 
					
				
		
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
Solved! Go to Solution.
 
					
				
		
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
 
					
				
		
 xiangjun_rong
		
			xiangjun_rong
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
 
					
				
		
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
 
					
				
		
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
