fbuild 1.2.8__py3-none-any.whl

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.
Files changed (121) hide show
  1. fbuild/__init__.py +390 -0
  2. fbuild/assets/example.txt +1 -0
  3. fbuild/build/__init__.py +117 -0
  4. fbuild/build/archive_creator.py +186 -0
  5. fbuild/build/binary_generator.py +444 -0
  6. fbuild/build/build_component_factory.py +131 -0
  7. fbuild/build/build_info_generator.py +624 -0
  8. fbuild/build/build_state.py +325 -0
  9. fbuild/build/build_utils.py +93 -0
  10. fbuild/build/compilation_executor.py +422 -0
  11. fbuild/build/compiler.py +165 -0
  12. fbuild/build/compiler_avr.py +574 -0
  13. fbuild/build/configurable_compiler.py +664 -0
  14. fbuild/build/configurable_linker.py +637 -0
  15. fbuild/build/flag_builder.py +214 -0
  16. fbuild/build/library_dependency_processor.py +185 -0
  17. fbuild/build/linker.py +708 -0
  18. fbuild/build/orchestrator.py +67 -0
  19. fbuild/build/orchestrator_avr.py +651 -0
  20. fbuild/build/orchestrator_esp32.py +878 -0
  21. fbuild/build/orchestrator_rp2040.py +719 -0
  22. fbuild/build/orchestrator_stm32.py +696 -0
  23. fbuild/build/orchestrator_teensy.py +580 -0
  24. fbuild/build/source_compilation_orchestrator.py +218 -0
  25. fbuild/build/source_scanner.py +516 -0
  26. fbuild/cli.py +717 -0
  27. fbuild/cli_utils.py +314 -0
  28. fbuild/config/__init__.py +16 -0
  29. fbuild/config/board_config.py +542 -0
  30. fbuild/config/board_loader.py +92 -0
  31. fbuild/config/ini_parser.py +369 -0
  32. fbuild/config/mcu_specs.py +88 -0
  33. fbuild/daemon/__init__.py +42 -0
  34. fbuild/daemon/async_client.py +531 -0
  35. fbuild/daemon/client.py +1505 -0
  36. fbuild/daemon/compilation_queue.py +293 -0
  37. fbuild/daemon/configuration_lock.py +865 -0
  38. fbuild/daemon/daemon.py +585 -0
  39. fbuild/daemon/daemon_context.py +293 -0
  40. fbuild/daemon/error_collector.py +263 -0
  41. fbuild/daemon/file_cache.py +332 -0
  42. fbuild/daemon/firmware_ledger.py +546 -0
  43. fbuild/daemon/lock_manager.py +508 -0
  44. fbuild/daemon/logging_utils.py +149 -0
  45. fbuild/daemon/messages.py +957 -0
  46. fbuild/daemon/operation_registry.py +288 -0
  47. fbuild/daemon/port_state_manager.py +249 -0
  48. fbuild/daemon/process_tracker.py +366 -0
  49. fbuild/daemon/processors/__init__.py +18 -0
  50. fbuild/daemon/processors/build_processor.py +248 -0
  51. fbuild/daemon/processors/deploy_processor.py +664 -0
  52. fbuild/daemon/processors/install_deps_processor.py +431 -0
  53. fbuild/daemon/processors/locking_processor.py +777 -0
  54. fbuild/daemon/processors/monitor_processor.py +285 -0
  55. fbuild/daemon/request_processor.py +457 -0
  56. fbuild/daemon/shared_serial.py +819 -0
  57. fbuild/daemon/status_manager.py +238 -0
  58. fbuild/daemon/subprocess_manager.py +316 -0
  59. fbuild/deploy/__init__.py +21 -0
  60. fbuild/deploy/deployer.py +67 -0
  61. fbuild/deploy/deployer_esp32.py +310 -0
  62. fbuild/deploy/docker_utils.py +315 -0
  63. fbuild/deploy/monitor.py +519 -0
  64. fbuild/deploy/qemu_runner.py +603 -0
  65. fbuild/interrupt_utils.py +34 -0
  66. fbuild/ledger/__init__.py +52 -0
  67. fbuild/ledger/board_ledger.py +560 -0
  68. fbuild/output.py +352 -0
  69. fbuild/packages/__init__.py +66 -0
  70. fbuild/packages/archive_utils.py +1098 -0
  71. fbuild/packages/arduino_core.py +412 -0
  72. fbuild/packages/cache.py +256 -0
  73. fbuild/packages/concurrent_manager.py +510 -0
  74. fbuild/packages/downloader.py +518 -0
  75. fbuild/packages/fingerprint.py +423 -0
  76. fbuild/packages/framework_esp32.py +538 -0
  77. fbuild/packages/framework_rp2040.py +349 -0
  78. fbuild/packages/framework_stm32.py +459 -0
  79. fbuild/packages/framework_teensy.py +346 -0
  80. fbuild/packages/github_utils.py +96 -0
  81. fbuild/packages/header_trampoline_cache.py +394 -0
  82. fbuild/packages/library_compiler.py +203 -0
  83. fbuild/packages/library_manager.py +549 -0
  84. fbuild/packages/library_manager_esp32.py +725 -0
  85. fbuild/packages/package.py +163 -0
  86. fbuild/packages/platform_esp32.py +383 -0
  87. fbuild/packages/platform_rp2040.py +400 -0
  88. fbuild/packages/platform_stm32.py +581 -0
  89. fbuild/packages/platform_teensy.py +312 -0
  90. fbuild/packages/platform_utils.py +131 -0
  91. fbuild/packages/platformio_registry.py +369 -0
  92. fbuild/packages/sdk_utils.py +231 -0
  93. fbuild/packages/toolchain.py +436 -0
  94. fbuild/packages/toolchain_binaries.py +196 -0
  95. fbuild/packages/toolchain_esp32.py +489 -0
  96. fbuild/packages/toolchain_metadata.py +185 -0
  97. fbuild/packages/toolchain_rp2040.py +436 -0
  98. fbuild/packages/toolchain_stm32.py +417 -0
  99. fbuild/packages/toolchain_teensy.py +404 -0
  100. fbuild/platform_configs/esp32.json +150 -0
  101. fbuild/platform_configs/esp32c2.json +144 -0
  102. fbuild/platform_configs/esp32c3.json +143 -0
  103. fbuild/platform_configs/esp32c5.json +151 -0
  104. fbuild/platform_configs/esp32c6.json +151 -0
  105. fbuild/platform_configs/esp32p4.json +149 -0
  106. fbuild/platform_configs/esp32s3.json +151 -0
  107. fbuild/platform_configs/imxrt1062.json +56 -0
  108. fbuild/platform_configs/rp2040.json +70 -0
  109. fbuild/platform_configs/rp2350.json +76 -0
  110. fbuild/platform_configs/stm32f1.json +59 -0
  111. fbuild/platform_configs/stm32f4.json +63 -0
  112. fbuild/py.typed +0 -0
  113. fbuild-1.2.8.dist-info/METADATA +468 -0
  114. fbuild-1.2.8.dist-info/RECORD +121 -0
  115. fbuild-1.2.8.dist-info/WHEEL +5 -0
  116. fbuild-1.2.8.dist-info/entry_points.txt +5 -0
  117. fbuild-1.2.8.dist-info/licenses/LICENSE +21 -0
  118. fbuild-1.2.8.dist-info/top_level.txt +2 -0
  119. fbuild_lint/__init__.py +0 -0
  120. fbuild_lint/ruff_plugins/__init__.py +0 -0
  121. fbuild_lint/ruff_plugins/keyboard_interrupt_checker.py +158 -0
@@ -0,0 +1,468 @@
1
+ Metadata-Version: 2.4
2
+ Name: fbuild
3
+ Version: 1.2.8
4
+ Summary: Modern replacement for PlatformIO with URL-based platform/toolchain management and bug-free architecture
5
+ Home-page: https://github.com/fastled/fbuild
6
+ Maintainer: Zachary Vorhies
7
+ License: BSD 3-Clause License
8
+ Keywords: embedded,arduino,platformio,compiler,toolchain,firmware,microcontroller
9
+ Classifier: Programming Language :: Python :: 3
10
+ Requires-Python: >=3.10
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: requests>=2.28.0
14
+ Requires-Dist: tqdm>=4.64.0
15
+ Requires-Dist: pyserial>=3.5
16
+ Requires-Dist: esptool>=4.6.0
17
+ Requires-Dist: psutil>=5.9.0
18
+ Provides-Extra: dev
19
+ Requires-Dist: pytest>=7.0; extra == "dev"
20
+ Requires-Dist: pytest-cov; extra == "dev"
21
+ Requires-Dist: pytest-xdist; extra == "dev"
22
+ Dynamic: home-page
23
+ Dynamic: license-file
24
+ Dynamic: maintainer
25
+
26
+ ![fbuild](https://github.com/user-attachments/assets/7db78eba-b10f-44c7-ae32-7fc0b5e46642)
27
+
28
+ [![Build Arduino Uno](https://github.com/fastled/fbuild/actions/workflows/build-uno.yml/badge.svg)](https://github.com/fastled/fbuild/actions/workflows/build-uno.yml) [![Build ESP32 Dev](https://github.com/fastled/fbuild/actions/workflows/build-esp32dev.yml/badge.svg)](https://github.com/fastled/fbuild/actions/workflows/build-esp32dev.yml) [![Build ESP32-C6](https://github.com/fastled/fbuild/actions/workflows/build-esp32c6.yml/badge.svg)](https://github.com/fastled/fbuild/actions/workflows/build-esp32c6.yml) [![Build ESP32-S3](https://github.com/fastled/fbuild/actions/workflows/build-esp32s3.yml/badge.svg)](https://github.com/fastled/fbuild/actions/workflows/build-esp32s3.yml) [![Build ESP32-C2](https://github.com/fastled/fbuild/actions/workflows/build-esp32c2.yml/badge.svg)](https://github.com/fastled/fbuild/actions/workflows/build-esp32c2.yml)
29
+
30
+ *A fast, next-generation multi-platform compiler, deployer, and monitor for embedded development, directly compatible with platformio*
31
+
32
+ # fbuild
33
+
34
+ Fbuild is a next-generation embedded development tool featuring a clean, transparent architecture. It provides fast incremental builds, URL-based package management, and soon to be comprehensive multi-platform support for Arduino and ESP32 development.
35
+
36
+ **platformio.ini compatible**
37
+
38
+ fbuiold uses the same `platformio.ini` already used in platformio sketches.
39
+
40
+ **Design Goals**
41
+
42
+ * Replaces `platformio` in `FastLED` repo builders
43
+ * Correct and parallel package management system
44
+ * locking is done through a daemon process
45
+ * packages are fingerprinted to their version and cached, download only once
46
+ * sccache for caching compiles
47
+ * Eesily add features via AI
48
+ * This codebase is designed and implemented by AI, just fork it and ask ai to make your change Please send us a PR!
49
+
50
+ **Current Status**: v1.1.0 - Full Arduino Uno / esp32c6 support with working build system
51
+
52
+ ## Examples
53
+
54
+ **Quick start** - Build, deploy, and monitor in one command:
55
+
56
+ ```bash
57
+ # install
58
+ pip install fbuild
59
+ ```
60
+
61
+ ```bash
62
+ # Default action: build + deploy
63
+ fbuild tests/esp32c6
64
+ ```
65
+
66
+ ```bash
67
+ # Default action: build + deploy + monitor
68
+ fbuild tests/esp32c6 --monitor
69
+ ```
70
+
71
+
72
+ **Deploy commands:**
73
+
74
+ ```bash
75
+ # Deploy with clean build
76
+ uv run fbuild deploy tests/esp32c6 --clean
77
+
78
+ # Deploy with monitoring and test patterns
79
+ uv run fbuild deploy tests/esp32c6 --monitor="--timeout 60 --halt-on-error \"TEST FAILED\" --halt-on-success \"TEST PASSED\""
80
+ ```
81
+
82
+ **Monitor command:**
83
+
84
+ ```bash
85
+ # Monitor serial output with pattern matching
86
+ uv run fbuild monitor --timeout 60 --halt-on-error "TEST FAILED" --halt-on-success "TEST PASSED"
87
+ ```
88
+
89
+ * Serial monitoring requires pyserial to attach to the USB device
90
+ * Port auto-detection works similarly to PlatformIO
91
+
92
+ ## Key Features
93
+
94
+ - **URL-based Package Management**: Direct URLs to toolchains and platforms - no hidden registries
95
+ - **Library Management**: Download and compile Arduino libraries from GitHub URLs
96
+ - **Fast Incremental Builds**: 0.76s rebuilds, 3s full builds (cached)
97
+ - **LTO Support**: Link-Time Optimization for optimal code size
98
+ - **Transparent Architecture**: Know exactly what's happening at every step
99
+ - **Real Downloads, No Mocks**: All packages are real, validated, and checksummed
100
+ - **Cross-platform Support**: Windows, macOS, and Linux
101
+ - **Modern Python**: 100% type-safe, PEP 8 compliant, tested
102
+
103
+ ## Installation
104
+
105
+ ```bash
106
+ # Install from PyPI (when published)
107
+ pip install fbuild
108
+
109
+ # Or install from source
110
+ git clone https://github.com/yourusername/fbuild.git
111
+ cd fbuild
112
+ pip install -e .
113
+ ```
114
+
115
+ ## Quick Start
116
+
117
+ ### Building an Arduino Uno Project
118
+
119
+ 1. **Create project structure**:
120
+ ```bash
121
+ mkdir my-project && cd my-project
122
+ mkdir src
123
+ ```
124
+
125
+ 2. **Create platformio.ini**:
126
+ ```ini
127
+ [env:uno]
128
+ platform = atmelavr
129
+ board = uno
130
+ framework = arduino
131
+ ```
132
+
133
+ 3. **Write your sketch** (`src/main.ino`):
134
+ ```cpp
135
+ void setup() {
136
+ pinMode(LED_BUILTIN, OUTPUT);
137
+ }
138
+
139
+ void loop() {
140
+ digitalWrite(LED_BUILTIN, HIGH);
141
+ delay(1000);
142
+ digitalWrite(LED_BUILTIN, LOW);
143
+ delay(1000);
144
+ }
145
+ ```
146
+
147
+ 4. **Build**:
148
+ ```bash
149
+ fbuild build
150
+ ```
151
+
152
+ On first build, Fbuild will:
153
+ - Download AVR-GCC toolchain (50MB, one-time)
154
+ - Download Arduino AVR core (5MB, one-time)
155
+ - Compile your sketch
156
+ - Generate `firmware.hex` in `.fbuild/build/uno/`
157
+
158
+ **Build time**: ~19s first build, ~3s subsequent builds, <1s incremental
159
+
160
+ ## CLI Usage
161
+
162
+ ### Build Command
163
+
164
+ ```bash
165
+ # Build with auto-detected environment
166
+ fbuild build
167
+
168
+ # Build specific environment
169
+ fbuild build --environment uno
170
+ fbuild build -e mega
171
+
172
+ # Clean build (remove all build artifacts)
173
+ fbuild build --clean
174
+
175
+ # Verbose output (shows all compiler commands)
176
+ fbuild build --verbose
177
+
178
+ # Build in different directory
179
+ fbuild build --project-dir /path/to/project
180
+ ```
181
+
182
+ ### Output
183
+
184
+ ```
185
+ Building environment: uno
186
+ Downloading toolchain: avr-gcc 7.3.0-atmel3.6.1-arduino7
187
+ Downloading: 100% ████████████████████ 50.1MB/50.1MB
188
+ Extracting package...
189
+ Toolchain ready at: .fbuild/cache/...
190
+ Downloading Arduino core: 1.8.6
191
+ Compiling sketch...
192
+ Compiling Arduino core...
193
+ Linking firmware...
194
+ Converting to Intel HEX...
195
+
196
+ ✓ Build successful!
197
+
198
+ Firmware: .fbuild/build/uno/firmware.hex
199
+ Program: 1058 bytes (3.3% of 32256 bytes)
200
+ RAM: 9 bytes (0.4% of 2048 bytes)
201
+ Build time: 3.06s
202
+ ```
203
+
204
+ ## Configuration
205
+
206
+ ### platformio.ini Reference
207
+
208
+ **Minimal configuration**:
209
+ ```ini
210
+ [env:uno]
211
+ platform = atmelavr
212
+ board = uno
213
+ framework = arduino
214
+ ```
215
+
216
+ **Full configuration**:
217
+ ```ini
218
+ [platformio]
219
+ default_envs = uno
220
+
221
+ [env:uno]
222
+ platform = atmelavr
223
+ board = uno
224
+ framework = arduino
225
+ upload_port = COM3 # Future: for uploading
226
+ monitor_speed = 9600 # Future: for serial monitor
227
+ build_flags =
228
+ -DDEBUG
229
+ -DLED_PIN=13
230
+ lib_deps =
231
+ https://github.com/FastLED/FastLED
232
+ https://github.com/adafruit/Adafruit_NeoPixel
233
+ ```
234
+
235
+ ### Library Dependencies
236
+
237
+ Fbuild supports downloading and compiling Arduino libraries directly from GitHub URLs:
238
+
239
+ ```ini
240
+ [env:uno]
241
+ platform = atmelavr
242
+ board = uno
243
+ framework = arduino
244
+ lib_deps =
245
+ https://github.com/FastLED/FastLED
246
+ ```
247
+
248
+ **Features**:
249
+ - Automatic GitHub URL optimization (converts repo URLs to zip downloads)
250
+ - Automatic branch detection (main vs master)
251
+ - Proper Arduino library structure handling
252
+ - LTO (Link-Time Optimization) for optimal code size
253
+ - Support for complex libraries with assembly optimizations
254
+
255
+ **Example build with FastLED**:
256
+ ```
257
+ ✓ Build successful!
258
+ Firmware: tests/uno/.fbuild/build/uno/firmware.hex
259
+ Size: 12KB (4318 bytes program, 3689 bytes RAM)
260
+ Build time: 78.59 seconds
261
+ ```
262
+
263
+
264
+ ### Supported Platforms and Boards
265
+
266
+ **Arduino AVR Platform** - Fully Supported ✓
267
+ - **Arduino Uno** (atmega328p, 16MHz) - Fully tested ✓
268
+
269
+ **ESP32 Platform** - Supported ✓
270
+ - **ESP32 Dev** (esp32dev) - Supported ✓
271
+ - **ESP32-C3** (esp32-c3-devkitm-1) - Supported ✓
272
+ - **ESP32-C6** (esp32c6-devkit) - Supported ✓
273
+ - **ESP32-S3** (esp32-s3-devkitc-1) - Supported ✓
274
+ - **ESP32-S2** - Supported ✓
275
+ - **ESP32-H2** - Supported ✓
276
+ - **ESP32-P4** - Supported ✓
277
+ - **ESP32-C2** - Supported ✓ (v0.1.0+)
278
+ - Uses skeleton library approach with ROM linker scripts
279
+ - Full Arduino framework support
280
+ - 220KB firmware size typical
281
+
282
+ **Planned Support**:
283
+ - Arduino Mega
284
+ - Arduino Nano
285
+ - Arduino Leonardo
286
+ - More AVR boards
287
+ - Teensy 3.x/4.x platforms
288
+ ## Performance
289
+
290
+ **Benchmarks** (Arduino Uno Blink sketch):
291
+
292
+ | Build Type | Time | Description |
293
+ |------------|------|-------------|
294
+ | First build | 19.25s | Includes toolchain download (50MB) |
295
+ | Full build | 3.06s | All packages cached |
296
+ | Incremental | 0.76s | No source changes |
297
+ | Clean build | 2.58s | Rebuild from cache |
298
+
299
+ **Firmware Size** (Blink):
300
+ - Program: 1,058 bytes (3.3% of 32KB flash)
301
+ - RAM: 9 bytes (0.4% of 2KB RAM)
302
+
303
+ ## Key Benefits
304
+
305
+ ### Transparency
306
+ Direct URLs and hash-based caching mean you know exactly what you're downloading. No hidden package registries or opaque dependency resolution.
307
+
308
+ ### Reliability
309
+ Real downloads with checksum verification ensure consistent, reproducible builds. No mocks in production code.
310
+
311
+ ### Speed
312
+ Optimized incremental builds complete in under 1 second, with intelligent caching for full rebuilds in 2-5 seconds.
313
+
314
+ ### Code Quality
315
+ 100% type-safe (mypy), PEP 8 compliant, and comprehensive test coverage ensure a maintainable and reliable codebase.
316
+
317
+ ### Clear Error Messages
318
+ Actionable error messages with suggestions help you quickly identify and fix issues without requiring forum searches.
319
+
320
+ ## Architecture
321
+
322
+ See [docs/build-system.md](docs/build-system.md) for comprehensive architecture documentation.
323
+
324
+ **High-level flow**:
325
+ ```
326
+ platformio.ini → Config Parser → Package Manager → Build Orchestrator
327
+
328
+ ┌─────────────────┼─────────────────┬──────────────────┐
329
+ ↓ ↓ ↓ ↓
330
+ Toolchain Arduino Core Source Scanner Library Manager
331
+ (AVR-GCC) (cores/variants) (.ino/.cpp/.c) (GitHub libs)
332
+ ↓ ↓ ↓ ↓
333
+ └─────────────────┼─────────────────┴──────────────────┘
334
+
335
+ Compiler (avr-g++)
336
+
337
+ Linker (avr-gcc)
338
+
339
+ objcopy (ELF → HEX)
340
+
341
+ firmware.hex
342
+ ```
343
+
344
+ ### Library System Architecture
345
+
346
+ The library management system handles downloading, compiling, and linking Arduino libraries:
347
+
348
+ 1. **Library Downloading**
349
+ - Optimizes GitHub URLs to direct zip downloads
350
+ - Detects and uses appropriate branch (main/master)
351
+ - Extracts libraries with proper directory structure
352
+
353
+ 2. **Library Compilation**
354
+ - Compiles C/C++ library sources with LTO flags (`-flto -fno-fat-lto-objects`)
355
+ - Resolves include paths for Arduino library structure
356
+ - Generates LTO bytecode objects for optimal linking
357
+
358
+ 3. **Library Linking**
359
+ - Passes library object files directly to linker (no archiving)
360
+ - LTO-aware linking with `--allow-multiple-definition` for symbol resolution
361
+ - Proper handling of weak symbols and ISR handlers
362
+
363
+ **Technical Solutions**:
364
+ - **LTO Bytecode**: Generate only LTO bytecode to avoid AVR register limitations during compilation
365
+ - **Direct Object Linking**: Pass object files directly to linker instead of archiving for better LTO integration
366
+ - **Multiple Definition Handling**: Support libraries that define symbols in multiple files (e.g., FastLED ISR handlers)
367
+
368
+ ## Project Structure
369
+
370
+ ```
371
+ my-project/
372
+ ├── platformio.ini # Configuration file
373
+ ├── src/
374
+ │ ├── main.ino # Your Arduino sketch
375
+ │ └── helpers.cpp # Additional C++ files
376
+ └── .fbuild/ # Build artifacts (auto-generated)
377
+ ├── cache/
378
+ │ ├── packages/ # Downloaded toolchains
379
+ │ └── extracted/ # Arduino cores
380
+ └── build/
381
+ └── uno/
382
+ ├── src/ # Compiled sketch objects
383
+ ├── core/ # Compiled Arduino core
384
+ └── firmware.hex # Final output ← Upload this!
385
+ ```
386
+
387
+ ## Testing
388
+
389
+ Fbuild includes comprehensive integration tests:
390
+
391
+ ```bash
392
+ # Run all tests
393
+ pytest tests/
394
+
395
+ # Run integration tests only
396
+ pytest tests/integration/
397
+
398
+ # Run with verbose output
399
+ pytest -v tests/integration/
400
+
401
+ # Test results: 11/11 passing
402
+ ```
403
+
404
+ **Test Coverage**:
405
+ - Full build success path
406
+ - Incremental builds
407
+ - Clean builds
408
+ - Firmware size validation
409
+ - HEX format validation
410
+ - Error handling (missing config, syntax errors, etc.)
411
+
412
+ ## Troubleshooting
413
+
414
+ ### Build fails with "platformio.ini not found"
415
+
416
+ Make sure you're in the project directory or use `-d`:
417
+ ```bash
418
+ fbuild build -d /path/to/project
419
+ ```
420
+
421
+ ### Build fails with checksum mismatch
422
+
423
+ Clear cache and rebuild:
424
+ ```bash
425
+ rm -rf .fbuild/cache/
426
+ fbuild build
427
+ ```
428
+
429
+ ### Compiler errors in sketch
430
+
431
+ Check the error message for line numbers:
432
+ ```
433
+ Error: src/main.ino:5:1: error: expected ';' before '}' token
434
+ ```
435
+
436
+ Common issues:
437
+ - Missing semicolon
438
+ - Missing closing brace
439
+ - Undefined function (missing #include or prototype)
440
+
441
+ ### Slow builds
442
+
443
+ - First build with downloads: 15-30s (expected)
444
+ - Cached builds: 2-5s (expected)
445
+ - Incremental: <1s (expected)
446
+
447
+ If slower, check:
448
+ - Network speed (for downloads)
449
+ - Disk speed (SSD recommended)
450
+ - Use `--verbose` to see what's slow
451
+
452
+ See [docs/build-system.md](docs/build-system.md) for more troubleshooting.
453
+
454
+ ## Development
455
+
456
+ To develop Fbuild, run `. ./activate.sh`
457
+
458
+ ### Windows
459
+
460
+ This environment requires you to use `git-bash`.
461
+
462
+ ### Linting
463
+
464
+ Run `./lint.sh` to find linting errors using `pylint`, `flake8` and `mypy`.
465
+
466
+ ## License
467
+
468
+ BSD 3-Clause License
@@ -0,0 +1,121 @@
1
+ fbuild/__init__.py,sha256=y7qcqRZGEqLUPqNh55Ns0v7M8NGH3UykAnfA5tEEumQ,13469
2
+ fbuild/cli.py,sha256=znkAj6zA5rGx4LZABQFWI4_zkamLDHcCldtfOvhwGDo,23676
3
+ fbuild/cli_utils.py,sha256=BlDT2XVlktUEgTF5SwFUFu8xbIa9P4O4LoCVKes8hFs,9950
4
+ fbuild/interrupt_utils.py,sha256=JuEAgImyF17ZP03ijCTRCXcxcTPt6eLZUmzqueyOEOQ,1026
5
+ fbuild/output.py,sha256=SqG4ZUafZ1wFosUioXeaO2xop5UEeSByv4hIema-_Vo,9378
6
+ fbuild/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ fbuild/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
8
+ fbuild/build/__init__.py,sha256=NS6A-b-yPCVcjbE0Elkx3_Qf-_O6sdk_aXumSheYjOA,2871
9
+ fbuild/build/archive_creator.py,sha256=L5ZMLK44jZFhROOsyQdk-8nBKbDqDDRAxlM9gbplK7Y,6919
10
+ fbuild/build/binary_generator.py,sha256=wDGtcPuQlKfMuxjJZdZqRdqQCbg9cAao4zaXKi3qArg,16042
11
+ fbuild/build/build_component_factory.py,sha256=bUfGNOVrO823TdGpEjNPpPrsM3ZXvvgwGVODLUbCZ28,4237
12
+ fbuild/build/build_info_generator.py,sha256=pjPBLBp4Vrv2b1_W9ixyOFSKCT78654yyh3hnYw96ig,22408
13
+ fbuild/build/build_state.py,sha256=MtnCof6nOtKyAqW8OFWuMK7GXOIwmG1TeBJtXiRq18Y,11168
14
+ fbuild/build/build_utils.py,sha256=tus8lduf98_HDszpJOqYP2FQlg1QcZF3IanYRvgonF8,2727
15
+ fbuild/build/compilation_executor.py,sha256=pzLeavweXkvaliLQEpwxjYvw1WMZcRzxdOJIX0kfezs,15748
16
+ fbuild/build/compiler.py,sha256=YMUUonS6eGbOPgf0Vo9BaG7ms3Kts2PalgCUhoIjCbY,4181
17
+ fbuild/build/compiler_avr.py,sha256=9KG2IfWEK9VGHbsWe2Y36rcFAkq1dMXo5PX5TPKI3D4,17604
18
+ fbuild/build/configurable_compiler.py,sha256=LUgxzB7UDm1Thha4ObyDWc8QnayTWUfa2n3SzgdAbn0,24006
19
+ fbuild/build/configurable_linker.py,sha256=tK6jHEojVOz7zqiBOa-jQZCC730LgjeRZrGtLiWxwxM,24141
20
+ fbuild/build/flag_builder.py,sha256=5EhsVkH6_Bu9O802EJL4r08TCHBjuzWrF8K1xYjMbtc,7147
21
+ fbuild/build/library_dependency_processor.py,sha256=EoyOZJX4lVYCasXL6S5g3q86jlMlR9zyf-xfCu5vUyE,5860
22
+ fbuild/build/linker.py,sha256=4ooKcSqQDn96KLxHAiWNbR0vuhDnDOXFFEKqp5x9UJE,23831
23
+ fbuild/build/orchestrator.py,sha256=KvKfyJw-SZR_X7c-iE-hLj4KvFkO-VXkwDG0VeNyoms,1792
24
+ fbuild/build/orchestrator_avr.py,sha256=q3gAHsarKBo1BPaea5PDNPTEGxX3dfCW5uaupcBJMZY,24397
25
+ fbuild/build/orchestrator_esp32.py,sha256=ZDQQ-h8xU6Uf1tZavY1tXfIuEpPfQQtPbo9l0J3eKwU,32619
26
+ fbuild/build/orchestrator_rp2040.py,sha256=1spsm1Yl1QU6ocPe47VAR2knBpo_7CxeZOl2cbivAfo,26505
27
+ fbuild/build/orchestrator_stm32.py,sha256=JGkUiwqcwp6IhOeKIe8rsQ4Ug4XNwjM0fCxZ9a72ZC0,24858
28
+ fbuild/build/orchestrator_teensy.py,sha256=KA4HhLj0vpl2zejNNZMcKc1IQW-GrFzE5uoIhTOzL1o,20217
29
+ fbuild/build/source_compilation_orchestrator.py,sha256=dWXKXAKonkiLWv0r7EufdUZS5EFTocwjSSS6kuDU8g0,7036
30
+ fbuild/build/source_scanner.py,sha256=sypaXJ7epC6APRosKG8xtTXGV-ngK2_3PdLCg-pnS4c,17422
31
+ fbuild/config/__init__.py,sha256=3QSJUBVhJabUl2g8dglAp58U8nH5fh2gHZWIoIxIl8g,403
32
+ fbuild/config/board_config.py,sha256=HXIDGyqcqSnMtIAkSNTBo8W374I3EfEbOOOm__IyMrU,16904
33
+ fbuild/config/board_loader.py,sha256=X64LJSISfP2pDx9FrNG5tkXqQ2wDfnp5WxHmpkfLXIk,3528
34
+ fbuild/config/ini_parser.py,sha256=1vZH0ANTfGDtuVToue5Le5aWmiWR_-A06XQxTSYPReo,13310
35
+ fbuild/config/mcu_specs.py,sha256=GZYl_86ykdYvuj5oLUoD5zN7hOUnhh7dK4X3q5AFk-E,2145
36
+ fbuild/daemon/__init__.py,sha256=48nihHHiDea4a9jnW8dHEn3p-cBMwr_gLDpNJn13y3Y,936
37
+ fbuild/daemon/async_client.py,sha256=o8LiQiPH6ACvlYsi8Dol9WHBtmi2IsRkUDtKQm5wb1w,18478
38
+ fbuild/daemon/client.py,sha256=fjifraznPyMvex83zbRRCtVyxbFJJasrPZ2uzU4wDBo,50033
39
+ fbuild/daemon/compilation_queue.py,sha256=l7LUBy81l_OhxocA0TDJVPT4FyU0dkbLwEEvFRGIaIo,10405
40
+ fbuild/daemon/configuration_lock.py,sha256=mc5VaPAIsZrRYS-KMHYP0wVCz8Qge3tvZyS0qgH5ols,34332
41
+ fbuild/daemon/daemon.py,sha256=GC_Pd8hu0F7ZSguZIZYnngrqJxaNpNNtC_NySrqCL80,22749
42
+ fbuild/daemon/daemon_context.py,sha256=OfF0CHGUdXJlyo7-CBDUNOiEjyg_JHhthDB8nP5Y68U,11744
43
+ fbuild/daemon/error_collector.py,sha256=P_s_1XkkpbK-295Uh1ExlYyW4t9mmBgxeusEoRH6vlE,8960
44
+ fbuild/daemon/file_cache.py,sha256=2DiKpKJGz1ubj-T0-otiLkE6za0DYdzmWmtrPN6xPkw,10784
45
+ fbuild/daemon/firmware_ledger.py,sha256=XDp-8cK7E2OEAGUFZY_jOyyEW9p_DEkNPjmRYKbcOgE,17415
46
+ fbuild/daemon/lock_manager.py,sha256=02JEUfmHM9qgaDXvAjkv2FIkdnOBIro_lw7rdbYeFEk,20723
47
+ fbuild/daemon/logging_utils.py,sha256=0lshNSYoqFxgm8vJdfF3bv_YGw3xvQ7uKHxy3jq0lZ4,5233
48
+ fbuild/daemon/messages.py,sha256=rAI2bHTDn5tftsOkgHnOYmlsC_XSnozlDiKB2F_x26E,33189
49
+ fbuild/daemon/operation_registry.py,sha256=4kJO0P-Q4wh-lv-CLQVktCi8fV9x4ycmIVCcoF9BrOc,11329
50
+ fbuild/daemon/port_state_manager.py,sha256=qwLudhUg24KutnXPEdTwpn-CNtNk6IHx07sWttPV4qY,8383
51
+ fbuild/daemon/process_tracker.py,sha256=cm0sngT6AP7spNCEmE2NJmcZcnYcYEhBds6yLsE8Ze0,12536
52
+ fbuild/daemon/request_processor.py,sha256=9tYUJ5n2m4aQ9Mkq1ra8XyqqxVxgDnQe5lgNaPikPgg,16830
53
+ fbuild/daemon/shared_serial.py,sha256=LjfvsSijFvGNSX93tw3IJjpx1fXpF0LlGse21HbKVHg,31081
54
+ fbuild/daemon/status_manager.py,sha256=5UgqQaqWfJw87gX4GBu2LQXgEKd6yhgNvlAUKHsqlHc,8795
55
+ fbuild/daemon/subprocess_manager.py,sha256=yTmBr_YnQmz2vaUwyPOlsfPI24aCbS7yUAiQpCNh-m8,12241
56
+ fbuild/daemon/processors/__init__.py,sha256=c8H6cIOJfrwfWmnmvFrTbiNnFB6dB4dLzJd5EJ5imb8,680
57
+ fbuild/daemon/processors/build_processor.py,sha256=t_tqj0cAeVOa10YZq3DIIklEja6e3OFPL5A4q36n7Tg,10573
58
+ fbuild/daemon/processors/deploy_processor.py,sha256=VWdh6ybhBmrdeHKt1oFB9lBPTmOBXDVqb3Of-PmjWyI,25430
59
+ fbuild/daemon/processors/install_deps_processor.py,sha256=VJ2sYS3jbv82gwbKcoHW_HMrs33LcYod07-uXYJEohc,17031
60
+ fbuild/daemon/processors/locking_processor.py,sha256=J5O0k-rnzHTDE_PDampWVVmuc5_f_7FILZUAx0GaueU,27523
61
+ fbuild/daemon/processors/monitor_processor.py,sha256=jfPfwetxaYoIQuyU28oNQn7B4cJ98acO--RdYx5ZLzk,11054
62
+ fbuild/deploy/__init__.py,sha256=u4w0S_hNJW_9Ept99VnxINjkSuntr4c4KXhT-NsCedc,559
63
+ fbuild/deploy/deployer.py,sha256=WiC4hrtt-NzUAXzXd1CaSieqBOHX7nqCZrwtjp1NeDc,1578
64
+ fbuild/deploy/deployer_esp32.py,sha256=dSlyxBd67PFaRZdkWqazQ59Q9lfnXOOMiZWXIRDkJ5U,11244
65
+ fbuild/deploy/docker_utils.py,sha256=wQxSo2T70cAkzpSWX4YY8C661LhAE8yIVE74Th7o59M,9818
66
+ fbuild/deploy/monitor.py,sha256=LQt1fxVsrr1KMn5jj0X640ZpCC75ueTASxdnOGIGfkM,20374
67
+ fbuild/deploy/qemu_runner.py,sha256=iGPv_a8rBMSb5I8KrCwTaSISEcJwBX9jDmbcT0x-4Dg,21276
68
+ fbuild/ledger/__init__.py,sha256=jprTD048wWmc6NzsC8r8jsauPDlpb2exOsRn2-QkZ_I,1339
69
+ fbuild/ledger/board_ledger.py,sha256=5NPlyQCLsKPhw_mqzZcCg2jg9fhdV2BLHGIpeAQ3mRs,17314
70
+ fbuild/packages/__init__.py,sha256=9HSayR9JVT8qnhXRo9f3oiNw8Iltq0nKJ7himkU6sBo,2062
71
+ fbuild/packages/archive_utils.py,sha256=jjrfx6IZllIQ6mCshO_QA7oiLkVYtlHHn-S35rS4aBU,51925
72
+ fbuild/packages/arduino_core.py,sha256=Ym_EFfb__Tp4HAexzbkdCuqqhd9Uvw7pa3eWelbIyCg,13235
73
+ fbuild/packages/cache.py,sha256=riZgyZowKD0LrDYsz-5BWZgOl_4ctwIC2WAJa0x4E9M,8559
74
+ fbuild/packages/concurrent_manager.py,sha256=Cp9QhB5eBVYYzTHVPq0dku-pGBqI7dWpsWqoV1Bcig8,17570
75
+ fbuild/packages/downloader.py,sha256=lx3y_qp31togbjjFFQeWNCc89UQ0sk27ojvWAzcMLZk,20636
76
+ fbuild/packages/fingerprint.py,sha256=b8HhZnJ9xKiGvQG3O8gc8TnUCuuNdHSMgjBF1hbv6Yc,13885
77
+ fbuild/packages/framework_esp32.py,sha256=2uS94oWbE2_vssTebMKz_9g-ZOHCFsYgo5PvfR4IpgQ,19612
78
+ fbuild/packages/framework_rp2040.py,sha256=2DNXuoQi2fZ0XHOXGjR_hWYMQhPrElrba_N7fIhlL8g,11367
79
+ fbuild/packages/framework_stm32.py,sha256=g1KPETEg4VgKT9WCjsXIc9DfMjBg_GXKuHBgCFJh6pE,15121
80
+ fbuild/packages/framework_teensy.py,sha256=3jbcaN91t5vE4A1Pd9nTdx89dwcg2NahCkiwrY3EMwA,11352
81
+ fbuild/packages/github_utils.py,sha256=iLwLpWaXPhaadJwScE_sWcmlzA5r-e5TuZY7-Yet4nY,2857
82
+ fbuild/packages/header_trampoline_cache.py,sha256=fupEB5mE6_dytWswx3-LqogVnw7wq_YRWCfHsy-14XY,14305
83
+ fbuild/packages/library_compiler.py,sha256=Giavoet3ijrNyshZQGw0mHFr11JSiPDn8aQ3dd_jng4,7244
84
+ fbuild/packages/library_manager.py,sha256=7QIYu8WYUf4g-GGzwnubjcqKiS92GOjkL_X9Jvx4Mtw,17704
85
+ fbuild/packages/library_manager_esp32.py,sha256=xkoyc0uQzhxJU0dVkawpgfTtTbvTWvNryr2P3MjUBzA,29126
86
+ fbuild/packages/package.py,sha256=scgvVHnaHm0gBV55DPbn0a8AcHLiBLKgBGFU--R6a6M,3894
87
+ fbuild/packages/platform_esp32.py,sha256=F1rbxnYwaxftHoSrarxj0p73XTrdL2IninsDWshS3zE,13820
88
+ fbuild/packages/platform_rp2040.py,sha256=Vlje_yWS6ENvcy5BJyyqDiMErWSv4tsWxvQiwpja5nc,13104
89
+ fbuild/packages/platform_stm32.py,sha256=8NfsCdCefhTDHPOd3AIblCpWymMmDyxHzSuf8LujjLc,19563
90
+ fbuild/packages/platform_teensy.py,sha256=wUTT1Zr4Hg-FI1JtbKkxUkPKSQHhG4k7YtrdvLsNrZU,9730
91
+ fbuild/packages/platform_utils.py,sha256=nE2nXDI6LDFTDqdndV2e9lY103m72H5nT7nKerQM3JM,3978
92
+ fbuild/packages/platformio_registry.py,sha256=lOOdYIfeDtrTg7bYSYHzJy8yfTF1_oFzfFfvSMjQQgA,12628
93
+ fbuild/packages/sdk_utils.py,sha256=XbPFT2dOJ8z4rU6gIVjt0wwkPEvaSPFu__R9UTV0-fc,9042
94
+ fbuild/packages/toolchain.py,sha256=HxC8HbufztiA-glrEqbc029AZer3WE2jerBIgVX0ZfE,14274
95
+ fbuild/packages/toolchain_binaries.py,sha256=qJXgrSTN9CxGwFSGdtjs_2-BnxjP68OltAPmRTO-69Y,6917
96
+ fbuild/packages/toolchain_esp32.py,sha256=-Xk_7DW6ltS1TEBwacqf3maE9KeX6EUSk_i_eZhFMrU,17071
97
+ fbuild/packages/toolchain_metadata.py,sha256=ws8bt5O_Ay8PwZDiN15BTaoKh2U77IlmhRyvA706h3s,6367
98
+ fbuild/packages/toolchain_rp2040.py,sha256=VmAJQxlt0BXgotI8Ly_GxgPGyZw6PqI0o70QzsVrMe8,14884
99
+ fbuild/packages/toolchain_stm32.py,sha256=2N5TFf51BZzf1Qms869u3MM8I94knQdyHT8NfLOy4l4,13994
100
+ fbuild/packages/toolchain_teensy.py,sha256=5bM49z4nbgAplZxmk8nVcOB-p7yGMLOWgzAnkChrKus,13584
101
+ fbuild/platform_configs/esp32.json,sha256=bynMS4DnDfG9Ka_wZQO1io-QygtJwMohmEaK_jlrDBA,4532
102
+ fbuild/platform_configs/esp32c2.json,sha256=phr00CLtw7bCD0cW7iHTX2ShtfVVrWibBx7cAvcF3BY,4438
103
+ fbuild/platform_configs/esp32c3.json,sha256=GgLERfXXbvZGnauiCnaYhgugKv1B7DADWiI3i0z0WZk,4427
104
+ fbuild/platform_configs/esp32c5.json,sha256=07wPF69U8MfOLup8H5CcguyCBq0kwBeU81Ka9BDFSRw,4691
105
+ fbuild/platform_configs/esp32c6.json,sha256=zRYpaOJ414ja5wrFiNgUb8kvZxyQBtvmJRkg9mmOrAc,4691
106
+ fbuild/platform_configs/esp32p4.json,sha256=OniO6KxL8iK_7qS3jW18Y8iJSt693a06vNyDEfcYSk0,4602
107
+ fbuild/platform_configs/esp32s3.json,sha256=iKtW28vzYPbDXGhcb78gm9tqYQTBvxPFI5kTRMaUmd8,4611
108
+ fbuild/platform_configs/imxrt1062.json,sha256=_eW8sDCnx4T8Y5uEtQruKquIvo01U6WcrEzPpH8b-94,1047
109
+ fbuild/platform_configs/rp2040.json,sha256=gh1IqMhoJ53mQjxCiXPJ2ILYfgg80bpnJK4f1QM6UiY,1493
110
+ fbuild/platform_configs/rp2350.json,sha256=pBUwpF2Bdh_cOugEKAN4MBILOKXrzLAZu-tu7Mk95C0,1659
111
+ fbuild/platform_configs/stm32f1.json,sha256=5c71opt49hFPT1zxMmK_Cl0UKjCTrIUTLksdh-6IdZo,1214
112
+ fbuild/platform_configs/stm32f4.json,sha256=7nRYPEVg4VFeIvOUpdt2aENn8PUzzzqC_gq6xvE2Miw,1316
113
+ fbuild-1.2.8.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
114
+ fbuild_lint/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
115
+ fbuild_lint/ruff_plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
116
+ fbuild_lint/ruff_plugins/keyboard_interrupt_checker.py,sha256=zFxPRGx6M9tNEOl8o7eKEEPrU1ZytbqmwNiVyrhWgRk,6555
117
+ fbuild-1.2.8.dist-info/METADATA,sha256=T_tk1K_bVhYAneU-RnYqS-ZI6v6QrgL7N2KN29doHms,14465
118
+ fbuild-1.2.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
119
+ fbuild-1.2.8.dist-info/entry_points.txt,sha256=FoKJ3GeqwGCKFr7Zanl1f67qRYS_EQpA5s2GadeYwQU,146
120
+ fbuild-1.2.8.dist-info/top_level.txt,sha256=SP5cQb_9JGxIZk2wo2pH6RlSxePBRTEBPVvPti2ckhQ,19
121
+ fbuild-1.2.8.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,5 @@
1
+ [console_scripts]
2
+ fbuild = fbuild.cli:main
3
+
4
+ [flake8.extension]
5
+ KBI = fbuild_lint.ruff_plugins.keyboard_interrupt_checker:KeyboardInterruptChecker
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 zackees
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ fbuild
2
+ fbuild_lint
File without changes
File without changes