Slice 2 of S08.03 (parent: #268).
Scope
Replace the QEMU mps2-an385 HelloWorld's semihosting transport with a CMSDK UART0 polled driver and newlib retargeting, so that printf/getchar in the FreeRTOS example route through qemu -serial stdio. This is the foundation for slice 3+, where Example/Common/ExampleInteractive.c's send N / quit contract drives the FreeRTOS image identically to Linux/Windows.
Out of scope (deferred)
- FreeRTOS-Plus-TCP wiring and the LAN9118 NIC bring-up (slice 3)
Example/FreeRtos/SingleTask/main.c and NullSender (slice 3)
quit / round-trip stdin handling (slice 3 — falls out of Example/Common/ExampleInteractive.c)
- BDD harness target switch and feature un-WIP'ing (slices 4..N)
Why UART, not semihosting
Semihosting reads/writes execute via BKPT traps; QEMU pauses the entire VM while the host services each call. With the IP stack and Service task running concurrently in slice 3+, that stalls every concurrent activity for the duration of every read/write. CMSDK UART0 is plain MMIO — the CPU polls a status register, the IP stack and tasks keep running, Behave drives the example over qemu -serial stdio exactly as it drives the Linux/Windows binaries today.
Acceptance
Slice 2 of S08.03 (parent: #268).
Scope
Replace the QEMU mps2-an385 HelloWorld's semihosting transport with a CMSDK UART0 polled driver and newlib retargeting, so that
printf/getcharin the FreeRTOS example route throughqemu -serial stdio. This is the foundation for slice 3+, whereExample/Common/ExampleInteractive.c'ssend N/quitcontract drives the FreeRTOS image identically to Linux/Windows.Out of scope (deferred)
Example/FreeRtos/SingleTask/main.candNullSender(slice 3)quit/ round-trip stdin handling (slice 3 — falls out ofExample/Common/ExampleInteractive.c)Why UART, not semihosting
Semihosting reads/writes execute via
BKPTtraps; QEMU pauses the entire VM while the host services each call. With the IP stack andServicetask running concurrently in slice 3+, that stalls every concurrent activity for the duration of everyread/write. CMSDK UART0 is plain MMIO — the CPU polls a status register, the IP stack and tasks keep running, Behave drives the example overqemu -serial stdioexactly as it drives the Linux/Windows binaries today.Acceptance
Tests/FreeRtos/(mirrors slice-1SolidSyslogFreeRtosDatagrampattern: source recompiled in the test executable against an in-memory fake register block)._write(and minimum stub set) routes stdout/stderr to the CMSDK UART driver.--specs=rdimon.specsremoved;initialise_monitor_handlesreplaced.Example/FreeRtos/HelloWorldELF still emits its banner under QEMU, but via-serial stdiorather than-semihosting-config.build-freertos-targetjob updated: drops-semihosting-config, adds-serial stdio; banner-grep unchanged.build-freertos-host-tddruns the newCmsdkUartTestautomatically (via the existingdebugpreset).