Skip to content

Releases

v0.2.3

Choose a tag to compare

@github-actions github-actions released this 11 Nov 01:56
f515c9c

Repository layout only. The firmware sources did not change, only moved,
and the release image built from this commit is byte-identical to the
published v0.2.2 binary, so nothing new ran on the board.

Changed

  • The repository is organised by what each part describes:

    • arch/cortex-m4/ holds the processor core's registers (was core/);
    • soc/stm32f446/ holds the chip's registers, startup file and linker
      script (were device/, startup/ and linker/);
    • board/nucleo-f446re/ holds the board support and the board's
      openocd.cfg (were bsp/ and tools/);
    • app/main.c replaces app/src/main.c;
    • unit tests sit in tests/unit/{arch,soc,drivers,board}/;
    • vendored code is in third_party/ (Unity, doxygen-awesome-css);
    • the build and release scripts are in scripts/, with CI-only files in
      scripts/ci/;
    • the Doxyfile is in docs/.

    The empty api/ and rtos/ placeholders are gone: a planned layer gets
    its directory when its code arrives. Headers are still included by bare
    name, and the firmware is byte-identical.

v0.2.2

Choose a tag to compare

@github-actions github-actions released this 06 Nov 01:27
3ddbf38

CI and tooling only. No firmware source changed since v0.2.1, and the
release image built from this commit is byte-identical to the published
v0.2.1 binary, so nothing new ran on the board.

Changed

  • CI runs only on repository events: pushes to main and develop, pull
    requests, release tags and manual dispatch. The scheduled CI runs
    (Tuesday and Friday), the weekly scheduled CodeQL scan and Dependabot
    (.github/dependabot.yml) are removed. Every pin is now bumped by hand
    after reading the release notes, and an upstream change shows up as a CI
    failure on the next pull request.
  • CI's tools updated: gcovr 8.8, actions/setup-python 7.1.0,
    github/codeql-action 4.39.1 and actions/deploy-pages 5.0.1 (#165,
    #166).

v0.2.1

Choose a tag to compare

@github-actions github-actions released this 16 Oct 03:09
cc9783f

CI and tooling only. No firmware source changed since v0.2.0, and the
release image built from this commit is byte-identical to the published
v0.2.0 binary, so nothing new ran on the board.

Not verified until this release is on main: Dependabot and the
twice-weekly scheduled CI run read their configuration from main, the
default branch, so their first runs come after this release.

Correction to v0.2.0's notes: they said UART receive could not be tested
because the board has no sender. The NUCLEO's ST-LINK virtual COM port
drives USART2's RX pin, so the host computer can send to it with no wiring.
UART receive is still untested.

Added

  • Every failure in one run. Each CI check runs after setup even if an
    earlier check failed, and the job still fails. Compiler, clang-format,
    cppcheck, Doxygen and Unity failures appear as annotations on the pull
    request (.github/problem-matchers/; make lint takes CPPCHECK_TEMPLATE).

  • A summary page for every run (tools/ci_summary.sh, which also runs
    locally):

    • the release image sizes against the 512 KB flash and 128 KB RAM;
    • their change against a pull request's base branch;
    • the deepest stack frames;
    • the test results and coverage.
  • GCC's static analyzer (make all ANALYZE=1) runs in CI for the
    firmware and the smoke image. The code is clean under it. Its
    infinite-loop check is off, because it fires only on deliberate parking
    loops such as main()'s.

  • Stack usage. Every object records its functions' stack frames
    (-fstack-usage, with no change to the generated code), and
    make stack-usage lists them, deepest first.

  • Linters:

    • codespell (make spell, .codespellrc) runs over code, comments and
      docs;
    • actionlint checks every workflow, with ShellCheck checking the scripts
      inside them;
    • ShellCheck also checks tools/*.sh and the pre-commit hook.

    The linters are release binaries pinned by version and SHA256. The repo
    had no typos; four RM0390 register names (HSI, ORE, TE, UE) are ignored
    with that reason.

  • A macOS job. host-tests (macOS) runs the host tests, plain and
    sanitized, with Apple clang and /usr/bin/make 3.81 on a pinned
    macos-15 runner. It is a required check, like build-and-check and
    Analyze (c-cpp).

  • Automation:

    • Dependabot checks the action pins and CI's Python tools monthly, and
      opens one grouped pull request per ecosystem against develop.
      Nothing merges automatically.
    • CI runs Tuesday and Friday on main to catch runner image and upstream
      changes early, and to keep the toolchain caches warm.
  • A pull request template with the project's checklist, and a CI badge
    in the README.

Changed

  • Hash-locked Python tools. CI installs them from tools/ci/requirements.txt,
    every package pinned with its hashes and generated by pip-compile from
    tools/ci/requirements.in, on a Python version pinned by
    actions/setup-python. Before, gcovr's own dependencies floated.
  • Toolchain fallback. If developer.arm.com fails, CI installs the
    toolchain from this repository's ci-mirror-arm-gnu-toolchain-15.2.rel1
    pre-release. It is a byte-for-byte copy, checked against the same pinned
    SHA256; a test run with Arm's URL broken took the mirror and passed.
  • Smaller hardening:
    • apt retries failed downloads;
    • no checkout leaves the job token in .git/config.
  • Repository settings:
    • only GitHub-owned actions may run, and every action must be pinned to a
      full commit SHA;
    • merged branches are deleted automatically.

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 15 Oct 00:49
145a53f

The driver layer is complete and has run on silicon. Every driver,
bspClockInit() and the fault handler pass the on-target smoke test on a
NUCLEO-F446RE, in both debug and release builds.

Not verified:

  • UART receive: it needs a sender, which the board does not have.
  • Other boards: only one board was tested.
  • The application: main() is still an empty loop, so the release
    firmware image does nothing yet.
  • The kernel: there is none yet.

Added

  • Fault handling. HardFault, MemManage, BusFault and UsageFault entered
    Default_Handler, so a fault looked like a stray interrupt. They now enter
    Fault_Handler:

    • it takes the stacked frame from MSP or PSP, as EXC_RETURN bit 2 says;
    • faultCapture() records the frame with CFSR, HFSR, MMFAR, BFAR and the
      exception number in faultRecord, which you read with
      p/x faultRecord in GDB;
    • the core then spins.

    The frame is not read when CFSR reports a stacking error: it is not
    there, and reading it could lock up the core. faultEnable() gives
    MemManage, BusFault and UsageFault their own handlers, and traps integer
    division by zero, which otherwise returns 0 silently.

  • EXTI driver (exti.h):

    • extiSelectPort() routes GPIO pins to lines 0-15 through SYSCFG.
    • extiConfigure() sets the edges.
    • The interrupt mask, software trigger and pending bit each have a
      function.

    extiClearPending() writes PR with a single store: PR is write-1-to-clear,
    so a read-modify-write would clear every other pending line.

  • IWDG driver (iwdg.h):

    • iwdgStart() starts the watchdog before writing PR and RLR, because they
      only take a value while the LSI runs and starting the IWDG turns the LSI
      on. It waits for the update to finish before the final refresh.
    • iwdgRefresh() reloads the counter.
    • iwdgFreezeInDebug() stops the counter while a debugger halts the core.
  • WWDG driver (wwdg.h):

    • wwdgStart() and wwdgRefresh().
    • Early-wakeup interrupt control.
    • wwdgFreezeInDebug().

    The board showed that the WWDG counter runs, and sets EWIF each time it
    passes 0x40, from the moment its clock is enabled, even before WDGA is
    set. wwdgStart() therefore clears that stale flag. Left set, the early
    wakeup fires at once, and a refresh from it lands above the window and
    resets the chip.

  • RCC:

    • rccResetFlags() and rccClearResetFlags() read and clear the reset
      cause;
    • rccWwdgClockEnable() and rccWwdgClockDisable() gate the WWDG clock.
  • Register headers:

    • dbgmcu_reg.h (the debug freeze bits);
    • the IWDG_PR_DIV* and WWDG_CFR_WDGTB_DIV* values;
    • RCC_APB1ENR_WWDGEN.
  • On-target smoke test. make smoke builds build/smoke.elf from
    tests/target/smoke.c in place of app/, and make smoke-flash
    programs it. It reports PASS/FAIL for each check on the ST-LINK virtual COM
    port (115200 8N1). Readable output itself confirms the clock tree, because
    the baud rate comes from PCLK1. The checks cover:

    • the 180 MHz clock tree, read back from RCC, PWR and FLASH;
    • GPIO;
    • NVIC pend, take, mask and clear;
    • SysTick, timed against 100 ms of UART traffic;
    • EXTI from software and from real pin edges, with LD2's pin driving its
      own input;
    • both watchdogs.

    A watchdog's reset can only be shown across a reset, so a full run is
    three boots, told apart by the reset cause:

    1. The first boot runs every check, then starves the IWDG.
    2. The boot after the IWDG reset holds the WWDG off from its early wakeup
      (exactly the predicted 4 wakeups in 200 ms), then refreshes it above the
      window.
    3. The boot after the WWDG reset reports its cause.

    LD2 then blinks slowly if the whole chain passed and fast if anything
    failed. SMOKE_FAULT=1 ends the run with a deliberate divide by zero for
    the fault handler. CI builds the image but cannot run it.

    Results on the board: every check passes in debug and release. A
    deliberate divide by zero recorded UsageFault, CFSR.DIVBYZERO and the
    stacked PC of the udiv. Both watchdogs' debug freezes held through a
    2 s debugger halt; with the freeze bit cleared, the same halt reset the
    chip.

Changed

  • Linking. The link fails on any section linker/STM32F446RE.ld does
    not name (-Wl,--orphan-handling=error). Before, ld placed such sections
    by heuristic, so a C constructor (.init_array) or a _Thread_local
    variable linked cleanly and was never initialised. The script now names
    the veneers, the IFUNC tables (asserted empty) and the unloaded debug
    sections.
  • Map files. Each image writes its own map file next to its ELF.
  • clang-format. make format and make format-check use clang-format 18,
    the version CI pins, from Homebrew's keg-only llvm@18 when it is
    installed. They warn when they fall back to another version.
  • Pre-commit hook. It also builds the smoke image, as CI does.
  • Kernel placeholders. The empty files in rtos/kernel/ are gone; the
    kernel will add its own.
  • Docs. Corrected where a review found them inaccurate or stale. That
    includes the README's macOS SDKROOT workaround, which current Command
    Line Tools no longer need.

Fixed

  • Flag switches under GNU Make 3.81 (macOS's /usr/bin/make). Switching
    BUILD, SANITIZE or coverage could keep objects built with the old
    flags. That make compares whole-second timestamps, so running
    make all && make all BUILD=release linked the -O0 objects into the
    "release" image. A changed flags stamp is now written after a one-second
    wait, so it is always newer than the old outputs. GNU Make 4, which CI
    uses, was not affected.

CI mirror: Arm GNU Toolchain 15.2.rel1 (not a project release)

Choose a tag to compare

@ka5j ka5j released this 16 Oct 02:32
145a53f

Not a release of this project. A byte-for-byte copy of Arm's own archive, kept so CI can still install the pinned compiler if developer.arm.com is unreachable.

.github/actions/setup-arm-toolchain downloads from Arm first and falls back to this copy only if that fails. It verifies the same pinned SHA256 either way, so this copy cannot change what CI builds with.

v0.1.7

Choose a tag to compare

@github-actions github-actions released this 14 Oct 02:17
0a88744

Documentation, tooling and CI only: the firmware image is byte-identical to
0.1.6 in both the debug and release builds, and nothing has run on
hardware. main() is still an empty loop, so no driver or bspClockInit()
has executed on the board.

Changed

  • Doxyfile: cut from the 1079-line default template to the 20-odd
    settings that differ from Doxygen's defaults, each commented
    (doxygen -x confirms the effective configuration changed only where
    intended). Adds call and caller graphs, and a \regaccess{} alias for
    register access types.

  • Generated docs use doxygen-awesome-css v2.5.0 (MIT), vendored in
    docs/theme/ with its dark-mode toggle and code copy button, plus
    docs/theme/project.css for project styles. No network access is needed
    to build the docs.

  • Project docs rewritten to be short and current, and published as pages
    of the generated site: the README is the site's home page, followed by
    Architecture, Design notes, Contributing, Versioning, Security and the
    Changelog. docs/mainpage.md is gone. Heading anchors follow GitHub's
    style (MARKDOWN_ID_STYLE = GITHUB), so the same links work on GitHub and
    on the site.

  • New docs/DESIGN.md holds the reasoning that was repeated across
    CONTRIBUTING, the README, the Makefile and driver headers: register blocks
    as parameters, the error contract, const register parameters, poll-count
    timeouts, clock bring-up order, concurrency, host-test limits and MISRA
    deviations.

  • docs/ARCHITECTURE.md replaces its ASCII art with Mermaid diagrams of
    the layers, the boot sequence and the 180 MHz clock tree. GitHub renders
    them natively; the site renders them with Mermaid 11.4.1.

  • CONTRIBUTING.md gains a Doxygen style section (one-line briefs,
    @retval, @pre/@post, @code examples, register @name groups).

  • The README no longer calls the driver layer complete: EXTI, IWDG and WWDG
    have register headers but no driver.

  • CI: every workflow now runs on ubuntu-24.04. codeql.yml, pages.yml
    and release.yml used ubuntu-latest, so the published docs and release
    firmware could be built on a different OS than the one CI checked.
    Graphviz installation moves into the setup-doxygen action (now "Set up
    Doxygen and Graphviz"), so make docs can never run without dot and
    silently drop its diagrams. Workflow and action comments are cut to the
    constraints that prevent mistakes. actionlint is clean.

  • Build and boot files keep only short what/why comments: the Makefile (383
    comment lines down to 43), startup_stm32f446re.s, the linker
    script and the headers of the tools/ scripts. Rationale now points to
    Design notes. Comments only: the Makefile and tools are unchanged with
    comment lines removed, the startup object's sections are byte-identical,
    and the firmware image is byte-identical.

  • Driver and BSP docs rewritten (drivers/, bsp/):

    • one-line briefs, and a @retval table for every status a function can
      return, replacing stacked @return prose;
    • @pre, @warning and @note where they apply, and a @code example in
      every driver header;
    • rcc.h's nine-step bring-up as a numbered list;
    • rationale moved to Design notes and linked rather than repeated.

    Each driver is now its own Topics subgroup under Drivers. Comments only:
    every driver and BSP source preprocesses to the same tokens as before.

  • Register headers (core/inc/, device/inc/): each register's macros are
    a Doxygen member group titled with the register name and offset, so the
    reference shows one table per register. Every field states its bits and
    its access type as a badge (rw, ro, wo, rc_w0, rc_w1, rs) in
    place of the old, inconsistent "WRITE"/"READ only" prose, and file
    comments are cut to the manual section, what is modelled and any
    part-specific trap. Comments only: the preprocessed macro definitions and
    struct layouts of all 13 headers are identical before and after.

  • docs/groups.dox: the ASCII table that rendered as preformatted text is
    replaced by a short description, and the group briefs are one line each.
    Its header is now a plain comment rather than an @file block, which drops
    a file page whose "source" link pointed at a page Doxygen never generates.

v0.1.6

Choose a tag to compare

@github-actions github-actions released this 14 Oct 01:15
5072cd3

Not verified on hardware: every driver and bspClockInit() is covered by
host tests (100% line and branch), but main() is still an empty loop, so
none of it has executed on the board. The register layer, startup file and
vector table were checked against RM0390/PM0214 by review, not on silicon.

Added

  • tools/check_pr_files.sh and make check-pr [BASE=origin/develop]: the
    two pull-request file checks that lived as inline shell in ci.yml (every
    touched source file has a Doxygen @file block; every touched
    driver/bsp/api/rtos .c has a tests/unit/test_<name>.c and every touched
    *_reg.h is included by a test), now runnable before pushing. CI calls the
    same target. Checked by hand against a branch that adds a bare module and
    a bare register header: all four error cases fire and the exit is 1.

  • make test SANITIZE=1 builds and runs the host suite under
    AddressSanitizer and UndefinedBehaviorSanitizer with every report fatal,
    and CI runs it after the plain suite. gpio.h documents an out-of-range
    pin as undefined behaviour; this is the build that would see it. All 275
    tests pass under it.

  • bsp/inc/bsp.h, bsp/src/bsp.c: bspClockInit(rcc, pwr, flash), the
    board's 180 MHz bring-up built from the driver calls in order: PWR
    clock, HSE bypass (8 MHz from the ST-LINK), regulator scale 1, PLL
    M=8/N=360/P=2, wait for the regulator, over-drive, AHB /1, APB1 /4
    (45 MHz), APB2 /2 (90 MHz), SYSCLK to the PLL with 5 flash wait states,
    then prefetch and caches. Stops at the first failing step and returns
    its status. BSP_SYSCLK_HZ/BSP_HCLK_HZ/BSP_PCLK1_HZ/BSP_PCLK2_HZ
    name the result for SysTick and UART setup. PLL M/N/P, the prescalers
    and the latency are the values in ST's own Nucleo-F446 180 MHz example;
    there is no VCO/APB validation in rccPllConfig/rccBusPrescalerConfig;
    the limits are _Static_asserts in bsp.h on this one configuration,
    and test_bsp.c checks that the registers bspClockInit() programs
    work out to the BSP_* frequencies. Ten host tests (the whole sequence, the
    limit checks, and one timeout or BUSY case per step). Adds a board_support Doxygen group, and make coverage now also gates bsp/src at 100%.

  • drivers/inc/flash.h, drivers/src/flash.c: flashEnableCaches()
    sets ACR.PRFTEN, ICEN and DCEN in one read-modify-write that keeps
    LATENCY, and returns void (no failure path). No cache reset: the caches
    come out of power-on reset empty, as ST's HAL_Init() also assumes, so
    ICRST/DCRST stay unused. Covered by three tests in test_flash.c,
    including that flashSetLatency() preserves the cache bits.

  • drivers/inc/pwr.h, drivers/src/pwr.c: pwrEnableOverdrive()
    (CR.ODEN, wait CSR.ODRDY, CR.ODSWEN, wait CSR.ODSWRDY) for the 180 MHz
    range, with bounded waits like pwrWaitVoltageScaleReady(); ODSWEN is
    not written if ODRDY never sets, and CR.VOS is preserved. The ready-flag
    waits share one helper, and the timeout constant is renamed
    PWR_READY_TIMEOUT_ITERATIONS (same 100000 value). drivers/inc/rcc.h's
    ordered bring-up sequence gains the over-drive step between the VOS
    wait and the prescaler/SYSCLK-switch steps. Sequence and bit positions
    checked against ST's HAL (HAL_PWREx_EnableOverDrive), its
    stm32f446xx.h, and its Nucleo-F446 180 MHz example; RM0390 5.1.4 was
    not checked directly.

  • drivers/inc/systick.h, drivers/src/systick.c: the SysTick driver,
    completing drivers/ (7 of 7). systickInit(systick, core_hz, tick_hz) programs LOAD = core_hz / tick_hz - 1, rejecting zero
    arguments and any period outside 2 to 2^24 clocks (LOAD 0 never
    reloads; LOAD is 24 bits) without touching a register, and starts the
    timer last with CLKSOURCE|TICKINT|ENABLE; systickDeinit restores the
    reset state. The SysTick_Handler and tick counter stay with the kernel.
    Covered by tests/unit/test_systick.c.

  • drivers/inc/nvic.h, drivers/src/nvic.c: the NVIC driver
    (nvicEnableIrq/DisableIrq, SetPending/ClearPending,
    SetPriority/GetPriority, and nvicSetSystemHandlerPriority for the
    six configurable system handlers via SCB SHPR1-3). Device IRQn is
    range-checked (0 to FMPI2C1_Error_IRQn) so a negative system-exception
    number can never index the NVIC arrays; priorities are 0-15, shifted into
    the implemented top nibble. ISER/ICER/ISPR/ICPR are written as single
    bits, never read-modify-written. No PRIGROUP setter: Reset_Handler
    already owns it. Covered by tests/unit/test_nvic.c; make lint gains
    scoped misra-c2012-8.7 (nvic.c) and 2.5/2.3/2.4 (nvic_reg.h,
    scb_reg.h) suppressions now that those headers are analysed.

  • core/inc/scb_reg.h, core/inc/nvic_reg.h, core/inc/systick_reg.h:
    added the core-register definitions the NVIC and SysTick drivers and the
    kernel's context switch need and the headers lacked. SCB: ICSR
    (PENDSVSET/PENDSVCLR/PENDSTSET/PENDSTCLR/VECTACTIVE), SCR
    (SLEEPONEXIT/SLEEPDEEP/SEVONPEND), CCR.USERSETMPEND, the SHCSR
    active and pended bits, the SHPR1 priority fields, and the six
    EXC_RETURN_* values (basic and FPU frames). IRQn_e gains the negative
    system-exception numbers (MemManage -12, BusFault -11, UsageFault -10,
    SVCall -5, PendSV -2, SysTick -1), which index SCB rather than the NVIC;
    tools/check_vector_table.awk only matches non-negative entries, so the
    vector-table cross-check is unaffected. SysTick gains the 24-bit
    LOAD/VAL masks and the CALIB fields. Each is covered by a test.
    Cross-checked against ARM's CMSIS core_cm4.h and ST's
    stm32f446xx.h (ST's F446 SVD has no core peripherals).

  • tools/install_cppcheck.sh builds the exact cppcheck version CI pins
    (2.13.0) from source into a per-user prefix, verifying the cloned commit
    first, and make lint now uses it automatically when it is installed
    (CPPCHECK= overrides). make lint also warns whenever the cppcheck it
    runs differs from CI's version. Different cppcheck versions report
    different MISRA findings; a cond ? A : B expression passed locally under
    2.21 and failed CI under 2.13.0 (misra-c2012-10.6), costing a CI cycle.
    Reproduced that exact failure with the pinned build before relying on it.

Changed

  • app/src/main.c: dropped the unreachable return 0; after the infinite
    loop (MISRA C:2012 Rule 2.1). tests/unit/test_nvic.c: removed a
    duplicate COUNT_OF definition. No behaviour change.

  • Docs and comments only: comments that narrated how the code used to be
    now say how it is, in uart.c, uart.h, iwdg_reg.h, startup, the
    Makefile, ci.yml, test_pwr.c and the README Status intro; the reasons
    they carried (why BRR rounds once, why the CI workflow must not use
    cancel-in-progress) stay. History belongs in this file and in commits.
    Also corrected: rcc.h now says a raising flash latency is already
    written when rccSysclkSwitch() returns NOT_INITIALIZED or TIMEOUT
    (safe, and left in place); the README's missing-VCO-check limitation is
    attributed to rccPllConfig(), not rccBusPrescalerConfig(); and
    driver_status.h names the GPIO functions that document a pin @pre
    instead of validating it.

  • Makefile: the firmware now links with -nostartfiles and
    -Wl,--fatal-warnings. Reset_Handler already does everything crt0
    would, and linking crt0 pulled newlib's syscall stubs in ahead of
    --gc-sections, which printed four "_close/_lseek/_read/_write
    is not implemented" warnings on every link. The link is now silent, so
    any new linker warning fails the build. The image is 24 bytes smaller and
    the vector table is unchanged. The old Makefile comment calling those
    warnings unavoidable is replaced.

  • Makefile: the host test and coverage objects now depend on a flags
    stamp, the way the firmware objects already did. Before this, editing
    WARN_FLAGS or HOST_CFLAGS rebuilt nothing, so a new warning stayed
    hidden until a clean build.

  • core/inc/*_reg.h, device/inc/*_reg.h: every bit and mask macro now
    casts its constant before shifting, ((uint32_t)1U << X_Pos) instead of
    (1U << X_Pos). 1U has the essential type of an 8-bit unsigned, so
    1U << 17U is a real MISRA C:2012 Rule 12.2 violation, not the
    cppcheck limitation the old comments called it; with the cast the rule
    passes under CI's cppcheck 2.13.0. That removes all 50 inline
    // cppcheck-suppress misra-c2012-12.2 comments from drivers/ and
    bsp/, and the comments that justified them. Generated code is
    unchanged. The Makefile's lint notes now say the rule is deliberately
    not suppressed anywhere.

  • Docs and comments only, from the full review: claims the code or the
    manual did not back are corrected or removed. rccBusPrescalerConfig()
    no longer says its fields "take effect immediately and synchronously"
    (RM0390 has no ready flag, but a divider can apply a few AHB cycles after
    the write); uartInit() no longer attributes its clear-UE-first order to
    an RM0390 requirement (the order is the safe one either way) and now says
    it rewrites only the fields it names, so a re-init of an instance that
    used interrupts or CR3 features should uartDeinit() first; bsp.h says
    what the _Static_asserts do and do not cover and that test_bsp.c ties
    the programmed registers to the BSP_* constants; CONTRIBUTING.md no
    longer says an unresolved bare include signals a layering violation (every
    inc/ directory is on every compile's path, so layering is a convention);
    the changelog no longer says a test binds the startup file's literals to
    scb_reg.h (it pins the header's side only); iwdg_reg.h names
    IWDG_KEY_ENABLE_ACCESS correctly; the Makefile comments give the real
    CI step order and explain the four libc "not implemented" link warnings.
    Checked against RM0390 Rev 6 (March 2021) once the manual was available:
    the "RM0390 Table 15" citations pointed at the *Low-powe...

Read more

v0.1.5

Choose a tag to compare

@github-actions github-actions released this 09 Oct 01:09
bc56fb5

Added

  • .github/workflows/release.yml: pushing a vX.Y.Z tag now checks that
    the tag, the Doxyfile PROJECT_NUMBER and CHANGELOG.md's newest release
    agree and that the commit is on main, builds the release firmware with
    the pinned toolchain, and creates the GitHub Release with that version's
    changelog section as the notes and the .elf/.bin/.hex/.map, a
    size report and SHA256SUMS attached. Releases were previously created
    by hand, and v0.1.3 and v0.1.4 never got one. On a pull request touching
    the release pipeline's files it runs the same steps without publishing,
    so the first real run is not a real release.
  • make check-version (tools/check_version.awk), also run in ci.yml on
    every PR and push: fails when the Doxyfile's PROJECT_NUMBER and the
    newest released heading in CHANGELOG.md differ. The two are edited by
    hand in different files at release time and nothing else compared them.
  • tools/changelog_section.awk: extracts one version's changelog section
    for the release notes; refuses an empty or missing section.

Changed

  • Documentation brought back in line with the code: the README, ARCHITECTURE
    and VERSIONING peripheral/driver lists now name every register block
    (MPU on the core side; EXTI, Flash, IWDG, PWR, SYSCFG, WWDG on the device
    side) and every implemented driver (Flash and PWR were missing from the
    0.2.0 definition); the README's one-line pitch no longer reads as if a
    scheduler exists; the GPIO and UART driver summaries describe
    gpioPortResetValues and parity; docs/ARCHITECTURE.md lists all four awk
    tools. The gcovr prerequisite now says to use Homebrew on macOS: the
    pinned 8.6 needs Python 3.10, and the Command Line Tools ship 3.9, so the
    documented pip install gcovr fails there.

  • CHANGELOG.md now ends with the Keep a Changelog comparison links, so each
    version heading links to its diff.

  • The toolchain and Doxygen install steps, previously copy-pasted across
    ci.yml, codeql.yml and pages.yml, now live in two composite actions
    under .github/actions/ (setup-arm-toolchain, setup-doxygen), so each
    version and checksum is defined once. Cache keys now include the start of
    the pinned checksum.

  • Every job has a timeout-minutes ceiling (20 for CI and CodeQL, 15 and 10
    for the Pages build and deploy) instead of GitHub's 6-hour default, so a
    hung download fails fast instead of holding a required check pending.

Fixed

  • The Makefile discovered assembly with -name '*.s' and had only a %.s
    rule, so rtos/kernel/src/context_switch.S (uppercase, preprocessed) was
    silently never assembled or linked. Left unfixed, the PendSV context
    switch would have built cleanly, with PendSV_Handler still the weak
    Default_Handler loop. Both .s and .S are now discovered, .S gets
    its own rule that runs the C preprocessor with the project's include
    paths, and the empty context_switch.S placeholder is now part of the
    link.
  • make debug backgrounded OpenOCD and started GDB immediately, so GDB's
    single target extended-remote :3333 could run before OpenOCD (which
    must open the ST-LINK and halt the target first) was listening and fail
    with "Connection refused". It now waits for the port, and stops with a
    clear message if OpenOCD exits (no board, ST-LINK busy) or does not
    listen within ~10 s.
  • Stale comments: make lint's said the drivers were still empty and
    would find nothing; the lint-suppression note listed CR1.OVER8 as
    having no consumer, which stopped being true when uartInit() started
    clearing it; startup_stm32f446re.s named itself .S.
  • rccHsiDisable() and rccHseDisable() only refused when CFGR.SWS
    named the oscillator itself. RM0390 also forbids clearing HSION/HSEON
    when the oscillator is used indirectly as the system clock, i.e. SWS
    names the PLL and PLLCFGR.PLLSRC selects that oscillator. In that case
    the hardware ignores the write while the driver reported
    DRIVER_STATUS_OK. Both now share one guard
    (rccOscillatorDisableGuard) and return DRIVER_STATUS_ERR_BUSY for the
    indirect case too. An active PLL sourced from the other oscillator does
    not block the disable.
  • gpioDeinit() zeroed the pin's MODER/OSPEEDR/PUPDR fields and documented
    that as the power-on-reset state, which is only true for most pins. GPIOA
    and GPIOB come out of reset with the SWD/JTAG pins (PA13/14/15, PB3/4) in
    alternate-function mode with pulls, so deinitialising one of them dropped
    the debug link. It now restores the real reset value for the pin's
    field. The per-port values live in gpio_reg.h (GPIOA_MODER_RESET etc.)
    behind a new gpioPortResetValues(), which identifies the port by address
    only so the lookup is host-testable.
  • uartInit() corrupted data whenever parity was enabled. CR1.M was
    always cleared, but RM0390 counts the parity bit inside the frame length
    M selects, so parity on with M clear is 7 data bits plus parity: the
    hardware replaced bit 7 of every transmitted byte with the parity bit,
    and a receiver would have discarded it. M is now derived from the
    parity setting (set exactly when parity is enabled), giving the 8 data
    bits plus parity the API always advertised. Transmit/receive stay
    uint8_t: the 9th bit is parity, generated and checked by hardware.
  • uartInit() now clears CR1.OVER8. The BRR it computes assumes 16x
    oversampling, so a stale OVER8 (set by earlier code or a debugger)
    silently doubled the baud rate the same divisor produced.

Security

  • The Arm GNU Toolchain and Doxygen archives are now verified against a
    pinned SHA256 before extraction. They were previously fetched with
    curl -sSL ... | tar and no integrity check, which undercut the
    SHA-pinning policy applied to the GitHub Actions themselves: a changed or
    tampered download would have been installed silently. A mismatch now
    fails the job. curl also uses -f, so an HTTP error fails the step
    instead of handing an error page to tar.

v0.1.2

Choose a tag to compare

@ka5j ka5j released this 27 Aug 04:21
dca12cf

Register-layer completeness fixes, a real NVIC/vector-table cross-check,
the drivers/ error-status contract, per-peripheral Doxygen grouping, and
this changelog.

Added

  • drivers/inc/driver_status.h: the DriverStatus_e error-status contract
    required by every driver function that can fail, per CONTRIBUTING.md's
    error-handling contract - a small, closed set of failure categories,
    DRIVER_MUST_CHECK-marked, with a non-zero DRIVER_STATUS_OK and an
    explicit DRIVER_STATUS_UNINITIALIZED sentinel so an unassigned status
    can't silently read as success under this project's -O0 build.
  • tools/check_vector_table.awk, run as part of make test: a real
    cross-check between core/inc/nvic_reg.h's IRQn_e enum and
    startup/startup_stm32f446re.s's vector table, replacing a test that only
    asserted the enum against its own values and could not catch the two
    files drifting apart.
  • Per-peripheral Doxygen subgroups (mpu_registers, nvic_registers,
    scb_registers, fpu_registers, systick_registers, gpio_registers,
    rcc_registers, uart_registers, exti_registers, flash_registers,
    iwdg_registers, pwr_registers, syscfg_registers, wwdg_registers),
    nested under core_peripherals/device_peripherals instead of every
    register header joining one flat parent group. scb_reg.h's two
    architecturally distinct blocks (SCB, FPU) now render as separate groups.
  • -Werror=unused-result in the Makefile's CFLAGS and host test compile
    line: promotes an ignored DRIVER_MUST_CHECK return from a warning to a
    build failure on both arm-none-eabi-gcc and the host cc.

Fixed

  • core/inc/scb_reg.h: added the missing FPU lazy-stacking fault bits to
    SCB_CFSR (MLSPERR, bit 5; LSPERR, bit 13) - Cortex-M4F-specific
    CFSR extensions the header omitted, relevant to any future HardFault
    handler or PendSV context switch.
  • core/inc/mpu_reg.h: added the missing MPU_RASR_AP_PRIV_RW_UNPRIV_RO
    (AP=0x2) encoding, one of six legitimate MPU access-permission values -
    the one needed to make kernel-owned data read-only to task code.
  • CI: Arm GNU Toolchain, cppcheck, and clang-format are now pinned to exact
    versions (15.2.rel1, 2.13.0-2ubuntu3, 1:18.0-59~exp2) instead of
    floating apt packages, so an archive update can only fail the build
    loudly rather than silently changing what CI enforces.

Changed

  • device/inc/flash_reg.h, device/inc/rcc_reg.h: documented previously
    unstated scope decisions (which real register fields each header
    intentionally omits, and why), matching the pattern already used in
    uart_reg.h/exti_reg.h/syscfg_reg.h.
  • CONTRIBUTING.md: documents the two-level Doxygen grouping convention
    (parent layer group, per-peripheral subgroup, multi-block-per-file
    splitting) for future register headers.
  • README.md, docs/VERSIONING.md, docs/mainpage.md, docs/ARCHITECTURE.md:
    corrected status text that still described drivers/ as entirely empty
    scaffolding after driver_status.h landed, and updated docs/mainpage.md's
    description of the Doxygen Topics page to match the per-peripheral
    subgroup structure above.

Removed

  • .github/dependabot.yml: Dependabot is disabled for this repository.
    SECURITY.md's claim that no automated tooling watches the Actions SHA
    pins is now accurate as a result.

v0.1.1

Choose a tag to compare

@ka5j ka5j released this 27 Aug 04:20
0b9181c

Register-layer bug fixes and completeness, Doxygen reorganization, CI
hardening, documentation tone rewrite.

Added

  • device/inc/syscfg_reg.h: SYSCFG register layer (RM0390 section 9),
    scoped to EXTI-line port routing (EXTICR1-4) and I/O compensation cell
    control (CMPCR).
  • docs/groups.dox: Doxygen "Topics" page group hierarchy, reorganizing
    generated docs by architectural layer instead of raw file listing.
  • docs/mainpage.md: a proper landing page for the generated Doxygen site.
  • tests/unit/test_rcc_reg.c, tests/unit/test_syscfg_reg.c.

Fixed

  • core/inc/systick_reg.h: added the missing SYSTICK_CTRL.TICKINT bit.
  • core/inc/scb_reg.h: corrected incorrect READ-only comments on CFSR/
    HFSR fields.
  • Hardware-read-only register struct fields marked const, CMSIS-style,
    across the register layer (volatile const uint32_t, not volatile uint32_t, for fields the hardware alone writes).
  • device/inc/rcc_reg.h: filled in RCC register/field gaps needed before
    driver work could start.
  • Stale peripheral lists and make clean documentation corrected after
    syscfg_reg.h landed.

Changed

  • Documentation tone rewrite across README.md, CONTRIBUTING.md,
    SECURITY.md, docs/VERSIONING.md, docs/ARCHITECTURE.md.
  • .github/workflows/ci.yml: added the PR-only @file-block and
    test-coverage diff checks.

Removed

  • .github/dependabot.yml.