Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7742

MicroPython • Re: Running SDK-C Code on Core in MicroPython

$
0
0
So something to do with stacks I would presume. Perhaps launching Core 1 without a specified stack is smashing Core 0's stack ?
Serendipitously, a change to MicroPython which broke the build of my fork of MicroPython, produced this linker report for vanilla MicroPython for the RP2040 -

Code:

[ 98%] Linking CXX executable firmware.elfMemory region         Used Size  Region Size  %age Used           FLASH:      341128 B       640 KB     52.05%        FLASH_FS:          0 GB      1408 KB      0.00%             RAM:       12504 B       256 KB      4.77%       SCRATCH_X:          0 GB         0 GB       SCRATCH_Y:          8 KB         8 KB    100.00%
It seems to me the linker script MicroPython uses treats Scratch X and Y as a single 8KB area and not as the two 4KB areas they normally are for Pico SDK builds, as I think MicroPython also did some time ago.

I don't know what affect calling 'multicore_launch_core1' with a default stack now has. Smashing Core 0's stack may be the result, or it may be triggering the stack guard for that.

Statistics: Posted by hippy — Thu May 28, 2026 7:19 pm



Viewing all articles
Browse latest Browse all 7742

Latest Images

Trending Articles



Latest Images