Forum Discussion
Altera_Forum
Honored Contributor
20 years agoHow to make very compact code
I have some code that gets run whenever the processor is reset and basically reads a register continually, waits for it to be set to '1' and when it is, sets up a DMA (by setting the register...
Altera_Forum
Honored Contributor
20 years agoI did it by editing the NIOS-II installation.
Comment out unnecesary calls from components\altera_hal\HAL\src\alt_main.c Comment out all .c files from the makefile components\altera_hal\HAL\src\component.mk - leaving these: C_LIB_SRCS += alt_main.c alt_irq_handler.c alt_irq_register.c You may also need to comment out lines from other makefiles - such as components\altera_avalon_cfi_flash\HAL\src\component.mk (remove all of the entries) Also make sure you set compiler optimisations to "minimum size", and also tick the "small C library" option.