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!
Another issue: HPS C for linux examples shows includes related to target Linux file system (as dev/mem as so on). How I set DS-5 to compile these C sources in order to have correct libraries link? On my local PC I haven't the Linux file system, I have only my s...software/spl directory in which there is my Linaro Linux for arm distro... I think that main issue to solve it is!
Are you using the DS-5 that comes from the SoC EDS?
We have a GCC-Based BareMetal Project Management:
Is this similar to what you are looking for?