Forum Discussion
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- Hi, Attached is my solution. In the .zip, you have all the files needed for the .bat. 1) Enter your application address (IMAGE_START) in boot_loader_epcs_bits_sii_siii_ciii.S file 2) running this .bat 3) copy SOPC_2Dcam_epcs_flash_controller_0_boot_rom_synth.hex in your <project>/SOPC_folder/synthesis/submodules/ 4) In Quartus, Processing -> Update Memory Initialization File 5) In Quartus, Processing -> Start -> Start Assembler Be careful, the .bat is for Quartus v11.1, if you are using another version. Open the .bat file with a text editor and change all 11.1 with your version number. for example: --- Quote End --- Thank you for your reply! I just tried your code and got the correct .hex file. But now I am falling in another confusing issue. This afternoon I found another solution which is more complicate than yours. I just modified the "boot_loader_epcs_bits_sii_siii_ciii.S" file as st_f introduced in# 4 of this thread. After executing "make" command in Shell, I then used this command
nios2-elf-objdump -D boot_loader_epcs_sii_siii_ciii.elf > info.txt to get the address information of the boot loader code. By checking the info.txt file, I found the boot loader codes start at address 0x1054, not 0x0. I have attached the info.txt file. I think that's why the commandelf2hex --input=obj\boot_loader_epcs_sii_siii_ciii.elf --output=kernel_epcs_boot_rom_synth.hex --width=32 --base=0 --end=0x3FF --record=4 will generate a .hex file with all 0. So I changed the command parameters to "--base=0x1054 --end=1453" and I got the correct boot loader code file(.hex file). I also opened your .bat file and found you use the elf2hex command with "--base=0". But your .bat file can generate the correct .hex file. I want know why this happen and what's the difference? -wei