IDE Integration & Setup Guides¶
Step-by-step setup guides for integrating SyntropicOS into standard microcontroller IDEs and toolchains: STM32CubeIDE, VS Code (PlatformIO & CMake), Keil MDK-ARM, IAR Embedded Workbench, and Arduino IDE.
1. STM32CubeIDE¶
Project Setup¶
- Add SyntropicOS Source Tree:
- Copy or add a git submodule of
SyntropicOSinto your STM32CubeIDE project root folder (e.g.Middlewares/Third_Party/SyntropicOS). - Configure Include Paths:
- Right-click your project → Properties → C/C++ Build → Settings → MCU GCC Compiler → Include paths.
- Add
${workspace_loc:/${ProjName}/Middlewares/Third_Party/SyntropicOS/src}. - Ensure
${workspace_loc:/${ProjName}/Core/Inc}is also in the include path (where yoursyn_config.hwill reside). - Add Source Folders to Build:
- Right-click
Middlewares/Third_Party/SyntropicOS/src/syntropic→ Source Actions → Add to Build (or ensure it is not marked as Exclude from build). - If using STM32 HAL porting, also include
src/port/stm32_hal/port_stm32_hal.c. - Set C Standard:
- In MCU GCC Compiler → Miscellaneous, set C Language Standard to
-std=c99. - Configuration Header:
- Copy
src/syntropic/common/syn_config_template.hto your project'sCore/Inc/syn_config.h.
2. VS Code (PlatformIO & CMake + Cortex-Debug)¶
PlatformIO Integration¶
SyntropicOS is a native PlatformIO library (library.json). Include it directly via lib_deps in your platformio.ini:
[env:stm32f407]
platform = ststm32
board = disco_f407vg
framework = stm32cube
build_flags =
-std=c99
lib_deps =
SyntropicOS
Or reference the Git repository directly:
CMake + VS Code Cortex-Debug¶
-
CMakeLists.txt: -
.vscode/launch.json(Cortex-Debug ST-Link):
3. Keil MDK-ARM (uVision)¶
Project Setup¶
- Add Group & Files:
- In the Project Workspace tree, right-click target → Add Group... → Name it
SyntropicOS. - Right-click
SyntropicOSgroup → Add Existing Files to Group 'SyntropicOS'. - Select all
.cfiles insrc/syntropic/subdirectories (common,kernel,drivers,input,output,protocol,system). - Set Include Paths:
- Click Options for Target (Alt+F7) → C/C++ tab.
- In Include Paths, add:
..\SyntropicOS\src;..\Core\Inc; - Compiler Options:
- Check C99 Mode in the C/C++ tab.
- Add preprocessor define
SYN_USE_CONFIG_HEADER=1. - SysTick & Critical Sections:
- Ensure
SysTick_Handlerinstm32f4xx_it.cincrementsHAL_IncTick()orsyn_port_get_tick_ms().
4. IAR Embedded Workbench for ARM¶
Project Setup¶
- Add Project Group:
- Right-click project root in Workspace window → Add → Add Group... → Name it
SyntropicOS. - Right-click
SyntropicOS→ Add → Add Files... - Select all
.cfiles fromsrc/syntropic/. - Preprocessor Options:
- Right-click project → Options → C/C++ Compiler → Preprocessor.
- Add to Additional include directories:
$PROJ_DIR$/../SyntropicOS/src$PROJ_DIR$/../Core/Inc - Language Standards:
- In C/C++ Compiler → Language 1 tab, select C Dialect → C99.
5. Arduino IDE (v1.8 / v2.x)¶
Library Installation¶
SyntropicOS is packaged as a standard Arduino Library (library.properties).
- Installation Methods:
- Library Manager: Search for
SyntropicOSin Sketch → Include Library → Manage Libraries... - Add .ZIP Library: Download repository release ZIP → Sketch → Include Library → Add .ZIP Library...
-
Manual Placement: Extract into your sketchbook
libraries/directory (Arduino/libraries/SyntropicOS). -
Header Inclusion & Sketch Usage:
- Include
<syntropic/syntropic.h>in your.inosketch: