From d19e21fb01b96ebd47f4635fb03ceac0140a3122 Mon Sep 17 00:00:00 2001 From: Kamil Piszczek Date: Thu, 25 Jun 2020 09:41:43 -0400 Subject: [PATCH] drivers: bluetooth: rpmsg: validate heap size configuration Added a build-time assert to check if heap memory configuration to make sure that it can accomodate RPMsg queue allocations. Ref: NCSDK-5479 Signed-off-by: Kamil Piszczek --- drivers/bluetooth/hci/rpmsg_nrf53.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/bluetooth/hci/rpmsg_nrf53.c b/drivers/bluetooth/hci/rpmsg_nrf53.c index b02390679df..d7b143107d4 100644 --- a/drivers/bluetooth/hci/rpmsg_nrf53.c +++ b/drivers/bluetooth/hci/rpmsg_nrf53.c @@ -48,6 +48,9 @@ BUILD_ASSERT((SHM_START_ADDR + SHM_SIZE - SHM_BASE_ADDRESS) #define VDEV_STATUS_ADDR SHM_BASE_ADDRESS +BUILD_ASSERT(CONFIG_HEAP_MEM_POOL_SIZE >= 1024, + "Not enough heap memory for RPMsg queue allocation"); + /* End of configuration defines */ static metal_phys_addr_t shm_physmap[] = { SHM_START_ADDR };