Skip to content

fix: make deploy does not update firmware reliably. #348

@Charly-sketch

Description

@Charly-sketch

Problem

After modifying a frozen Python driver, make firmware && make deploy does not always include the changes on the board.

Two root causes identified:

1. Stale frozen_content.c

The MicroPython build system uses timestamps to decide whether to regenerate frozen_content.c. With the symlink to local drivers, timestamps can be stale, causing the build to skip regeneration even when source files changed.

2. OpenOCD flash not reliable

make deploy via OpenOCD (CMSIS-DAP) does not reliably update the firmware. The same firmware.bin copied manually to the DAPLink mass storage works correctly. See #380 for investigation.

Fix (PR #379)

  1. Force frozen regeneration: delete frozen_content.c before each build (~3s overhead)
  2. Switch to pyOCD: replace OpenOCD with pyOCD as default flash tool — reliably detects the STeaMi board and flashes correctly
  3. Install pyOCD via pip: added flash optional dependency group in pyproject.toml

New targets:

  • make deploymake deploy-pyocd (default)
  • make deploy-openocd (kept for compatibility)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreleased

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions