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 ago[list][*]Use alt_main() instead of main().
[*]Copy the alt_sys_init() function that is generated in your system library over to your own source file [*]Delete any parts of your alt_sys_init() that you don't need. Make sure to give it a different name, if you're not just copying its code straight into your alt_main(). [*]So long as you don't reference anything in alt_sys_init.c (including globals), it won't link alt_sys_init.o into your executable. [/list]That should do it.