How to Download C code to De1-SoC and get it running

0

I have a DE1-SoC board and would like to play with it.

My wish is to write a simple program in C, compile, then upload the binary to the board. However, I am not sure where to start from.

Do I understand correctly, that there are two ways of executing code on DE1-SoC:

  • 1) Upload synthesized HDL code for FPGA to execute
  • 2) Use HPS processor to execute ARM instructions?

I have successfully realised the first case. Now I want to explore the second case.

How to upload compiled C code for HPS processor to run?

mercury0114

Posted 2016-01-05T12:46:44.250

Reputation: 139

C code does not run natively. You compile it to a binary. Which means that you probably want a compiler on the SoC, or a cross compiler set to produce the right code (arm). – Hennes – 2016-01-05T13:50:12.977

I imagine compiling c on PC and uploading the binary to SoC is easier than compiling c on the SoC itself? Now suppose I have the compiled binary code. My main question is HOW to upload it so that the SoC would start executing the code? – mercury0114 – 2016-01-05T13:55:20.003

Setting up cross compilation is almost certainly harder. But it also tends to be much faster. As for the rest, someone else will have to answer that. I have no experience with a DE1. – Hennes – 2016-01-05T13:57:45.557

No answers