Repository navigation
Conversation
Previous review (2026-09-08)Automated review note — AI-generated (Claude), validated against the live diff. Please sanity-check before acting. Reviewed at head The bulk of this review was done at The headlineAll 59 failing CI checks are existing boards and tools broken by this PR. Not one of them is a new Zephyr target — no CI job builds a Zephyr board at all. Two reviewers independently fetched every failing job's log and built a ledger; both arrived at the same split: (a) new Zephyr target failing: 0; (b) existing board/test/tool broken by this PR: 59; (c) infrastructure or unrelated: 0. That is the useful message, because with 59 red checks it looks like the port is failing when in fact the port isn't being built. Six of the seven root causes are one-line guard defects. The seventh is not. Blocker status at
|
| Blocker | Status | Evidence |
|---|---|---|
BNO085 includes <zephyr/sys/printk.h> (23 jobs) |
FIXED by 9e81d8ad18 |
no zephyr/ include or printk remains |
AP_InertialSensor_NONE outside its guard (12 jobs) |
FIXED by 2a7495059c |
HAL_INS_NONE branch is now // no INS device; detect() sits under #if ESP32 || ZEPHYR |
CPUInfo unguarded tick symbols (1 job) |
FIXED by 589a9e7320 |
both sites guarded, incl. a non-Zephyr #else for ap_cyc_per_sec() |
| markdown lint / trailing whitespace | FIXED | afcd8b26b3, 7c95a9c820 |
APM_BUILD_Heli on every library object (10 jobs) |
STILL OPEN | see below |
AP_BOOTLOADER_MCUBOOT_AB undefined (8 jobs) |
STILL OPEN | mcuboot_ab.h still included only inside #ifdef __ZEPHYR__ |
AP_BATTERY_ENABLED guarded before its header (2 jobs) |
STILL OPEN | no AP_BattMonitor_config.h include above AP_DroneCAN.cpp:33 |
chain_profile.h enum comment breaks logger_metadata |
STILL OPEN | multi-line trailing comment on AP_PHASE_SCHED_TASKS unchanged |
The one that matters most
Every vehicle-dependent library object is compiled as APM_BUILD_Heli on a plain ./waf.
Tools/ardupilotwaf/ardupilotwaf.py:458 deletes the eager bld.ap_library() loop from ap_stlib(), and Tools/ardupilotwaf/ap_library.py:175 moves the call into process_ap_libraries — i.e. from wscript-recursion time to taskgen-post time. By then _select_programs_from_group() has populated bld.targets, so get_legacy_defines()'s 'heli' in bld.targets test (ardupilotwaf.py:140) is true for every vehicle.
Measured on fmuv3, clean tree, plain ./waf:
| merge base | this PR | |
|---|---|---|
| exit code | 0 | 1 |
undefined reference lines |
0 | 33 |
APM_BUILD_DIRECTORY histogram |
AntennaTracker 17, ArduCopter 74, ArduPlane 64, ArduSub 37, Blimp 27, Rover 140 | same, but Rover 38 and Heli 113 |
distinct AP_Vehicle.cpp.*.o |
4 | 1 (all 8 byte-identical) |
Proved by mutation: restoring the eager loop makes the head build green, restores the histogram, and restores the four distinct objects. Two reviewers reproduced this independently.
This is worse than a build break. ./waf copter is unaffected, which is why some CI jobs pass — but wherever the multi-vehicle link does succeed, you get library code silently compiled with the wrong vehicle's semantics, including scheduler defaults. Suggested fix: keep the eager bld.ap_library() in ap_stlib (it takes extra_defines fine), or stop get_legacy_defines() depending on mutable bld.targets. Related, same commit: ap_library.py replaced the stable idx=0 for common objects with a shared counter, so ./waf antennatracker followed by ./waf copter now leaves a single AP_Vehicle.cpp.2.o where the base leaves two.
Shared-code changes needing a decision, not a guard
wait_for_sample()'s new ~100 ms timeout is not board-gated (AP_InertialSensor.cpp:2116,:2172), so it applies to flying ChibiOS hardware. Compiled in a bounded no-samples harness against the real function bodies: base keeps waiting; head returns after 100,100 µs with_have_sample=1and both new-data flags false. To be fair about the downstream effect — the cross-check established thatget_delta_time()clamps to ten loop periods, so this does not feed an unbounded ≥100 ms timestep to the EKF, and I've withdrawn that part. What remains is that the main loop now continues past a total IMU failure instead of tripping the watchdog, on every board. Please put it behind#if CONFIG_HAL_BOARD == HAL_BOARD_ZEPHYR, or argue it on its own merits.- ExternalAHRS IMU detection is now keyed on parameters, not a working backend (
AP_InertialSensor.cpp:1219-1223):enabled()isdevtype != Noneandhas_sensor()is a parameter bitmask; the oldget_port()requiredbackend != nullptr. So a type whose backend failed to construct or isn't compiled in still registers anAP_InertialSensor_ExternalAHRSas IMU 0, shifting_first_onboard_imu_instanceand the real IMUs' numbering.serial_portis also anint8_t -1reaching auint8_tparameter, so 255 lands inmake_bus_id().
Dependency
.gitmodules adds modules/zephyr → https://github.com/davidbuzz/zephyr.git, branch main_buzz. To be explicit that this is not the usual objection: a submodule pointer moving to an unmerged commit in an ArduPilot-owned repo is normal and expected here, and that is not what's being reported. This is a personal fork, and it needs an ArduPilot-owned home before merge regardless of the code. (check_branch_conventions.py also failed on reachability of the pin; a fresh compare during the cross-check found the SHA is now reachable from that fork's master, so that part may already be resolved.)
Separately, the 24 carried Zephyr patches under libraries/AP_HAL_Zephyr/zephyr/patches/ are never applied or verified by anything — no git apply/git am/patch -p1 in zephyr.py or the prerequisites script, and no SHA or hash check, so a stale patch is undetectable by construction. That's already true of pr-113193-udc-dwc2-dp-pullup, which is absent from the pinned tree, while 14 of the 24 are already in the fork. And Tools/scripts/zephyr_manifest_v4_4_0_map.tsv:31 pins hal_espressif at a SHA that doesn't exist upstream (upload-pack: not our ref; a control SHA fetches fine), so under set -euo pipefail the prerequisites script aborts before the SDK install — nobody but you can complete prerequisites for any board today.
Zephyr-only — not merge blockers for existing boards, but fix before anyone flies these targets
Every file cited here is byte-identical between 50be295e20 and 7c95a9c820, so all of it still applies.
AnalogIn::read_pin_raw()null-dereferences for pins 2–3 (AnalogIn.cpp:140)._adc_readycomes from_adc1only (:109),valid_analog_pin()acceptspin < 4, and_adc2is legitimately null on mr_vmu_rt1176 — the code says so and even claims "see the null guard inread_pin_raw()below", which doesn't exist.BATT_VOLT_PIN=2hard-faults the FC. One line.ap_lpi2c_hard_reset()is indexed 1-based and called 0-based (I2CDevice.cpp:61-73, call site:220).bases[]is{0, LPI2C1, LPI2C2, LPI2C3}but_busis the 0-based AP index. So AP bus 0 returns without resetting — the exact case the function exists for — and AP bus 1 resets LPI2C1, possibly mid-transfer, from a thread not holding that bus's semaphore.- Failed parameter writes are marked clean on ZMS/FRAM/SD (
Storage.cpp:~437).okis only ever set false by the ROM-flash branch; the other three discard their write results, then the dirty bit is cleared anyway — so a failed write leaves the retry queue andhealthy()stays true, defeating the "Param storage failed" prearm you reinstated a few lines above. FRAM is CubeOrangeZephyr's backend. Alsoerase()has no ROM-flash branch and returns true unconditionally, and the dirty bit is cleared without re-checking whetherwrite_block()re-dirtied the chunk during the write. micros64()on Xtensa overflows after 71.6 minutes (system.cpp:224).(xtensa_cycles64() * 17895697ULL) >> 32— the scale factor is right, but the multiply overflowsuint64at 1,030,792,154,881 cycles = 4,294.967 s at 240 MHz, so the wrap extension buys nothing over a 32-bit µs counter.DeviceBus.cpp:209compares this against absolute deadlines.- CAN
select()treats an absolute deadline as a relative timeout (CANIface.cpp:199). The ChibiOS implementation names itblocking_deadlineand waitsblocking_deadline - micros64();AP_CANSensor.cpp:129passesmicros64() + timeout_us. At 60 s uptime a 1 ms wait becomes ~60 s. AlsoCANIface.cpp:81installs a standard-ID filter only if the extended-ID one fails, so standard-ID sensors can't receive alongside DroneCAN; andcan_send(…, K_NO_WAIT, nullptr, nullptr)at:126selects Zephyr's synchronous path, which waitsK_FOREVERfor completion. thread_create()silently halves AP_Scripting's stack and returns success (Scheduler.cpp:888-915). Lua asks for 17 KB and gets 8192, withCONFIG_HW_STACK_PROTECTION=non rt1176 so the overflow is silent corruption. It should returnfalse.- The device-bus pool caps at 4 and fails silently (
DeviceBus.cpp:47,:282). A plain#define(not#ifndef), and the overflow returnsnullptrwith noprintkand noINTERNAL_ERROR, unlike every neighbouring path — while your own comment at:216-223allocates slots for six. To be fair: mr_vmu_rt1176 declares five buses but that doesn't prove five allocated threads (SPI1's sensor answersWHOAMI 0x44and a failed probe registers no callback), so overflow on the default config isn't demonstrated — the latent capacity limit and the silent failure are the finding. - A parameter-format change keeps the old parameters and never records the new version (
AP_Vehicle/Parameters.cpp:13-33). The comment explains skippingStorageManager::erase(), but the#elsealso skipsformat_version.set_and_save(...), so a Zephyr board re-detects the mismatch on every subsequent boot. Theset_and_savelooks like collateral rather than intent. - Board hwdefs contain silent no-ops because
zephyr_hwdef.py:214-369is anif/elifchain with noelse: warn. Found:AP_DRONECAN_ENABLED,AP_LOGGER_ENABLED,AP_AIN_ENABLED,HAL_CAN_ENABLED,AP_NOTIFY_ENABLEDin the ESP32S3/CodeCell hwdefs are read nowhere in the tree, so the claimed RAM savings never happen (the real names areHAL_ENABLE_DRONECAN_DRIVERS,HAL_LOGGING_ENABLED, and the per-backendAP_NOTIFY_*_ENABLED);CubeOrangeZephyr/hwdef.inc:291-292setsHAL_BATT_VOLT_PIN 14/HAL_BATT_CURR_PIN 15, whichAnalogInrejects as ≥ 4, so battery voltage and current can never be read; all 88PAn/PBnlines are dropped so that board has no GPIO map at all; andhwdef.inc:130includes asdcard.incthat doesn't exist. Latent parser bugs worth fixing now:1.5*MHZparses to 1 Hz viaint(float(…))(five ChibiOS hwdefs use7.5*MHZ, so the first port that copies one gets a 7 Hz SPI bus), and theI2C_ORDERfilter testsstartswith('I2C')so anLPI2Cntoken is dropped and no bus lookup is emitted at all. - CubeOrangeZephyr enables
HAL_HAVE_IMU_HEATER, andAP_Arming.cpp:1133-1151gates arming on IMU temperature. (Fairly:AP_BoardConfigimplements the heating loop itself, so the absentUtil::set_imu_temp()override isn't on its own proof the board can never heat — but it's untested and it gates arming.) - Also:
UARTDriver::_tx_dma_kick()(:716-740) advances bytes out of the ring before attemptinguart_tx()and abandons them on failure, after_write()already reported them accepted — a torn MAVLink frame or truncated RTCM on the DMA path.AP_ExternalAHRS_BNO085::shtp_read()(:101-125) accepts a length of 1–3 and returnsrd - 4, underflowing to ~65535 asuint16_t, then walked over a 384-byte buffer.GPIO::_attach_interrupt()ignores both Zephyr return codes and returns true.RCOutput::write()re-enables a channeldisable_ch()turned off, and_apply_channel()discardspwm_set()errors including the zero-duty disable.GPIO::valid_pin()returns(pin >> 5) < 8without consulting the pin table. Creating a fast-mode I2C device after a standard-mode one raises the shared bus clock and never restores it, andI2CDevice::_timeout_msis stored but never read, so a wedged bus blocks forever — which also means theap_lpi2c_hard_reset()recovery in (2) is never reached.
On the micros() defect — the tree records two explanations and neither survives
prj.conf:233 sets CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000000 for every board, and prj.conf:197-200 says that's only safe because "the board DTS now sets &systick { zephyr,min-timeout-cycles = <10000>; }". Only mr_vmu_rt1176_mimxrt1176_cm7.dts:1861-1863 has it — cube_orange_zephyr.dts has no &systick node at all, nor do the ESP32-S3 or CodeCell C6 files. That asymmetry is real and worth fixing regardless.
But the cost is smaller than the tree claims, and I initially got this wrong myself. At 480 MHz, CYC_PER_TICK = 480 and MIN_DELAY = MAX(1024, 30) = 1024 cycles = 2.13 µs, so the floor does exceed the 1 µs quantum and single-tick sleeps are clamped — delay_microseconds(1) costs ~2.1 µs, consistent with your own CPUInfo capture of 4.1 µs/call. What it does not explain is prj.conf's recorded "every k_msleep(1) returned in ~15 µs instead of 1000 µs": a 1 ms sleep is 1000 ticks = 480,000 cycles, three orders of magnitude above a 1024-cycle floor and well inside SysTick's 24-bit range, so it is never clamped. And the other explanation — COMPARED_TO_CHIBIOS.md:48-55 attributing it to TIM5 mis-scaling — doesn't hold either, since system.cpp:54-71 derives TIM5->PSC from LL_RCC_GetSystemClocksFreq(), whose plausible failure modes are 1× or 2× (the APB doubler), not 68×.
So: the missing DTS override is real with a modest cost, the ~68× symptom you measured is real and acknowledged, and both written-down mechanisms are wrong. Since micros() underpins the EKF, the scheduler and every filter time-step, that's worth pinning before the board is trusted — and the tooling exists and has already run on two other boards (output-mr_vmu_rt1176.zephyr.txt:19-25 has the micros-vs-k_uptime table; the CubeOrange capture is truncated before it). One CPUInfo run on the H7 would settle it.
Checked and found genuinely neutral — stated explicitly, because with 59 red checks it's easy to assume the worst
AP_HAL_ChibiOS/hwdef/common/ffconf.h: preprocessing base and head against the same generated CubeOrange hwdef gives identical macro tables. No FATFS setting changed.- The
AP_NavEKF3O3 pragma is genuinely opt-in —EK3_OPTIMIZE_O3is defined in exactly one place (CodeCell_C6/hwdef.dat:61); every other board still takesO2. AP_Scheduler's default loop rate is#ifndef-guarded and overridden only by mr_vmu_rt1176.ArduCopter/rate_thread.cpp's +41 lines are entirely inside the Zephyr guard — zero flash and zero RAM on a 1 MB F4.bl_protocol.cppis not a wire-protocol change: no new or alteredPROTO_*commands,APP_VECTOR_OFFSETdefaults to 0 soapp_baseandSCB_VTORare numerically identical everywhere, andJUMP_MARK/JUMP_FAILaredo {} while (0)off-Zephyr.- The vendored monocypher is not a second divergent copy — it's the upstream Monocypher 3.1.2 optional ed25519 module, byte-identical apart from a provenance comment, with
crypto_ed25519_check()verbatim, andnmon a ChibiOS image finds zerocrypto_*symbols (dead-stripped, no flash cost). One caveat: it's currently dead code, since its only consumer is behindAP_MCUBOOT_AB_PUBKEYwhich is never defined — whileAP_BOOTLOADER_MCUBOOT_ABis 1 on Zephyr, so the A/B adoption path today accepts a slot-1 image on SHA-256 integrity alone. Worth either wiring up or documenting unambiguously. ./waf configure --board CubeOrangeproduces byte-identicalap_config.h,hwdef.h,ldscript.ldandprocessed_defaults.parmat both revisions; a key-by-key diff of all threec4checaches (177 keys) differs in exactly one, the newZEPHYR_SHIP=False.list_boardsis purely additive../waf cleanstill behaves identically on ChibiOS.- New board IDs
AP_HW_CodeCell_C6 1251andAP_HW_ESP32S3Zephyr 1252are free and unique;validate_board_list.pypasses. The committedmr_vmu_rt1176_bl.binfollows the existing convention (823 such binaries already live there). One gap:build_bootloaders.pydiscovers boards only fromAP_HAL_ChibiOS/hwdef/*/hwdef-bl.dat, so this one can't be regenerated by the standard tool, and the commit records no SDK version. AC_PosControl.cpp's GCC 14.3 workaround really is a false positive and behaviour is identical; measured cost on CubeOrange/GCC 10-O2is +2 bytes of.text.
Three changes here are genuine unrelated bug fixes that would merge immediately on their own: cmake.py:172 return self._original_run() (cmake configure failures were previously swallowed on all boards), ap_library.py:433 self.use → use, and the AP_Notify add_backend_helper nullptr check (a null NEW_NOTHROW result was previously dereferenced immediately, on every board).
Verdict: REQUEST CHANGES — with the reason kept narrow
The port itself is better than "unflown" usually implies. The semaphore mapping onto k_mutex is correct (recursive and priority-inheriting, which is exactly what WITH_SEMAPHORE needs), the thread-priority model carries static_asserts on the relationships rather than the numbers, the ring buffers reuse ArduPilot's own ByteBuffer, nearly every non-obvious constant carries a dated hardware measurement, and COMPARED_TO_CHIBIOS.md is an unusually honest self-assessment that mostly holds up against the code — several gaps I'd otherwise have reported are already in it, correctly worded. The one-subsystem-per-commit split is exactly what ArduPilot asks for and is the only reason 46k lines were reviewable at all.
What blocks it is that the shared-code layer isn't yet inert. ./waf configure --board CubeOrange && ./waf, plus ./waf bootloader, a SITL build, a Linux build and ./waf --targets=tool/CPUInfo, catches every remaining build blocker locally in one sitting.
A split the commit structure already supports, if it helps:
- Now, independently: the two unrelated bug fixes above (they're pure wins with no Zephyr content).
- The enabling layer —
HAL_BOARD_ZEPHYR,minimize.hand the guard commits — once the remaining unconditional leaks are gated. Lands with zero behaviour change for existing boards. - waf plus one board: mr_vmu_rt1176, the only one with real hardware time behind it. This is where the object/defines rework belongs, and it needs replacing rather than adjusting.
- The HAL drivers.
- The remaining four boards, one PR each —
a30870ecc8,b47f290004,e2e10207dcand6b35b89aebare already self-contained.
Separately and before any of it: modules/zephyr needs an ArduPilot-owned home and a manifest that resolves.
|
response to ai: '59 failing CI' - most of this was a transient CI glitch this morning that peter was talking about. I have fixed a few smaller things too. |
peterbarker
left a comment
There was a problem hiding this comment.
partial review only - github interface started to explode.
e6550eb to
1ef7a14
Compare
… needs A checkout now resolves modules/zephyr to one revision: 851d97ff1d on davidbuzz/zephyr, branch main_buzz. That is Zephyr main a long way past v4.4.0, at v4.4.0-7956-g851d97ff1d7 with VERSION 4.4.99. The fork carries 21 local patches for parts the HAL needs: cdc_acm and ESP32 USB serial RX, the dwc2 D+ pull-up for the ESP32 USB OTG PHY, ESP32 WiFi AP mode and TX power limits, NXP i.MX RT lpspi, lpi2c, lpuart, igpio and FlexPWM, an STM32 SPI interrupt fix, placement new and std::nothrow, and C linkage for arch_num_cpus(). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- allocate HAL_BOARD_ZEPHYR and add the Zephyr board header - drop the ESP32-C6 reference from the Zephyr board header - drop the RISC-V double-precision case from the Zephyr board header AI-assisted (GitHub Copilot).
…lasses - add the Zephyr backend, hwdef and devicetree generators, board classes - pad the built .apj so bin/<board>.apj boots - place selected objects in RAM for Zephyr boards, and keep -Os - drop the RISC-V Espressif devicetree root from the Zephyr generator - apply the Zephyr ramtext rename only on the RT1176 - build EKF, AP_Math and Filter at -O3 on ESP32S3Zephyr - map SERIAL_ORDER OTG1 to ESP32 usb_serial as a fallback AI-assisted (GitHub Copilot).
AI-assisted (GitHub Copilot).
AI-assisted (GitHub Copilot).
…del everywhere AI-assisted (GitHub Copilot).
- add ZephyrLEDStrip, a bit-banged SK6805 board LED for ESP32-C6 - remove the ZephyrLEDStrip backend AI-assisted (GitHub Copilot).
AI-assisted (GitHub Copilot).
AI-assisted (GitHub Copilot).
…nd diagnostics - route GCS_SEND_TEXT through one function, plus portability fixes - trace FTP replies while diagnosing a stalled worker - count the MAVFTP worker and reply path - wake the FTP worker on a request, bound push_reply() - add send-path counters to the MAVFTP diagnostics - report the MAVFTP send counters over MAVLink - guard the Zephyr-only FTPDIAG printk calls AI-assisted (GitHub Copilot).
- give Zephyr the 10s io thread heartbeat timeout ESP32 uses - time the io_timer phases to name the stuck-thread blocker - move the io_timer diagnostic reporting off log_io - drop a no-op left in the io_timer instrumentation AI-assisted (GitHub Copilot).
… ESP32 AI-assisted (GitHub Copilot).
…annels AI-assisted (GitHub Copilot).
…eton AI-assisted (GitHub Copilot).
AI-assisted (GitHub Copilot).
…e boot AI-assisted (GitHub Copilot).
AI-assisted (GitHub Copilot).
AI-assisted (GitHub Copilot).
…ment AI-assisted (GitHub Copilot).
AI-assisted (GitHub Copilot).
…tion - new HAL backend on Zephyr, four board targets and documentation - drop references to the removed ESP32-C6 target - put the mr_vmu_rt1176 console on USB CDC - build CRSF telemetry for mr_vmu_rt1176 - implement is_dma_enabled() and bw_in_bytes_per_second() - keep XIP usable across a ROM flash erase or program - place the fault path in ITCM so a fault can be recorded - carry the fault record across the reset and report it - mr_vmu_rt1176 loop rate 190 Hz to 466-483 Hz - fix the mr_vmu_rt1176 IMU rotation, HUD was inverted - measure bus-callback cost and the CPU bands - bound I2C retries, raise loop yield, extend ITCM - dump the FlexPWM submodule registers for the motors - check pad mux and counter advance in the FlexPWM dump - fix defects in the bring-up diagnostics - remove the remaining ESP32-C6 references - fix ESP32S3Zephyr build broken by Cortex-M-only diagnostics - let hwdef override pool, stack and bus sizes - ESP32-S3 save FPU registers on context switch, trim RAM - enable WiFi softAP on ESP32S3Zephyr - ESP32S3Zephyr: size user thread stacks to 4 KB - treat usb_serial as USB, quiet unmapped serial ports - run ESP32-S3 as a dual-USB-port board AI-assisted (GitHub Copilot).
AI-assisted (GitHub Copilot).
…_rt1176 AI-assisted (GitHub Copilot).
…ernor hunting - clear the spool-up block when the takeoff checks are compiled out - stop the fast-rate governor hunting AI-assisted (GitHub Copilot).
- bench scripts, Renode models and CPUInfo buses for the Zephyr port - add the Zephyr ramtext section renamer - drop the RISC-V frame-size exception from CPUInfo - refetch @SYS/tasks.txt after 5s and never keep the first read AI-assisted (GitHub Copilot).
…eference AI-assisted (GitHub Copilot).
- add pre-flight notes for mr_vmu_rt1176, plus the measurements - record why the mr_vmu_rt1176 HUD was upside down (UNFLOWN) - extend the mr_vmu_rt1176 day-2 pre-flight record - start the attempt-3 pre-flight record for mr_vmu_rt1176 - record the FlexPWM register evidence in the attempt-3 notes - record the attempt-3 outcome for mr_vmu_rt1176 AI-assisted (GitHub Copilot).
7f08566 to
037b8fd
Compare
Global Size Summary (Total Flash delta in bytes)Built from 037b8fd rebased onto 1f1251a
|
|
Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head Re-reviewed at What blocks at this head:
Should fix: board IDs 1252/1253 are inside the reserved Simplifly range; a write-only CAN Not covered: no Zephyr build, hardware or Renode run here; |
Summary
Adds
AP_HAL_Zephyr, a HAL backend running ArduPilot on Zephyr RTOS.Includes Five initial board targets across Cortex-M7, Xtensa, RISC-V and a host build.
Classification & Testing (check all that apply and add your own)
Nothing here has flown. Every "verified" claim is bench work, named to a
board and a date. All five boards boot and run to some degree; coverage beyond that is uneven
and
COMPARED_TO_CHIBIOS.mdhas the per-feature, per-board matrix.mr_vmu_rt1176took nearly all the hardware time: SPI/IMUs, bus DMA,UART/GPS, USB CDC MAVLink, RC in, PWM out, storage, SD logging, CAN/DroneCAN,
crash dump and the resident bootloader.
ESP32S3ZephyrandCodeCell_C6: boot and USB CDC MAVLink, plus WiFi on theC6. Sensor, UART and storage rows are read off devicetree, not measured.
CubeOrangeZephyr: boot and run only. Open bug -micros()comes from TIM5and
Scheduler::delay()measures ~68x short, so treat anymicros()-derivednumber from that board as unverified.
native_sim: boot, storage and main loop. Not SITL - SITL replaces the HAL,native_sim exercises it.
Tools/CPUInfo/output-*.txtholds in-tree captures from all five Zephyrtargets plus two ChibiOS boards, so timings compare column for column.
Not a no-binary change:
Tools/bootloaders/mr_vmu_rt1176_bl.binis added, perthe existing ChibiOS convention, so firmware can reflash its own bootloader.
Description
Right now Board bring-up requires devicetree and Kconfig work, and i've started to demonstrate the ability to make the device tree overlay/s in hte generator. mr_vmu_rt1176 ->LPUART3 is generated the rest arent, yet.
mr_vmu_rt1176CubeOrangeZephyrESP32S3Zephyrnative_simBuild. waf stays the top-level build and runs Zephyr's CMake build as a
sub-build, producing
libzephyr.ato link against. Zephyr subsystems stay offby default.
./Tools/scripts/zephyr_get_prerequisites.sh # first time only ./waf configure --board=mr_vmu_rt1176 ./waf copterNo west. Zephyr is an ordinary submodule. Its own dependency repos cannot
be, since git will not track paths inside another submodule's gitlink, so
Tools/scripts/zephyr_manifest_v4_4_0_map.tsvpins them: one row perdependency with name, URL, commit and path. The prerequisites script reads
that map, creates every checkout, installs host packages, and fetches the
Espressif RF blobs against the SHA-256 in hal_espressif's own
module.yml.Parity gap to know before reading the code. There is no equivalent of
Shared_DMA. Every DMA channel is a fixed devicetree binding owned by oneperipheral at compile time, so no runtime borrow or evict and no contention
stats.
Docs.
libraries/AP_HAL_Zephyr/README.mdis the entry point, withCOMPARED_TO_CHIBIOS.md,ARCHITECTURAL.md,DEBUGGING.md,PARITY_DETAIL.md,PROCESS.mdandBOOTLOADER_SECURITY.mdalongside it.Per-board wiring is in
hwdef/<board>/README.md.More todo: