__not_in_flash_func() is a SDK macro, but all it does is to create a GCC __attribute__ to put the code in a particular section (rather than the default ".text"). The linker script then places that section in the same output section as the initialised variables, so that they get copied from flash to RAM at program startup.Thanks for the tips.I noticed all your anonymous __not_in_flash_func() ISRs which seem to be magically hooked up somewhere. It looks pretty funky but I probably have enough on my plate and don't need maximum optimisation, if I can split the load between the two cores. My code is only about 5% of the RAM available here.- I put all interrupt handlers in RAM
Sorry, yes - one core running mostly from flash doing slow stuff (but optionally with interrupt handlers in RAM), then the other core doing a limited selection of tasks all in RAM.Did you mean other core executing mostly from RAM, there ?and have the other core executing mostly from flash (handling whatever features of the application are most timing-critical).
However, in your case it sounds like it would all fit in RAM anyhow and you can avoid the problem, if only you could find where to flip the option.
In a vanilla SDK build with CMakelists.txt you just need:
Code:
pico_set_binary_type(ubhu_boot copy_to_ram)
Statistics: Posted by arg001 — Mon Aug 12, 2024 6:46 pm