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

SDK • Re: How to set an assembler routine to run in RAM?

$
0
0
The standard linker script puts everything in sections .time_critical.* into RAM.

So in a .S file you want something like:

Code:

.section .time_critical.my_function_name
Where for an ordinary piece of code (to go in flash unless the whole thing is build copy-to-ram) you would have written:

Code:

.section .text.my_function_name
You can use objdump -h to show you the sections in the .o files generated by the compiler/assembler. In the standard SDK build, your .o files end up in the CMakeFiles/my_program_name.dir subdirectory of the build directory. If you do that, you can see your C code getting split into .text.function_name for ordinary functions and .time_critical.function_name for ones where you've used __not_in_flash_func().

Statistics: Posted by arg001 — Fri Sep 13, 2024 7:50 am



Viewing all articles
Browse latest Browse all 4151

Trending Articles