Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

Remote Update Controller - Problem

Hallo together,

I'm using an Cyclone iv. What I want to do is to switch between a factory image and a user image in epcs64.

So I thought I could simply use the Remote Update Controller. I programmed the flash like this:

0x000000: Hardware_Image_1

0xxxxxxxx: Software_Image_1

...

0x100000: Hardware_Image_2

0xxxxxxxx: Software_Image_2

Hardware_Image_1+Software_Image_1 are loaded correct over the epcs-controller (default boot copier). Software_Image_1 then induces a reconfiguration after a short time.

Then Hardware_Image_2 is loaded (I can see that at some LEDs) but here comes the Problem: not Software_Image_2 but Software_Image_1 is loaded! (Hardware_Image_1 and Hardware_Image_2 are equivalent except the offset in flash and two LEDs. The Qsys System is the same).

So is it right that I had to modify the default boot copier to load the right Software Image??

How could I do this?

If my way of looking at this problem is right, I had to modify the default boot copier in the following way:

1) I had to identify in the boot copier which hw-image has been loaded.

2) If I had done this, I had to load the sw-image behind the hw-image which has been loaded.

So, I have no idea how could I modify the default boot copier in this way. I hope someone could help me.

Thanks for your Help!

15 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hallo,

    I will try to remember. :)

    The boot copier loads the software image with reference to the base address of the Hw_Image_1. So the copier takes this base address and calculates the offset to find the Sw- Image.

    To load the Sw_Image_2 I modified the pointer on the base address.

    I modified only the file "boot_loader_epcs_bits_sii_siii_ciii.S".

    Every time the command

    movi r_flash_ptr, address_original

    appears, I replaced it with

    mov r_flash_ptr, hw_image_2_base_address

    addi r_flash_ptr, r_flash_ptr, address_originalSo the boot copier doesn't start his search at address 0x0000 (where Hw_image_1 was located), but he starts at the base address of Hw_image_2.

    The hw_image_2_base_address could be defined in boot_loader.h.

    I'm sorry, but I could not provide the modified source code, because I made this changes for someone else and I can't find a copy of the modified code. Maybe I deleted it...

    But I hope this information would help you.

    Greets.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Does that answer help?

    I'm now facing with a new question. I recognized now (never before) that the remote update controller, which could be added in qsys, is for a CIII. But what if you are using a CIV or CV?

    Had I to make my own RUC for this devices?

    Greets

    Sim
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks for the help.

    After reading many postings on this subject it finally got it to work.

    I created a new remote update IP module for the Cyclone IV device and then modified the EPCS bootloader code to read the configuration address and then boot form the correct location.

    It took a while working through the assembly code but I got there, Ive not done any assembly for 20 years.

    Thanks

    Davie
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Anyone needing an official remote update IP for the Cyclone IV / V should file a SR to Altera. They should update their IP to support the newest component they sell, and I don't think it's a big job for them.

    Anyway I'm glad you were able to make it work! And the time you spent wasn't wasted, in the process I'm sure you learned about the Nios' internals and the booting process, and this knowledge can always come in handy.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I got the information from Altera, that the RUC also supports C4 / C5.