Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12590 Discussions

How to get bare metal app running independently on SoCkit?

Altera_Forum
Honored Contributor II
1,368 Views

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 II
483 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
0 Kudos
Altera_Forum
Honored Contributor II
483 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.
0 Kudos
Altera_Forum
Honored Contributor II
483 Views

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

 

There's quite a few ways, actually.
0 Kudos
Altera_Forum
Honored Contributor II
483 Views

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

0 Kudos
Altera_Forum
Honored Contributor II
483 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
0 Kudos
Altera_Forum
Honored Contributor II
483 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.
0 Kudos
Altera_Forum
Honored Contributor II
483 Views

Yes, you are right..

0 Kudos
Altera_Forum
Honored Contributor II
483 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.
0 Kudos
Reply