Forum Discussion
Altera_Forum
Honored Contributor
15 years agoOutsource a funktion to a flash device
Hallo together, I have a QSys System with a Nios II and an EPCS controller, using a Cyclone IV. The CIV boots from an EPCS-Flash and starts the Software. Now I want to outsource some ...
Altera_Forum
Honored Contributor
15 years agoWhile technically possible, you'll need to write a lot of infrastructure to do this. Code overlays haven't been used much since 32bit address spaces and paged memory became common.
I'm not even sure the gnu linker will put multiple code blocks at the same physical adress, but at different virtual addresses. You might be better off trying to reduce the code size by ensuring everything is compiled with the optimiser (try -O2, -O3 and -Os, and possibly mark some functions as 'noinline'), reducing the use of libc (especially stdio and malloc) to the minimum. Even changes to the C source (eg careful use of local variables to avoid repeated memory accesses) can reduce the code size.