Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21602 Discussions

Porting Custom Code on SD

Altera_Forum
Honored Contributor II
1,242 Views

Hi, 

 

 

I have successfully managed to boot Linux on Cyclone 5 SoC with SD card. I also run 2 applications (hello & led_blink) which were already present in the prebuilt sd card image taken off rocketboards webpage. However, now I need to run my own application on the board. How do I do that? For example I have a C code, so I build it using DS-5 and write the application (only) on SD card? Would that work? How do I compile/run a project on the board? 

Also, are the apps led_blink & hello a part of the image file on the sd card? Because when I look at the contents of the card on windows I do not see those apps or file names. 

 

 

Thank you, 

Surabhi
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
529 Views

You will need to create a Makefile to build your application. See the DS-5 documentation for some examples. Once you have built your application, the easiest way to transfer it to the SD card is to mount it on a Linux system. I had a virtual CentOs Linux machine running under VMware player (free version) on my windows PC, so that's what I use. 

 

You can also connect your board with Ethernet and set up DS-5 to automatically copy the application, but the setup is more complicated.
0 Kudos
Altera_Forum
Honored Contributor II
529 Views

Thanks for your suggestion Galfonz.  

It took me a while to understand that I could edit and debug the apps present in the prebuilt image file on the SD card. The learning curve is steep! 

I eventually setup Ethernet and use DS-5 to debug & run my application on Linux. Anybody looking to do something similar can refer to this tutorial I came across https://www.youtube.com/watch?v=zcgqejkywoc 

Thanks :)
0 Kudos
Reply