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-02-01 08:56:22 +01:00
committed by Lorenz Meier
parent 834ac38841
commit 78dff6adcb
41 changed files with 70 additions and 7 deletions
+6 -2
View File
@@ -58,9 +58,13 @@ struct orb_metadata {
typedef const struct orb_metadata *orb_id_t;
/**
* Maximum number of multi topic instances
* Maximum number of multi topic instances. This must be <= 10 (because it's the last char of the node path)
*/
#define ORB_MULTI_MAX_INSTANCES 10 // This must be <= 10 (because it's the last char of the node path)
#if defined(CONSTRAINED_MEMORY)
# define ORB_MULTI_MAX_INSTANCES 4
#else
# define ORB_MULTI_MAX_INSTANCES 10
#endif
/**
* Generates a pointer to the uORB metadata structure for
@@ -727,12 +727,14 @@ int uORBTest::UnitTest::test_SubscriptionMulti()
ORB_ID::orb_test,
ORB_ID::orb_test,
ORB_ID::orb_test,
#if ORB_MULTI_MAX_INSTANCES > 4
ORB_ID::orb_test,
ORB_ID::orb_test,
ORB_ID::orb_test,
ORB_ID::orb_test,
ORB_ID::orb_test,
ORB_ID::orb_test,
#endif
};
uORB::SubscriptionMultiArray<orb_test_s> orb_test_sub_multi_array{ORB_ID::orb_test};