# this is so jank

STM32 seems so very not designed to work with C++, but you can absolutely make it work.

This project should compile from C++ as long as your arm-none-eabi-g++ is new enough... works on my machine anyways

Try [this](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)

Change this part of Makefile below line 79 if you're not me:

```
#ifdef GCC_PATH
GCC_PATH = $(HOME)/.arm-gcc/bin
CC = $(GCC_PATH)/$(PREFIX)gcc
CXX = $(GCC_PATH)/$(PREFIX)g++
AS = $(GCC_PATH)/$(PREFIX)gcc -x assembler-with-cpp
CP = $(GCC_PATH)/$(PREFIX)objcopy
SZ = $(GCC_PATH)/$(PREFIX)size
#else
#CC = $(PREFIX)gcc
#AS = $(PREFIX)gcc -x assembler-with-cpp
#CP = $(PREFIX)objcopy
#SZ = $(PREFIX)size
#endif
HEX = $(CP) -O ihex
BIN = $(CP) -O binary -S
```

to this:

```
ifdef GCC_PATH
CC = $(GCC_PATH)/$(PREFIX)gcc
CXX = $(GCC_PATH)/$(PREFIX)g++
AS = $(GCC_PATH)/$(PREFIX)gcc -x assembler-with-cpp
CP = $(GCC_PATH)/$(PREFIX)objcopy
SZ = $(GCC_PATH)/$(PREFIX)size
else
CC = $(PREFIX)gcc
AS = $(PREFIX)gcc -x assembler-with-cpp
CP = $(PREFIX)objcopy
SZ = $(PREFIX)size
endif
HEX = $(CP) -O ihex
BIN = $(CP) -O binary -S
```

### Not for release. See:

```
./Drivers/CMSIS/Documentation/General/html/LICENSE.txt
./Drivers/CMSIS/Device/ST/STM32F4xx/LICENSE.txt
./Drivers/CMSIS/DSP/ComputeLibrary/LICENSE.txt
./Drivers/CMSIS/LICENSE.txt
./Drivers/STM32F4xx_HAL_Driver/LICENSE.txt
```
