The project consists of a CAN transmitter (hereinafter CAN TX), CAN receivers (hereinafter CAN RX), buttons, PWM chips and outer LEDs
- The CAN transmitter is connected to the buttons. There are 4 buttons to select a mode of the headlights. Each button corresponds to the particular mode
- The CAN TX sends messages to a queue, that is read by each CAN RX
- The CAN RX processes the mode from the message and provides this info to the PWM chip
- The PWM chip coordinates the LEDs
- Download the special
arm-none-eabi13.2.1toolchain for the ARM architecturesudo apt install gcc-arm-none-eabi gdb-arm-none-eabi
- In case
aptcontains an old version, use an official web page. Search for thex86_64 Linux hosted cross toolchainsandAArch32 bare-metal target (arm-none-eabi) - Download
.deb1.8.0release of thestlinkrepository and install:sudo dpkg -i stlink_1.8.0-1_amd64.deb
- Check everything is installed correctly by running:
arm-none-eabi-gcc --version st-info --version st-flash --version
-
To build elf, bin and hex files run
makecommand with theTARGET_NAMEargument. SetTXvalue to compile code of the transmitter,RX- for receiver.make TARGET_NAME=TX make TARGET_NAME=RX
-
To build the executable and flash it to the MCU:
make flash TARGET_NAME=TX make flash TARGET_NAME=RX
- Download
cppcheckversion2.13.0 - To perform code static analysis run
make check TARGET_NAME=<TX|RX>
User can enable/disable asserts in the project by providing USE_ASSERTS building parameter. For example: make TARGET_NAME=RX USE_ASSERTS=1
