boards: add CONSTRAINED_MEMORY build option

- currently the main change is that it reduces the max number of ORB multi instances to 4, but usage will be expanded as needed
 - limits number of EKF2 multi instances to 2.
 - enabled on all cortex m4 boards
This commit is contained in:
Daniel Agar
2021-01-30 21:56:36 -05:00
committed by Lorenz Meier
parent 834ac38841
commit 78dff6adcb
41 changed files with 70 additions and 7 deletions

View File

@@ -56,6 +56,7 @@
# [ EXAMPLES <list> ]
# [ SERIAL_PORTS <list> ]
# [ CONSTRAINED_FLASH ]
# [ CONSTRAINED_MEMORY ]
# [ TESTING ]
# [ LINKER_PREFIX <string> ]
# [ EMBEDDED_METADATA <string> ]
@@ -80,6 +81,7 @@
# SERIAL_PORTS : mapping of user configurable serial ports and param facing name
# EMBEDDED_METADATA : list of metadata to embed to ROMFS
# CONSTRAINED_FLASH : flag to enable constrained flash options (eg limit init script status text)
# CONSTRAINED_MEMORY : flag to enable constrained memory options (eg limit maximum number of uORB publications)
# TESTING : flag to enable automatic inclusion of PX4 testing modules
# LINKER_PREFIX : optional to prefix on the Linker script.
#
@@ -156,6 +158,7 @@ function(px4_add_board)
OPTIONS
BUILD_BOOTLOADER
CONSTRAINED_FLASH
CONSTRAINED_MEMORY
TESTING
REQUIRED
PLATFORM
@@ -248,6 +251,11 @@ function(px4_add_board)
add_definitions(-DCONSTRAINED_FLASH)
endif()
if(CONSTRAINED_MEMORY)
set(px4_constrained_memory_build "1" CACHE INTERNAL "constrained memory build" FORCE)
add_definitions(-DCONSTRAINED_MEMORY)
endif()
if(TESTING)
set(PX4_TESTING "1" CACHE INTERNAL "testing enabled" FORCE)
endif()