Hi all,
Following on my earlier post, Project report: Bazel build for am335x PRU, I thought I’d share an update.
While still under development, GitHub - jmacd/supruglue: PRU test kit, has become a functional development environment, containing:
- Bazel crosstools setup for running TI PRU tools
- Bazel BUILD definitions for the TI pru-software-support-package
- Lightweight system libraries (RPMsg, debug logs, GPIO, clock, …)
- Code generation for system events, pin definitions, etc.
- Test harness using Googletest
- Golang tools to inspect, invoke, and print debug logs on the device.
So far it includes just one example, it has two independent coroutines looking like
void toggle_blue(ThreadID tid, Args args) {
gpio_pin pin = GPIO_PIN(P9_23);
PRULOG_2U(INFO, "starting blue half-cycle %uns", BLUE_PERIOD, 0);
while (1) {
PRULOG_2U(INFO, "blue on", 0, 0);
GPIO_SetPin(pin, 1);
Sleep(BLUE_PERIOD);
PRULOG_2U(INFO, "blue off", 0, 0);
GPIO_SetPin(pin, 0);
Sleep(BLUE_PERIOD);
}
}
Thanks for reading,
Josh