Skip to content

Commit

Permalink
Merge pull request #310 from zykrahgaming/chibios-21.11.x-dev
Browse files Browse the repository at this point in the history
Update all MCUs to ChibiOS 21.11.x/master
  • Loading branch information
fpoussin authored Feb 6, 2022
2 parents 1127b55 + 8c93606 commit 47b1ce6
Show file tree
Hide file tree
Showing 335 changed files with 8,535 additions and 1,059 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: build tests

on:
push:
branches: [ chibios-21.6.x ]
branches: [ chibios-21.11.x ]
pull_request:
branches: [ chibios-21.6.x ]
branches: [ chibios-21.11.x ]

jobs:
build:
Expand All @@ -16,7 +16,7 @@ jobs:
release: '10-2020-q4'
- name: setup vars
run: |
echo "CH_VER=stable_20.3.x" >> $GITHUB_ENV
echo "CH_VER=stable_21.11.x" >> $GITHUB_ENV
echo "CHC_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: download Chibios
run: |
Expand All @@ -25,11 +25,11 @@ jobs:
- name: decompress ChibiOS ext resources
run: |
cd $CH_PATH/ext
for i in *.7z; do 7z x -y $i; done
for i in *.7z; do 7z x -y "$i"; done
- name: decompress ChibiOS-Contrib ext resources
run: |
cd $CHC_PATH/ext
for i in *.7z; do 7z x -y $i; done
for i in *.7z; do 7z x -y "$i"; done
- name: build STM32
run: |
$CHC_PATH/tools/chbuild.sh $CHC_PATH/testhal/STM32
Expand Down
2 changes: 1 addition & 1 deletion demos/GD32VF103/USB_CDC_IAD/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ include $(CHIBIOS_CONTRIB)/os/common/ports/RISCV-ECLIC/compilers/GCC/mk/port.mk
# Auto-build files in ./source recursively.
include $(CHIBIOS)/tools/mk/autobuild.mk
# Other files (optional).
include $(CHIBIOS)/test/lib/test.mk
include $(CHIBIOS)/os/test/test.mk
include $(CHIBIOS)/test/rt/rt_test.mk
include $(CHIBIOS)/test/oslib/oslib_test.mk
include $(CHIBIOS)/os/hal/lib/streams/streams.mk
Expand Down
84 changes: 81 additions & 3 deletions demos/GD32VF103/USB_CDC_IAD/cfg/chconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,27 @@
#define CHCONF_H

#define _CHIBIOS_RT_CONF_
#define _CHIBIOS_RT_CONF_VER_6_1_
#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

/** @} */

/*===========================================================================*/
/**
Expand Down Expand Up @@ -119,6 +139,19 @@
#define CH_CFG_NO_IDLE_THREAD FALSE
#endif

/**
* @brief Kernel hardening level.
* @details This option is the level of functional-safety checks enabled
* in the kerkel. The meaning is:
* - 0: No checks, maximum performance.
* - 1: Reasonable checks.
* - 2: All checks.
* .
*/
#if !defined(CH_CFG_HARDENING_LEVEL)
#define CH_CFG_HARDENING_LEVEL 0
#endif

/** @} */

/*===========================================================================*/
Expand Down Expand Up @@ -160,6 +193,17 @@
#define CH_CFG_USE_TM TRUE
#endif

/**
* @brief Time Stamps APIs.
* @details If enabled then the time time stamps APIs are included in
* the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_TIMESTAMP)
#define CH_CFG_USE_TIMESTAMP TRUE
#endif

/**
* @brief Threads registry APIs.
* @details If enabled then the registry APIs are included in the kernel.
Expand Down Expand Up @@ -330,6 +374,16 @@
#define CH_CFG_USE_MAILBOXES TRUE
#endif

/**
* @brief Memory checks APIs.
* @details If enabled then the memory checks APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_MEMCHECKS)
#define CH_CFG_USE_MEMCHECKS TRUE
#endif

/**
* @brief Core Memory Manager APIs.
* @details If enabled then the core memory manager APIs are included
Expand Down Expand Up @@ -631,15 +685,31 @@
* @details User fields added to the end of the @p ch_system_t structure.
*/
#define CH_CFG_SYSTEM_EXTRA_FIELDS \
/* Add threads custom fields here.*/
/* 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 threads initialization code here.*/ \
/* 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.
*
* @param[in] oip pointer to the @p os_instance_t structure
*/
#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) { \
/* Add OS instance initialization code here.*/ \
}

/**
Expand Down Expand Up @@ -745,6 +815,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
2 changes: 1 addition & 1 deletion demos/GD32VF103/USB_CDC_IAD/cfg/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_0_

#include "mcuconf.h"

Expand Down
4 changes: 2 additions & 2 deletions demos/HT32/HT32F165x_USB_DFU/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ include $(BOARDDIR)/board.mk
include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
include $(CHIBIOS)/os/common/ports/ARMv7-M/compilers/GCC/mk/port.mk
# Auto-build files in ./source recursively.
include $(CHIBIOS)/tools/mk/autobuild.mk
# Other files (optional).
#include $(CHIBIOS)/test/lib/test.mk
#include $(CHIBIOS)/os/test/test.mk
#include $(CHIBIOS)/test/rt/rt_test.mk
#include $(CHIBIOS)/test/oslib/oslib_test.mk

Expand Down
83 changes: 80 additions & 3 deletions demos/HT32/HT32F165x_USB_DFU/cfg/chconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,27 @@
#define CHCONF_H

#define _CHIBIOS_RT_CONF_
#define _CHIBIOS_RT_CONF_VER_6_1_
#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

/** @} */

/*===========================================================================*/
/**
Expand Down Expand Up @@ -119,6 +139,19 @@
#define CH_CFG_NO_IDLE_THREAD FALSE
#endif

/**
* @brief Kernel hardening level.
* @details This option is the level of functional-safety checks enabled
* in the kerkel. The meaning is:
* - 0: No checks, maximum performance.
* - 1: Reasonable checks.
* - 2: All checks.
* .
*/
#if !defined(CH_CFG_HARDENING_LEVEL)
#define CH_CFG_HARDENING_LEVEL 0
#endif

/** @} */

/*===========================================================================*/
Expand Down Expand Up @@ -160,6 +193,17 @@
#define CH_CFG_USE_TM FALSE
#endif

/**
* @brief Time Stamps APIs.
* @details If enabled then the time time stamps APIs are included in
* the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_TIMESTAMP)
#define CH_CFG_USE_TIMESTAMP FALSE
#endif

/**
* @brief Threads registry APIs.
* @details If enabled then the registry APIs are included in the kernel.
Expand Down Expand Up @@ -330,6 +374,16 @@
#define CH_CFG_USE_MAILBOXES TRUE
#endif

/**
* @brief Memory checks APIs.
* @details If enabled then the memory checks APIs are included in the kernel.
*
* @note The default is @p TRUE.
*/
#if !defined(CH_CFG_USE_MEMCHECKS)
#define CH_CFG_USE_MEMCHECKS TRUE
#endif

/**
* @brief Core Memory Manager APIs.
* @details If enabled then the core memory manager APIs are included
Expand Down Expand Up @@ -631,15 +685,31 @@
* @details User fields added to the end of the @p ch_system_t structure.
*/
#define CH_CFG_SYSTEM_EXTRA_FIELDS \
/* Add threads custom fields here.*/
/* 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 threads initialization code here.*/ \
/* 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.
*
* @param[in] oip pointer to the @p os_instance_t structure
*/
#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) { \
/* Add OS instance initialization code here.*/ \
}

/**
Expand Down Expand Up @@ -745,6 +815,13 @@
/* 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
2 changes: 1 addition & 1 deletion demos/HT32/HT32F165x_USB_DFU/cfg/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_0_

#include "mcuconf.h"

Expand Down
4 changes: 2 additions & 2 deletions demos/KINETIS/RT-FREEDOM-K20D50M/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ include $(CHIBIOS_CONTRIB)/os/hal/boards/FREESCALE_FREEDOM_K20D50M/board.mk
include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
include $(CHIBIOS)/os/common/ports/ARMv7-M/compilers/GCC/mk/port.mk
# Other files (optional).
include $(CHIBIOS)/test/lib/test.mk
include $(CHIBIOS)/os/test/test.mk
include $(CHIBIOS)/test/rt/rt_test.mk
include $(CHIBIOS)/test/oslib/oslib_test.mk

Expand Down
Loading

0 comments on commit 47b1ce6

Please sign in to comment.