dinuxbg / pru-gcc-examples

Simple example projects for PRU-GCC
49 stars 12 forks source link

Patch to Run hc-sr04 range sensor code on PRU0 #12

Closed deebot closed 4 years ago

deebot commented 4 years ago

Current code runs on PRU1 . This patch incorporates changes in the resource table files mainx.c files and makefile to successfully run it on core0.Also patch instructions are added to the readme. This might act as reference for others wanting to run rpmsg on PRU0.

hyau commented 4 years ago

It would me more useful to explain the patch so when upstream changes the example and the patch gets rejected, one can quickly update it. Also, would it be nice to check it in as a git change rather then a patch file. Reviewing a diff of diff's is rather annoying.

deebot commented 4 years ago

@hyau i have already updated the readme file where i have written the purpose of patch. Do you want to me to add more information in the pull? I have also created a blog post.https://deebot.github.io/rpmsgPRU.html. Should i add the link to it in the read me?

Also, would it be nice to check it in as a git change rather then a patch file. Reviewing a diff of diff's is rather annoying. Can you please elaborate, are you suggesting to use git patch

hyau commented 4 years ago

Generally, one puts docs for the patch with the patch. i.e. as the header to it. The patch utiity ignores that part.

IMO - checking in a patch for in git is not the best way to go about this. Make the change in GIT as a commit. So the changes are obvious when the diffs are generated.

dinuxbg commented 4 years ago

I agree with @hyau . Getting the examples running is hard enough as it is. Requiring users to patch the source code is a step in the wrong direction.

I like the idea of having RPMSG example for PRU0. But it should be a separate project, preferably doing something else. Maybe get PRU0 R31 IN and set R30 OUT via RPMSG?

deebot commented 4 years ago

@dinuxbg ok. I will write a new example in couple of days and will raise a new pull