Forum Discussion
Altera_Forum
Honored Contributor
21 years agoGo into the Nios II IDE and create a new "Hello Freestanding" project. This is intended for more advanced users who want to squeeze every last byte out - the source code has comments that can assist you.
What you will want to do is build the free-standing example, and then alter the "alt_sys_init()" code we generate -- this function basically calls the initialization routines of the various peripherals in your system... you can just comment out the ones you dont want to use to save space. A note, though, if you modify the file with this alt_sys_init code, it will be over-written if you re-build (auto-generated file), it would be best to save your changes as your own source file/subroutine name and call that during boot-up. PS: Before you do this, you might also consider building the hello_world example and looking at the comments in its sorce file; it has instructions to reduce code size without switching over to the "freestanding" example.