Altera_Forum
Honored Contributor
14 years agoHow do I get smallest NIOS2 code footprint possible?
Greetings
I am trying to shrink my NIOS2 boot code to as small as possible so that it takes up the minimum amount of on-board RAM possible. I have disabled all possible drivers in the BSP editor and have enabled the small C library. When I write the following program: while( 1 ) continue; the code footprint is still around 3kB. I understand that the CRT will take up a little space, but the objdump shows that I'm linking in, among other things, "alt_release_fd, close, _do_ctors, _do_dtors, alt_get_errno, and various other seemingly irrelevant pieces of code". Is there a way to get rid of these bits of code that I don't really need? Can I build code without the HAL? Thank you Scott Wild