Debug FREERtos code inside IRAM **ONLY** problems

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debug FREERtos code inside IRAM **ONLY** problems

144 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by zextcom on Thu Nov 13 04:25:40 MST 2014
Hello all, I'm a new LPC developer from few days.
I'm working on a Seriz II board based on LPC4350 and LPC Link2 debugging probe, LPCXpresso 7.5, the latest.
I attached the usual Blinky example project based on FreeRTOS,without any reference to board. It does work perfectly when debugging from SPIFI flash.
Then I wanted to debug it directly to SRAM (avoiding re-writing of SPIFI flash each time) and found that LPCXpresso has functionality for it:
1) Under Project properties->C/C++ Build -> Settings ->Managed Linked Script there's a NEW (UNDOCUMENTED) feature that generates automatically a linker script placed in SRAM : Link application to SRAM

It really does its job but I didn't find info about it anywhere, neither inside LPCXpresso help file  :~

2) Then in Debug Configurations/Debugger/Reset Script   I set the LPC18LPC43RamReset.scp script.

Debugging the code seems working correctly: code starts at reset function and runs perfectly until vTaskStartScheduler(); function is called.
After this point the code continuously breaks at static void prvPortStartFirstTask( void ) function (FreeRTOS) with INTSIG interrupt. No way to execute any other part of code.

I suppose the problem is related to INTERRUPT vector relocation but wasn't able to find a solution. I searched a lot in this forum (and google) and found many discussion about placing code in IRAM but nothing that helped me.

I would like also to run code in IRAM for production, so to have code flashed in SPIFI and copied to ram in startup code at reset.
So would be helpful to have a solution for both DEBUG and PRODUCTION.
I hope any help.
Thanks a lot
Manlio
0 Kudos
0 Replies