2020-07-08 06:15 AM
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?
2020-07-08 07:50 AM
Perhaps arm-none-eabi-nm *.elf?
2020-07-08 12:13 PM
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?
2020-07-08 12:53 PM
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
2020-07-08 02:17 PM
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
2020-07-11 01:36 AM
Typically the size of LUT is known. If that's the case, then just add it to the size of firmware without LUT.