LPC54018 running code from SRAM0

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPC54018 running code from SRAM0

跳至解决方案
1,205 次查看
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

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
1,112 次查看
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 项奖励
回复
3 回复数
1,112 次查看
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 项奖励
回复
1,112 次查看
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 项奖励
回复
1,113 次查看
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 项奖励
回复