xcode-select --install
softwareupdate --all --install --force
brew tap ArmMbed/homebrew-formulae
brew install arm-none-eabi-gcc
compiledb make -j8
Or for cmake
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1
add this before # *** EOF \*\*\*
flash: all
openocd -f interface/stlink.cfg -f target/stm32g4x.cfg -c "program $(BUILD_DIR)/$(TARGET).elf verify reset exit"