DS-5 correct paths, compiler settings to develop C app running under Linux
Hi to everyone! I'm develop (I wish..) a C app for HPS running under Linux (Cyclone5 SoC self-developed card)
- I obtained a Angstrom 2018.06 running linux distro.
- I use DS-5 starting from Hello word Linux example : Ok, it runs linking my target with remote session host debug!
- Following Led example, I'm attempt to open a dev/mem to link my ONCHIP ram space, connected to Master Axi Bus
- My difficult is: there is a bunch of libraries to include :
- LINUX related (mman.h, fcntl, stdio etc) but under my distro in spl folder there are almost 5 of fcntl and so on!
- MY QSYS-HPS related (hps_0.h, ..... )
- Some standard for HPS (from ds5 folder/embedded/ip/...
Compiler question: depending of compiler , GCC complier fails with ordinary C code, selecting ARM-5 compiler, I have a bunch of error due to wrong references in my libraries: option 0_RDWR, O_SYNC are not resolved and so on.
My question: there is a clear tutorial to learn how DS-5 environment DS-5 must be set and which are the correct paths to include al needed libs to run in reliable mode? Code examples for Leds and so on are quit clear: I must create an access to virtual memory and open a file with appropriate base, span addresses to R/W my peripherals. But applyng these examples in DS-5 , it is very hard to understand which are correct libraries !!! Any suggestion is appreciated!