Skip to content

gilsllendo/led-headlights

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LED Headlights

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

Schema

Set Up

  • Download the special arm-none-eabi 13.2.1 toolchain for the ARM architecture
    sudo apt install gcc-arm-none-eabi gdb-arm-none-eabi
  • In case apt contains an old version, use an official web page. Search for the x86_64 Linux hosted cross toolchains and AArch32 bare-metal target (arm-none-eabi)
  • Download .deb 1.8.0 release of the stlink repository 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

Build

  • To build elf, bin and hex files run make command with the TARGET_NAME argument. Set TX value 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

Checks

Static Analysis

  • Download cppcheck version 2.13.0
  • To perform code static analysis run make check TARGET_NAME=<TX|RX>

Asserts

User can enable/disable asserts in the project by providing USE_ASSERTS building parameter. For example: make TARGET_NAME=RX USE_ASSERTS=1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 92.9%
  • Makefile 7.1%