Quantcast
Viewing all articles
Browse latest Browse all 5114

SDK • Put code in the Stack section

Hi,

I am working on a really time critical code.
Part of the code is randomly longer, surely due to memory access conflict (Both core are used)

The core1 run a 1700bytes code in RAM and use almost no Stack.

Then, I can surely have 1K for the Stack and 3K for the code.

I tried this:

Code:

void __attribute__((section(".stack1_dummy")))  (main_core1)(void)
The MAP look like this:
0x20027198 __HeapLimit = .

.stack1_dummy 0x20040000 0xe50
*(.stack1*)
.stack1_dummy 0x20040000 0x62c CMakeFiles/picomem.dir/picomem.cpp.obj
0x20040000 main_core1()
*fill* 0x2004062c 0x4
.stack1_dummy.__stub
0x20040630 0x20 linker stubs
.stack1 0x20040650 0x800 CMakeFiles/picomem.dir/E_/Code/Pico/pico-sdk/src/rp2_common/pico_multicore/multicore.c.obj
But anyway, I have a link error Image may be NSFW.
Clik here to view.
:(
[build] [ 12%] Building CXX object CMakeFiles/picomem.dir/picomem.cpp.obj
[build] [ 14%] Linking CXX executable picomem.elf
[build] ERROR: ELF contains memory contents for uninitialized memory at 0x0000000020040000
Does anybody know how I can do this ?

Statistics: Posted by FreddyV — Wed Dec 27, 2023 9:35 pm



Viewing all articles
Browse latest Browse all 5114

Trending Articles