Altera_Forum
Honored Contributor
13 years agoProblem with Advanced Bootcopier
I am trying to implement the advanced boot copier in my Nios Design and at the moment I am not able get it work.
First of all I included the advanced_boot_copier.h to my design and set the advanced_boot_copier.c as my main programm. In the next step I modified this files so they match with my design. I choose#define BOOT_METHOD BOOT_EPCS_FROM_ONCHIP_ROMAnd also rename the base adress to my EPCS Controller. Then I generated an application programm. Just Hello World via jtag uart. I took the .elf file like in the Applikation AN458 mentioned and convert it via the make_flash_image_script into a .bin file with the expected header for the bootloader. Now I generate from the bin file a flash file with the location 0x00060000. And programmed it into the epcs flash with the nios2-flash-programmer. I used the Eclipse enviroment to debug my bootloader and it get stuck at the point where it should copy the content of my epcs flash. Now from the debugger I can see that I get at this point in the programm the following length and address values: length =0xd9c00815 address =0xb307a I think these values must be wrong the length defines the byte length of the software image didn't it? So I checked the bin file with a hex editor. A modified sreenshot is in the attachment. I am wondering why the bytes in the .bin files are inverted from right to left But besites that, it seems ok. In my opinion the programm reads the right values. Is there maybe a mistake in the make_flash_image_script script. Did I have to change something there. Did anyone here have had the same problem or knows a solution?