I’ve just got a duo for low level programming and operations.
I took a look to the wiringx library but I saw that the binary is only given (libwiringx.so) and not the sources with the specific adaptations for the duo. Is it possible to put the sources of the modified wiringx version ? I am really interested to understand how it works at lower level.
Thank you. That’s it ! I saw the adress space and registers.
However, it is mentionned that 4 group of GPIO exists. I can’t understand from the document what it actually means. I guess the GPIO pins of the milk-v duo are mapped to the GPIO0 (base adresse : 0x03020000).
My understanding is that GPIOs are split into multiple ‘ports’. Each port has 32 GPIOs. So if you wish to (say) control the LED on GPIOC24 you would use GPIO2 base address.
The above example blinks the on-board LED 5 times.
I tried similar code and, then, the example above.
I have both a segmentation fault. The OS seems to prevent direct access to this addresses.
Should I use mmap() ?
I’ll take a look to FreeRTOS when I have time.
And I would also be interested to look at the wiringx code.
For the moment, I’ll simply use digitalread and write…