Skip to content

Commit ea8b4d8

Browse files
committed
update configs for chibios 2.11
1 parent 45fd6d3 commit ea8b4d8

File tree

9 files changed

+273
-33
lines changed

9 files changed

+273
-33
lines changed

platforms/chibios/boards/SN_SN32F240/configs/chconf.h

Lines changed: 65 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
2+
ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -29,7 +29,27 @@
2929
#define CHCONF_H
3030

3131
#define _CHIBIOS_RT_CONF_
32-
#define _CHIBIOS_RT_CONF_VER_6_1_
32+
#define _CHIBIOS_RT_CONF_VER_7_0_
33+
34+
/*===========================================================================*/
35+
/**
36+
* @name System settings
37+
* @{
38+
*/
39+
/*===========================================================================*/
40+
41+
/**
42+
* @brief Handling of instances.
43+
* @note If enabled then threads assigned to various instances can
44+
* interact each other using the same synchronization objects.
45+
* If disabled then each OS instance is a separate world, no
46+
* direct interactions are handled by the OS.
47+
*/
48+
#if !defined(CH_CFG_SMP_MODE)
49+
#define CH_CFG_SMP_MODE FALSE
50+
#endif
51+
52+
/** @} */
3353

3454
/*===========================================================================*/
3555
/**
@@ -160,6 +180,16 @@
160180
#define CH_CFG_USE_TM FALSE
161181
#endif
162182

183+
/**
184+
* @brief Time Stamps APIs.
185+
* @details If enabled then the time stamps APIs are included in the kernel.
186+
*
187+
* @note The default is @p TRUE.
188+
*/
189+
#if !defined(CH_CFG_USE_TIMESTAMP)
190+
#define CH_CFG_USE_TIMESTAMP FALSE
191+
#endif
192+
163193
/**
164194
* @brief Threads registry APIs.
165195
* @details If enabled then the registry APIs are included in the kernel.
@@ -631,15 +661,31 @@
631661
* @details User fields added to the end of the @p ch_system_t structure.
632662
*/
633663
#define CH_CFG_SYSTEM_EXTRA_FIELDS \
634-
/* Add threads custom fields here.*/
664+
/* Add system custom fields here.*/
635665

636666
/**
637667
* @brief System initialization hook.
638668
* @details User initialization code added to the @p chSysInit() function
639669
* just before interrupts are enabled globally.
640670
*/
641671
#define CH_CFG_SYSTEM_INIT_HOOK() { \
642-
/* Add threads initialization code here.*/ \
672+
/* Add system initialization code here.*/ \
673+
}
674+
675+
/**
676+
* @brief OS instance structure extension.
677+
* @details User fields added to the end of the @p os_instance_t structure.
678+
*/
679+
#define CH_CFG_OS_INSTANCE_EXTRA_FIELDS \
680+
/* Add OS instance custom fields here.*/
681+
682+
/**
683+
* @brief OS instance initialization hook.
684+
*
685+
* @param[in] oip pointer to the @p os_instance_t structure
686+
*/
687+
#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) { \
688+
/* Add OS instance initialization code here.*/ \
643689
}
644690

645691
/**
@@ -655,6 +701,8 @@
655701
*
656702
* @note It is invoked from within @p _thread_init() and implicitly from all
657703
* the threads creation APIs.
704+
*
705+
* @param[in] tp pointer to the @p thread_t structure
658706
*/
659707
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
660708
/* Add threads initialization code here.*/ \
@@ -663,6 +711,8 @@
663711
/**
664712
* @brief Threads finalization hook.
665713
* @details User finalization code added to the @p chThdExit() API.
714+
*
715+
* @param[in] tp pointer to the @p thread_t structure
666716
*/
667717
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
668718
/* Add threads finalization code here.*/ \
@@ -671,6 +721,9 @@
671721
/**
672722
* @brief Context switch hook.
673723
* @details This hook is invoked just before switching between threads.
724+
*
725+
* @param[in] ntp thread being switched in
726+
* @param[in] otp thread being switched out
674727
*/
675728
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
676729
/* Context switch code here.*/ \
@@ -745,6 +798,14 @@
745798
/* Trace code here.*/ \
746799
}
747800

801+
/**
802+
* @brief Runtime Faults Collection Unit hook.
803+
* @details This hook is invoked each time new faults are collected and stored.
804+
*/
805+
#define CH_CFG_RUNTIME_FAULTS_HOOK(mask) { \
806+
/* Faults handling code here.*/ \
807+
}
808+
748809
/** @} */
749810

750811
/*===========================================================================*/

platforms/chibios/boards/SN_SN32F240/configs/halconf.h

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
2+
ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@
2929
#define HALCONF_H
3030

3131
#define _CHIBIOS_HAL_CONF_
32-
#define _CHIBIOS_HAL_CONF_VER_7_1_
32+
#define _CHIBIOS_HAL_CONF_VER_8_0_
3333

3434
#include <mcuconf.h>
3535

@@ -415,6 +415,26 @@
415415
#define SERIAL_BUFFERS_SIZE 16
416416
#endif
417417

418+
/*===========================================================================*/
419+
/* SIO driver related settings. */
420+
/*===========================================================================*/
421+
422+
/**
423+
* @brief Default bit rate.
424+
* @details Configuration parameter, this is the baud rate selected for the
425+
* default configuration.
426+
*/
427+
#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__)
428+
#define SIO_DEFAULT_BITRATE 38400
429+
#endif
430+
431+
/**
432+
* @brief Support for thread synchronization API.
433+
*/
434+
#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__)
435+
#define SIO_USE_SYNCHRONIZATION TRUE
436+
#endif
437+
418438
/*===========================================================================*/
419439
/* SERIAL_USB driver related setting. */
420440
/*===========================================================================*/
@@ -451,11 +471,10 @@
451471
#endif
452472

453473
/**
454-
* @brief Enables circular transfers APIs.
455-
* @note Disabling this option saves both code and data space.
474+
* @brief Inserts an assertion on function errors before returning.
456475
*/
457-
#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
458-
#define SPI_USE_CIRCULAR FALSE
476+
#if !defined(SPI_USE_ASSERT_ON_ERROR) || defined(__DOXYGEN__)
477+
#define SPI_USE_ASSERT_ON_ERROR TRUE
459478
#endif
460479

461480
/**

platforms/chibios/boards/SN_SN32F240/configs/mcuconf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
2+
ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

platforms/chibios/boards/SN_SN32F240B/configs/chconf.h

Lines changed: 65 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
2+
ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -29,7 +29,27 @@
2929
#define CHCONF_H
3030

3131
#define _CHIBIOS_RT_CONF_
32-
#define _CHIBIOS_RT_CONF_VER_6_1_
32+
#define _CHIBIOS_RT_CONF_VER_7_0_
33+
34+
/*===========================================================================*/
35+
/**
36+
* @name System settings
37+
* @{
38+
*/
39+
/*===========================================================================*/
40+
41+
/**
42+
* @brief Handling of instances.
43+
* @note If enabled then threads assigned to various instances can
44+
* interact each other using the same synchronization objects.
45+
* If disabled then each OS instance is a separate world, no
46+
* direct interactions are handled by the OS.
47+
*/
48+
#if !defined(CH_CFG_SMP_MODE)
49+
#define CH_CFG_SMP_MODE FALSE
50+
#endif
51+
52+
/** @} */
3353

3454
/*===========================================================================*/
3555
/**
@@ -160,6 +180,16 @@
160180
#define CH_CFG_USE_TM FALSE
161181
#endif
162182

183+
/**
184+
* @brief Time Stamps APIs.
185+
* @details If enabled then the time stamps APIs are included in the kernel.
186+
*
187+
* @note The default is @p TRUE.
188+
*/
189+
#if !defined(CH_CFG_USE_TIMESTAMP)
190+
#define CH_CFG_USE_TIMESTAMP FALSE
191+
#endif
192+
163193
/**
164194
* @brief Threads registry APIs.
165195
* @details If enabled then the registry APIs are included in the kernel.
@@ -631,15 +661,31 @@
631661
* @details User fields added to the end of the @p ch_system_t structure.
632662
*/
633663
#define CH_CFG_SYSTEM_EXTRA_FIELDS \
634-
/* Add threads custom fields here.*/
664+
/* Add system custom fields here.*/
635665

636666
/**
637667
* @brief System initialization hook.
638668
* @details User initialization code added to the @p chSysInit() function
639669
* just before interrupts are enabled globally.
640670
*/
641671
#define CH_CFG_SYSTEM_INIT_HOOK() { \
642-
/* Add threads initialization code here.*/ \
672+
/* Add system initialization code here.*/ \
673+
}
674+
675+
/**
676+
* @brief OS instance structure extension.
677+
* @details User fields added to the end of the @p os_instance_t structure.
678+
*/
679+
#define CH_CFG_OS_INSTANCE_EXTRA_FIELDS \
680+
/* Add OS instance custom fields here.*/
681+
682+
/**
683+
* @brief OS instance initialization hook.
684+
*
685+
* @param[in] oip pointer to the @p os_instance_t structure
686+
*/
687+
#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) { \
688+
/* Add OS instance initialization code here.*/ \
643689
}
644690

645691
/**
@@ -655,6 +701,8 @@
655701
*
656702
* @note It is invoked from within @p _thread_init() and implicitly from all
657703
* the threads creation APIs.
704+
*
705+
* @param[in] tp pointer to the @p thread_t structure
658706
*/
659707
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
660708
/* Add threads initialization code here.*/ \
@@ -663,6 +711,8 @@
663711
/**
664712
* @brief Threads finalization hook.
665713
* @details User finalization code added to the @p chThdExit() API.
714+
*
715+
* @param[in] tp pointer to the @p thread_t structure
666716
*/
667717
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
668718
/* Add threads finalization code here.*/ \
@@ -671,6 +721,9 @@
671721
/**
672722
* @brief Context switch hook.
673723
* @details This hook is invoked just before switching between threads.
724+
*
725+
* @param[in] ntp thread being switched in
726+
* @param[in] otp thread being switched out
674727
*/
675728
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
676729
/* Context switch code here.*/ \
@@ -745,6 +798,14 @@
745798
/* Trace code here.*/ \
746799
}
747800

801+
/**
802+
* @brief Runtime Faults Collection Unit hook.
803+
* @details This hook is invoked each time new faults are collected and stored.
804+
*/
805+
#define CH_CFG_RUNTIME_FAULTS_HOOK(mask) { \
806+
/* Faults handling code here.*/ \
807+
}
808+
748809
/** @} */
749810

750811
/*===========================================================================*/

platforms/chibios/boards/SN_SN32F240B/configs/halconf.h

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
2+
ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@
2929
#define HALCONF_H
3030

3131
#define _CHIBIOS_HAL_CONF_
32-
#define _CHIBIOS_HAL_CONF_VER_7_1_
32+
#define _CHIBIOS_HAL_CONF_VER_8_0_
3333

3434
#include <mcuconf.h>
3535

@@ -415,6 +415,26 @@
415415
#define SERIAL_BUFFERS_SIZE 128
416416
#endif
417417

418+
/*===========================================================================*/
419+
/* SIO driver related settings. */
420+
/*===========================================================================*/
421+
422+
/**
423+
* @brief Default bit rate.
424+
* @details Configuration parameter, this is the baud rate selected for the
425+
* default configuration.
426+
*/
427+
#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__)
428+
#define SIO_DEFAULT_BITRATE 38400
429+
#endif
430+
431+
/**
432+
* @brief Support for thread synchronization API.
433+
*/
434+
#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__)
435+
#define SIO_USE_SYNCHRONIZATION TRUE
436+
#endif
437+
418438
/*===========================================================================*/
419439
/* SERIAL_USB driver related setting. */
420440
/*===========================================================================*/
@@ -451,11 +471,10 @@
451471
#endif
452472

453473
/**
454-
* @brief Enables circular transfers APIs.
455-
* @note Disabling this option saves both code and data space.
474+
* @brief Inserts an assertion on function errors before returning.
456475
*/
457-
#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
458-
#define SPI_USE_CIRCULAR FALSE
476+
#if !defined(SPI_USE_ASSERT_ON_ERROR) || defined(__DOXYGEN__)
477+
#define SPI_USE_ASSERT_ON_ERROR TRUE
459478
#endif
460479

461480
/**

platforms/chibios/boards/SN_SN32F240B/configs/mcuconf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
2+
ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)