Skip to content

fbucafusco/basic_build_stm32_nob

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example of building a STM32 project using nob.h. It is based on this project where I did the same using bash.

Usage

gcc mk.c -o mk
./mk

Install ARM Toolchain

You can install the ARM GNU Toolchain either locally (for this project only) or system-wide. Choose the method that best fits your needs:

Option 1: Local Installation (Recommended for quick setup)

  1. Download the official ARM GNU Toolchain:
wget https://developer.arm.com/-/media/Files/downloads/gnu/14.3.rel1/binrel/arm-gnu-toolchain-14.3.rel1-x86_64-arm-none-eabi.tar.xz
  1. Extract the toolchain in your project directory:
tar -xf arm-gnu-toolchain-14.3.rel1-x86_64-arm-none-eabi.tar.xz
  1. Use the binaries by specifying their path in your build scripts or by temporarily adding them to your PATH:
export PATH="$PWD/arm-gnu-toolchain-14.3.rel1-x86_64-arm-none-eabi/bin:$PATH"

Option 2: System-wide Installation (Requires sudo)

  1. Create installation directory:
sudo mkdir -p /opt/arm-gnu-toolchain-14.3.rel1
  1. Extract the toolchain to /opt:
sudo tar -xJf arm-gnu-toolchain-14.3.rel1-x86_64-arm-none-eabi.tar.xz -C /opt/arm-gnu-toolchain-14.3.rel1 --strip-components=1
  1. Add the toolchain to your PATH (append to ~/.bashrc):
echo 'export PATH=/opt/arm-gnu-toolchain-14.3.rel1/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Verify Installation

Run the following command to check the toolchain is available:

arm-none-eabi-g++ -v

About

Example of building a STM32 project using [nob.h](https://github.com/tsoding/nob.h). It is based on [this project](https://github.com/fbucafusco/basic_build_stm32_bash) where I did the same using bash.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published