diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..ce65cf2 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: Build NUSense firmware for STM32H753 + +on: + push: + branches: + - "**" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install PlatformIO + run: pip install platformio + + - name: Build firmware + run: cd NUSense && pio run -e nucleo_h753zi \ No newline at end of file diff --git a/.gitignore b/.gitignore index a859f94..b7be746 100644 --- a/.gitignore +++ b/.gitignore @@ -113,3 +113,4 @@ tags .ccls-cache .vscode +NUSense/.pio \ No newline at end of file diff --git a/NUSense/platformio.ini b/NUSense/platformio.ini new file mode 100644 index 0000000..590d502 --- /dev/null +++ b/NUSense/platformio.ini @@ -0,0 +1,50 @@ +; PlatformIO Project Configuration File +; +; Build options: build flags, source filter +; Upload options: custom upload port, speed and extra flags +; Library options: dependencies, extra library storages +; Advanced options: extra scripting +; +; Please visit documentation for the other options and examples +; https://docs.platformio.org/page/projectconf.html + +[platformio] +src_dir = . +include_dir = Core/Inc + +[env:nucleo_h753zi] +platform = ststm32 +board = nucleo_h753zi +framework = stm32cube +platform_packages = + toolchain-gccarmnoneeabi@~1.120301.0 + +; Ensure C++20 headers (e.g. ) are available/selected. +build_unflags = + -std=gnu++11 + -std=gnu++14 + -std=gnu++17 + +; Compile all C/C++ sources under Core/Src recursively. +build_src_filter = + + + + + + + + + - + +; Make Core/Src module headers visible without changing include statements. +build_flags = + -O2 ; optimize for speed - change this based on what you're up to :D + -std=gnu++20 + -ICore/Src + -ICore/Src/device + -ICore/Src/dynamixel + -ICore/Src/nusense + -ICore/Src/uart + -ICore/Src/usb + -ICore/Src/utility + -IUSB_DEVICE/App + -IUSB_DEVICE/Target + -IMiddlewares/ST/STM32_USB_Device_Library/Core/Inc + -IMiddlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc \ No newline at end of file