Forum Discussion
Altera_Forum
Honored Contributor
15 years agowhere does code resides
one small querry.. when i use external SRAM in my design using nios2 for DE1 board my code wil be placed there in sram .. i want my code to be in onchip memory.. not sram.. how to do this..please he...
Altera_Forum
Honored Contributor
15 years agoOr try not to use any of the C library at all!
printf() pulls is a lot of code. You may have code to initialise/destroy stdin/stdout/stderr being exected before/after main() is called - this also pulls in malloc() etc. Calling your code alt_main() will remove the stdio stuff (this probably isn't the official way to do it! but worked for me). The linker map file (possibly with cross references) will show why each library function was added. Although I don't know how to persuade the IDE to generate it.