F4.5: consola UART interactiva de operador#83
Merged
Conversation
…oot) Añade una consola de operador por UART real sobre la capa rugus-kernel, desacoplada del hardware por el trait `ConsoleOut` (mismo patrón que `StatusLeds`/`FaultObserver`). El kernel acumula la línea byte a byte, hace eco y parsea comandos que inspeccionan (`ps`/`mem`/`faults`) y actúan (`respawn`/`reboot`) sobre el estado vivo, sin `alloc` ni `defmt` y sin bloquear al supervisor. - rugus-kernel/console.rs: `Console` (parser de línea + comandos + NumBuf), trait `ConsoleOut` y anillo SPSC `RxRing` sin bloqueo (ISR productor / supervisor consumidor) reutilizable entre placas. - rugus-kernel/lib.rs: wrappers de introspección (task_state_name, is_user_task, task_priority, stack_*, heap_* cfg-gated por `alloc`) y `reboot()`. - rugus-core: `sched::task_state_name`/`is_user_task` y `heap::used/free/size`. - HAL F4/F7: `enable_rx_irq()` (RXNEIE) + `isr_read_byte()` para drenar RX desde el `#[interrupt] fn USART2`. - Ejemplos F407/F769: handler USART2 → RxRing, ConsoleOut sobre Usart2, drenado en el supervisor, NVIC unmask + greet. Validado por RTT en ambas placas (loopback PASS, "UART console ready", selftests PASS, supervisor vivo). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumen
rugus-kernel, desacoplada del HW por el traitConsoleOut(patrónStatusLeds/FaultObserver). Sinallocnidefmt, sin bloquear al supervisor.help,ps(tareas: idx/pri/modo/estado/stack),mem(heap),faults(telemetría persistente + safe-mode),respawn <n>,reboot.RxRingsin bloqueo (ISR productor / supervisor consumidor); RX por IRQ víaenable_rx_irq()/isr_read_byte()en HAL F4 y F7.#[interrupt] fn USART2→RxRing,ConsoleOutsobreUsart2, drenado en el supervisor, NVIC unmask + greet.Test plan
cargo fmt --all+ host-tests fmtthumbv7em-none-eabihfythumbv7m-none-eabi(-D warnings) limpiocargo doc --workspacelimpio🤖 Generated with Claude Code