I'm using an LPCXpresso54S018 board and debugging a FreeRTOS application.
I've not modified any debug settings, just pressing the Debug link in the Quickstart panel.
I see on my UART the application runs twice before halting. I assume at least one of these times is the code originally in Flash before we reprogram.
I'm a bit worried that running the application multiple times could set external peripherals in undesired states during boot.
Is there a way to set up the debugger such that it does not run the contents of the flash before it's been reprogrammed with the new build?
Please provide us more information thus we can check it in detail:
1. you use EVK board or custom PCB?
2. The problem may be related with part revision. Do you use rev 1B or 0A? please send us a photo of the part silkscreen.
3. Are there any pullup on ISP0-ISP2?
Thanks,
Jun Zhang
Hi, @andrewsglenn
You can set Disable use of preconnect script in the debug configuration as follows:
Hope this helps you.
Best regards, Alex
Hi Alex,
Thank you.
I still see my welcome message appear twice before the program halts at the beginning of main().
I think this means the program already in Flash memory is being executed twice before the new program is programmed into Flash, yes?
Glenn
Hi, @andrewsglenn
Could you please share the debug configuration information so that I can check it for you? If it is convenient, you can share it with me. Please refer to the attachment for my demo on MCXN947.
Note: The original program in the board is hello word
Hope this helps you.
Best regards, Alex
Hi Alex,
Here is my debug configuration.
I think I set it the same as yours, but I still get two reboots before the debugger halts.
My Flash driver reset handling was set to SOFT instead of Default, but changing it made no difference, neither did specifying a Reset handling option or setting disconnect behavior to No Change
I also tested with the freertos_hello demo and get the same response.
I also tested with the hello_world demo that does not use FreeRTOS. Same result.
Glenn
Hi, @andrewsglenn
Sorry, now, MCUXpresso IDE 11.10.0 is not publish. You can refer to my latest reply, I have tested it and it is OK.
Hope this helps you. If you have any questions, please contact me and I will try my best to help you.
Best regards, Alex
Unfortunately, setting that option seems to make this problem worse:
Hi, @andrewsglenn
Attached is the test I conducted using LPC54018, and no problem has occurred. What problem did you have in canceling "Pull ISP on reset"?
Best regards, Alex
I'm continually having problems with memory read errors on the board, which I mentioned in the other post.
Since I changed the "Pull ISP on Reset" the errors have become almost constant.
Is there a difference between the LPC54018 and the LPC54S018?
Hi, @andrewsglenn
LPC54018 and LPC54S018 are not very different in nature, LPC54S018 has more security zones. Can you tell me which version of the development board you are using?
LPC54S018 Rev version? If it is convenient, please take a clear photo of the text on the chip, I need to know the chip version.
Is it OK when you check "Pull ISP on Reset"?
Attached is the test I conducted on LPC54s018.
Best regards, Alex
Thank you. I'll update my IDE.
Regards
Glenn
Hi, @andrewsglenn
The current version also has a workaround:
Plese note that the preconnect scripts are available for some (newer) devices. LPC54S018M does not have a preconnect script.
For older LPC devices, including LPC54S018M, the IDE has a global LinkServer configuration - "Pull ISP on reset" - which is enabled by default.
When set, the IDE sends `WireISPReset 1" commands to the probe. This command triggers intermediary reset.
An option would be to disable this configuration:
Best regards, Alex
Hi, @andrewsglenn
According to the problem you mentioned, I have conducted experiments with LPC54S018. Indeed, setting the debugging configuration Disable use of preconnect script does not work, and the program will be reset and run before downloading. I have reported this problem to MCUXpresso IDE, and I will inform you as soon as there is any new information.
Best regards, Alex