You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For extra optimisation by reducing flash operations to a maximum, we added the set(PICO_COPY_TO_RAM 1) to our project's CMakeList.
The program's code includes read-only data that we include using .incbin, and placed in .rodata using .section .flashdata at the top of the assembly file.
According to linker scripts in pico-sdk, .flashdata sections are placed in .rodata, which is what happens. The output .elf has all the data in the correct place. However, the resulting .uf2 image is way smaller than it should be prior to adding PICO_COPY_TO_RAM. On one hand this makes sense because you'd only want to keep the actual program code that can fit in ram. But on the other hand, the documentation outlines how .flashdata will force variables and data to be kept in the final program and stored in flash.
Is there something we may be doing wrong with our usage of PICO_COPY_TO_RAM ? Is stripping .rodata intended and we should program the flash with read-only data another way ?
The text was updated successfully, but these errors were encountered:
For extra optimisation by reducing flash operations to a maximum, we added the
set(PICO_COPY_TO_RAM 1)
to our project's CMakeList.The program's code includes read-only data that we include using .incbin, and placed in .rodata using
.section .flashdata
at the top of the assembly file.According to linker scripts in pico-sdk, .flashdata sections are placed in .rodata, which is what happens. The output .elf has all the data in the correct place. However, the resulting .uf2 image is way smaller than it should be prior to adding PICO_COPY_TO_RAM. On one hand this makes sense because you'd only want to keep the actual program code that can fit in ram. But on the other hand, the documentation outlines how .flashdata will force variables and data to be kept in the final program and stored in flash.
Is there something we may be doing wrong with our usage of PICO_COPY_TO_RAM ? Is stripping .rodata intended and we should program the flash with read-only data another way ?
The text was updated successfully, but these errors were encountered: