diff --git a/examples/stm32/nucleo-f429zi-keil-baremetal/mongoose_custom.h b/examples/stm32/nucleo-f429zi-keil-baremetal/mongoose_custom.h index fa67625c495..31a9cab89cf 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 - -#define MG_CMSISPACK_ARCH 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 0 - -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 -// +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_ARMCC +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 1 -// 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 -// +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 1 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() -#define MG_ENABLE_CUSTOM_RANDOM 1 -// +// 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 -// Filesystem support -// Enable packed (embedded) filesystem -#define MG_ENABLE_PACKED_FS 1 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// <<< end of configuration section >>> +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 1 -// 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 +// Enable custom mg_random() +#define MG_ENABLE_CUSTOM_RANDOM 1 +// Enable packed (embedded) filesystem +#define MG_ENABLE_PACKED_FS 1 + +// <<< end of configuration section >>> // 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 97a05b3c4e1..580d281749e 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 - -#define MG_CMSISPACK_ARCH 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 - -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 -// +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_FREERTOS +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 1 -// 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 -// +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 1 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() -#define MG_ENABLE_CUSTOM_RANDOM 1 -// +// 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 -// Filesystem support -// Enable packed (embedded) filesystem -#define MG_ENABLE_PACKED_FS 1 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// <<< end of configuration section >>> +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 1 -// 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 +// Enable custom mg_random() +#define MG_ENABLE_CUSTOM_RANDOM 1 +// Enable packed (embedded) filesystem +#define MG_ENABLE_PACKED_FS 1 + +// <<< end of configuration section >>> // 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 fa67625c495..31a9cab89cf 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 - -#define MG_CMSISPACK_ARCH 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 0 - -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 -// +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_ARMCC +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 1 -// 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 -// +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 1 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() -#define MG_ENABLE_CUSTOM_RANDOM 1 -// +// 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 -// Filesystem support -// Enable packed (embedded) filesystem -#define MG_ENABLE_PACKED_FS 1 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// <<< end of configuration section >>> +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 1 -// 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 +// Enable custom mg_random() +#define MG_ENABLE_CUSTOM_RANDOM 1 +// Enable packed (embedded) filesystem +#define MG_ENABLE_PACKED_FS 1 + +// <<< end of configuration section >>> // 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 154bb5c4bf6..81e9eb2a8e3 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 - -#define MG_CMSISPACK_ARCH 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 1 - -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 -// +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_FREERTOS +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 0 -// 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 -// +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 0 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() -#define MG_ENABLE_CUSTOM_RANDOM 1 -// +// 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 -// Filesystem support -// Enable packed (embedded) filesystem -#define MG_ENABLE_PACKED_FS 1 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// <<< end of configuration section >>> +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 1 -// 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 +// Enable custom mg_random() +#define MG_ENABLE_CUSTOM_RANDOM 1 + +// Enable packed (embedded) filesystem +#define MG_ENABLE_PACKED_FS 1 +// <<< end of configuration section >>> // 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 4c87f8fa2d6..9c82bb45192 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,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 - -#define MG_CMSISPACK_ARCH 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 2 - -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 -// +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_FREERTOS +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 0 -// 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 -// +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 0 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() -#define MG_ENABLE_CUSTOM_RANDOM 1 -// +// 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 -// Filesystem support -// Enable packed (embedded) filesystem -#define MG_ENABLE_PACKED_FS 1 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// <<< end of configuration section >>> +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 1 -// 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 +// Enable custom mg_random() +#define MG_ENABLE_CUSTOM_RANDOM 1 + +// Enable packed (embedded) filesystem +#define MG_ENABLE_PACKED_FS 1 +// <<< end of configuration section >>> // Add your customization below this comment +MG_ENABLE_FREERTOS_TCP diff --git a/examples/stm32/nucleo-f746zg-keil-freertos/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-freertos/mongoose_custom.h index 97a05b3c4e1..580d281749e 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 - -#define MG_CMSISPACK_ARCH 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 - -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 -// +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_FREERTOS +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 1 -// 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 -// +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 1 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() -#define MG_ENABLE_CUSTOM_RANDOM 1 -// +// 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 -// Filesystem support -// Enable packed (embedded) filesystem -#define MG_ENABLE_PACKED_FS 1 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// <<< end of configuration section >>> +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 1 -// 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 +// Enable custom mg_random() +#define MG_ENABLE_CUSTOM_RANDOM 1 +// Enable packed (embedded) filesystem +#define MG_ENABLE_PACKED_FS 1 + +// <<< end of configuration section >>> // 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 948dddfe938..f555340c087 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 - -#define MG_CMSISPACK_ARCH 3 - - -// 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 - -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 -// +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_CMSIS_RTOS2 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 0 -// 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 -// +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 0 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() -#define MG_ENABLE_CUSTOM_RANDOM 1 -// +// 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 -// Filesystem support -// Enable packed (embedded) filesystem -#define MG_ENABLE_PACKED_FS 1 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// <<< end of configuration section >>> +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 1 -// 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 +// Enable custom mg_random() +#define MG_ENABLE_CUSTOM_RANDOM 1 + +// Enable packed (embedded) filesystem +#define MG_ENABLE_PACKED_FS 1 +// <<< end of configuration section >>> // 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 0a7b750f176..44205d2ad4b 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 - -#define MG_CMSISPACK_ARCH 3 - - -// 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 - -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 -// +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_CMSIS_RTOS2 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 1 -// 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 -// +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 1 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() -#define MG_ENABLE_CUSTOM_RANDOM 1 -// +// 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 -// Filesystem support -// Enable packed (embedded) filesystem -#define MG_ENABLE_PACKED_FS 1 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// <<< end of configuration section >>> +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 1 -// 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 +// Enable custom mg_random() +#define MG_ENABLE_CUSTOM_RANDOM 1 +// Enable packed (embedded) filesystem +#define MG_ENABLE_PACKED_FS 1 + +// <<< end of configuration section >>> // 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 8e5a9871e8e..ea493a66655 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 - -#define MG_CMSISPACK_ARCH 2 - - -// 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 - -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 -// +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_CMSIS_RTOS1 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 0 -// 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 -// +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 0 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() -#define MG_ENABLE_CUSTOM_RANDOM 1 -// +// 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 -// Filesystem support -// Enable packed (embedded) filesystem -#define MG_ENABLE_PACKED_FS 1 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// <<< end of configuration section >>> +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 1 -// 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 +// Enable custom mg_random() +#define MG_ENABLE_CUSTOM_RANDOM 1 +// Enable packed (embedded) filesystem +#define MG_ENABLE_PACKED_FS 1 + +// <<< end of configuration section >>> // 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 2023bee210e..6d0d336ba47 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 - -#define MG_CMSISPACK_ARCH 2 - - -// 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 - -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 -// +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_CMSIS_RTOS1 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 1 -// 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 -// +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 1 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() -#define MG_ENABLE_CUSTOM_RANDOM 1 -// +// 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 -// Filesystem support -// Enable packed (embedded) filesystem -#define MG_ENABLE_PACKED_FS 1 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// <<< end of configuration section >>> +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 1 -// 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 +// Enable custom mg_random() +#define MG_ENABLE_CUSTOM_RANDOM 1 +// Enable packed (embedded) filesystem +#define MG_ENABLE_PACKED_FS 1 + +// <<< end of configuration section >>> // 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 948dddfe938..2b6d2508457 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 - -#define MG_CMSISPACK_ARCH 3 - - -// 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 - -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 -// +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_CMSIS_RTOS2 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 0 -// 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 -// +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 0 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() -#define MG_ENABLE_CUSTOM_RANDOM 1 -// +// 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 -// Filesystem support -// Enable packed (embedded) filesystem -#define MG_ENABLE_PACKED_FS 1 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// <<< end of configuration section >>> +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 1 -// 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 +// Enable custom mg_random() +#define MG_ENABLE_CUSTOM_RANDOM 1 +// Enable packed (embedded) filesystem +#define MG_ENABLE_PACKED_FS 1 + +// <<< end of configuration section >>> // 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 067d228c55f..099bcfb2c27 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 - -#define MG_CMSISPACK_ARCH 3 - - -// 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 - -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 -// +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_CMSIS_RTOS2 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 0 -// 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 -// +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 0 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() -#define MG_ENABLE_CUSTOM_RANDOM 1 -// +// 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 -// Filesystem support -// Enable packed (embedded) filesystem -#define MG_ENABLE_PACKED_FS 1 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// <<< end of configuration section >>> +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 1 -// 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 +// Enable custom mg_random() +#define MG_ENABLE_CUSTOM_RANDOM 1 +// Enable packed (embedded) filesystem +#define MG_ENABLE_PACKED_FS 1 + +// <<< end of configuration section >>> // 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 07ad7c36fa9..44205d2ad4b 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 - -#define MG_CMSISPACK_ARCH 3 - - -// 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 - -// Use Mbed-TLS -// Mongoose will use Mbed-TLS calls for TLS-related functionality -#define MG_ENABLE_MBEDTLS 0 -// +// Build environment +// Keil MDK +// FreeRTOS +// CMSIS-RTOS v1 +// CMSIS-RTOS v2 +// ARM GCC + Newlib +#define MG_ARCH MG_ARCH_CMSIS_RTOS2 +// Enable builtin TCP/IP stack +#define MG_ENABLE_TCPIP 1 -// 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 -// +// Network Drivers for builtin TCP/IP stack +// Enable STM23Fxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32F 1 +// Enable STM32Hxx Ethernet driver +#define MG_ENABLE_DRIVER_STM32H 0 -// Enable custom mg_rand() -// Use a user-provided function to generate random numbers, otherwise Mongoose will default to using rand() -#define MG_ENABLE_CUSTOM_RANDOM 1 -// +// 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 -// Filesystem support -// Enable packed (embedded) filesystem -#define MG_ENABLE_PACKED_FS 1 // +// TLS support +// None +// Built-in TLS 1.3 stack +// MbedTLS +#define MG_TLS MG_TLS_NONE -// <<< end of configuration section >>> +// Enable custom mg_millis() +#define MG_ENABLE_CUSTOM_MILLIS 1 -// 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 +// Enable custom mg_random() +#define MG_ENABLE_CUSTOM_RANDOM 1 +// Enable packed (embedded) filesystem +#define MG_ENABLE_PACKED_FS 1 + +// <<< end of configuration section >>> // Add your customization below this comment -#define MG_ENABLE_DRIVER_STM32F 1 + diff --git a/mongoose.h b/mongoose.h index 60362d50635..c03002b76ad 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 diff --git a/src/arch.h b/src/arch.h index a9bc24b083e..cf93f31db42 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