packwise-skills 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursorrules +23 -23
- package/CLAUDE.md +25 -25
- package/LICENSE +21 -0
- package/README.md +404 -295
- package/audit.md +224 -224
- package/bin/packwise.js +322 -155
- package/install.sh +123 -0
- package/package.json +32 -31
- package/skill.md +944 -719
- package/sub-skills/ai/local-llm.md +183 -183
- package/sub-skills/ai/python-ml.md +164 -164
- package/sub-skills/backend/go-server.md +184 -184
- package/sub-skills/backend/java-spring.md +241 -241
- package/sub-skills/backend/node-server.md +164 -164
- package/sub-skills/backend/php-laravel.md +175 -175
- package/sub-skills/backend/python-server.md +164 -164
- package/sub-skills/backend/rust-backend.md +118 -118
- package/sub-skills/cli/python-cli.md +236 -236
- package/sub-skills/cli/sdk-library.md +497 -497
- package/sub-skills/cloud/ci-cd-pipelines.md +350 -350
- package/sub-skills/cloud/docker.md +191 -191
- package/sub-skills/cloud/kubernetes.md +277 -277
- package/sub-skills/cloud/payment-integration.md +307 -307
- package/sub-skills/cross-platform/multiplatform.md +252 -252
- package/sub-skills/desktop/electron.md +783 -783
- package/sub-skills/desktop/game-dev.md +443 -443
- package/sub-skills/desktop/native-app.md +123 -123
- package/sub-skills/desktop/scenarios.md +443 -443
- package/sub-skills/desktop/smart-platforms.md +324 -324
- package/sub-skills/desktop/tauri.md +428 -428
- package/sub-skills/desktop/vr-ar.md +252 -252
- package/sub-skills/desktop/web-to-desktop.md +153 -153
- package/sub-skills/embedded/car-infotainment.md +129 -129
- package/sub-skills/embedded/esp32.md +184 -184
- package/sub-skills/embedded/ros.md +150 -150
- package/sub-skills/embedded/stm32.md +160 -160
- package/sub-skills/mobile/android.md +322 -322
- package/sub-skills/mobile/capacitor.md +232 -232
- package/sub-skills/mobile/flutter-mobile.md +138 -138
- package/sub-skills/mobile/harmonyos.md +150 -150
- package/sub-skills/mobile/ios.md +245 -245
- package/sub-skills/mobile/react-native.md +443 -443
- package/sub-skills/mobile/wearables.md +230 -230
- package/sub-skills/plugins/browser-extension.md +308 -308
- package/sub-skills/plugins/jetbrains-plugin.md +226 -226
- package/sub-skills/plugins/vscode-extension.md +204 -204
- package/sub-skills/security/security-tools.md +174 -174
- package/sub-skills/web/monorepo.md +274 -274
- package/sub-skills/web/pwa.md +220 -220
- package/sub-skills/web/serverless-edge.md +295 -295
- package/sub-skills/web/spa.md +266 -266
- package/sub-skills/web/ssr.md +228 -228
- package/sub-skills/web/wasm.md +243 -243
|
@@ -1,160 +1,160 @@
|
|
|
1
|
-
# STM32 Embedded Build Sub-Skill
|
|
2
|
-
|
|
3
|
-
Build firmware for STM32 microcontrollers using STM32CubeIDE, Keil MDK, or PlatformIO.
|
|
4
|
-
|
|
5
|
-
**Current versions**: STM32CubeIDE 1.17 / STM32CubeMX 6.13 / ARM GCC 13.x (2025-2026)
|
|
6
|
-
|
|
7
|
-
## When to Use
|
|
8
|
-
|
|
9
|
-
- Industrial control systems
|
|
10
|
-
- IoT sensor nodes and gateways
|
|
11
|
-
- Motor control applications
|
|
12
|
-
- Medical devices
|
|
13
|
-
- Automotive ECU (non-safety-critical)
|
|
14
|
-
- Consumer electronics firmware
|
|
15
|
-
|
|
16
|
-
## STM32 Family Overview
|
|
17
|
-
|
|
18
|
-
| Family | Core | Speed | Flash | Best For |
|
|
19
|
-
|--------|------|-------|-------|----------|
|
|
20
|
-
| STM32F0 | Cortex-M0 | 48MHz | 16-256KB | Cost-sensitive, basic control |
|
|
21
|
-
| STM32F1 | Cortex-M3 | 72MHz | 16-1024KB | General purpose (legacy, very popular) |
|
|
22
|
-
| STM32F4 | Cortex-M4F | 168-200MHz | 512KB-2MB | DSP, audio, mid-range processing |
|
|
23
|
-
| STM32G0 | Cortex-M0+ | 64MHz | 16-512KB | Low power, cost-sensitive |
|
|
24
|
-
| STM32G4 | Cortex-M4F | 170MHz | 128-512KB | Analog-rich, motor control |
|
|
25
|
-
| STM32H7 | Cortex-M7+M4 | 480MHz | 1-2MB | High-performance, display, audio |
|
|
26
|
-
| STM32L0 | Cortex-M0+ | 32MHz | 16-192KB | Ultra-low power |
|
|
27
|
-
| STM32L4 | Cortex-M4F | 80MHz | 256KB-1MB | Low power + performance |
|
|
28
|
-
| STM32U5 | Cortex-M33 | 160MHz | 256KB-2MB | Ultra-low power + security |
|
|
29
|
-
| STM32WB | Cortex-M4+M0+ | 64MHz | 256KB-1MB | Bluetooth LE + application |
|
|
30
|
-
| STM32WL | Cortex-M4+M0+ | 48MHz | 64-256KB | LoRa/LoRaWAN + application |
|
|
31
|
-
| STM32MP1/2 | Cortex-A7/M4 | 650-1200MHz | External | Linux + real-time coprocessor |
|
|
32
|
-
|
|
33
|
-
## Prerequisites
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
# STM32CubeIDE (all-in-one: editor + compiler + debugger)
|
|
37
|
-
# Download from st.com/stm32cubeide
|
|
38
|
-
|
|
39
|
-
# OR: ARM GCC toolchain + STM32CubeMX + VS Code
|
|
40
|
-
# ARM GCC:
|
|
41
|
-
sudo apt install gcc-arm-none-eabi # Linux
|
|
42
|
-
brew install --cask gcc-arm-embedded # macOS
|
|
43
|
-
|
|
44
|
-
# STM32CubeMX (pin/peripheral configuration)
|
|
45
|
-
# Download from st.com/stm32cubemx
|
|
46
|
-
|
|
47
|
-
# OR: PlatformIO (cross-platform build system)
|
|
48
|
-
pip install platformio
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## STM32CubeIDE Build
|
|
52
|
-
|
|
53
|
-
### Project Setup
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
STM32CubeIDE:
|
|
57
|
-
1. File → New → STM32 Project
|
|
58
|
-
2. Select MCU/Board (e.g., STM32F407VG)
|
|
59
|
-
3. Configure pins in .ioc file (CubeMX integrated)
|
|
60
|
-
4. Generate code
|
|
61
|
-
5. Write application code in Core/Src/main.c
|
|
62
|
-
6. Build: Project → Build All (Ctrl+B)
|
|
63
|
-
7. Debug: Run → Debug (ST-Link/J-Link)
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Build Output
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
Debug/ or Release/
|
|
70
|
-
├── myproject.elf ← Debug binary (with symbols)
|
|
71
|
-
├── myproject.hex ← Intel HEX (for programmer)
|
|
72
|
-
├── myproject.bin ← Raw binary (for bootloader/OTA)
|
|
73
|
-
└── myproject.map ← Memory map (linker output)
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Command Line Build
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
# Build with ARM GCC
|
|
80
|
-
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 \
|
|
81
|
-
-O2 -g -Wall \
|
|
82
|
-
-DSTM32F407xx \
|
|
83
|
-
-IInc -IDrivers/STM32F4xx_HAL_Driver/Inc \
|
|
84
|
-
-ICore/Inc \
|
|
85
|
-
Src/main.c Src/stm32f4xx_it.c \
|
|
86
|
-
-TSTM32F407VGTX_FLASH.ld \
|
|
87
|
-
-o build/myproject.elf \
|
|
88
|
-
-lc -lm -lnosys
|
|
89
|
-
|
|
90
|
-
# Generate .bin from .elf
|
|
91
|
-
arm-none-eabi-objcopy -O binary build/myproject.elf build/myproject.bin
|
|
92
|
-
|
|
93
|
-
# Generate .hex from .elf
|
|
94
|
-
arm-none-eabi-objcopy -O ihex build/myproject.elf build/myproject.hex
|
|
95
|
-
|
|
96
|
-
# Flash with ST-Link
|
|
97
|
-
st-flash write build/myproject.bin 0x08000000
|
|
98
|
-
|
|
99
|
-
# Flash with J-Link
|
|
100
|
-
JLinkExe -device STM32F407VG -if SWD -speed 4000 -CommandFile flash.jlink
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### Flash Size Report
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
arm-none-eabi-size build/myproject.elf
|
|
107
|
-
# Output:
|
|
108
|
-
# text data bss dec hex filename
|
|
109
|
-
# 32768 1024 4096 37888 9400 build/myproject.elf
|
|
110
|
-
# text = code + const data (Flash)
|
|
111
|
-
# data = initialized variables (Flash + RAM)
|
|
112
|
-
# bss = zero-initialized variables (RAM only)
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## PlatformIO Build
|
|
116
|
-
|
|
117
|
-
```ini
|
|
118
|
-
; platformio.ini
|
|
119
|
-
[env:stm32f407vg]
|
|
120
|
-
platform = ststm32
|
|
121
|
-
board = disco_f407vg
|
|
122
|
-
framework = stm32cube ; or: arduino, cmsis, zephyr
|
|
123
|
-
build_flags = -O2 -DSTM32F407xx
|
|
124
|
-
upload_protocol = stlink
|
|
125
|
-
debug_tool = stlink
|
|
126
|
-
monitor_speed = 115200
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
pio run # Build
|
|
131
|
-
pio run -t upload # Flash
|
|
132
|
-
pio run -t debug # Debug (GDB + OpenOCD/ST-Link)
|
|
133
|
-
pio device monitor # Serial monitor
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## RTOS Options for STM32
|
|
137
|
-
|
|
138
|
-
| RTOS | License | RAM (min) | Best For |
|
|
139
|
-
|------|---------|-----------|----------|
|
|
140
|
-
| FreeRTOS | MIT | ~5KB | Most popular, AWS-supported |
|
|
141
|
-
| Zephyr | Apache 2.0 | ~30KB | Full-featured, Linux-like ecosystem |
|
|
142
|
-
| RT-Thread | Apache 2.0 | ~3KB | Chinese ecosystem, IoT-focused |
|
|
143
|
-
| Azure RTOS (ThreadX) | MIT | ~2KB | Microsoft, very small footprint |
|
|
144
|
-
| CMSIS-RTOS2 | Apache 2.0 | N/A | ARM standard API (wraps FreeRTOS/ThreadX) |
|
|
145
|
-
| bare-metal | N/A | 0 | Simple applications, no OS |
|
|
146
|
-
|
|
147
|
-
## Common Pitfalls
|
|
148
|
-
|
|
149
|
-
| Issue | Fix |
|
|
150
|
-
|-------|-----|
|
|
151
|
-
| Flash size overflow | Use `-Os` (optimize for size); enable LTO; remove unused HAL modules |
|
|
152
|
-
| RAM overflow | Reduce stack/heap size in linker script; use `.data` and `.bss` sections properly |
|
|
153
|
-
| HardFault crash | Check stack overflow (increase stack size); verify interrupt priorities |
|
|
154
|
-
| Clock misconfiguration | Use CubeMX to configure RCC; verify HSE/HSI oscillator source |
|
|
155
|
-
| Debug connection fails | Check ST-Link firmware; verify SWD pins not reconfigured as GPIO |
|
|
156
|
-
| Peripheral not working | Enable peripheral clock in RCC; check pin AF mapping in CubeMX |
|
|
157
|
-
| Power consumption too high | Use low-power modes (STOP/STANDBY); disable unused peripherals |
|
|
158
|
-
| Bootloader jump fails | Set MSP and PC correctly; disable interrupts before jump |
|
|
159
|
-
| OTA update fails | Verify flash write alignment (usually 256-byte or 1KB pages) |
|
|
160
|
-
| Floating point not working | Use `-mfloat-abi=hard -mfpu=fpv4-sp-d16`; enable FPU in CPACR register |
|
|
1
|
+
# STM32 Embedded Build Sub-Skill
|
|
2
|
+
|
|
3
|
+
Build firmware for STM32 microcontrollers using STM32CubeIDE, Keil MDK, or PlatformIO.
|
|
4
|
+
|
|
5
|
+
**Current versions**: STM32CubeIDE 1.17 / STM32CubeMX 6.13 / ARM GCC 13.x (2025-2026)
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
- Industrial control systems
|
|
10
|
+
- IoT sensor nodes and gateways
|
|
11
|
+
- Motor control applications
|
|
12
|
+
- Medical devices
|
|
13
|
+
- Automotive ECU (non-safety-critical)
|
|
14
|
+
- Consumer electronics firmware
|
|
15
|
+
|
|
16
|
+
## STM32 Family Overview
|
|
17
|
+
|
|
18
|
+
| Family | Core | Speed | Flash | Best For |
|
|
19
|
+
|--------|------|-------|-------|----------|
|
|
20
|
+
| STM32F0 | Cortex-M0 | 48MHz | 16-256KB | Cost-sensitive, basic control |
|
|
21
|
+
| STM32F1 | Cortex-M3 | 72MHz | 16-1024KB | General purpose (legacy, very popular) |
|
|
22
|
+
| STM32F4 | Cortex-M4F | 168-200MHz | 512KB-2MB | DSP, audio, mid-range processing |
|
|
23
|
+
| STM32G0 | Cortex-M0+ | 64MHz | 16-512KB | Low power, cost-sensitive |
|
|
24
|
+
| STM32G4 | Cortex-M4F | 170MHz | 128-512KB | Analog-rich, motor control |
|
|
25
|
+
| STM32H7 | Cortex-M7+M4 | 480MHz | 1-2MB | High-performance, display, audio |
|
|
26
|
+
| STM32L0 | Cortex-M0+ | 32MHz | 16-192KB | Ultra-low power |
|
|
27
|
+
| STM32L4 | Cortex-M4F | 80MHz | 256KB-1MB | Low power + performance |
|
|
28
|
+
| STM32U5 | Cortex-M33 | 160MHz | 256KB-2MB | Ultra-low power + security |
|
|
29
|
+
| STM32WB | Cortex-M4+M0+ | 64MHz | 256KB-1MB | Bluetooth LE + application |
|
|
30
|
+
| STM32WL | Cortex-M4+M0+ | 48MHz | 64-256KB | LoRa/LoRaWAN + application |
|
|
31
|
+
| STM32MP1/2 | Cortex-A7/M4 | 650-1200MHz | External | Linux + real-time coprocessor |
|
|
32
|
+
|
|
33
|
+
## Prerequisites
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# STM32CubeIDE (all-in-one: editor + compiler + debugger)
|
|
37
|
+
# Download from st.com/stm32cubeide
|
|
38
|
+
|
|
39
|
+
# OR: ARM GCC toolchain + STM32CubeMX + VS Code
|
|
40
|
+
# ARM GCC:
|
|
41
|
+
sudo apt install gcc-arm-none-eabi # Linux
|
|
42
|
+
brew install --cask gcc-arm-embedded # macOS
|
|
43
|
+
|
|
44
|
+
# STM32CubeMX (pin/peripheral configuration)
|
|
45
|
+
# Download from st.com/stm32cubemx
|
|
46
|
+
|
|
47
|
+
# OR: PlatformIO (cross-platform build system)
|
|
48
|
+
pip install platformio
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## STM32CubeIDE Build
|
|
52
|
+
|
|
53
|
+
### Project Setup
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
STM32CubeIDE:
|
|
57
|
+
1. File → New → STM32 Project
|
|
58
|
+
2. Select MCU/Board (e.g., STM32F407VG)
|
|
59
|
+
3. Configure pins in .ioc file (CubeMX integrated)
|
|
60
|
+
4. Generate code
|
|
61
|
+
5. Write application code in Core/Src/main.c
|
|
62
|
+
6. Build: Project → Build All (Ctrl+B)
|
|
63
|
+
7. Debug: Run → Debug (ST-Link/J-Link)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Build Output
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Debug/ or Release/
|
|
70
|
+
├── myproject.elf ← Debug binary (with symbols)
|
|
71
|
+
├── myproject.hex ← Intel HEX (for programmer)
|
|
72
|
+
├── myproject.bin ← Raw binary (for bootloader/OTA)
|
|
73
|
+
└── myproject.map ← Memory map (linker output)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Command Line Build
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Build with ARM GCC
|
|
80
|
+
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 \
|
|
81
|
+
-O2 -g -Wall \
|
|
82
|
+
-DSTM32F407xx \
|
|
83
|
+
-IInc -IDrivers/STM32F4xx_HAL_Driver/Inc \
|
|
84
|
+
-ICore/Inc \
|
|
85
|
+
Src/main.c Src/stm32f4xx_it.c \
|
|
86
|
+
-TSTM32F407VGTX_FLASH.ld \
|
|
87
|
+
-o build/myproject.elf \
|
|
88
|
+
-lc -lm -lnosys
|
|
89
|
+
|
|
90
|
+
# Generate .bin from .elf
|
|
91
|
+
arm-none-eabi-objcopy -O binary build/myproject.elf build/myproject.bin
|
|
92
|
+
|
|
93
|
+
# Generate .hex from .elf
|
|
94
|
+
arm-none-eabi-objcopy -O ihex build/myproject.elf build/myproject.hex
|
|
95
|
+
|
|
96
|
+
# Flash with ST-Link
|
|
97
|
+
st-flash write build/myproject.bin 0x08000000
|
|
98
|
+
|
|
99
|
+
# Flash with J-Link
|
|
100
|
+
JLinkExe -device STM32F407VG -if SWD -speed 4000 -CommandFile flash.jlink
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Flash Size Report
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
arm-none-eabi-size build/myproject.elf
|
|
107
|
+
# Output:
|
|
108
|
+
# text data bss dec hex filename
|
|
109
|
+
# 32768 1024 4096 37888 9400 build/myproject.elf
|
|
110
|
+
# text = code + const data (Flash)
|
|
111
|
+
# data = initialized variables (Flash + RAM)
|
|
112
|
+
# bss = zero-initialized variables (RAM only)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## PlatformIO Build
|
|
116
|
+
|
|
117
|
+
```ini
|
|
118
|
+
; platformio.ini
|
|
119
|
+
[env:stm32f407vg]
|
|
120
|
+
platform = ststm32
|
|
121
|
+
board = disco_f407vg
|
|
122
|
+
framework = stm32cube ; or: arduino, cmsis, zephyr
|
|
123
|
+
build_flags = -O2 -DSTM32F407xx
|
|
124
|
+
upload_protocol = stlink
|
|
125
|
+
debug_tool = stlink
|
|
126
|
+
monitor_speed = 115200
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
pio run # Build
|
|
131
|
+
pio run -t upload # Flash
|
|
132
|
+
pio run -t debug # Debug (GDB + OpenOCD/ST-Link)
|
|
133
|
+
pio device monitor # Serial monitor
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## RTOS Options for STM32
|
|
137
|
+
|
|
138
|
+
| RTOS | License | RAM (min) | Best For |
|
|
139
|
+
|------|---------|-----------|----------|
|
|
140
|
+
| FreeRTOS | MIT | ~5KB | Most popular, AWS-supported |
|
|
141
|
+
| Zephyr | Apache 2.0 | ~30KB | Full-featured, Linux-like ecosystem |
|
|
142
|
+
| RT-Thread | Apache 2.0 | ~3KB | Chinese ecosystem, IoT-focused |
|
|
143
|
+
| Azure RTOS (ThreadX) | MIT | ~2KB | Microsoft, very small footprint |
|
|
144
|
+
| CMSIS-RTOS2 | Apache 2.0 | N/A | ARM standard API (wraps FreeRTOS/ThreadX) |
|
|
145
|
+
| bare-metal | N/A | 0 | Simple applications, no OS |
|
|
146
|
+
|
|
147
|
+
## Common Pitfalls
|
|
148
|
+
|
|
149
|
+
| Issue | Fix |
|
|
150
|
+
|-------|-----|
|
|
151
|
+
| Flash size overflow | Use `-Os` (optimize for size); enable LTO; remove unused HAL modules |
|
|
152
|
+
| RAM overflow | Reduce stack/heap size in linker script; use `.data` and `.bss` sections properly |
|
|
153
|
+
| HardFault crash | Check stack overflow (increase stack size); verify interrupt priorities |
|
|
154
|
+
| Clock misconfiguration | Use CubeMX to configure RCC; verify HSE/HSI oscillator source |
|
|
155
|
+
| Debug connection fails | Check ST-Link firmware; verify SWD pins not reconfigured as GPIO |
|
|
156
|
+
| Peripheral not working | Enable peripheral clock in RCC; check pin AF mapping in CubeMX |
|
|
157
|
+
| Power consumption too high | Use low-power modes (STOP/STANDBY); disable unused peripherals |
|
|
158
|
+
| Bootloader jump fails | Set MSP and PC correctly; disable interrupts before jump |
|
|
159
|
+
| OTA update fails | Verify flash write alignment (usually 256-byte or 1KB pages) |
|
|
160
|
+
| Floating point not working | Use `-mfloat-abi=hard -mfpu=fpv4-sp-d16`; enable FPU in CPACR register |
|