Go to file
D.R.racer 2c8f4cb13c Add cpu.h/cpp, avr subdir
The idea is to have a separate implementation of the HAL interface for each CPU. So far we only have the AVR.
2021-04-15 08:27:21 +02:00
cmake Initial support for AnyAvrGcc toolchain 2021-04-13 10:17:03 +02:00
src Add cpu.h/cpp, avr subdir 2021-04-15 08:27:21 +02:00
tests Prepare parts of the build system 2021-04-13 08:24:43 +02:00
utils build.py: Switch to AnyAvrGcc.cmake 2021-04-14 16:29:26 +02:00
.clang-format Fix clang format settings 2021-04-14 16:39:20 +02:00
.cmake-format.py Prepare parts of the build system 2021-04-13 08:24:43 +02:00
.gitignore Prepare parts of the build system 2021-04-13 08:24:43 +02:00
.pre-commit-config.yaml Prepare parts of the build system 2021-04-13 08:24:43 +02:00
CMakeLists.txt Set correct MCU ID + output HEX files 2021-04-14 09:16:55 +02:00
README.md Update description of the build process 2021-04-15 07:38:43 +02:00
version.txt Prepare parts of the build system 2021-04-13 08:24:43 +02:00

README.md

Prusa-Firmware-MMU-Private

How to prepare build env and tools

As the first step extract the AVR-GCC to some dir, e.g. /home/user/AVRToolchainMMU/avr8-gnu-toolchain-5.4.0

Add /home/user/AVRToolchainMMU/avr8-gnu-toolchain-5.4.0/bin to your PATH.

mkdir .dependencies
cd .dependencies
mkdir gcc-avr-5.4.0
cd ..
utils/bootstrap.py

bootstrap.py will now download all the "missing" dependencies into the .dependencies folder:

  • clang-format-9.0.0-noext
  • cmake-3.15.5
  • ninja-1.9.0

Note: bootstrap.py will not try to download the AVR-GCC as there is already a directory called gcc-avr-5.4.0. This will be fixed when we find out where to download the correct packages reliably.

How to build the preliminary project so far:

Now the process is the same as in the Buddy Firmware:

utils/build.py

builds the firmware.hex in build/mmu_release

In case you'd like to build the project directly via cmake you can use an approach like this:

mkdir build
cd build
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=../cmake/AnyAvrGcc.cmake
ninja

Should produce a firmware.hex file as well.