Skip to content

Commit

Permalink
drivers: bluetooth: rpmsg: validate heap size configuration
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kapi-no authored and carlescufi committed Jul 10, 2020
1 parent e09fcca commit d19e21f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/bluetooth/hci/rpmsg_nrf53.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down

0 comments on commit d19e21f

Please sign in to comment.