Skip to content

v0.2.0 ready#9

Merged
Charliechen114514 merged 14 commits into
mainfrom
release/v0.2.0-prep
Jul 7, 2026
Merged

v0.2.0 ready#9
Charliechen114514 merged 14 commits into
mainfrom
release/v0.2.0-prep

Conversation

@Charliechen114514

Copy link
Copy Markdown
Member

No description provided.

GUI was physically under src/ but §E defines it as a consumer, not core.
CMake already isolated it via MICRO_FORGE_GUI=OFF default; this aligns the
physical layout with that boundary. gui/CMakeLists.txt now holds the Qt
wiring, paralleling examples/test/bench. Core lib + CLI stay zero-dep;
default build still 355 green, GUI build produces micro-forge-gui.
introspection.{hpp,cpp} was core library code (compiled into micro_forge,
the single source of truth consumed by both CLI and GUI per DIRECTIVES §E)
but sat under cli/ — a consumer namespace. Moved to its own library module
src/introspection/ + include/introspection/, namespace micro_forge::introspection.

CLI proper (main/snapshot) moved to top-level cli/, paralleling gui/. CLI is
a pure consumer; snapshot.hpp is now an internal header next to its .cpp.
The micro-forge binary stays at build/micro-forge so README paths hold.

Default build + 355 ctests green; GUI builds; CLI SIGINT smoke flushes a
complete JSON snapshot end-to-end.
Project convention is .hpp (50 files) but 7 legacy headers still used .h.
Renamed all 7, and gave the two generic def.h meaningful names matching
their contents:
  arch/arm/cortex_m3/def.h        -> cortex_m3_defs.hpp  (PSR flags, reg table)
  loader/utils/def.h              -> elf_defs.hpp        (ELF magic, Elf32_*)
  arch/toy/{cpu,isa}.h            -> .hpp
  util/weak_ptr/{weak_ptr,weak_ptr_factory,private/weak_ptr_internals}.h -> .hpp

All #include paths updated (including two relative same-dir includes the
first sed pass missed: cortex_m3.hpp and weak_ptr_factory.hpp). Zero .h
files remain. Default build + 355 ctests + GUI build all green.
…bly)

src/chips/stm32f1/ had 11 files flat — 7 peripheral devices mixed with 4 SoC
assembly/config files. Split by role:
  periph/ : stm32f1_{afio,exti,flash,gpio,rcc,timer,usart} (the 7 devices)
  soc/    : {clock_domains,interrupt_config,memory_bus,peripheral_config,
             stm32f103_soc} (5 SoC config + assembly; clock_domains is header-only)

Finding a device vs an assembly concern no longer needs grep across a flat
dir. All #include paths + CMake MICRO_FORGE_SOURCES updated. Default build +
355 ctests + GUI build all green.
…ng, structure)

README was stale relative to the codebase: test count said 244 (real 353),
the GUI dashboard was listed as a future milestone though G5c shipped it,
the moved layout (top-level cli/gui, include/introspection) wasn't reflected,
and the coverage/bench/QEMU-oracle tooling was unmentioned. Fixed across both
README.md and README.en.md: test count, GUI feature + build instructions,
project-structure tree, a Development Tooling section, and a rewritten roadmap
that moves EXTI/Timer/USART/GUI to 'already landed'.
…rror

Closes the two v0.2.0 acceptance gaps from milestone 01:
  * 'micro-forge dump-mem <fw> --addr A [--len N]' — loads firmware (sharing
    a load_firmware helper with 'run') and dumps a memory window via the
    existing tools::memory_dump. Verified: F103.axf vector table head dumps
    correctly (0x20000670 SP, 0x08000189 reset handler).
  * fault summary now prints the instruction opcode (16/32-bit), and when
    present the access_addr (+width) and bus_error — the data was already in
    FaultRecord, the CLI just wasn't surfacing it. Verified opcode path with
    an illegal-instruction binary; access_addr/bus_error branches are
    optional-gated (data-access faults only) and code-reviewed.

Default build + 355 ctests green.
Release-engineering minimum to cut v0.2.0:
  * project(VERSION) 0.1.0 -> 0.2.0
  * CHANGELOG.md (Keep-a-Changelog) covering everything since v0.1.0
  * document/SUPPORT.md — explicit support matrix + non-goals (milestone 05)
  * cmake --install rules: core lib + CLI + public headers (GUI conditional)
  * README links to CHANGELOG and support matrix (zh + en)

Verified: cmake --install --prefix /tmp/mf-install deploys 109 files (bin/
micro-forge, lib/, include/ with the new periph/soc layout). Default build +
355 ctests green. No CPack — teaching/portfolio use, not distribution.

Tag and push deferred until review.
The release(v0.2.0) commit installed only include/*.hpp, but
autogen/arch_details.hpp is a configure_file output in the binary dir and a
PUBLIC include of the library — so an installed micro_forge couldn't actually
be linked against. Add a dedicated FILES rule to install it to
${CMAKE_INSTALL_INCLUDEDIR}/autogen.

Verified: cmake --install --prefix /tmp/mf-install2 now deploys
include/autogen/arch_details.hpp (110 files total, no .in template leaked).
@Charliechen114514

Copy link
Copy Markdown
Member Author

把目录和一些基建工作统一了一下

test_introspection.cpp defined read_file() unconditionally but used it only
inside #ifdef INTROSPECTION_HELLO_ELF. On ci.yml (gcc-14 only, no ARM
toolchain) hello_firmware isn't built, so the macro is undefined and
read_file became unused -> -Werror=unused-function broke the Build step.

Moved the helper inside the #ifdef so it only exists when actually compiled.
Not a regression from this branch (main has the same structure since G1 /
notes 031) — just surfaced now that the PR ran ci.yml.

Local: full build + 355 ctests green.
ci.yml had only g++-14, so find_program(arm-none-eabi-gcc) failed and
hello/blink/systick firmware targets weren't built. That left test_e2e /
test_cli / INTROSPECTION_HELLO_ELF unconfigured, dropping the product-test
count to 344 and tripping the test_count_floor gate (baseline 353).

Install gcc-arm-none-eabi + binutils-arm-none-eabi (same as cross-compile.yml)
so the firmware targets build, all tests configure, and the floor gate
reaches 353. Bonus: ci.yml now actually runs the firmware E2E tests instead
of silently skipping them.
ci.yml's checkout lacked submodules: recursive, so the hal_uart firmware
(needed by E2E.HalUartTransmit) wasn't built and that one product test
stayed unconfigured — leaving the test-count floor one short (352 vs 353).
cross-compile.yml already does this; now ci.yml matches.
@Charliechen114514 Charliechen114514 merged commit f4422ee into main Jul 7, 2026
2 checks passed
@Charliechen114514 Charliechen114514 deleted the release/v0.2.0-prep branch July 7, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant