Hello,
I have a little bit strange behavior of NECTO in debug mode, and I hope it is not an intended function.
If I build my project successfully and afterwards click on "Debug", the project will be downloaded to the board.
However, it will also be immediately started. I can recognize this by the UART output I see.
It takes a while, maybe a few hundred milliseconds, before the debugger takes control.
Then, the debugger correctly starts at "main()".
If a program is buggy, and I recompile the updated version, I don't want the new version already running before I check
everything. In other words: the debugger should hold the processor at "main()" and only execute the code I allow him to execute.
Usually other debuggers run the code until "main()" and stop there, or even provide an option to select how far the processor should go.
Changing the options of CODEGRIP to "Connection: Under reset" or "Hold on connect: Enabled" doesn't help.
Please advice
with best regards
Frank
My Configuration:
Fusion for STM32 v8
mikroC AI for ARM
mikroSDK v.2.6.0
STM32F407ZG
CODEGRIP
168MHz#
no display
[NECTO Studio 2.0] Debug Mode: program will already start
-
- Posts: 96
- Joined: 09 Apr 2021 20:37
[NECTO Studio 2.0] Debug Mode: program will already start
Kind regards
Frank
Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2
Frank
Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2
Re: [NECTO Studio 2.0] Debug Mode: program will already start
Hi,
What you are observing is a typical behavior - upon programming the user code will be executed for a very short time, and when NECTO Studio enters debug mode it will reset and halt MCU.
Regards,
Filip.
What you are observing is a typical behavior - upon programming the user code will be executed for a very short time, and when NECTO Studio enters debug mode it will reset and halt MCU.
Regards,
Filip.
-
- Posts: 96
- Joined: 09 Apr 2021 20:37
Re: [NECTO Studio 2.0] Debug Mode: program will already start
Hi Filip,
I thought two days about what to reply to your statement "is a typical behavior".
My answer: it is not a correct behavior!
Let's discuss this offline.
Kind regards
Frank
I thought two days about what to reply to your statement "is a typical behavior".
My answer: it is not a correct behavior!
Let's discuss this offline.
Kind regards
Frank
Kind regards
Frank
Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2
Frank
Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2
-
- Posts: 96
- Joined: 09 Apr 2021 20:37
Re: [NECTO Studio 2.0] Debug Mode: program will already start
Hi Filip,
in other thread I found an interesting comment about an option called "Halt after programming".
As I'm not familiar with the history of CODEGRIP, I can only assume that it might be available in earlier versions
of the CODEGRIP suite.
Is there a chance to enable this function ?
kind regards
Frank
PS: actually it seems that this discussion is on the wrong board and maybe should be moved to the CODEGRIP board.
in other thread I found an interesting comment about an option called "Halt after programming".
As I'm not familiar with the history of CODEGRIP, I can only assume that it might be available in earlier versions
of the CODEGRIP suite.
Is there a chance to enable this function ?
kind regards
Frank
PS: actually it seems that this discussion is on the wrong board and maybe should be moved to the CODEGRIP board.
Kind regards
Frank
Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2
Frank
Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2
Re: [NECTO Studio 2.0] Debug Mode: program will already start
Hi,
You can set this option in the CODEGRIP Suite application, Click on the target MCU, choose Options and enable/disable Halt on Connect option.
Regards,
Filip.
You can set this option in the CODEGRIP Suite application, Click on the target MCU, choose Options and enable/disable Halt on Connect option.
Regards,
Filip.
-
- Posts: 96
- Joined: 09 Apr 2021 20:37
Re: [NECTO Studio 2.0] Debug Mode: program will already start
Hi Filip,
thank you for your suggestion.
I think "hold on connect" is different to "hold after programming".
If I remember well, the description of "hold on connect" is, to connect CODEGRIP to a running target and hold it.
What I'm looking for is a "program the device, reset, and keep it in hold/reset during connect" or something similar.
Sorry for my poor explanation. I'm just a user, not an IDE development expert. I just thought that "hold after programming"
sounds promising to solve my issue.
with best regards
Frank
thank you for your suggestion.
I think "hold on connect" is different to "hold after programming".
If I remember well, the description of "hold on connect" is, to connect CODEGRIP to a running target and hold it.
What I'm looking for is a "program the device, reset, and keep it in hold/reset during connect" or something similar.
Sorry for my poor explanation. I'm just a user, not an IDE development expert. I just thought that "hold after programming"
sounds promising to solve my issue.
with best regards
Frank
Kind regards
Frank
Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2
Frank
Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2
-
- Posts: 96
- Joined: 09 Apr 2021 20:37
Re: [NECTO Studio 2.0] Debug Mode: program will already start
Hi Filip,
I have to say, "just by chance" I found a menu entry called "Start HW Debugging" under "Debugger".
It seems that this is already half way the direction I want. It starts the debugging at main(), and doesn't
execute the program beforehand.
The down side is, that it doesn't build nor starts the programmer. In other words, I'm back at square one,
as I first need to use the programmer or standard debug function, which already starts the program, what
I try to avoid.
I'm very much surprised that it seems that I'm the only one having this issue.
Is there a user manual for Necto where I can find the difference between "Debug" and "HW Debugging" ?
I have to say, "just by chance" I found a menu entry called "Start HW Debugging" under "Debugger".
It seems that this is already half way the direction I want. It starts the debugging at main(), and doesn't
execute the program beforehand.
The down side is, that it doesn't build nor starts the programmer. In other words, I'm back at square one,
as I first need to use the programmer or standard debug function, which already starts the program, what
I try to avoid.
I'm very much surprised that it seems that I'm the only one having this issue.
Is there a user manual for Necto where I can find the difference between "Debug" and "HW Debugging" ?
Kind regards
Frank
Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2
Frank
Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2
-
- Posts: 96
- Joined: 09 Apr 2021 20:37
Re: [NECTO Studio 2.0] Debug Mode: program will already start
Hi,
just tried this with an external CODEGRIP, simply assuming the on-board CODEGRIP might have an issue.
However, even with an external CODEGRIP the program is already started under Debug mode, independently of the reset strategy.
It also ignores the breakpoint at main() and simply runs the program for a while, until stopped by the debugger, starting from the
reset point again and stopping at main now.
PLease note that at this point in time already a lot of initialization has been done and maybe, under bad circumstances, the board has
been destroyed by a buggy program, not halting under debug mode.
Please advice
just tried this with an external CODEGRIP, simply assuming the on-board CODEGRIP might have an issue.
However, even with an external CODEGRIP the program is already started under Debug mode, independently of the reset strategy.
It also ignores the breakpoint at main() and simply runs the program for a while, until stopped by the debugger, starting from the
reset point again and stopping at main now.
PLease note that at this point in time already a lot of initialization has been done and maybe, under bad circumstances, the board has
been destroyed by a buggy program, not halting under debug mode.
Please advice
Kind regards
Frank
Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2
Frank
Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2
Re: [NECTO Studio 2.0] Debug Mode: program will already start
Hi,
thank you for your observation, I will pass this to our development team.
Regards,
Filip.
thank you for your observation, I will pass this to our development team.
Regards,
Filip.