Skip to content

Commit

Permalink
bump ChibiOS to stable release, and update F0 configs
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Jan 24, 2025
1 parent 416a6d9 commit 7498263
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[submodule "firmware/ChibiOS"]
path = firmware/ChibiOS
url = https://github.com/rusefi/ChibiOS
branch = master.wideband
url = https://github.com/ChibiOS/ChibiOS
branch = stable_21.11.x
[submodule "firmware/cmsis-svd"]
path = firmware/cmsis-svd
url = https://github.com/posborne/cmsis-svd
Expand Down
2 changes: 1 addition & 1 deletion firmware/ChibiOS
Submodule ChibiOS updated 5491 files
60 changes: 48 additions & 12 deletions firmware/boards/f0_module/chconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,29 @@
#ifndef CHCONF_H
#define CHCONF_H

#ifndef __ASSEMBLER__
// HACK: some compilers have a problem with syscalls_cpp.cpp not being able to find pid_t
typedef int pid_t;
#endif

#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 @@ -45,7 +60,7 @@ typedef int pid_t;

/**
* @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 @@ -167,8 +182,7 @@ typedef int pid_t;

/**
* @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 Down Expand Up @@ -643,21 +657,35 @@ typedef int pid_t;
/*===========================================================================*/

/**
* @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 @@ -770,6 +798,14 @@ typedef int pid_t;
/* 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
16 changes: 11 additions & 5 deletions firmware/boards/f0_module/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_7_1_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down Expand Up @@ -194,6 +194,13 @@
#define HAL_USE_WDG FALSE
#endif

/**
* @brief Enables the WSPI subsystem.
*/
#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
#define HAL_USE_WSPI FALSE
#endif

/*===========================================================================*/
/* PAL driver related settings. */
/*===========================================================================*/
Expand Down Expand Up @@ -289,11 +296,10 @@
#endif

/**
* @brief Enables circular transfers APIs.
* @note Disabling this option saves both code and data space.
* @brief Inserts an assertion on function errors before returning.
*/
#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
#define SPI_USE_CIRCULAR FALSE
#if !defined(SPI_USE_ASSERT_ON_ERROR) || defined(__DOXYGEN__)
#define SPI_USE_ASSERT_ON_ERROR TRUE
#endif

/**
Expand Down

0 comments on commit 7498263

Please sign in to comment.