MarkAYoder / PRUCookbook

This is a cookbook of the Programmable Realtime Unit on the BeagleBoard
66 stars 38 forks source link

How to add library in clpru compiler. #19

Open rajmehta28599 opened 3 years ago

rajmehta28599 commented 3 years ago

Aim: run GCC with Clpru in BeagleBone Black.

Info: I have BeagleBone Black and I run ws2812B LED strip with PRU. and merge/integrate other data with that to control the led pattern.

so I need help in change the compilation method or learn to integrate it into clpru.

Main code : led.pru0.c _as same : https://beagleboard.org/static/prucookbook/#blocks_neo1_

second code : _Datafetch.c This code use -l:librobotcontrol.so.1 library with GCC compiler to compile _Datafetch.c script. and have one method which provides the number of LEDs (0 to 90), this varies as per battery voltage.

Issue: So the issue is: The main code compiler is clpru and the second code use GCC compiler for execution. So how do I communicate both codes? or shared resources.

Thank you I will appreciate your response.

MarkAYoder commented 2 years ago

@rajmehta28599 I think the easiest approach may be to use the neo4.pru0.c code. It uses /dev/rpmsd_pru to control the LEDs. You could then modify Data_fetch.c to write to /dev/rpmsg_pru to control the desired LEDs.