What's the closest I can get to a C compiler if I use linux-socfpga ? There seems to be no gcc but there is an awk interpreter. If I can use awk then it is ok but I would prefer C.

  • 2
    You want to compile C code on an FPGA? – Thomas Weller Apr 20 '17 at 21:53
  • @ThomasWeller If I can. I should also be able to compile it on my other system and then load it to the FPGA. It is an Altera DE2-115 with a design done in QSys. – Niklas Apr 20 '17 at 21:55
  • 2
    Well, it's possible to emulate a Z80 in a FPGA. The Z80 can execute assembly instructions. You could implement a C compiler in assembler and then let it compile your C code. I just wonder why someone would do this. Sounds like total overkill. – Thomas Weller Apr 20 '17 at 21:59
  • 1
    @ThomasWeller It is good as an exercise. I want to learn. I only designed 4-bit system and Z80 is 8-bit that I want to learn. – Niklas Apr 20 '17 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.