LPC54018 running code from SRAM0

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

LPC54018 running code from SRAM0

Jump to solution
1,094 Views
danielgull
Contributor IV

Hi

I am running the MCUXpresso SDK 2.7.0 demo app "hello_world" using IAR. It works fine when code is executed from SRAMX. I would like to have the code execute from SRAM0. However I cannot get it to run. I get an Warning when I download the firmware: "Warning: Stack pointer is setup to incorrect alignment. Stack addr = 0x9081F4D5". What am I doing wrong, and how can I get the code to execute from SRAM0 in place of SRAMX - see attached my examples for debug reference.

Many thanks

Dani

Labels (1)
Tags (2)
0 Kudos
1 Solution
1,001 Views
danielgull
Contributor IV

Hi Xiangjun

I managed to get the software up and running. I had a problem with the ISP pins on startup that did not allow the chip to enter the correct boot ROM sequence showing up as having the program counter in an undefined location with an address of 0x9xxxxxxx. This item is solved for me.

Many thanks

Dani

View solution in original post

0 Kudos
3 Replies
1,001 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,Daniel,

Unfortunately, my license of IAR tools has expired, so I can not compile it. I will try to apply a new license.

Regarding the stack pointer initialization, I think it is similar with the MCUEpresso tools. So the . = ALIGN(4) and -StackSize must be in 4 boundary.

Hope it can help you

BR

Xiangjun Rong

pastedImage_1.png

pastedImage_2.png

0 Kudos
1,001 Views
danielgull
Contributor IV

Hi Xiangjun

Did you get your IAR license? I tried to find a solution with IAR, but so far I cannot see anything wrong in setting the stack pointer within the IAR IDE. I have a gut feeling that there is something wrong within the chip when the contents of SRAMX are copied to SRAM0-3 in the last step of the boot process. Here the stack pointer seems to get corrupted somehow and I need your help to get this use case running.

Many thanks

Dani

0 Kudos
1,002 Views
danielgull
Contributor IV

Hi Xiangjun

I managed to get the software up and running. I had a problem with the ISP pins on startup that did not allow the chip to enter the correct boot ROM sequence showing up as having the program counter in an undefined location with an address of 0x9xxxxxxx. This item is solved for me.

Many thanks

Dani

0 Kudos