JeffV
JeffV

Reputation: 54487

Place GCC assembler code section in RAM

I have an assembly function written for an embedded ARM project that I would like to tag with the attribute to place it in a RAM code section rather than flash. How do I specify this?

To do this for C I would use the section attribute:

int f (void) __attribute__ ((section (".ram"))) {...}

Thanks.

Upvotes: 1

Views: 1391

Answers (1)

Marat Dukhan
Marat Dukhan

Reputation: 12263

The exact answer depends on your target (bare metal? ELF?), but the following will likely work

.section .ram
YOUR ASSEMBLY CODE

Upvotes: 1

Related Questions