Skip to content

various: import / refactor commits from beriberikix#1 - #664

Merged
pennam merged 8 commits into
arduino:mainfrom
facchinm:address_issues_from_beriberikix
Oct 20, 2026
Merged

pennam merged 8 commits into
arduino:mainfrom
facchinm:address_issues_from_beriberikix

Conversation

@facchinm

Copy link
Copy Markdown
Member

Import generally useful patches from beriberikix#1 , so the project doesn't need to ship them anymore (and downstream core users can benefit from them too 🙂 )

@beriberikix

@facchinm
facchinm requested review from pennam and pillo79 September 28, 2026 14:40
@facchinm
facchinm force-pushed the address_issues_from_beriberikix branch from 938b470 to 804711d Compare September 28, 2026 14:40
@CLAassistant

CLAassistant commented Sep 28, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown

Built 1.0.1-0.pr.664.260928t1442z+g804711df

CI run PASSED 🟢

ArtifactBoardCoreTestsRAMSketchesWarningsErrors
✅ zephyr_contrib ek_ra8d1 1 🏷️ ✅

12.0%

2--
frdm_mcxn947 7 🏷️ ✅

53.4%

2--
frdm_rw612 5 🏷️ ✅

63.8%

2--
✅* zephyr_main giga 11 🏷️ ✅*

39.6%

742-
nano33ble 6 🏷️ ✅

78.8%

42--
nano_connect 4 🏷️ ✅

48.5%

32--
nano_matter 4 🏷️ ✅

⚠️ 86.5%

22--
nicla_sense 4 🏷️ ✅

⚠️ 88.5%

18--
nicla_vision 11 🏷️ ✅

38.7%

58--
opta 11 🏷️ ✅

42.3%

68--
portentac33 6 🏷️ ✅

⚠️ 100.0%

72--
portentah7 10 🏷️ ✅*

40.7%

862-
✅ zephyr_unoq unoq 2 🏷️ ✅

43.5%

56--
ventunoq 5 🏷️ ✅

23.7%

48--
Legend

BoardTestStatus description
🔥 🔥 Test run failed to complete.
❌ 🔴 Test completed with unexpected errors.
⁉️ ⁉️ Test was expected to fail but passed; exception entry is outdated.
✔️* 🚫 Test completed with errors, but all are known/expected.
✅* 🟡 Test completed with some warnings; no errors detected.
✅ 🟢 Test passed successfully, with no warnings or errors.
🌑 🌑 Test was skipped.

@pillo79 pillo79 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! A few cleanups to hide the fact that AI is taking over the world 🙂

Comment thread loader/llext_exports.c Outdated
Comment thread loader/main.c
Comment thread variants/frdm_rw612_rw612/frdm_rw612_rw612.conf Outdated
Comment thread variants/frdm_rw612_rw612/frdm_rw612_rw612.conf Outdated
@facchinm
facchinm force-pushed the address_issues_from_beriberikix branch 3 times, most recently from 3b305fb to 0f777a4 Compare September 30, 2026 08:47
@github-actions

Copy link
Copy Markdown

Built 1.0.1-0.pr.664.260930t0848z+g0f777a40

CI run PASSED 🟢

ArtifactBoardCoreTestsRAMSketchesWarningsErrors
✅ zephyr_contrib ek_ra8d1 1 🏷️ ✅

12.0%

2--
frdm_mcxn947 7 🏷️ ✅

53.4%

2--
frdm_rw612 8 🏷️ ✅

75.5%

2--
✅* zephyr_main giga 11 🏷️ ✅*

39.6%

742-
nano33ble 6 🏷️ ✅

78.8%

42--
nano_connect 4 🏷️ ✅

48.5%

32--
nano_matter 4 🏷️ ✅

⚠️ 86.5%

22--
nicla_sense 4 🏷️ ✅

⚠️ 88.5%

18--
nicla_vision 11 🏷️ ✅

38.7%

58--
opta 11 🏷️ ✅

42.3%

68--
portentac33 6 🏷️ ✅

⚠️ 100.0%

72--
portentah7 10 🏷️ ✅*

40.7%

862-
✅ zephyr_unoq unoq 2 🏷️ ✅

43.5%

56--
ventunoq 5 🏷️ ✅

23.7%

48--
Legend

BoardTestStatus description
🔥 🔥 Test run failed to complete.
❌ 🔴 Test completed with unexpected errors.
⁉️ ⁉️ Test was expected to fail but passed; exception entry is outdated.
✔️* 🚫 Test completed with errors, but all are known/expected.
✅* 🟡 Test completed with some warnings; no errors detected.
✅ 🟢 Test passed successfully, with no warnings or errors.
🌑 🌑 Test was skipped.

@pillo79
pillo79 force-pushed the address_issues_from_beriberikix branch 2 times, most recently from df80d70 to fa6f5aa Compare October 20, 2026 11:00
beriberikix and others added 2 commits October 20, 2026 13:01
Both are reachable on any board with ZARD_FIRST_SERIAL_IS_SERIALUSB and
CONFIG_SHELL; they are dormant today only because the boards currently
shipped happen to enable CONFIG_THREAD_NAME.

- loader_usb_disable() dereferenced _usbd unconditionally. When USB was
  never brought up, usbd_shutdown(NULL) jumps through a null vtable and
  the loader takes a usage fault at PC=0x4 rather than skipping teardown.

- The 'am I the main thread' check used k_thread_name_get(), which returns
  NULL without CONFIG_THREAD_NAME. That makes the strcmp() undefined
  behaviour and, in practice, silently skips USB setup - which is what
  left _usbd NULL above. Compare the thread object instead.

Also narrows the raw-HCI export guard from CONFIG_BT to CONFIG_BT_HCI_RAW.
bt_enable_raw()/bt_send()/bt_buf_get_tx() only exist in raw mode, so a
variant running Zephyr's own Bluetooth host has CONFIG_BT=y but none of
those symbols and fails to link.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016jxgAKD8zZeWVBu1NRR6JV
@pillo79
pillo79 force-pushed the address_issues_from_beriberikix branch from fa6f5aa to 4b04e96 Compare October 20, 2026 11:08
@pillo79 pillo79 changed the title Address issues from https://github.com/beriberikix/ArduinoCore-zephyr/pull/1 various: import / refactor commits from beriberikix#1 Oct 20, 2026
@pennam

pennam commented Oct 20, 2026

Copy link
Copy Markdown

we can drop 2b3df4f because now MPU is enabled in loader/prj.conf

pennam and others added 4 commits October 20, 2026 15:56
bootstrap.sh, build.sh and package_core.sh each carried their own copy
of log_msg. Define log_msg once in extra/common.sh and source it from
all three scripts.
The boards.txt file was selecting 'hal_stm32', which is incorrect for
this board. Change to 'hal_nxp' to ensure proper functionality and
compatibility with the Zephyr RTOS build.

:1
The on-board VL53L1CB is held in reset by XSHUT (gpiog 10) until
something drives it HIGH. Zephyr's st,vl53l1x driver would, but this
loader does not integrate it.

Define a new pin D34 for XSHUT and add it to the overlay so that a
sketch can drive it HIGH to release the ToF.
Group the options into sections, drop duplicate assignments that were
overridden later in the file and remove stale comments.

No functional change: the effective value of every option is the same.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@pillo79
pillo79 force-pushed the address_issues_from_beriberikix branch from 4b04e96 to fa73c88 Compare October 20, 2026 13:58
CONFIG_ARM_MPU=n (loader/prj.conf) leaves the RW612's coprocessor shared
memory at 0x443C0000 inside the ARMv7-M default map's peripheral region,
which is Device memory - where unaligned access faults unconditionally.
NXP's HCI driver reads the ACL header with an unaligned 16-bit load, so
every inbound BLE packet took K_ERR_ARM_USAGE_UNALIGNED_ACCESS and the
gateway died mid-pairing. Enabling the MPU lets Zephyr map that region as
Normal memory.
@pillo79
pillo79 force-pushed the address_issues_from_beriberikix branch from fa73c88 to 152a61e Compare October 20, 2026 14:06
- add mbedTLS/PSA crypto and TLS socket options
- enable Bluetooth central with GATT client and SMP
- enable the Ethernet driver, disable zperf
- reduce net packet/buffer counts, allow 3 IPv4/IPv6 addresses per iface
- lower WiFi log level from DBG to ERR, use UART log backend without color
- drop TEST_RANDOM_GENERATOR, NET_TX/RX_STACK_SIZE and
  NET_STATISTICS_PERIODIC_OUTPUT overrides, leaving Kconfig defaults

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@pillo79
pillo79 force-pushed the address_issues_from_beriberikix branch from 152a61e to 831405f Compare October 20, 2026 15:12
@pennam
pennam marked this pull request as ready for review October 20, 2026 15:27
@github-actions

Copy link
Copy Markdown

Built 1.0.1-0.pr.664.261020t1513z+g831405f1

CI run PASSED 🟢

ArtifactBoardCoreTestsRAMSketchesWarningsErrors
✅ zephyr_contrib ek_ra8d1 2 🏷️ ✅

12.0%

2--
frdm_mcxn947 7 🏷️ ✅

53.4%

2--
frdm_rw612 8 🏷️ ✅

73.4%

2--
✅* zephyr_main giga 10 🏷️ ✅*

45.9%

862-
nano33ble 5 🏷️ ✅

79.2%

44--
nano_connect 6 🏷️ ✅

69.5%

38--
nano_matter 3 🏷️ ✅

⚠️ 86.5%

22--
nicla_sense 3 🏷️ ✅

⚠️ 89.0%

18--
nicla_vision 11 🏷️ ✅

40.4%

68--
opta 11 🏷️ ✅

42.3%

76--
portentac33 6 🏷️ ✅

⚠️ 100.0%

72--
portentah7 10 🏷️ ✅*

51.2%

1022-
✅ zephyr_unoq unoq 2 🏷️ ✅

43.5%

56--
ventunoq 5 🏷️ ✅

23.7%

48--
Legend

BoardTestStatus description
🔥 🔥 Test run failed to complete.
❌ 🔴 Test completed with unexpected errors.
⁉️ ⁉️ Test was expected to fail but passed; exception entry is outdated.
✔️* 🚫 Test completed with errors, but all are known/expected.
✅* 🟡 Test completed with some warnings; no errors detected.
✅ 🟢 Test passed successfully, with no warnings or errors.
🌑 🌑 Test was skipped.

@pennam
pennam merged commit e2a7b7d into arduino:main Oct 20, 2026
59 checks passed
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.

5 participants