diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..2464bb7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: firmware-build + +on: + push: + pull_request: + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y cmake ninja-build gcc-arm-none-eabi + + - name: Configure + run: cmake --preset Debug + + - name: Build + run: cmake --build --preset Debug diff --git a/components/main.cpp b/components/main.cpp index 931475f..cac3147 100644 --- a/components/main.cpp +++ b/components/main.cpp @@ -1,7 +1,6 @@ #include "main.hpp" -void flightTask(void *pvParameters) { - +extern "C" void flightTask(void *pvParameters) { } int app_main() { diff --git a/components/main.hpp b/components/main.hpp index a731bf4..61fd4a6 100644 --- a/components/main.hpp +++ b/components/main.hpp @@ -10,9 +10,8 @@ extern I2C_HandleTypeDef hi2c1; extern SPI_HandleTypeDef hspi1; int app_main(void); +void flightTask(void *pvParameters); #ifdef __cplusplus } -#endif - -void flightTask(void *pvParameters); \ No newline at end of file +#endif \ No newline at end of file