This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 2f04ddce4ae4077c5bafdf0f0992f7b835a9bd58 Author: yinshengkai <[email protected]> AuthorDate: Thu Jul 31 10:59:59 2025 +0800 note: put the rpmsg note buffer into the bss section g_noterpmsg_driver has initializers, so the CONFIG_DRIVERS_NOTERPMSG_BUFSIZE bytes of buffer embedded in it go to .data and take the same space in the flash image. Move the buffer to a static array of its own, which goes to .bss, and point the driver at it. Assisted-by: Kiro:claude-opus-5-5 Signed-off-by: yinshengkai <[email protected]> --- drivers/note/noterpmsg_driver.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/note/noterpmsg_driver.c b/drivers/note/noterpmsg_driver.c index 35df8d75289..58f205e85d7 100644 --- a/drivers/note/noterpmsg_driver.c +++ b/drivers/note/noterpmsg_driver.c @@ -45,9 +45,9 @@ struct noterpmsg_driver_s { struct note_driver_s driver; + FAR uint8_t *buffer; volatile size_t head; volatile size_t tail; - uint8_t buffer[CONFIG_DRIVERS_NOTERPMSG_BUFSIZE]; struct work_s work; struct rpmsg_endpoint ept; spinlock_t lock; @@ -64,6 +64,8 @@ static void noterpmsg_add(FAR struct note_driver_s *driver, * Private Data ****************************************************************************/ +static uint8_t g_noterpmsg_buffer[CONFIG_DRIVERS_NOTERPMSG_BUFSIZE]; + static const struct note_driver_ops_s g_noterpmsg_ops = { noterpmsg_add @@ -85,6 +87,7 @@ struct noterpmsg_driver_s g_noterpmsg_driver = #endif &g_noterpmsg_ops }, + g_noterpmsg_buffer }; /****************************************************************************
