Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
908 Views

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
0 Kudos
8 Replies
Altera_Forum
Honored Contributor I
23 Views

I think you need to execute your application in the boot loader after the SOC boot up completes either from QSPI or NAND, long story...try to digest this 

 

http://rocketboards.org/foswiki/view/documentation/preloaderubootcustomization131
Altera_Forum
Honored Contributor I
23 Views

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
Honored Contributor I
23 Views

Here's a related note: http://www.freertos.org/rtos_ports.html 

 

There's quite a few ways, actually.
Altera_Forum
Honored Contributor I
23 Views

And finally, as I'm sure BadOmen will mention shortly: http://www.alteraforum.com/forum/showthread.php?t=47099

Altera_Forum
Honored Contributor I
23 Views

 

--- Quote Start ---  

And finally, as I'm sure BadOmen will mention shortly: http://www.alteraforum.com/forum/showthread.php?t=47099 

--- Quote End ---  

 

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
Altera_Forum
Honored Contributor I
23 Views

 

--- 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
Honored Contributor I
23 Views

Yes, you are right..

Altera_Forum
Honored Contributor I
23 Views

 

--- 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.