A set of test rigs for monitoring and creating CAN bus traffic using an STM32 F746ZG.
The following test rigs are currently available:
Name | Purpose |
---|---|
Listener | Receive and print specific messages on a CAN bus |
Refer to the linked instructions for usage information.
You will need the GNU ARM Embedded toolchain and make
on your path. To build, run:
make -s
Add -j $(nproc)
for a parallelised build.
You will need the STLink toolset on your path. To flash, run:
make flash -s
- Each test rig is implemented in its own C and header files, usually as a thread.
- Tests are configured in the configuration header. All test options should be set here with
#define
and prefixed withCONFIG_
. - The configuration header includes an option to disable each test rig.
- The top level test rig instantiates all tests.
- New tests can use the RTCAN instances provided by the top level test rig to interface with the CAN buses.
- While calling
printf()
(configured to write to UART3), threads must lock theprintf_mutex
provided by the top level test rig. Whileprintf()
is by itself thread safe, this mutex prevents mixing of printed outputs from different threads.