Altera_Forum
Honored Contributor
20 years agoBootloader size
Hi!
I'm writing a bootloader for NIOSII to load my application from an rs232 uart into SDRAM. What I'm trying to do is pretty much the same as described in this topic: http://www.niosforum.com/forum/index.php?s...t=0&#entry10330 (http://www.niosforum.com/forum/index.php?showtopic=2636&pid=10330&st=0&#entry10330) I have a problem with the size of my bootloader. All the code I have written is: int main() { int i; for (i=0; i<13;i++); return i; } When I compile this, the linker output is as follows: Info: (boot_loader.elf) 4684 Bytes program size (code + initialized data). Why is my image so big? When I view the .elf file in the Nios II IDE, I see many symbols that I don't use, quite a few of them with an alt_ prefix. Since I never refer to them, I thought they would be stripped away at linking time, but it doesn't seem that way. Anybody got any hints/suggestions?