diff --git a/examples/stm32/nucleo-f429zi-keil-baremetal/mongoose_custom.h b/examples/stm32/nucleo-f429zi-keil-baremetal/mongoose_custom.h index fa67625c..31a9cab8 100644 --- a/examples/stm32/nucleo-f429zi-keil-baremetal/mongoose_custom.h +++ b/examples/stm32/nucleo-f429zi-keil-baremetal/mongoose_custom.h @@ -1,78 +1,53 @@ +// See https://mongoose.ws/documentation/#build-options +#pragma once // <<< Use Configuration Wizard in Context Menu >>> -// System Architecture -// <0=> Bare metal -// <1=> FreeRTOS -// <2=> CMSIS-RTOS v1 -// <3=> CMSIS-RTOS v2 -// Select either bare metal operation or a supported RTOS -// FreeRTOS uses direct FreeRTOS calls -// CMSIS-RTOS1 supports only Keil RTX through API v1 -// CMSIS-RTOS2 supports Keil RTX5 and FreeRTOS through API v2 +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_ARMCC -#define MG_CMSISPACK_ARCH 0 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 1 +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 1 -// Networking support -// Networking stack -// <0=> Built-in -// <1=> lwIP -// <2=> FreeRTOS-Plus-TCP -// <3=> MDK (RL) -// Select the networking stack to use with Mongoose Library -// The built-in stack can run on bare metal or over any RTOS -// "lwIP" requires using an RTOS and BSD socket mode -// "MDK" requires using CMSIS-RTOS1 (RTX + RL) or CMSIS-RTOS2 (MDK Plus or Pro), and BSD socket mode -#define MG_CMSISPACK_NET 0 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 + +// Enable IMXRT Ethernet driver +#define MG_ENABLE_DRIVER_IMXRT 0 + +// Enable W5500 Ethernet driver +#define MG_ENABLE_DRIVER_W5500 0 + +// Enable TI TM4C Ethernet driver +#define MG_ENABLE_DRIVER_TM4C 0 -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// Enable custom mg_millis() -// Use a user-provided function to get uptime in milliseconds, otherwise Mongoose will default to using time(). Except for bare metal, Mongoose will use the time base for the configured architecture +// Enable custom mg_millis() #define MG_ENABLE_CUSTOM_MILLIS 1 -// - -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() +// Enable custom mg_random() #define MG_ENABLE_CUSTOM_RANDOM 1 -// - -// Filesystem support // Enable packed (embedded) filesystem #define MG_ENABLE_PACKED_FS 1 -// - // <<< end of configuration section >>> -// Translate to Mongoose macros -#if MG_CMSISPACK_ARCH == 1 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_FREERTOS -#elif MG_CMSISPACK_ARCH == 2 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS1 -#elif MG_CMSISPACK_ARCH == 3 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#endif -#if MG_CMSISPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_CMSISPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_CMSISPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_CMSISPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - - // Add your customization below this comment -#define MG_ENABLE_DRIVER_STM32F 1 + diff --git a/examples/stm32/nucleo-f429zi-keil-freertos/mongoose_custom.h b/examples/stm32/nucleo-f429zi-keil-freertos/mongoose_custom.h index 97a05b3c..390a6157 100644 --- a/examples/stm32/nucleo-f429zi-keil-freertos/mongoose_custom.h +++ b/examples/stm32/nucleo-f429zi-keil-freertos/mongoose_custom.h @@ -1,78 +1,53 @@ +// See https://mongoose.ws/documentation/#build-options +#pragma once // <<< Use Configuration Wizard in Context Menu >>> -// System Architecture -// <0=> Bare metal -// <1=> FreeRTOS -// <2=> CMSIS-RTOS v1 -// <3=> CMSIS-RTOS v2 -// Select either bare metal operation or a supported RTOS -// "FreeRTOS" uses direct FreeRTOS calls -// "CMSIS-RTOS v1" supports only Keil RTX through API v1 -// "CMSIS-RTOS v2" supports Keil RTX5 and FreeRTOS through API v2 +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_FREERTOS -#define MG_CMSISPACK_ARCH 1 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 1 +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 1 -// Networking support -// Networking stack -// <0=> Built-in -// <1=> lwIP -// <2=> FreeRTOS-Plus-TCP -// <3=> MDK (RL) -// Select the networking stack to use with Mongoose Library -// The built-in stack can run on bare metal or over any RTOS -// "lwIP" requires using an RTOS and BSD socket mode -// "MDK" requires using CMSIS-RTOS1 (RTX + RL) or CMSIS-RTOS2 (MDK Plus or Pro), and BSD socket mode -#define MG_CMSISPACK_NET 0 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 + +// Enable IMXRT Ethernet driver +#define MG_ENABLE_DRIVER_IMXRT 0 + +// Enable W5500 Ethernet driver +#define MG_ENABLE_DRIVER_W5500 0 + +// Enable TI TM4C Ethernet driver +#define MG_ENABLE_DRIVER_TM4C 0 -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// Enable custom mg_millis() -// Use a user-provided function to get uptime in milliseconds, otherwise Mongoose will default to using time(). Except for bare metal, Mongoose will use the time base for the configured architecture -//#define MG_ENABLE_CUSTOM_MILLIS 1 -// +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 0 - -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() +// Enable custom mg_random() #define MG_ENABLE_CUSTOM_RANDOM 1 -// - -// Filesystem support // Enable packed (embedded) filesystem #define MG_ENABLE_PACKED_FS 1 -// - // <<< end of configuration section >>> -// Translate to Mongoose macros -#if MG_CMSISPACK_ARCH == 1 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_FREERTOS -#elif MG_CMSISPACK_ARCH == 2 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS1 -#elif MG_CMSISPACK_ARCH == 3 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#endif -#if MG_CMSISPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_CMSISPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_CMSISPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_CMSISPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - - // Add your customization below this comment -#define MG_ENABLE_DRIVER_STM32F 1 + diff --git a/examples/stm32/nucleo-f746zg-keil-baremetal/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-baremetal/mongoose_custom.h index fa67625c..31a9cab8 100644 --- a/examples/stm32/nucleo-f746zg-keil-baremetal/mongoose_custom.h +++ b/examples/stm32/nucleo-f746zg-keil-baremetal/mongoose_custom.h @@ -1,78 +1,53 @@ +// See https://mongoose.ws/documentation/#build-options +#pragma once // <<< Use Configuration Wizard in Context Menu >>> -// System Architecture -// <0=> Bare metal -// <1=> FreeRTOS -// <2=> CMSIS-RTOS v1 -// <3=> CMSIS-RTOS v2 -// Select either bare metal operation or a supported RTOS -// FreeRTOS uses direct FreeRTOS calls -// CMSIS-RTOS1 supports only Keil RTX through API v1 -// CMSIS-RTOS2 supports Keil RTX5 and FreeRTOS through API v2 +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_ARMCC -#define MG_CMSISPACK_ARCH 0 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 1 +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 1 -// Networking support -// Networking stack -// <0=> Built-in -// <1=> lwIP -// <2=> FreeRTOS-Plus-TCP -// <3=> MDK (RL) -// Select the networking stack to use with Mongoose Library -// The built-in stack can run on bare metal or over any RTOS -// "lwIP" requires using an RTOS and BSD socket mode -// "MDK" requires using CMSIS-RTOS1 (RTX + RL) or CMSIS-RTOS2 (MDK Plus or Pro), and BSD socket mode -#define MG_CMSISPACK_NET 0 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 + +// Enable IMXRT Ethernet driver +#define MG_ENABLE_DRIVER_IMXRT 0 + +// Enable W5500 Ethernet driver +#define MG_ENABLE_DRIVER_W5500 0 + +// Enable TI TM4C Ethernet driver +#define MG_ENABLE_DRIVER_TM4C 0 -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// Enable custom mg_millis() -// Use a user-provided function to get uptime in milliseconds, otherwise Mongoose will default to using time(). Except for bare metal, Mongoose will use the time base for the configured architecture +// Enable custom mg_millis() #define MG_ENABLE_CUSTOM_MILLIS 1 -// - -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() +// Enable custom mg_random() #define MG_ENABLE_CUSTOM_RANDOM 1 -// - -// Filesystem support // Enable packed (embedded) filesystem #define MG_ENABLE_PACKED_FS 1 -// - // <<< end of configuration section >>> -// Translate to Mongoose macros -#if MG_CMSISPACK_ARCH == 1 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_FREERTOS -#elif MG_CMSISPACK_ARCH == 2 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS1 -#elif MG_CMSISPACK_ARCH == 3 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#endif -#if MG_CMSISPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_CMSISPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_CMSISPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_CMSISPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - - // Add your customization below this comment -#define MG_ENABLE_DRIVER_STM32F 1 + diff --git a/examples/stm32/nucleo-f746zg-keil-freertos-lwip/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-freertos-lwip/mongoose_custom.h index 154bb5c4..18aca303 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos-lwip/mongoose_custom.h +++ b/examples/stm32/nucleo-f746zg-keil-freertos-lwip/mongoose_custom.h @@ -1,78 +1,55 @@ +// See https://mongoose.ws/documentation/#build-options +#pragma once // <<< Use Configuration Wizard in Context Menu >>> -// System Architecture -// <0=> Bare metal -// <1=> FreeRTOS -// <2=> CMSIS-RTOS v1 -// <3=> CMSIS-RTOS v2 -// Select either bare metal operation or a supported RTOS -// "FreeRTOS" uses direct FreeRTOS calls -// "CMSIS-RTOS v1" supports only Keil RTX through API v1 -// "CMSIS-RTOS v2" supports Keil RTX5 and FreeRTOS through API v2 +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_FREERTOS -#define MG_CMSISPACK_ARCH 1 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 0 +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 0 -// Networking support -// Networking stack -// <0=> Built-in -// <1=> lwIP -// <2=> FreeRTOS-Plus-TCP -// <3=> MDK (RL) -// Select the networking stack to use with Mongoose Library -// The built-in stack can run on bare metal or over any RTOS -// "lwIP" requires using an RTOS and BSD socket mode -// "MDK" requires using CMSIS-RTOS1 (RTX + RL) or CMSIS-RTOS2 (MDK Plus or Pro), and BSD socket mode -#define MG_CMSISPACK_NET 1 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 + +// Enable IMXRT Ethernet driver +#define MG_ENABLE_DRIVER_IMXRT 0 + +// Enable W5500 Ethernet driver +#define MG_ENABLE_DRIVER_W5500 0 + +// Enable TI TM4C Ethernet driver +#define MG_ENABLE_DRIVER_TM4C 0 -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// Enable custom mg_millis() -// Use a user-provided function to get uptime in milliseconds, otherwise Mongoose will default to using time(). Except for bare metal, Mongoose will use the time base for the configured architecture -//#define MG_ENABLE_CUSTOM_MILLIS 1 -// +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 0 - -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() +// Enable custom mg_random() #define MG_ENABLE_CUSTOM_RANDOM 1 -// - -// Filesystem support // Enable packed (embedded) filesystem #define MG_ENABLE_PACKED_FS 1 -// - // <<< end of configuration section >>> -// Translate to Mongoose macros -#if MG_CMSISPACK_ARCH == 1 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_FREERTOS -#elif MG_CMSISPACK_ARCH == 2 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS1 -#elif MG_CMSISPACK_ARCH == 3 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#endif -#if MG_CMSISPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_CMSISPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_CMSISPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_CMSISPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - - // Add your customization below this comment +#define MG_ENABLE_LWIP 1 + diff --git a/examples/stm32/nucleo-f746zg-keil-freertos-tcp/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-freertos-tcp/mongoose_custom.h index 4c87f8fa..2eba6594 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos-tcp/mongoose_custom.h +++ b/examples/stm32/nucleo-f746zg-keil-freertos-tcp/mongoose_custom.h @@ -1,78 +1,53 @@ +// See https://mongoose.ws/documentation/#build-options +#pragma once // <<< Use Configuration Wizard in Context Menu >>> -// System Architecture -// <0=> Bare metal -// <1=> FreeRTOS -// <2=> CMSIS-RTOS v1 -// <3=> CMSIS-RTOS v2 -// Select either bare metal operation or a supported RTOS -// "FreeRTOS" uses direct FreeRTOS calls -// "CMSIS-RTOS v1" supports only Keil RTX through API v1 -// "CMSIS-RTOS v2" supports Keil RTX5 and FreeRTOS through API v2 +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_FREERTOS -#define MG_CMSISPACK_ARCH 1 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 0 +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 0 -// Networking support -// Networking stack -// <0=> Built-in -// <1=> lwIP -// <2=> FreeRTOS-Plus-TCP -// <3=> MDK (RL) -// Select the networking stack to use with Mongoose Library -// The built-in stack can run on bare metal or over any RTOS -// "lwIP" requires using an RTOS and BSD socket mode -// "MDK" requires using CMSIS-RTOS1 (RTX + RL) or CMSIS-RTOS2 (MDK Plus or Pro), and BSD socket mode -#define MG_CMSISPACK_NET 2 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 + +// Enable IMXRT Ethernet driver +#define MG_ENABLE_DRIVER_IMXRT 0 + +// Enable W5500 Ethernet driver +#define MG_ENABLE_DRIVER_W5500 0 + +// Enable TI TM4C Ethernet driver +#define MG_ENABLE_DRIVER_TM4C 0 -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// Enable custom mg_millis() -// Use a user-provided function to get uptime in milliseconds, otherwise Mongoose will default to using time(). Except for bare metal, Mongoose will use the time base for the configured architecture -//#define MG_ENABLE_CUSTOM_MILLIS 1 -// +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 0 - -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() +// Enable custom mg_random() #define MG_ENABLE_CUSTOM_RANDOM 1 -// - -// Filesystem support // Enable packed (embedded) filesystem #define MG_ENABLE_PACKED_FS 1 -// - // <<< end of configuration section >>> -// Translate to Mongoose macros -#if MG_CMSISPACK_ARCH == 1 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_FREERTOS -#elif MG_CMSISPACK_ARCH == 2 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS1 -#elif MG_CMSISPACK_ARCH == 3 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#endif -#if MG_CMSISPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_CMSISPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_CMSISPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_CMSISPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - - // Add your customization below this comment - +#define MG_ENABLE_FREERTOS_TCP 1 diff --git a/examples/stm32/nucleo-f746zg-keil-freertos/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-freertos/mongoose_custom.h index 97a05b3c..390a6157 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos/mongoose_custom.h +++ b/examples/stm32/nucleo-f746zg-keil-freertos/mongoose_custom.h @@ -1,78 +1,53 @@ +// See https://mongoose.ws/documentation/#build-options +#pragma once // <<< Use Configuration Wizard in Context Menu >>> -// System Architecture -// <0=> Bare metal -// <1=> FreeRTOS -// <2=> CMSIS-RTOS v1 -// <3=> CMSIS-RTOS v2 -// Select either bare metal operation or a supported RTOS -// "FreeRTOS" uses direct FreeRTOS calls -// "CMSIS-RTOS v1" supports only Keil RTX through API v1 -// "CMSIS-RTOS v2" supports Keil RTX5 and FreeRTOS through API v2 +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_FREERTOS -#define MG_CMSISPACK_ARCH 1 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 1 +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 1 -// Networking support -// Networking stack -// <0=> Built-in -// <1=> lwIP -// <2=> FreeRTOS-Plus-TCP -// <3=> MDK (RL) -// Select the networking stack to use with Mongoose Library -// The built-in stack can run on bare metal or over any RTOS -// "lwIP" requires using an RTOS and BSD socket mode -// "MDK" requires using CMSIS-RTOS1 (RTX + RL) or CMSIS-RTOS2 (MDK Plus or Pro), and BSD socket mode -#define MG_CMSISPACK_NET 0 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 + +// Enable IMXRT Ethernet driver +#define MG_ENABLE_DRIVER_IMXRT 0 + +// Enable W5500 Ethernet driver +#define MG_ENABLE_DRIVER_W5500 0 + +// Enable TI TM4C Ethernet driver +#define MG_ENABLE_DRIVER_TM4C 0 -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// Enable custom mg_millis() -// Use a user-provided function to get uptime in milliseconds, otherwise Mongoose will default to using time(). Except for bare metal, Mongoose will use the time base for the configured architecture -//#define MG_ENABLE_CUSTOM_MILLIS 1 -// +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 0 - -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() +// Enable custom mg_random() #define MG_ENABLE_CUSTOM_RANDOM 1 -// - -// Filesystem support // Enable packed (embedded) filesystem #define MG_ENABLE_PACKED_FS 1 -// - // <<< end of configuration section >>> -// Translate to Mongoose macros -#if MG_CMSISPACK_ARCH == 1 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_FREERTOS -#elif MG_CMSISPACK_ARCH == 2 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS1 -#elif MG_CMSISPACK_ARCH == 3 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#endif -#if MG_CMSISPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_CMSISPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_CMSISPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_CMSISPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - - // Add your customization below this comment -#define MG_ENABLE_DRIVER_STM32F 1 + diff --git a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/mongoose_custom.h index 948dddfe..b179d99a 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/mongoose_custom.h +++ b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/mongoose_custom.h @@ -1,78 +1,55 @@ +// See https://mongoose.ws/documentation/#build-options +#pragma once // <<< Use Configuration Wizard in Context Menu >>> -// System Architecture -// <0=> Bare metal -// <1=> FreeRTOS -// <2=> CMSIS-RTOS v1 -// <3=> CMSIS-RTOS v2 -// Select either bare metal operation or a supported RTOS -// "FreeRTOS" uses direct FreeRTOS calls -// "CMSIS-RTOS v1" supports only Keil RTX through API v1 -// "CMSIS-RTOS v2" supports Keil RTX5 and FreeRTOS through API v2 +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#define MG_CMSISPACK_ARCH 3 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 0 +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 0 -// Networking support -// Networking stack -// <0=> Built-in -// <1=> lwIP -// <2=> FreeRTOS-Plus-TCP -// <3=> MDK (RL) -// Select the networking stack to use with Mongoose Library -// The built-in stack can run on bare metal or over any RTOS -// "lwIP" requires using an RTOS and BSD socket mode -// "MDK" requires using CMSIS-RTOS1 (RTX + RL) or CMSIS-RTOS2 (MDK Plus or Pro), and BSD socket mode -#define MG_CMSISPACK_NET 1 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 + +// Enable IMXRT Ethernet driver +#define MG_ENABLE_DRIVER_IMXRT 0 + +// Enable W5500 Ethernet driver +#define MG_ENABLE_DRIVER_W5500 0 + +// Enable TI TM4C Ethernet driver +#define MG_ENABLE_DRIVER_TM4C 0 -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// Enable custom mg_millis() -// Use a user-provided function to get uptime in milliseconds, otherwise Mongoose will default to using time(). Except for bare metal, Mongoose will use the time base for the configured architecture -//#define MG_ENABLE_CUSTOM_MILLIS 1 -// +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 0 - -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() +// Enable custom mg_random() #define MG_ENABLE_CUSTOM_RANDOM 1 -// - -// Filesystem support // Enable packed (embedded) filesystem #define MG_ENABLE_PACKED_FS 1 -// - // <<< end of configuration section >>> -// Translate to Mongoose macros -#if MG_CMSISPACK_ARCH == 1 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_FREERTOS -#elif MG_CMSISPACK_ARCH == 2 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS1 -#elif MG_CMSISPACK_ARCH == 3 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#endif -#if MG_CMSISPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_CMSISPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_CMSISPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_CMSISPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - - // Add your customization below this comment +#define MG_ENABLE_LWIP 1 + diff --git a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/mongoose_custom.h index 0a7b750f..26fb7071 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/mongoose_custom.h +++ b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/mongoose_custom.h @@ -1,78 +1,53 @@ +// See https://mongoose.ws/documentation/#build-options +#pragma once // <<< Use Configuration Wizard in Context Menu >>> -// System Architecture -// <0=> Bare metal -// <1=> FreeRTOS -// <2=> CMSIS-RTOS v1 -// <3=> CMSIS-RTOS v2 -// Select either bare metal operation or a supported RTOS -// "FreeRTOS" uses direct FreeRTOS calls -// "CMSIS-RTOS v1" supports only Keil RTX through API v1 -// "CMSIS-RTOS v2" supports Keil RTX5 and FreeRTOS through API v2 +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#define MG_CMSISPACK_ARCH 3 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 1 +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 1 -// Networking support -// Networking stack -// <0=> Built-in -// <1=> lwIP -// <2=> FreeRTOS-Plus-TCP -// <3=> MDK (RL) -// Select the networking stack to use with Mongoose Library -// The built-in stack can run on bare metal or over any RTOS -// "lwIP" requires using an RTOS and BSD socket mode -// "MDK" requires using CMSIS-RTOS1 (RTX + RL) or CMSIS-RTOS2 (MDK Plus or Pro), and BSD socket mode -#define MG_CMSISPACK_NET 0 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 + +// Enable IMXRT Ethernet driver +#define MG_ENABLE_DRIVER_IMXRT 0 + +// Enable W5500 Ethernet driver +#define MG_ENABLE_DRIVER_W5500 0 + +// Enable TI TM4C Ethernet driver +#define MG_ENABLE_DRIVER_TM4C 0 -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// Enable custom mg_millis() -// Use a user-provided function to get uptime in milliseconds, otherwise Mongoose will default to using time(). Except for bare metal, Mongoose will use the time base for the configured architecture -//#define MG_ENABLE_CUSTOM_MILLIS 1 -// +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 0 - -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() +// Enable custom mg_random() #define MG_ENABLE_CUSTOM_RANDOM 1 -// - -// Filesystem support // Enable packed (embedded) filesystem #define MG_ENABLE_PACKED_FS 1 -// - // <<< end of configuration section >>> -// Translate to Mongoose macros -#if MG_CMSISPACK_ARCH == 1 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_FREERTOS -#elif MG_CMSISPACK_ARCH == 2 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS1 -#elif MG_CMSISPACK_ARCH == 3 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#endif -#if MG_CMSISPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_CMSISPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_CMSISPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_CMSISPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - - // Add your customization below this comment -#define MG_ENABLE_DRIVER_STM32F 1 + diff --git a/examples/stm32/nucleo-f746zg-keil-rtx-mdk/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-rtx-mdk/mongoose_custom.h index 8e5a9871..964ab129 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx-mdk/mongoose_custom.h +++ b/examples/stm32/nucleo-f746zg-keil-rtx-mdk/mongoose_custom.h @@ -1,78 +1,54 @@ +// See https://mongoose.ws/documentation/#build-options +#pragma once // <<< Use Configuration Wizard in Context Menu >>> -// System Architecture -// <0=> Bare metal -// <1=> FreeRTOS -// <2=> CMSIS-RTOS v1 -// <3=> CMSIS-RTOS v2 -// Select either bare metal operation or a supported RTOS -// "FreeRTOS" uses direct FreeRTOS calls -// "CMSIS-RTOS v1" supports only Keil RTX through API v1 -// "CMSIS-RTOS v2" supports Keil RTX5 and FreeRTOS through API v2 +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_CMSIS_RTOS1 -#define MG_CMSISPACK_ARCH 2 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 0 +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 0 -// Networking support -// Networking stack -// <0=> Built-in -// <1=> lwIP -// <2=> FreeRTOS-Plus-TCP -// <3=> MDK (RL) -// Select the networking stack to use with Mongoose Library -// The built-in stack can run on bare metal or over any RTOS -// "lwIP" requires using an RTOS and BSD socket mode -// "MDK" requires using CMSIS-RTOS1 (RTX + RL) or CMSIS-RTOS2 (MDK Plus or Pro), and BSD socket mode -#define MG_CMSISPACK_NET 3 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 + +// Enable IMXRT Ethernet driver +#define MG_ENABLE_DRIVER_IMXRT 0 + +// Enable W5500 Ethernet driver +#define MG_ENABLE_DRIVER_W5500 0 + +// Enable TI TM4C Ethernet driver +#define MG_ENABLE_DRIVER_TM4C 0 -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// Enable custom mg_millis() -// Use a user-provided function to get uptime in milliseconds, otherwise Mongoose will default to using time(). Except for bare metal, Mongoose will use the time base for the configured architecture -//#define MG_ENABLE_CUSTOM_MILLIS 1 -// +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 0 - -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() +// Enable custom mg_random() #define MG_ENABLE_CUSTOM_RANDOM 1 -// - -// Filesystem support // Enable packed (embedded) filesystem #define MG_ENABLE_PACKED_FS 1 -// - // <<< end of configuration section >>> -// Translate to Mongoose macros -#if MG_CMSISPACK_ARCH == 1 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_FREERTOS -#elif MG_CMSISPACK_ARCH == 2 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS1 -#elif MG_CMSISPACK_ARCH == 3 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#endif -#if MG_CMSISPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_CMSISPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_CMSISPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_CMSISPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - - // Add your customization below this comment +#define MG_ENABLE_RL 1 diff --git a/examples/stm32/nucleo-f746zg-keil-rtx/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-rtx/mongoose_custom.h index 2023bee2..e5a681c1 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx/mongoose_custom.h +++ b/examples/stm32/nucleo-f746zg-keil-rtx/mongoose_custom.h @@ -1,78 +1,53 @@ +// See https://mongoose.ws/documentation/#build-options +#pragma once // <<< Use Configuration Wizard in Context Menu >>> -// System Architecture -// <0=> Bare metal -// <1=> FreeRTOS -// <2=> CMSIS-RTOS v1 -// <3=> CMSIS-RTOS v2 -// Select either bare metal operation or a supported RTOS -// FreeRTOS uses direct FreeRTOS calls -// CMSIS-RTOS1 supports only Keil RTX through API v1 -// CMSIS-RTOS2 supports Keil RTX5 and FreeRTOS through API v2 +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_CMSIS_RTOS1 -#define MG_CMSISPACK_ARCH 2 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 1 +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 1 -// Networking support -// Networking stack -// <0=> Built-in -// <1=> lwIP -// <2=> FreeRTOS-Plus-TCP -// <3=> MDK (RL) -// Select the networking stack to use with Mongoose Library -// The built-in stack can run on bare metal or over any RTOS -// "lwIP" requires using an RTOS and BSD socket mode -// "MDK" requires using CMSIS-RTOS1 (RTX + RL) or CMSIS-RTOS2 (MDK Plus or Pro), and BSD socket mode -#define MG_CMSISPACK_NET 0 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 + +// Enable IMXRT Ethernet driver +#define MG_ENABLE_DRIVER_IMXRT 0 + +// Enable W5500 Ethernet driver +#define MG_ENABLE_DRIVER_W5500 0 + +// Enable TI TM4C Ethernet driver +#define MG_ENABLE_DRIVER_TM4C 0 -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// Enable custom mg_millis() -// Use a user-provided function to get uptime in milliseconds, otherwise Mongoose will default to using time(). Except for bare metal, Mongoose will use the time base for the configured architecture -//#define MG_ENABLE_CUSTOM_MILLIS 1 -// +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 0 - -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() +// Enable custom mg_random() #define MG_ENABLE_CUSTOM_RANDOM 1 -// - -// Filesystem support // Enable packed (embedded) filesystem #define MG_ENABLE_PACKED_FS 1 -// - // <<< end of configuration section >>> -// Translate to Mongoose macros -#if MG_CMSISPACK_ARCH == 1 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_FREERTOS -#elif MG_CMSISPACK_ARCH == 2 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS1 -#elif MG_CMSISPACK_ARCH == 3 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#endif -#if MG_CMSISPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_CMSISPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_CMSISPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_CMSISPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - - // Add your customization below this comment -#define MG_ENABLE_DRIVER_STM32F 1 + diff --git a/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/mongoose_custom.h index 948dddfe..46cde88f 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/mongoose_custom.h +++ b/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/mongoose_custom.h @@ -1,78 +1,54 @@ +// See https://mongoose.ws/documentation/#build-options +#pragma once // <<< Use Configuration Wizard in Context Menu >>> -// System Architecture -// <0=> Bare metal -// <1=> FreeRTOS -// <2=> CMSIS-RTOS v1 -// <3=> CMSIS-RTOS v2 -// Select either bare metal operation or a supported RTOS -// "FreeRTOS" uses direct FreeRTOS calls -// "CMSIS-RTOS v1" supports only Keil RTX through API v1 -// "CMSIS-RTOS v2" supports Keil RTX5 and FreeRTOS through API v2 +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#define MG_CMSISPACK_ARCH 3 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 0 +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 0 -// Networking support -// Networking stack -// <0=> Built-in -// <1=> lwIP -// <2=> FreeRTOS-Plus-TCP -// <3=> MDK (RL) -// Select the networking stack to use with Mongoose Library -// The built-in stack can run on bare metal or over any RTOS -// "lwIP" requires using an RTOS and BSD socket mode -// "MDK" requires using CMSIS-RTOS1 (RTX + RL) or CMSIS-RTOS2 (MDK Plus or Pro), and BSD socket mode -#define MG_CMSISPACK_NET 1 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 + +// Enable IMXRT Ethernet driver +#define MG_ENABLE_DRIVER_IMXRT 0 + +// Enable W5500 Ethernet driver +#define MG_ENABLE_DRIVER_W5500 0 + +// Enable TI TM4C Ethernet driver +#define MG_ENABLE_DRIVER_TM4C 0 -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// Enable custom mg_millis() -// Use a user-provided function to get uptime in milliseconds, otherwise Mongoose will default to using time(). Except for bare metal, Mongoose will use the time base for the configured architecture -//#define MG_ENABLE_CUSTOM_MILLIS 1 -// +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 0 - -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() +// Enable custom mg_random() #define MG_ENABLE_CUSTOM_RANDOM 1 -// - -// Filesystem support // Enable packed (embedded) filesystem #define MG_ENABLE_PACKED_FS 1 -// - // <<< end of configuration section >>> -// Translate to Mongoose macros -#if MG_CMSISPACK_ARCH == 1 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_FREERTOS -#elif MG_CMSISPACK_ARCH == 2 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS1 -#elif MG_CMSISPACK_ARCH == 3 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#endif -#if MG_CMSISPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_CMSISPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_CMSISPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_CMSISPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - - // Add your customization below this comment +#define MG_ENABLE_LWIP 1 diff --git a/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/mongoose_custom.h index 067d228c..34800f75 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/mongoose_custom.h +++ b/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/mongoose_custom.h @@ -1,78 +1,54 @@ +// See https://mongoose.ws/documentation/#build-options +#pragma once // <<< Use Configuration Wizard in Context Menu >>> -// System Architecture -// <0=> Bare metal -// <1=> FreeRTOS -// <2=> CMSIS-RTOS v1 -// <3=> CMSIS-RTOS v2 -// Select either bare metal operation or a supported RTOS -// "FreeRTOS" uses direct FreeRTOS calls -// "CMSIS-RTOS v1" supports only Keil RTX through API v1 -// "CMSIS-RTOS v2" supports Keil RTX5 and FreeRTOS through API v2 +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#define MG_CMSISPACK_ARCH 3 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 0 +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 0 -// Networking support -// Networking stack -// <0=> Built-in -// <1=> lwIP -// <2=> FreeRTOS-Plus-TCP -// <3=> MDK (RL) -// Select the networking stack to use with Mongoose Library -// The built-in stack can run on bare metal or over any RTOS -// "lwIP" requires using an RTOS and BSD socket mode -// "MDK" requires using CMSIS-RTOS1 (RTX + RL) or CMSIS-RTOS2 (MDK Plus or Pro), and BSD socket mode -#define MG_CMSISPACK_NET 3 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 + +// Enable IMXRT Ethernet driver +#define MG_ENABLE_DRIVER_IMXRT 0 + +// Enable W5500 Ethernet driver +#define MG_ENABLE_DRIVER_W5500 0 + +// Enable TI TM4C Ethernet driver +#define MG_ENABLE_DRIVER_TM4C 0 -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// Enable custom mg_millis() -// Use a user-provided function to get uptime in milliseconds, otherwise Mongoose will default to using time(). Except for bare metal, Mongoose will use the time base for the configured architecture -//#define MG_ENABLE_CUSTOM_MILLIS 1 -// +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 0 - -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() +// Enable custom mg_random() #define MG_ENABLE_CUSTOM_RANDOM 1 -// - -// Filesystem support // Enable packed (embedded) filesystem #define MG_ENABLE_PACKED_FS 1 -// - // <<< end of configuration section >>> -// Translate to Mongoose macros -#if MG_CMSISPACK_ARCH == 1 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_FREERTOS -#elif MG_CMSISPACK_ARCH == 2 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS1 -#elif MG_CMSISPACK_ARCH == 3 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#endif -#if MG_CMSISPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_CMSISPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_CMSISPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_CMSISPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - - // Add your customization below this comment +#define MG_ENABLE_RL 1 diff --git a/examples/stm32/nucleo-f746zg-keil-rtx5/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-rtx5/mongoose_custom.h index 07ad7c36..26fb7071 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx5/mongoose_custom.h +++ b/examples/stm32/nucleo-f746zg-keil-rtx5/mongoose_custom.h @@ -1,78 +1,53 @@ +// See https://mongoose.ws/documentation/#build-options +#pragma once // <<< Use Configuration Wizard in Context Menu >>> -// System Architecture -// <0=> Bare metal -// <1=> FreeRTOS -// <2=> CMSIS-RTOS v1 -// <3=> CMSIS-RTOS v2 -// Select either bare metal operation or a supported RTOS -// FreeRTOS uses direct FreeRTOS calls -// CMSIS-RTOS1 supports only Keil RTX through API v1 -// CMSIS-RTOS2 supports Keil RTX5 and FreeRTOS through API v2 +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#define MG_CMSISPACK_ARCH 3 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 1 +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 1 -// Networking support -// Networking stack -// <0=> Built-in -// <1=> lwIP -// <2=> FreeRTOS-Plus-TCP -// <3=> MDK (RL) -// Select the networking stack to use with Mongoose Library -// The built-in stack can run on bare metal or over any RTOS -// "lwIP" requires using an RTOS and BSD socket mode -// "MDK" requires using CMSIS-RTOS1 (RTX + RL) or CMSIS-RTOS2 (MDK Plus or Pro), and BSD socket mode -#define MG_CMSISPACK_NET 0 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 + +// Enable IMXRT Ethernet driver +#define MG_ENABLE_DRIVER_IMXRT 0 + +// Enable W5500 Ethernet driver +#define MG_ENABLE_DRIVER_W5500 0 + +// Enable TI TM4C Ethernet driver +#define MG_ENABLE_DRIVER_TM4C 0 -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// Enable custom mg_millis() -// Use a user-provided function to get uptime in milliseconds, otherwise Mongoose will default to using time(). Except for bare metal, Mongoose will use the time base for the configured architecture -//#define MG_ENABLE_CUSTOM_MILLIS 1 -// +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 0 - -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() +// Enable custom mg_random() #define MG_ENABLE_CUSTOM_RANDOM 1 -// - -// Filesystem support // Enable packed (embedded) filesystem #define MG_ENABLE_PACKED_FS 1 -// - // <<< end of configuration section >>> -// Translate to Mongoose macros -#if MG_CMSISPACK_ARCH == 1 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_FREERTOS -#elif MG_CMSISPACK_ARCH == 2 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS1 -#elif MG_CMSISPACK_ARCH == 3 -#undef MG_ARCH -#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#endif -#if MG_CMSISPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_CMSISPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_CMSISPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_CMSISPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - - // Add your customization below this comment -#define MG_ENABLE_DRIVER_STM32F 1 + diff --git a/mongoose.h b/mongoose.h index 60362d50..83f14b59 100644 --- a/mongoose.h +++ b/mongoose.h @@ -61,16 +61,12 @@ extern "C" { #define MG_ARCH MG_ARCH_AZURERTOS #elif defined(PICO_TARGET_NAME) #define MG_ARCH MG_ARCH_RP2040 -#elif defined(__ARMCC_VERSION) -#define MG_ARCH MG_ARCH_ARMCC #elif defined(__RTTHREAD__) #define MG_ARCH MG_ARCH_RTTHREAD #endif #endif // !defined(MG_ARCH) -// if the user did not specify an MG_ARCH, or specified a custom one, OR -// we guessed a known IDE, pull the customized config (Configuration Wizard) -#if !defined(MG_ARCH) || (MG_ARCH == MG_ARCH_CUSTOM) || MG_ARCH == MG_ARCH_ARMCC +#if !defined(MG_ARCH) || (MG_ARCH == MG_ARCH_CUSTOM) #include "mongoose_custom.h" // keep this include #endif @@ -188,6 +184,7 @@ extern "C" { #if defined(__ARMCC_VERSION) #define mode_t size_t #include +#include #else #include #endif @@ -293,6 +290,7 @@ int mkdir(const char *, mode_t); #include #include #include +#include #include #include #if MG_ARCH == MG_ARCH_CMSIS_RTOS1 diff --git a/src/arch.h b/src/arch.h index a9bc24b0..cf93f31d 100644 --- a/src/arch.h +++ b/src/arch.h @@ -34,16 +34,12 @@ #define MG_ARCH MG_ARCH_AZURERTOS #elif defined(PICO_TARGET_NAME) #define MG_ARCH MG_ARCH_RP2040 -#elif defined(__ARMCC_VERSION) -#define MG_ARCH MG_ARCH_ARMCC #elif defined(__RTTHREAD__) #define MG_ARCH MG_ARCH_RTTHREAD #endif #endif // !defined(MG_ARCH) -// if the user did not specify an MG_ARCH, or specified a custom one, OR -// we guessed a known IDE, pull the customized config (Configuration Wizard) -#if !defined(MG_ARCH) || (MG_ARCH == MG_ARCH_CUSTOM) || MG_ARCH == MG_ARCH_ARMCC +#if !defined(MG_ARCH) || (MG_ARCH == MG_ARCH_CUSTOM) #include "mongoose_custom.h" // keep this include #endif diff --git a/src/arch_freertos.h b/src/arch_freertos.h index 345c0db4..883e996a 100644 --- a/src/arch_freertos.h +++ b/src/arch_freertos.h @@ -16,6 +16,7 @@ #if defined(__ARMCC_VERSION) #define mode_t size_t #include +#include #else #include #endif diff --git a/src/arch_rtx.h b/src/arch_rtx.h index c649d62c..e39a871e 100644 --- a/src/arch_rtx.h +++ b/src/arch_rtx.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #if MG_ARCH == MG_ARCH_CMSIS_RTOS1