Forum Discussion
Altera_Forum
Honored Contributor
14 years agoAlso, if you want to have code/data into multiple sections, you need to consider how the 'load' process will work.
The JTAG loader uses the elf program headers to work out where to write each code/data area - so can load directly into the relevant area. The EPCS loader can only load one big chunk of data - so must load into external memory - code is added to alt_main() to copy the code/data to its correct physical address. The Altera linker scripts assume you are going to use (something like) the EPCS loader. This means they just don't work if you are trying to only use tightly coupled memory. You might also find that a lot of your code size it just bloat caused by using printf() and the malloc/free that happen in order to let you call printf().