Forum Discussion

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

How to get bare metal app running independently on SoCkit?

Hello all, I have a simple "hello world" bare metal app running in Debug using DS-5 (Eclipse) Altera Edition. Target system is Altera/Arrow SoCkit with Cyclone V. My problem is how to get this running in Release mode, independently on the board. It seems that I need to learn about the boot modes, right? Presumably the app would have to programmed into the QSPI or NAND flash. Any help on how to set this up is appreciated. Part of the problem is knowing what keywords to search for.

Thanks

Ron

8 Replies

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

    There is actually a good example in the "Hello World" example at this link: http://www.alterawiki.com/wiki/socbootfromfpga

    It really all depends what you mean by "bare metal". You can probably get your code running in the On-Chip Memory by replacing the preloader with your own code and placing your code in the 0xA2 partition, but you'll have to do any chip initialization yourself. I haven't seen any good examples yet on working with no preloader, even though there is no particular reason why you couldn't.

    You could even build an RTOS in DS-5 and port it over, if you wanted to try that.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    This looks like it may be helpful, thanks. As far as the RTOS link, not sure how that would apply since that would be using an OS, not bare-metal.

    Ron

    --- Quote End ---

    One of my favorite things to look at when trying to figure out baremetal is looking at how RTOSs implement it themselves. It at least provides another source for examples, besides the bare-metal thread and the user handbooks. Practical examples are sometimes surprisingly difficult to track down.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    There is actually a good example in the "Hello World" example at this link: http://www.alterawiki.com/wiki/socbootfromfpga

    It really all depends what you mean by "bare metal". You can probably get your code running in the On-Chip Memory by replacing the preloader with your own code and placing your code in the 0xA2 partition, but you'll have to do any chip initialization yourself. I haven't seen any good examples yet on working with no preloader, even though there is no particular reason why you couldn't.

    You could even build an RTOS in DS-5 and port it over, if you wanted to try that.

    --- Quote End ---

    But this example of fpga only power up the preloader from the FGPA memory, there rest of the files looks like still remain it in the SD card.