Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- Hi, The source code for the default bootloader is included in the Quartus distribution (C:\altera\11.1\ip\altera\nios2_ip\altera_nios2\boot_loader_sources) and must be modified for the application image. First you change the assembly file boot_loader_epcs_bits_sii_siii_ciii.S so that the bootloader for the application image jumps to the Nios code for the application image (which is just after the FPGA configuration for EPCS). Here is one way to change to this code: 1) Add a define to the offset to the application image:# define IMAGE_START 0x00440000 2) Replace all occurencs of the following code : (several places in the code) movi r_flash_ptr, xx with: movhi r_flash_ptr, %hi(IMAGE_START) ori r_flash_ptr, r_flash_ptr, xx 3) Add the following statement before fp_short_circuit: orhi r_flash_ptr, r_flash_ptr, %hi(IMAGE_START) This should work if the 16 lower bits of IMAGE_START are 0. Then run make (Last time I tried it I only got it working with the gcc3 quartus 10.0, not with gcc4). Then go to the obj directory and run: elf2hex --input="boot_loader_epcs_sii_siii_ciii.elf" --output="epcs_controller_boot_rom.hex" --base=0 --width=32 --end=1023 --record=4 --lower You must then replace the boot rom file in your design with this file. In Quartus 11.1 the file name may be changed to epcs_flash_controller_boot_rom_synth.hex. Note that you do not have to recompile the whole design, you just select 'Update Memory Iniialization File' in Quartus and run the asssembler after changing the bootloader. I have tested this for Stratix II,III,IV and Cyclone IV. --- Quote End --- Hi st_f, Do you have an idea how to change the bootloader on Quartus 12.1sp1 for a Cyclone IV GX? Thanks Regards