Minimal Build for 3.x
Posted: Tue Nov 18, 2014 1:04 pm
I was trying to do a minimal build for ChibiOS V3.x by turning off all the option in the chconf.h file and all the perohperals in halconf.h and found that some options are mandatory:
#define CH_CFG_USE_MESSAGES TRUE
#define CH_CFG_USE_EVENTS TRUE
Setting CH_CFG_USE_MESSAGES -> FALSE
gives the following compile error in threads which seems fundamental
../libraries/ChibiOS-RT/os/rt/src/chthreads.c:501:25: error: 'struct thread' has no member named 'p_msg'
return chThdGetSelfX()->p_msg;
Setting CH_CFG_USE_EVENTS -> FALSE
Causes errors in the inline functions:
static inline void osalEventObjectInit(event_source_t *esp) {
static inline void osalEventBroadcastFlagsI(event_source_t *esp,
static inline void osalEventBroadcastFlags(event_source_t *esp,
in osal.h which is called from hal.h.
the #include "hal.h" is called for ADC and other HAL drivers regardless of the HAL_USE_XXX flag becuse it occurs before the #if HAL_USE_XXX
its also included in the file that includes the port SysTick handler which if I am not mistaken is mandatory for the OS to function.
Is this intentional or am I just doing somehting wrong ?
#define CH_CFG_USE_MESSAGES TRUE
#define CH_CFG_USE_EVENTS TRUE
Setting CH_CFG_USE_MESSAGES -> FALSE
gives the following compile error in threads which seems fundamental
../libraries/ChibiOS-RT/os/rt/src/chthreads.c:501:25: error: 'struct thread' has no member named 'p_msg'
return chThdGetSelfX()->p_msg;
Setting CH_CFG_USE_EVENTS -> FALSE
Causes errors in the inline functions:
static inline void osalEventObjectInit(event_source_t *esp) {
static inline void osalEventBroadcastFlagsI(event_source_t *esp,
static inline void osalEventBroadcastFlags(event_source_t *esp,
in osal.h which is called from hal.h.
the #include "hal.h" is called for ADC and other HAL drivers regardless of the HAL_USE_XXX flag becuse it occurs before the #if HAL_USE_XXX
its also included in the file that includes the port SysTick handler which if I am not mistaken is mandatory for the OS to function.
Is this intentional or am I just doing somehting wrong ?