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

SDK • Re: Less code compiles larger

$
0
0
The only way to know for sure is to go and look at the assembly generated - either the disassembly of the entire program that the SDK build generates as a .dis alongside your .uf2 and .elf files, or by disassembling an individual .o file:

Code:

arm-none-eabi-objdump -r -S myfile.o
It can sometimes be tricky to find the section of code that's of interest in a large function; sometimes I insert something like this:

Code:

asm volatile("foobar:");
which has no effect on the code generated but adds a symbol to the output - you can then search the .dis file for <foo> to find the point in the disassembly corresponding to where you put the label in the source.

Statistics: Posted by arg001 — Sun Oct 13, 2024 9:20 am



Viewing all articles
Browse latest Browse all 8037

Trending Articles