Skip to content

Commit

Permalink
f0 bootloader conf
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Jan 24, 2025
1 parent 29ed5ff commit 4c38715
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 233 deletions.
79 changes: 60 additions & 19 deletions firmware/boards/f0_module/bootloader/cfg/chconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,26 @@
#define _CHIBIOS_RT_CONF_
#define _CHIBIOS_RT_CONF_VER_7_0_

/*===========================================================================*/
/**
* @name System settings
* @{
*/
/*===========================================================================*/

/**
* @brief Handling of instances.
* @note If enabled then threads assigned to various instances can
* interact each other using the same synchronization objects.
* If disabled then each OS instance is a separate world, no
* direct interactions are handled by the OS.
*/
#if !defined(CH_CFG_SMP_MODE)
#define CH_CFG_SMP_MODE FALSE
#endif

/** @} */

/*===========================================================================*/
/**
* @name System timers settings
Expand All @@ -40,7 +60,7 @@

/**
* @brief System time counter resolution.
* @note Allowed values are 16 or 32 bits.
* @note Allowed values are 16, 32 or 64 bits.
*/
#if !defined(CH_CFG_ST_RESOLUTION)
#define CH_CFG_ST_RESOLUTION 32
Expand Down Expand Up @@ -162,8 +182,7 @@

/**
* @brief Time Stamps APIs.
* @details If enabled then the time time stamps APIs are included in
* the kernel.
* @details If enabled then the time stamps APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
Expand All @@ -178,7 +197,7 @@
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_REGISTRY)
#define CH_CFG_USE_REGISTRY TRUE
#define CH_CFG_USE_REGISTRY FALSE
#endif

/**
Expand All @@ -189,7 +208,7 @@
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_WAITEXIT)
#define CH_CFG_USE_WAITEXIT TRUE
#define CH_CFG_USE_WAITEXIT FALSE
#endif

/**
Expand All @@ -199,7 +218,7 @@
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_SEMAPHORES)
#define CH_CFG_USE_SEMAPHORES TRUE
#define CH_CFG_USE_SEMAPHORES FALSE
#endif

/**
Expand All @@ -222,7 +241,7 @@
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_MUTEXES)
#define CH_CFG_USE_MUTEXES TRUE
#define CH_CFG_USE_MUTEXES FALSE
#endif

/**
Expand All @@ -246,7 +265,7 @@
* @note Requires @p CH_CFG_USE_MUTEXES.
*/
#if !defined(CH_CFG_USE_CONDVARS)
#define CH_CFG_USE_CONDVARS TRUE
#define CH_CFG_USE_CONDVARS FALSE
#endif

/**
Expand Down Expand Up @@ -291,7 +310,7 @@
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_MESSAGES)
#define CH_CFG_USE_MESSAGES TRUE
#define CH_CFG_USE_MESSAGES FALSE
#endif

/**
Expand All @@ -317,7 +336,7 @@
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
*/
#if !defined(CH_CFG_USE_DYNAMIC)
#define CH_CFG_USE_DYNAMIC TRUE
#define CH_CFG_USE_DYNAMIC FALSE
#endif

/** @} */
Expand Down Expand Up @@ -349,7 +368,7 @@
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_MEMCORE)
#define CH_CFG_USE_MEMCORE TRUE
#define CH_CFG_USE_MEMCORE FALSE
#endif

/**
Expand Down Expand Up @@ -378,7 +397,7 @@
* @note Mutexes are recommended.
*/
#if !defined(CH_CFG_USE_HEAP)
#define CH_CFG_USE_HEAP TRUE
#define CH_CFG_USE_HEAP FALSE
#endif

/**
Expand Down Expand Up @@ -555,7 +574,7 @@
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_CHECKS)
#define CH_DBG_ENABLE_CHECKS FALSE
#define CH_DBG_ENABLE_CHECKS TRUE
#endif

/**
Expand All @@ -567,7 +586,7 @@
* @note The default is @p FALSE.
*/
#if !defined(CH_DBG_ENABLE_ASSERTS)
#define CH_DBG_ENABLE_ASSERTS FALSE
#define CH_DBG_ENABLE_ASSERTS TRUE
#endif

/**
Expand Down Expand Up @@ -600,7 +619,7 @@
* @p panic_msg variable set to @p NULL.
*/
#if !defined(CH_DBG_ENABLE_STACK_CHECK)
#define CH_DBG_ENABLE_STACK_CHECK FALSE
#define CH_DBG_ENABLE_STACK_CHECK TRUE
#endif

/**
Expand Down Expand Up @@ -638,21 +657,35 @@
/*===========================================================================*/

/**
* @brief OS instance structure extension.
* @brief System structure extension.
* @details User fields added to the end of the @p ch_system_t structure.
*/
#define CH_CFG_SYSTEM_EXTRA_FIELDS \
/* Add system custom fields here.*/

/**
* @brief System initialization hook.
* @details User initialization code added to the @p chSysInit() function
* just before interrupts are enabled globally.
*/
#define CH_CFG_SYSTEM_INIT_HOOK() { \
/* Add system initialization code here.*/ \
}

/**
* @brief OS instance structure extension.
* @details User fields added to the end of the @p os_instance_t structure.
*/
#define CH_CFG_OS_INSTANCE_EXTRA_FIELDS \
/* Add OS instance custom fields here.*/

/**
* @brief OS instance initialization hook.
* @details User initialization code added to the @p chSysInit() function
* just before interrupts are enabled globally.
*
* @param[in] oip pointer to the @p os_instance_t structure
*/
#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) { \
/* Add system instance initialization code here.*/ \
/* Add OS instance initialization code here.*/ \
}

/**
Expand Down Expand Up @@ -765,6 +798,14 @@
/* Trace code here.*/ \
}

/**
* @brief Runtime Faults Collection Unit hook.
* @details This hook is invoked each time new faults are collected and stored.
*/
#define CH_CFG_RUNTIME_FAULTS_HOOK(mask) { \
/* Faults handling code here.*/ \
}

/** @} */

/*===========================================================================*/
Expand Down
Loading

0 comments on commit 4c38715

Please sign in to comment.