AnsweredAssumed Answered

target halted due to breakpoint

Question asked by Takayoshi Ishii on Jun 22, 2017
Latest reply on Jun 26, 2017 by Takayoshi Ishii

Hello, I'm a new with STM32.

 

I have Nucloe-N053R8, Win8.1, SystemWorkbench.

I made a short program and it seems that I could send the program to the Nucloe-board, but it doesn't work. I can see the console said "target halted due to breakpoint". But there is no breakpoint.

Nucleo-board have LED as LD2, connected PA5. My program wants to blink it. I just did click the "RUN" button on the Systemworkbench.

I have no idea whether my program is incorrect or if the operation of Workbench is incorrect.

---my program----


#include "stm32l0xx.h"
#include "stm32l0xx_nucleo.h"
#include "stm32l0xx_hal_gpio.h"

int main(void)
{

HAL_Init();

GPIO_InitTypeDef pin_PA5;
pin_PA5.Mode = GPIO_MODE_OUTPUT_PP;
pin_PA5.Pin = GPIO_PIN_5;
HAL_GPIO_Init(GPIOA, &pin_PA5);

HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_SET);

for(;;){
double i=0;
while(1){
i = i +1;
if(i>100000){
break;
}
}
HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_5);
}
}

 

---the console result---

Open On-Chip Debugger 0.10.0-dev-00278-ga53935e-dirty (2017-05-09-09:25)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_assert_srst
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 480 kHz
adapter_nsrst_delay: 100
Info : clock speed 480 kHz
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : STLINK v2 JTAG v28 API v2 M v18 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.261782
Info : STM32L053R8Tx.cpu: hardware has 4 breakpoints, 2 watchpoints
STM32L053R8Tx.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0xf1000000 pc: 0x08001190 msp: 0x20002000
STM32L0: Enabling HSI16
** Programming Started **
auto erase enabled
Info : Device: STM32L0xx (Cat. 3)
Info : STM32L flash size is 64kb, base address is 0x8000000
STM32L053R8Tx.cpu: target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000000e msp: 0x20002000
STM32L053R8Tx.cpu: target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000000e msp: 0x20002000
wrote 8192 bytes from file Debug/Nucleo-L053R8_disc4.elf in 1.288458s (6.209 KiB/s)
** Programming Finished **
** Verify Started **
STM32L053R8Tx.cpu: target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20002000
STM32L053R8Tx.cpu: target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20002000
verified 6136 bytes in 0.098492s (60.839 KiB/s)
** Verified OK **
** Resetting Target **
shutdown command invoked

Outcomes