Bela Support for BBAI/Later Ti-Chips

you can use #ifdef to make them conditional at compile time. The Makefile could detect whether we are running on an AM335x or an AM572x and define a flag accordingly. This same flag can be used for conditional compilation of the libprussdrv vs rproc stuff in core/PRU.cpp. This could be the initial approach because it’s faster to get it done. Later in the project, we could move to a runtime flag if appropriate by passing a flag to the PRU at runtime for whether we are on am335x or am527x and allow it to select the relevant addresses at runtime. Each approach has its own merit, we can figure out which is best down the line. In the meantime, a conditional define in the code triggered by either automatic detection in the Makefile or a manual option when calling make is probably the best starting point.

that seems about right.

I think we are using only MCASP1 on the BBAI, so you don’t really need MCASP2. Also, the define for MCASP1 on the AM335x is not needed, because we never use that. The MCSPI and GPIO addresses will also need to change between the two boards. We can think about how to best rationalise the defines.

if you find another stand-alone PRU disassembler, feel free to plug it in. This one has very limited testing in that I only tested it to ensure it produces assembly that is recognised as valid from clpru when disassembling the Bela PRU code. Personally, I have no reason to think it doesn’t work properly, so I’d wait until it proves unfit for the task before looking elsewhere.

I commented on it just now

great

1 Like