Forum Discussion
Altera_Forum
Honored Contributor
21 years agohow to place firmware in ROM
I use NIOSII IDE ( Version: 1.1.0 Build: 137 ) to write c software for a design consisting of SRAM, peripherals and a PCI-Interface. Booting is done via EPCS and a short programme initializes all per...
Altera_Forum
Honored Contributor
21 years agoYou can do it with functions, but you must put the attribute on the declaration, not the definition. So your code would look something like this:
void function(void) __attribute__ ((section (".memory_name")));
void function(void)
{
/* stuff */
} Of course the declaration will often be in a header file.