Create argument parser with all options.
(self)
| 154 | return config |
| 155 | |
| 156 | def _create_parser(self) -> argparse.ArgumentParser: |
| 157 | """Create argument parser with all options.""" |
| 158 | parser = argparse.ArgumentParser( |
| 159 | description="Compile FastLED examples for various boards using PioCompiler" |
| 160 | ) |
| 161 | |
| 162 | # Positional arguments |
| 163 | parser.add_argument( |
| 164 | "boards", |
| 165 | type=str, |
| 166 | help="Comma-separated list of boards to compile for", |
| 167 | nargs="?", |
| 168 | ) |
| 169 | parser.add_argument( |
| 170 | "positional_examples", |
| 171 | type=str, |
| 172 | help="Examples to compile (positional arguments after board name)", |
| 173 | nargs="*", |
| 174 | ) |
| 175 | |
| 176 | # Build options |
| 177 | parser.add_argument( |
| 178 | "--examples", type=str, help="Comma-separated list of examples to compile" |
| 179 | ) |
| 180 | parser.add_argument( |
| 181 | "--exclude-examples", type=str, help="Examples that should be excluded" |
| 182 | ) |
| 183 | parser.add_argument( |
| 184 | "--no-filter", |
| 185 | action="store_true", |
| 186 | help="Disable @filter directives (compile even if incompatible with board). " |
| 187 | "By default, filters always apply to prevent compilation failures.", |
| 188 | ) |
| 189 | parser.add_argument( |
| 190 | "--defines", type=str, help="Comma-separated list of compiler definitions" |
| 191 | ) |
| 192 | parser.add_argument( |
| 193 | "--extra-packages", |
| 194 | type=str, |
| 195 | help="Comma-separated list of extra PlatformIO library packages to install (e.g., 'OctoWS2811')", |
| 196 | ) |
| 197 | parser.add_argument( |
| 198 | "-v", "--verbose", action="store_true", help="Enable verbose output" |
| 199 | ) |
| 200 | # Output options |
| 201 | parser.add_argument( |
| 202 | "-o", |
| 203 | "--out", |
| 204 | type=str, |
| 205 | help="Output path for build artifact. Requires exactly one sketch. " |
| 206 | "If path ends with '/', treated as directory. If has suffix, treated as file. " |
| 207 | "Use '-o .' to save in current directory with sketch name.", |
| 208 | ) |
| 209 | parser.add_argument( |
| 210 | "--merged-bin", |
| 211 | action="store_true", |
| 212 | help="Generate merged binary for QEMU/flashing (ESP32/ESP8266 only). " |
| 213 | "Produces a single flash image instead of separate bootloader/firmware/partition files.", |