Forum Discussion
Altera_Forum
Honored Contributor
19 years agoHello jakobjones,
if I understand you correctly, you want different code executed on your coprocessor. This code is generated off-line on the development system, not on-the-fly on your master. The gnutools offer to put your code / data / whatever of your program in different "sections". Normally these sections are .text for function code .data for initialized global variables and .bss for unitialized global variables. But you can instruct gcc to put your "special function" in a section all of its own. Maybe call it ".replace". Then modify your linker script to link this section to a known address. Then you can use the program objcopy (well, nios2-elf-objcopy) to generate a s-record file or a binary file. Then you can download this to your system. Please tell if my explanation is too short.