CV-Bowen opened a new pull request, #22298:
URL: https://github.com/apache/nuttx/pull/22298
## Summary
imx93-qsb:rpmsg runs from the 126 KB ITCM and no longer links on
master:
```
arm-none-eabi-ld: region `itcm' overflowed by 480 bytes
```
Two new options let a board leave out debug support it does not need,
and the board uses both:
- `debug: add DEBUG_FUNCTIONNAME to drop the function name from debug
output`: `_emerg()`, `_alert()`, `_err()`, `_warn()`, `_info()` and
the subsystem macros built on them prefix every message with
`"%s: "` and `__FUNCTION__` unless `DEFAULT_SMALL` is set.
`DEFAULT_SMALL` also changes the defaults of a few hundred other
options (on this board: pthreads, message queues, directory
operations, file streams, most of procfs), so a board could not drop
only the names. `DEBUG_FUNCTIONNAME` defaults to `!DEFAULT_SMALL`, so
no existing configuration changes.
- `drivers/rpmsg: add RPMSG_DUMP to leave out the dump support`: the
`RPMSGIOC_DUMP` handlers of rpmsg_virtio, rpmsg_port and
rpmsg_port_uart, `rpmsg_dump_epts()` and their strings are always
built. `RPMSG_DUMP` defaults to y; without it `RPMSGIOC_DUMP` returns
`-ENOTTY` and `RPMSG_PANIC_DUMP_LEVEL` defaults to 0.
- `boards/imx93-qsb: shrink the rpmsg configuration to fit the ITCM`:
disables both.
## Impact
- New Kconfig `DEBUG_FUNCTIONNAME` (default `!DEFAULT_SMALL`) and
`RPMSG_DUMP` (default y). Every other configuration builds as before.
- imx93-qsb:rpmsg: debug messages lose the `function: ` prefix, and
`rpmsg dump` fails (`RPMSGIOC_DUMP` returns `-ENOTTY`). Nothing else
in its configuration changes.
## Testing
Host: Ubuntu 22.04.5 LTS x86_64, arm-gnu-toolchain 13.2.rel1 (the CI
toolchain) for imx93-qsb
**imx93-qsb:rpmsg** (`make`, ITCM 129024 bytes). The two `.config`
files differ only in `DEBUG_FUNCTIONNAME`, `RPMSG_DUMP` and the
`RPMSG_PANIC_DUMP_LEVEL` default (2 → 0):
| | ITCM used |
|---|---|
| master | 129504, overflows by 480 |
| this PR | 127344 (`DEBUG_FUNCTIONNAME` −556, `RPMSG_DUMP` −1600) |
**`RPMSG_DUMP=n`** on sim:rpserver, sim:rpproxy, qemu-armv8a:rpserver
and qemu-armv8a:rpproxy (rpmsg_virtio and rpmsg_port_uart): builds with
0 warnings; `rpmsg dump all` fails (`echo $?` prints 1), `rpmsg ping
all 10 64 1 0` passes on both sides.
Every commit builds sim:rpserver and qemu-armv8a:rpproxy with 0
warnings.
No regression in rpmsg: sim:rpserver/rpproxy and
qemu-armv8a:rpserver/rpproxy boot and pass the fixed rpmsg cases (dump, ping,
rpmsgfs; 15/15). qemu-armv8a was built with LIBC_ENVPATH and BINFMT_CHECKEXEC
disabled, which current master needs for nxinit to start nsh there; unrelated
to this change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]