microchip-devtools 0.1.0__tar.gz → 0.1.1__tar.gz
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.
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/PKG-INFO +1 -1
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/pyproject.toml +1 -1
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/format/uncrustify.py +1 -1
- microchip_devtools-0.1.1/src/microchip_devtools/list_cmds.py +31 -0
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/mcc/check_peripheral.py +1 -1
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/mcc/mcc_refresh.py +4 -4
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/mcc/parse_hardware.py +2 -2
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/setup_env/runner.py +4 -4
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/xc32/merge_hex.py +1 -1
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/xc32/validate_fmt3.py +2 -2
- microchip_devtools-0.1.0/src/microchip_devtools/list_cmds.py +0 -31
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/__init__.py +0 -0
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/_project.py +0 -0
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/format/__init__.py +0 -0
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/mcc/__init__.py +0 -0
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/setup_env/__init__.py +0 -0
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/setup_env/_ui.py +0 -0
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/setup_env/checks.py +0 -0
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/setup_env/defaults.py +0 -0
- {microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/xc32/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "microchip-devtools"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.1"
|
|
4
4
|
description = "Shared build and dev environment scripts for Microchip firmware projects"
|
|
5
5
|
authors = [{ name = "Ericson Joseph", email = "joseph.ericson@allthings.me" }]
|
|
6
6
|
requires-python = ">=3.10,<4.0"
|
{microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/format/uncrustify.py
RENAMED
|
@@ -6,7 +6,7 @@ Walks one or more source roots, collects C/H files, runs uncrustify,
|
|
|
6
6
|
and reports which files were actually reformatted.
|
|
7
7
|
|
|
8
8
|
CLI usage:
|
|
9
|
-
|
|
9
|
+
format firmware/src -c uncrustifyVoltuC.cfg -x config mcc build
|
|
10
10
|
|
|
11
11
|
Python usage:
|
|
12
12
|
from microchip_devtools.format.uncrustify import format_files
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from rich.console import Console
|
|
2
|
+
from rich.table import Table
|
|
3
|
+
from rich.theme import Theme
|
|
4
|
+
|
|
5
|
+
_THEME = Theme(
|
|
6
|
+
{
|
|
7
|
+
"cmd": "bold cyan",
|
|
8
|
+
"desc": "default",
|
|
9
|
+
}
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
COMMANDS = [
|
|
13
|
+
("list", "List all available commands"),
|
|
14
|
+
("project-setup", "Check prerequisites and install project deps"),
|
|
15
|
+
("validate-fmt3", "Detect XC32 fmt=3 compiler bug in ELF/object files"),
|
|
16
|
+
("merge-hex", "Merge bootloader + app HEX into a single image"),
|
|
17
|
+
("format", "Format C/H source files with uncrustify"),
|
|
18
|
+
("mcc-refresh", "Force full MCC regeneration workflow"),
|
|
19
|
+
("check-peripheral", "Validate MCC-generated peripheral config files"),
|
|
20
|
+
("parse-hardware", "Show hardware config parsed from Harmony YML files"),
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def main():
|
|
25
|
+
console = Console(theme=_THEME, highlight=False)
|
|
26
|
+
table = Table(box=None, show_header=False, padding=(0, 2, 0, 0))
|
|
27
|
+
table.add_column(style="cmd", no_wrap=True)
|
|
28
|
+
table.add_column(style="desc")
|
|
29
|
+
for cmd, desc in COMMANDS:
|
|
30
|
+
table.add_row(cmd, desc)
|
|
31
|
+
console.print(table)
|
{microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/mcc/check_peripheral.py
RENAMED
|
@@ -11,7 +11,7 @@ Prevents two silent hardware bugs:
|
|
|
11
11
|
(core.yml). PMD registers are write-once per reset.
|
|
12
12
|
|
|
13
13
|
Usage:
|
|
14
|
-
|
|
14
|
+
check-peripheral [--root PATH] [--project-name NAME] [--stubs-file PATH]
|
|
15
15
|
|
|
16
16
|
Exit code:
|
|
17
17
|
0 — all checks passed
|
{microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/mcc/mcc_refresh.py
RENAMED
|
@@ -13,12 +13,12 @@ Workflow (default)
|
|
|
13
13
|
4. Launch – open project in MPLAB X (unless --skip-launch).
|
|
14
14
|
5. Wait – prompt operator to confirm MCC generation is complete.
|
|
15
15
|
6. Merge – launch meld to review old vs new files (unless --skip-merge).
|
|
16
|
-
7. Validate – run
|
|
16
|
+
7. Validate – run check-peripheral (Bug 1 + Bug 3 guards).
|
|
17
17
|
8. Report – print git diff stat for the generated directory.
|
|
18
18
|
|
|
19
19
|
Usage
|
|
20
20
|
-----
|
|
21
|
-
|
|
21
|
+
mcc-refresh [--root PATH] [--project-name NAME] [options]
|
|
22
22
|
|
|
23
23
|
--root PATH Project root (default: $VOLTU_PROJECT_ROOT or cwd)
|
|
24
24
|
--project-name NAME Project name (default: $VOLTU_PROJECT_NAME or folder name)
|
|
@@ -239,12 +239,12 @@ def merge_review(
|
|
|
239
239
|
|
|
240
240
|
def validate(dry_run: bool, root: Path, name: str) -> None:
|
|
241
241
|
if dry_run:
|
|
242
|
-
log("[dry-run] Would run:
|
|
242
|
+
log("[dry-run] Would run: check-peripheral")
|
|
243
243
|
return
|
|
244
244
|
|
|
245
245
|
log("Running peripheral config validation...")
|
|
246
246
|
result = subprocess.run(
|
|
247
|
-
["
|
|
247
|
+
["check-peripheral", "--root", str(root), "--project-name", name],
|
|
248
248
|
cwd=root,
|
|
249
249
|
)
|
|
250
250
|
if result.returncode != 0:
|
{microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/mcc/parse_hardware.py
RENAMED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
microchip_devtools.mcc.parse_hardware — Parse Harmony component YML and report hardware config.
|
|
4
4
|
|
|
5
5
|
Usage:
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
parse-hardware [--root PATH] [--project-name NAME]
|
|
7
|
+
parse-hardware --components-dir PATH [--format json] [--output FILE]
|
|
8
8
|
|
|
9
9
|
Exit codes:
|
|
10
10
|
0 — success
|
{microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/setup_env/runner.py
RENAMED
|
@@ -91,7 +91,7 @@ def check(defaults: dict[str, str], env_file: Path) -> bool:
|
|
|
91
91
|
console.print(
|
|
92
92
|
Panel(
|
|
93
93
|
f"[green]✔ All {total} checks passed. The project is ready to build.[/green]\n"
|
|
94
|
-
f" Run [bold]make[/bold] or [bold]poetry run
|
|
94
|
+
f" Run [bold]make[/bold] or [bold]poetry run project-setup install[/bold] to continue.",
|
|
95
95
|
border_style="green",
|
|
96
96
|
padding=(0, 2),
|
|
97
97
|
)
|
|
@@ -101,7 +101,7 @@ def check(defaults: dict[str, str], env_file: Path) -> bool:
|
|
|
101
101
|
console.print(
|
|
102
102
|
Panel(
|
|
103
103
|
f"[red]✗ {failed} of {total} checks failed.[/red]\n"
|
|
104
|
-
f" Fix the issues above, then run [bold]poetry run
|
|
104
|
+
f" Fix the issues above, then run [bold]poetry run project-setup check[/bold] again.",
|
|
105
105
|
border_style="red",
|
|
106
106
|
padding=(0, 2),
|
|
107
107
|
)
|
|
@@ -216,7 +216,7 @@ def _prompt_env_form(defaults: dict[str, str], env_file: Path) -> None:
|
|
|
216
216
|
console.print(
|
|
217
217
|
Panel(
|
|
218
218
|
f"[green]✔ .env updated.[/green] Overridden: {keys_fmt}\n\n"
|
|
219
|
-
f" Run [bold]poetry run
|
|
219
|
+
f" Run [bold]poetry run project-setup check[/bold] to verify your setup.",
|
|
220
220
|
border_style="green",
|
|
221
221
|
padding=(0, 2),
|
|
222
222
|
)
|
|
@@ -226,7 +226,7 @@ def _prompt_env_form(defaults: dict[str, str], env_file: Path) -> None:
|
|
|
226
226
|
Panel(
|
|
227
227
|
"[green]✔ .env created.[/green] All variables left at their defaults (commented out).\n\n"
|
|
228
228
|
" Edit [cyan].env[/cyan] manually any time to override a value.\n"
|
|
229
|
-
" Run [bold]poetry run
|
|
229
|
+
" Run [bold]poetry run project-setup check[/bold] to verify your setup.",
|
|
230
230
|
border_style="green",
|
|
231
231
|
padding=(0, 2),
|
|
232
232
|
)
|
{microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/xc32/merge_hex.py
RENAMED
|
@@ -7,7 +7,7 @@ Optionally patches:
|
|
|
7
7
|
- DEVCFG0 config bits to enable EJTAG debugging (PIC32MK-specific)
|
|
8
8
|
|
|
9
9
|
Usage:
|
|
10
|
-
|
|
10
|
+
merge-hex boot.hex app.hex out.hex [options]
|
|
11
11
|
|
|
12
12
|
Options:
|
|
13
13
|
--sig-addr ADDR Physical address to write the signature word (hex, e.g. 0x1D0FFFF8)
|
{microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/xc32/validate_fmt3.py
RENAMED
|
@@ -13,8 +13,8 @@ in the real XC32 build. Scanning only the final ELF misses those. This script
|
|
|
13
13
|
scans individual object files (.o) where all symbols are present before GC.
|
|
14
14
|
|
|
15
15
|
Usage:
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
validate-fmt3 <elf_or_obj> [<elf_or_obj> ...]
|
|
17
|
+
validate-fmt3 --objects-dir <dir>
|
|
18
18
|
|
|
19
19
|
Exit codes:
|
|
20
20
|
0 — no violations found
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
from rich.console import Console
|
|
2
|
-
from rich.table import Table
|
|
3
|
-
from rich.theme import Theme
|
|
4
|
-
|
|
5
|
-
_THEME = Theme(
|
|
6
|
-
{
|
|
7
|
-
"cmd": "bold cyan",
|
|
8
|
-
"desc": "default",
|
|
9
|
-
}
|
|
10
|
-
)
|
|
11
|
-
|
|
12
|
-
COMMANDS = [
|
|
13
|
-
("mchp-list", "List all available mchp commands"),
|
|
14
|
-
("mchp-setup", "Check prerequisites and install project deps"),
|
|
15
|
-
("mchp-xc32", "Detect XC32 fmt=3 compiler bug in ELF/object files"),
|
|
16
|
-
("mchp-hex", "Merge bootloader + app HEX into a single image"),
|
|
17
|
-
("mchp-fmt", "Format C/H source files with uncrustify"),
|
|
18
|
-
("mchp-mcc", "Force full MCC regeneration workflow"),
|
|
19
|
-
("mchp-periph", "Validate MCC-generated peripheral config files"),
|
|
20
|
-
("mchp-hw", "Show hardware config parsed from Harmony YML files"),
|
|
21
|
-
]
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def main():
|
|
25
|
-
console = Console(theme=_THEME, highlight=False)
|
|
26
|
-
table = Table(box=None, show_header=False, padding=(0, 2, 0, 0))
|
|
27
|
-
table.add_column(style="cmd", no_wrap=True)
|
|
28
|
-
table.add_column(style="desc")
|
|
29
|
-
for cmd, desc in COMMANDS:
|
|
30
|
-
table.add_row(cmd, desc)
|
|
31
|
-
console.print(table)
|
|
File without changes
|
|
File without changes
|
{microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/format/__init__.py
RENAMED
|
File without changes
|
{microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/mcc/__init__.py
RENAMED
|
File without changes
|
{microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/setup_env/__init__.py
RENAMED
|
File without changes
|
{microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/setup_env/_ui.py
RENAMED
|
File without changes
|
{microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/setup_env/checks.py
RENAMED
|
File without changes
|
{microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/setup_env/defaults.py
RENAMED
|
File without changes
|
{microchip_devtools-0.1.0 → microchip_devtools-0.1.1}/src/microchip_devtools/xc32/__init__.py
RENAMED
|
File without changes
|