Forum Discussion

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

equivalent "safe" mode for nios2?

Hello nios gurus again,

Is there an equivalent "safe" mode for the nios II like there was for the nios I?

I use the safe mode to quickly do firmware upgrades via tftp in the safe mode. It is very easy to use and is very fast compared to downloading code via rs232.

Is there a faster method? I like the tftp feature found in the safe mode.

-Quan

4 Replies

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

    Hi Quan,

    There is still a "factory safe" design that starts up a web server that describes the dev board you're using... however, it is just that, a web server. We had to take out the tftp server and file upload capability due to scheduling constraints to get Nios II 1.0 out on-time.

    We would like to add this feature back in (and hopefully some more cool features to the factory-safe design) as it was popular and useful; in the mean time you can always keep your board using the Nios v3.2 safe image which has the capability.... the ability to upload a .hexout file to memory works regardless of what is in the .hexout -- so you can use the old 'safe' design to update your board with new "user" Nios II images.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Jesse,

    Sorry to bring this back up again. I just ran into some minor inconveniences trying to downgrade a nios II dev kit back to nios I safe image. I had to do this to use the tftp capabilities for a much faster than rs232 firmware/software upload. Unfortunately, the only way possible was to use the byteblasterII cable to download the old hexout file, then use GERMS over rs232 to download complete safe image of the old. This took roughly 20 minutes just for the download over serial. This is fine for me, but it was almost impossible for me to instruct others at a remote location on how to accomplish this easily. Before I just sent them a .flash file and they installed using tftp. And on top of that, they would have to install an old version of the nios sdk, version 3.01 or something similar just to access the console port and talk to the uart. I don't mind having to wait long to download a flash image, but this does not seem possible with the nios II dev kit right out of the box. In the old kits, everything was possible right out of the box, i can download new images via tftp, the webserver utilities, or even at worst over serial.

    And I did not have to install any dev kits to do any of this. Did i miss something?

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

    Hi Quan,

    Sorry if that took a while. We don't want to make things difficult for anyone. Perhaps one thing that I should have mentioned earlier is that flashing the boards with Nios II is *not* slow when using the new flash programmer (that operates via JTAG). An FPGA image can be programmed into flash in about a minute or so (with full readback & error checking), depending on which FPGA you're using.

    Originally we wanted the factory safe example to go out with all of its previous features, but those weren't as high a priority as shipping on time as it was just a software example... the whole Nios II dev. cycle was pretty long and, like many engineering projects, there were a few weeks of late night crunch time at the end. Thus, as tftp was not part of the final product (Nios II), it slipped in favor of the schedule.

    A suitably curious and talented software engineer using the Nios II kit might take on the TFTP server as a good project to learn about the product if so inclined... all the sources are in the 'safe' example design of the previous Nios kit (although now that we have the sockets API, it would probably be much more simple to take an example design like the new web server and modify that to act as a TFTP server that stores things to flash), and perhaps when they're done, it could be posted to the forum here.... not that I am asking you to do so, but I bet someone out there might find it an interesting project!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Jesse,

    Don't get me wrong. I think the nios II kit is awesome and I do understand the time to market sacrafices that are needed to accomplish them.

    As for the project of adding in an tftp server, I may be curious but not that talented yet. I do not have enough knowledge of socket programming yet to understand fully, but definitely i&#39;ll try it out. Hopefully there will be others who are willing to help out with this. And of course this will have to be done without conflict with daily work activities. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif

    thanx,

    -Quan