cancel
Showing results for 
Search instead for 
Did you mean: 

How to tell how big my program is?

deep_rune
Associate III

i have a program with a BIG lookup table. The program compiles fine except for if i reference the lookup table, then it quits with one error and doesn't tell me what the error is.

How can i tell how big the compiled program - would be - with the lookup table? how can i confirm the error is because of the lookup table?

5 REPLIES 5
Uwe Bonnes
Principal II

Perhaps arm-none-eabi-nm *.elf?

S.Ma
Principal

Does it fail at compile or link step? Usually linker automatically try to remove from memories stuffs that seems unused.

Try to compile half size of the LUT to see what happen. Are your LUT function pointer or 32 bit aligned structure or something more exotic?

Jack Peacock_2
Senior III

The linker has an option to generate a map file. This text file shows where all globals are placed in the memory space of the controller. Typically the end of flash image will be where the C runtime variable initialization section ends. The end of each SRAM section can be found from the addresses where space is allocated.

Jack Peacock

If a linker error, and one where no .MAP is generated, you could expand the FLASH size in linker script, scatter file, or UI to be something massive like 64MB so that the linker can get closure, and then review the .MAP

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Piranha
Chief II

Typically the size of LUT is known. If that's the case, then just add it to the size of firmware without LUT.