Can't restart debugger without reloading code

Discuss how to use the features of Atollic TrueSTUDIO, including the editor, assembler, C/C++ compiler, linker, debugger, static code analysis and team collaboration tools.

Moderators: Markus Girdland, Mattias Norlander

dex749
Posts: 2
Joined: Mon Jun 27, 2016 11:42 am

Can't restart debugger without reloading code

Postby dex749 » Mon Jun 27, 2016 1:35 pm

Looking for a solution to the following problem: Can't restart debug without reloading code

Processor: STM32F429
Debugger: ST/LINK

Good: Fire off debugger, code is transferred to platform flash, code executes to main and pauses
Good: Breakpoints work, singlestepping, etc.. work fine
Good: Terminate and relaunch works fine
Bad: Restart fails (debugger locks and is unresponsive)

Is there something that is needed (hardware and/or configuration) that the 'Restart' feature is expecting? I don't really like having to re-flash code to the platform just to restart program execution from the beginning (with no code changes).

Any ideas or guidance? Thanks.

dex749
Posts: 2
Joined: Mon Jun 27, 2016 11:42 am

- Update - I found the

Postby dex749 » Wed Jun 29, 2016 7:17 pm

- Update -

I found the problem. The root cause was that the device was configured to boot into system mode (via BOOT0/1 pins). This works fine when entering a fresh debugging session because firmware load and initial execution is under the control of the debug probe. However, when the restart button is clicked, execution path appears to be governed by the processor instead of the probe, allowing boot mode selection to lead to confusion. Ensuring that flash boot mode is selected while debugging solves the problem.

Lawrence
Posts: 53
Joined: Mon Nov 09, 2015 5:13 pm

Thank you for sharing this

Postby Lawrence » Wed Jun 29, 2016 10:17 pm

Thank you for sharing this problem, its with people like you that this forum will grow and become good and lively.

Expect me to do the same.

bertrand
Posts: 5
Joined: Sun Feb 25, 2018 2:17 pm

Re: Can't restart debugger without reloading code

Postby bertrand » Sun Feb 25, 2018 2:25 pm

Hello,
I have similar problem, but despite information given in previous post I am not able to solve my problem.
When I enter in debug mode for the first time all work fine, but if I "restart", I fall in NVIC infinite routine after I enable it ( HAL_NVIC_EnableIRQ(DMA1_Channel1_IRQn) because the signal handler is called.
It's an initialisation issue but I don't find where.
It could be a code issue, but it works at the fisrt time and it is the portion automaticly supplied by CubeMX.
The onbly workaround is to reload the debugger.

Thanks for your advise.

BR
Bertrand
useful serial debug app with plotter : https://github.com/mindstorm38/debug-sensor

Martxel
Posts: 1
Joined: Thu Feb 22, 2018 12:14 pm

Re: Can't restart debugger without reloading code

Postby Martxel » Mon Feb 26, 2018 9:22 am

I have the same issue.

It's a project generated with CubeMX based on STM32H7 + FreeRTOS.

If I try to restart the debugging session, once the IRQ of TIMER1 is enabled in the HAL_Init (HAL_InitTick), it ends up in a loop.

The only workaround I've found is to leave and re-enter debug.

bertrand
Posts: 5
Joined: Sun Feb 25, 2018 2:17 pm

Re: Can't restart debugger without reloading code

Postby bertrand » Mon Feb 26, 2018 9:28 am

Ok, I am a new user of TrueStudio. I worked with openstm32 before. I had not this behaviour with openstm32. So, maybe it could be a configuration problem with Turestudio.
Bertrand
useful serial debug app with plotter : https://github.com/mindstorm38/debug-sensor

JeromeBryant
Posts: 3
Joined: Tue May 08, 2018 2:30 pm

Re: - Update -I found the

Postby JeromeBryant » Tue May 08, 2018 2:35 pm

dex749 wrote:- Update -

I found the problem. The root cause was that the device was configured to boot into system mode (via BOOT0/1 pins). This works fine when entering a fresh debugging session because firmware load and initial execution is under the control of the debug probe. However, when the restart button is clicked, execution path appears to be governed by the processor instead of the probe, allowing boot mode selection to lead to confusion. Ensuring that flash boot mode is selected while debugging solves the problem.


yes, that is what will solve the problem

dirkvermaak
Posts: 11
Joined: Mon Dec 11, 2017 11:22 am
Location: United Kingdom
Contact:

Re: Can't restart debugger without reloading code

Postby dirkvermaak » Tue May 08, 2018 6:20 pm

I have long had this problem, but I don't quite understand the answer. Do you mean on the chip itself via the Boot Pins? (our chips are all pulled to boot this way), or do you mean a debugger setting somewhere and if so could you point me to it. It's a really annoying problem and I would love to fix it.
Andibee Ltd.
Loughborough
Leicestershire
LE11 3SJ

dirkvermaak@andibee.co.uk

Designing with STM32 since 2007

MRomano
Posts: 4
Joined: Mon Mar 12, 2018 6:56 am

Re: Can't restart debugger without reloading code

Postby MRomano » Fri May 18, 2018 2:14 pm

good morning,

I have the same problem, I use a Discovery kit with STM32F407VG CPU.
I have a system sw generated with Stm32CUBEMX.
The pin BOOT0 is connected to gnd, when I use the "Restart" function button the debug cursor returns to the first instruction of the main () function. By sending the application in run, it remains locked in a loop in the TIM1_UP_TIM10_IRQHandler function, and does not proceed with normal program execution.
To restore normal execution I have to end the debug session, reload the program and return to run again.

You can suggest some solution to my problem.

Thank you
Romano M.

dirkvermaak
Posts: 11
Joined: Mon Dec 11, 2017 11:22 am
Location: United Kingdom
Contact:

Re: Can't restart debugger without reloading code

Postby dirkvermaak » Fri May 18, 2018 5:19 pm

Exactly the problem we have, and we have used numerous development boards and our own designs. It happens on all of them. I have scoured the settings etc. but because it doesn't run the startup code again things seem to go badly. HELP! ANYONE?
Andibee Ltd.
Loughborough
Leicestershire
LE11 3SJ

dirkvermaak@andibee.co.uk

Designing with STM32 since 2007


Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: No registered users and 1 guest