i grabbed your broken code, and adjusted my cmake file slightly with: set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-usage")
after building it, this file was produced:that tells me that main() is using 4104 bytes of stack space
and the stack is 0x800 bytes (2048) in size
so thats another way to confirm the failure offline
after building it, this file was produced:
Code:
[clever@amd-nixos:~/apps/rpi/pico/pico-examples/build/randomdemo]$ cat ./CMakeFiles/randomdemo.dir/demo.c.su/home/clever/apps/rpi/pico/pico-examples/randomdemo/demo.c:7:6:core1_entry 8 static/home/clever/apps/rpi/pico/pico-examples/randomdemo/demo.c:14:5:main 4104 static
Code:
[clever@amd-nixos:~/apps/rpi/pico/pico-examples/build/randomdemo]$ less randomdemo.elf.map .stack1_dummy 0x0000000020040000 0x800.stack_dummy 0x0000000020041000 0x800
so thats another way to confirm the failure offline
Statistics: Posted by cleverca22 — Wed Jan 03, 2024 2:05 am