Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all MCUs to ChibiOS 21.11.x/master #310

Merged
merged 54 commits into from
Feb 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
407a762
Empty test commit
zykrah Dec 29, 2021
d4f07e0
Testing changes: declared unsigned integer and commented out unused v…
zykrah Dec 30, 2021
3714f94
remove pico-sdk from makefiles, just testing
zykrah Dec 30, 2021
8680848
Commented out all other/optional files in Makefiles for Pico
zykrah Dec 30, 2021
6307c5f
Added separate chibios for pico, reverted some changes
zykrah Dec 30, 2021
48f40ac
seperate chbuild.sh for pico
zykrah Dec 30, 2021
2d38b8a
updated permissions
zykrah Dec 30, 2021
f1f8ac5
Updated RP2040 chconf.h files
zykrah Dec 30, 2021
45f4545
Updated chibios version in chconf.h, readded some lines that were acc…
zykrah Dec 30, 2021
288e6a1
Modified Chibios HAL and RT versions
zykrah Dec 30, 2021
a1ea0a7
Forgot to modify one file
zykrah Dec 30, 2021
da3127b
Fix wrong size passed to calculate buffer offset (as in https://githu…
zykrah Dec 30, 2021
588de0b
Empty test commit
zykrah Dec 30, 2021
adad56d
Reversed extra chibios build files for pico, now all MCUs are using m…
zykrah Jan 1, 2022
d624a42
Fixed whitespace in ext package causing error by using quotation marks
zykrah Jan 1, 2022
a2a9fc5
Update Makefiles to use new test library
zykrah Jan 1, 2022
42bc000
Updated Makefiles to use newer ARM ports
zykrah Jan 1, 2022
2cc8ba6
Updated Makefiles to use new ChibiOS HAL and RT versions. Updated chc…
zykrah Jan 1, 2022
f3f4b4f
Further updates to chconf.h files
zykrah Jan 1, 2022
7014bc0
Even more updates to chconf.h files
zykrah Jan 1, 2022
0aa26e0
Fixed HAL version in halconf.h files
zykrah Jan 1, 2022
e898157
Even more more changes to chconf.h files
zykrah Jan 1, 2022
29da390
Updated ffconf.h version, Attempting to fix redefinition of structs
zykrah Jan 1, 2022
e66ea30
Attempting to fix PACKED_VAR redefinition.
zykrah Jan 1, 2022
9309bb4
Defined IRQ USART Priorities
zykrah Jan 1, 2022
b3e24e4
Defined IRQ Priorities
zykrah Jan 1, 2022
2d44a5a
Attempting to fix IRQ Priorities again
zykrah Jan 1, 2022
05378da
Once again trying to fix IRQ Priorities
zykrah Jan 1, 2022
56b7db2
Attempting to fix mcuconf.h IRQ priorities again
zykrah Jan 1, 2022
969f0d1
Attempting to fix IRQ priorities in mcuconf.h again
zykrah Jan 1, 2022
c387fb6
Added an additional MCU definition
zykrah Jan 1, 2022
1aac536
Testing replacing osal file
zykrah Jan 1, 2022
f687010
Reverted previous commit and also fixed up some missing MCU definitio…
zykrah Jan 1, 2022
51b16df
Fixed missing include
zykrah Jan 1, 2022
058c358
Testing replacing <> with ""
zykrah Jan 1, 2022
5a88412
Testing
zykrah Jan 1, 2022
bbf65ff
Another attempt to fix ch error
zykrah Jan 1, 2022
2d04624
Testing again
zykrah Jan 1, 2022
a186e67
Found the issue, changed ch. to currcore->
zykrah Jan 1, 2022
0e91010
Forgot to remove #include
zykrah Jan 1, 2022
9eab1d6
Testing small error
zykrah Jan 1, 2022
be8d2d4
Added #include <stdbool.h> to a file
zykrah Jan 1, 2022
6b5576f
Reverted previous commit, not required.
zykrah Jan 1, 2022
9ace633
Updated some chconf.h files (NUMICRO)
zykrah Jan 1, 2022
a49fb58
Attempting to fix missing definition/declaration
zykrah Jan 1, 2022
95919e3
Fixed error from previous commit, renamed chDbgSuspendTrace to chTrac…
zykrah Jan 1, 2022
c4b31a8
Small fix: repeated definitions in RP2040 chconf.h files
zykrah Jan 1, 2022
ed9890d
Slight oversight: updated build.yml
zykrah Jan 1, 2022
66d7b7c
Fix CI
Sleepdealr Jan 1, 2022
c95ea76
Merge pull request #1 from Sleepdealr/chibios-21.11.x-dev
zykrah Jan 2, 2022
cd18281
Fix additional error in the lgtm.yml in relation to extraction. Remov…
zykrah Jan 2, 2022
38c01bd
Revert uneccessary changes to RP2040 files
zykrah Jan 2, 2022
9f4768a
Trigger Build
zykrah Jan 2, 2022
8c93606
Update build.yml
zykrah Feb 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to fix a problem with a whitespace existing in one of the files that gets extracted (pico-sdk).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

- 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