Skip to content

nRF5340 net-core image overflows RAM by 820 bytes on the rebased zephyr #41

Description

@mikeysklar

Blocks nordic_nrf7002dk, nordic_nrf5340dk and native_nrf5340bsim on the zephyr_260803 pin. Found by building locally; CI did not compile these boards (separate scheduler gap, see below).

Symptom

ld.bfd: zephyr/zephyr_pre0.elf section `noinit' will not fit in region `RAM'
ld.bfd: region `RAM' overflowed by 820 bytes

The overflow is in the hci_ipc net-core image (nRF5340 cpunet), not the application core.

This is not a migration error

Fixed in 2b4737d: the hci_ipc conf split (CONF_FILE -> EXTRA_CONF_FILE + new filename), plus hci_ipc_netcore.conf restoring BT_MAX_CONN=3 and ISR_STACK_SIZE=1024.

Every setting that differed from the pre-rebase build is now restored, verified against the resolved .config. The ISR_STACK_SIZE fix moved the overflow 1332 -> 820 bytes, exactly the 512-byte delta it should. There is nothing left to restore: the residual is growth in the new zephyr itself (8175 commits between pins).

An earlier hypothesis that BT_MAX_CONN caused it was wrong - the override applied correctly and the overflow stayed byte-identical, which is what disproved it.

What closing it requires

Changing behavior rather than restoring it. Options, roughly in order of preference:

  1. Drop ISO. sysbuild.cmake uses the ISO variant of the controller config, likely inherited from Nordic's example. CircuitPython's _bleio does not do isochronous audio, so this may be free. Needs someone to confirm nothing depends on it.
  2. Trim BT buffers. BT_BUF_EVT_RX_COUNT=16 and the ACL buffer sizes in hci_ipc_netcore.conf are the obvious candidates. Changes BLE throughput/queue depth on nordic.
  3. Accept and disable the nRF5340 boards on this pin until upstream shrinks the controller.

Why CI did not catch this

tools/ci_set_matrix.py produced an empty board matrix for PR #40 despite logging Building boards: True, so zero boards compiled. Two causes:

  • Line 93-94 intersects the full PR diff with only the tip commit's diff, so a many-commit PR is scored as if it changed only what the last commit touched.
  • pattern_board expects ports/<port>/boards/<name>/ directories, but zephyr-cp boards are .conf files (boards/siwx917_dk2605a.conf), so the port never expands to a board list.

Worth fixing independently - it means zephyr-cp changes are broadly under-tested, not just this one.

Not blocking siwx917

silabs_siwx917_dk2605a builds, flashes and runs on the new pin: gc.mem_free() 8,264,720, allocation-churn test 0 errors, cpu.uid and mDNS unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    port:siwx917SiWx917 CircuitPython port

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions