mirror of
https://github.com/apache/nuttx.git
synced 2026-09-22 06:04:28 +08:00
The top command was added to nshlib in 2024 but was never documented. Add a section to the NSH commands page covering syntax, options, example output and configuration dependencies, including the Linux-like summary header. Also enable the command in the linum-stm32h753bi:nsh config: procfs, CPU load measurement, stack coloration and task names, so that top and ps are fully functional out of the box. This requires a dedicated interrupt stack and larger IDLE/init task stacks: with SCHED_CPULOAD the per-tick accounting runs in interrupt context, and with ARCH_INTERRUPTSTACK=0 it lands on the stack of the interrupted task, overflowing the 1 KiB IDLE stack and corrupting the adjacent heap. Also add the VT100 escape sequences used by the top command screen refresh as string literals in include/nuttx/vt100.h (VT100_STR_*), next to the existing VT100_FMT_* definitions. Tested on hardware. Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>