Closed VedantParanjape closed 4 years ago
Yes, pru-gcc supports am57xx. You simply need to provide the MCU variant. Instead of am335x.pru0 provide any of am572xx.icss0.pru0/am572xx.icss0.pru1/am572xx.icss1.pru0/am572xx.icss1.pru1
-CFLAGS0 += -mmcu=am335x.pru0
+CFLAGS0 += -mmcu=am572xx.icss0.pru0
Indeed am572x.h header is missing from gnuprumcu . For beaglemic I "cheat" by always building for am335x.pru0 and relying on binary compatibility between AM335x and AM572x PRU subsystems. Proper solution would be to add this header to gnuprumcu . Writing from scratch and licensing under BSD-2-Clause-FreeBSD is preferred for such library code. Feel free to do it - am572x.h should be fairly similar to am335x.h .
Where can find the pru_cfg.h, pru_ecap.h files.
@dinuxbg So, can the same header files work for am572xx?
Like for example is pru_cfg.h for am335x same as that of am572xx?
@VedantParanjape , for now I'm bundling copies of TI headers in RPMSG example source code:
./pru-gcc-examples/hc-sr04-range-sensor/include/am335x/pru_cfg.h
./beaglemic/pru/include/am335x/pru_cfg.h
Someday I hope to find time to write them from scratch in gnuprumcu.
@dinuxbg So, can the same header files work for am572xx?
My understanding is that yes, you should be able to do it. If in doubt, you can get TI headers for AM572x from pru-software-package and incorporate them in your project.
I won't go with TI's one, since am335x ones work. I am only left with a week for deadline.
I would like to contribute to writing am57xx.h. If you could guide me, I couldn't find TRM for am57xx processors, by chance do you have those?
Start by copying the am335x ones from gnuprumcu. Then check all bit fields and registers per TRM. Search for spruhz6l : https://www.ti.com/lit/pdf/spruhz6?keyMatch=SPRUHZ6L&tisearch=Search-EN-everything
Submitted PR:https://github.com/dinuxbg/gnuprumcu/pull/1
I am unable to find am57xx specific header files, like am572x.h.
If not how can i port them ?