Forum Discussion

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

Porting Custom Code on SD

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

2 Replies

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

    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.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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 :)