Forum Discussion
Altera_Forum
Honored Contributor
10 years agoYou can run nios2-stackreport on your *elf file. It should give you the code size.
For example: $ nios2-stackreport hello_world.elf Info: (hello_world.elf) 29 KBytes program size (code + initialized data). Info: 92 KBytes free for stack + heap. It shows me that the program size is 29KBytes. I have a 128KByte onchip-memory, thus it reported I have 92KBytes for stack and heap. You can reduce the size if you are sharing the onchip memory via nios2-bsp-editor/linker section. Or you can just split out the onchip memory to smaller size, ie 2 64KByte memory.