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 peripherals and PCI. Now the SRAM is mapped into PCI space to load the actual software for NIOS by a linux host. In the meantime NIOS runs in internal ROM (in a wait loop) until download has finished.
How can I force the compiler / linker to place one function into this internal ROM? Adding __attribute__ ((section (".waitrom"))) doesn't work with functions. It's no problem with variables and constants so I've created an const array filled with assemby code. But how can I do this with a standard c-function? Mike