arch: rp2040: Fix the initial stack pointer

Summary:
- The NuttX for raspberrypi-pico boots via the boot_stage2 provided
  by the pico-sdk which sets the MSP at the end of the SRAM.
- However, the NuttX expects the MSP is set to the top of the idle stack.
- This commit fixes this issue.

Impact:
- None

Testing:
- Tested with nsh, nshsram and smp configrations
This commit is contained in:
Masayuki Ishikawa 2021-04-25 10:54:50 +09:00 committed by Xiang Xiao
parent 05f743aa3a
commit dc9223f4cf

View File

@ -89,6 +89,10 @@ void __start(void)
uint32_t *dest;
int i;
/* Set MSP to the top of the IDLE stack */
__asm__ __volatile__ ("\tmsr msp, %0\n" :: "r" (g_idle_topstack));
if (up_cpu_index() != 0)
{
while (1)