From f1f8ac57fecad48b29257f68be6bc80409f5d30c Mon Sep 17 00:00:00 2001 From: zykrahgaming Date: Thu, 30 Dec 2021 14:42:00 +1100 Subject: [PATCH] Updated RP2040 chconf.h files --- .../RP/RP2040/RT-RP2040-PICO-ADC/cfg/chconf.h | 26 ++++++++++++-- .../RP/RP2040/RT-RP2040-PICO-HID/cfg/chconf.h | 34 +++++++++++++------ .../RT-RP2040-PICO-I2C-24AA01/cfg/chconf.h | 26 ++++++++++++-- .../RP2040/RT-RP2040-PICO-SERIAL/cfg/chconf.h | 34 +++++++++++++------ 4 files changed, 96 insertions(+), 24 deletions(-) diff --git a/testhal/RP/RP2040/RT-RP2040-PICO-ADC/cfg/chconf.h b/testhal/RP/RP2040/RT-RP2040-PICO-ADC/cfg/chconf.h index 50154e42..175f458f 100644 --- a/testhal/RP/RP2040/RT-RP2040-PICO-ADC/cfg/chconf.h +++ b/testhal/RP/RP2040/RT-RP2040-PICO-ADC/cfg/chconf.h @@ -139,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 + /** @} */ /*===========================================================================*/ @@ -182,8 +195,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. */ @@ -361,6 +373,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 diff --git a/testhal/RP/RP2040/RT-RP2040-PICO-HID/cfg/chconf.h b/testhal/RP/RP2040/RT-RP2040-PICO-HID/cfg/chconf.h index ee5ed5a7..175f458f 100644 --- a/testhal/RP/RP2040/RT-RP2040-PICO-HID/cfg/chconf.h +++ b/testhal/RP/RP2040/RT-RP2040-PICO-HID/cfg/chconf.h @@ -139,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 + /** @} */ /*===========================================================================*/ @@ -182,8 +195,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. */ @@ -361,6 +373,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 @@ -813,14 +835,6 @@ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ -#ifdef USB_DEBUG -#include - -extern void process_command(uint32_t message); - -#define PORT_HANDLE_FIFO_MESSAGE(core, message) \ - if (core == 0U) { process_command(message); } -#endif /* USB_DEBUG */ #endif /* CHCONF_H */ diff --git a/testhal/RP/RP2040/RT-RP2040-PICO-I2C-24AA01/cfg/chconf.h b/testhal/RP/RP2040/RT-RP2040-PICO-I2C-24AA01/cfg/chconf.h index 50154e42..175f458f 100644 --- a/testhal/RP/RP2040/RT-RP2040-PICO-I2C-24AA01/cfg/chconf.h +++ b/testhal/RP/RP2040/RT-RP2040-PICO-I2C-24AA01/cfg/chconf.h @@ -139,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 + /** @} */ /*===========================================================================*/ @@ -182,8 +195,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. */ @@ -361,6 +373,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 diff --git a/testhal/RP/RP2040/RT-RP2040-PICO-SERIAL/cfg/chconf.h b/testhal/RP/RP2040/RT-RP2040-PICO-SERIAL/cfg/chconf.h index ee5ed5a7..175f458f 100644 --- a/testhal/RP/RP2040/RT-RP2040-PICO-SERIAL/cfg/chconf.h +++ b/testhal/RP/RP2040/RT-RP2040-PICO-SERIAL/cfg/chconf.h @@ -139,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 + /** @} */ /*===========================================================================*/ @@ -182,8 +195,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. */ @@ -361,6 +373,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 @@ -813,14 +835,6 @@ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ -#ifdef USB_DEBUG -#include - -extern void process_command(uint32_t message); - -#define PORT_HANDLE_FIFO_MESSAGE(core, message) \ - if (core == 0U) { process_command(message); } -#endif /* USB_DEBUG */ #endif /* CHCONF_H */