Skip to content

Egoizt/TestP01

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Electric Driven Baby Car Control Firmware

Important thing to know

  • This firmware is using CMake based build system.
  • This firmware is designed to run on Arduino Leonardo (or analog) boards.
  • This instructions is only for CLion running under macOS.

How to build

  1. Clone Arduino-CMake-NG repository.
  2. Set ARDUINO_CMAKE_TOOLCHAIN_PATH environment variable with the cloned repository path (it should be something like $HOME/Github/arduino-cmake/Arduino-CMake-NG).
  3. Locate AVR Tools (on macOS it is most likely located in /Applications/Arduino.app/Contents/Java/hardware/tools/avr)
  4. Set ARDUINO_AVR_PATH environment variable with absolute path to AVR Tools directory.
  5. Locate your connected Arduino Leonardo board port (it should be something like /dev/cu.usbmodem145101).
  6. Set UPLOAD_PORT environment variable in CMake settings to board port you've just found out.
  7. Follow toolchain manual and pass the following argument to CMake: -DCMAKE_TOOLCHAIN_FILE=${ARDUINO_CMAKE_TOOLCHAIN_PATH}/Arduino-Toolchain.cmake.

Arduino-CMake-NG

This project is using Arduino-CMake-NG toolchain o build and upload firmware to target device. In fact upload is kind of broken for Leonardo class of devices but workaround is implemented.

How to set environment variable globally

On macOS you should modify your terminal profile to keep your environment variables set in any new terminal session.

This can be done by adding this line export SOME_ENV_VALUE="/Some/Value/Meaning" to ~/.bash_profile or ~/.zshrc depending on terminal you are using.

You should restart terminal session (or any other application) for the changes to take effect.

How to set environment variable in CMake settings of CLion

Open Preferences > Build, Execution, Deployment > CMake.

Edit Environment field.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published