Template to create FreeRTOS tasks using the team's middleware
- Clone it
git clone git@github.com:RobomasterOwltech/AppCodeRepo.git - Download the submodules
git submodule init && git submodule update - In case any of the dependencies needs to be updated, simply do:
git submodule update --remote
- Make sure that
postStartCommandvalue is set at the.devcontainer/devcontainer.json. - Make sure to have created and register ssh keys for Github, as done in DeployTools
- At the moment you clone the repo, modify the branch for the
robotConfigrepo. 1. This will Change the defines on theMakefile - Change the OwlDefines variables at
.vscode/c_cpp_properties.json
-
From the project folder call make
make all-
You might need to specify the compiler path, in which case use:
make GCC_PATH=/path/2/compiler -
Alternatively, you can add it to your path, or set it as an environment variable.
-
-
If your build failed, then you can clean the
buildfoldermake clean -
If you are encountering problems, and would like to know what is being configured by the makefiles from other projects, try:
make showRobotConfig showRtosConfig
- Save your changes to the file.
- Copy it's relative path.
- If it is a C, add it in the
C_SOURCESvariable from theMakefile - In case your file is referencing any library, make sure it is present in the
C_INCLUDES
arm-none-eabi-gcc -c -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -DUSE_HAL_DRIVER -DSTM32F407xx -IrobotConfig/inc -Ieigen/Eigen -IDrivers/STM32F4xx_HAL_Driver/Inc -IDrivers/STM32F4xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32F4xx/Include -IDrivers/CMSIS/Include -IMiddlewares/Third_Party/FreeRTOS/Source/include -IMiddlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -IMiddlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -IMiddlewares/ST/stm32_mw_usb_device/Class/CDC/Inc -IMiddlewares/ST/stm32_mw_usb_device/Core/Inc -IowltechMiddleware/inc -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/main.d" -Wa,-a,-ad,-alms=build/main.lst robotConfig/src/main.cpp -o build/main.o
If you were to change the C/C++ standard used, remember to change it in the IntelliSense, makefile, and c_cpp_properties.json
For more formatting options see the link.
If you would like to learn more about the used tools and information, then check:
- Quick intro to Makefiles (Video)
- GNU Make manual
- The GNU Make Book. John Graham-Cumming. No Starch Press
- Example on using Eigen