diff --git a/Makefile b/Makefile index d4faeb315f..c977955d3f 100644 --- a/Makefile +++ b/Makefile @@ -197,10 +197,12 @@ mongoose.h: $(HDRS) Makefile (cat src/license.h; echo; echo '#ifndef MONGOOSE_H'; echo '#define MONGOOSE_H'; echo; cat src/version.h ; echo; echo '#ifdef __cplusplus'; echo 'extern "C" {'; echo '#endif'; cat src/arch.h src/arch_*.h src/net_ft.h src/net_lwip.h src/net_rl.h src/config.h src/str.h src/queue.h src/fmt.h src/printf.h src/log.h src/timer.h src/fs.h src/util.h src/url.h src/iobuf.h src/base64.h src/md5.h src/sha1.h src/sha256.h src/tls_x25519.h src/tls_aes128.h src/tls_uecc.h src/event.h src/net.h src/http.h src/ssi.h src/tls.h src/tls_mbed.h src/tls_openssl.h src/ws.h src/sntp.h src/mqtt.h src/dns.h src/json.h src/rpc.h src/ota.h src/device.h src/net_builtin.h src/profile.h src/drivers/*.h | sed -e '/keep/! s,#include ".*,,' -e 's,^#pragma once,,'; echo; echo '#ifdef __cplusplus'; echo '}'; echo '#endif'; echo '#endif // MONGOOSE_H')> $@ -clean: clean_examples clean_embedded +clean: clean_examples clean_examples_embedded rm -rf $(PROG) *.exe *.o *.dSYM *_test* ut fuzzer *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb slow-unit* _CL_* infer-out data.txt crash-* test/packed_fs.c pack #find examples -maxdepth 3 -name zephyr -prune -o -name Makefile -print | xargs dirname | xargs -n1 make clean -C -clean_embedded: +examples_embedded: + @for X in $(EXAMPLES_EMBEDDED); do test -f $$X/Makefile || continue; $(MAKE) -C $$X build || exit 1; done +clean_examples_embedded: for X in $(EXAMPLES_EMBEDDED); do test -f $$X/Makefile || continue; $(MAKE) -C $$X clean || exit 1; done diff --git a/examples/arduino/teensy41-http/mongoose_custom.h b/examples/arduino/teensy41-http/mongoose_custom.h deleted file mode 100644 index 9c6a33cca7..0000000000 --- a/examples/arduino/teensy41-http/mongoose_custom.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#define MG_ARCH MG_ARCH_NEWLIB // Use ARM toolchain -#define MG_ENABLE_TCPIP 1 // Enable built-in network stack -#define MG_ENABLE_DRIVER_IMXRT 1 // Enable RTxx driver -#define MG_ENABLE_CUSTOM_MILLIS 1 // Let user implement mg_millis() -#define MG_ENABLE_POSIX_FS 0 // Disable POSIX filesystem -#define MG_ENABLE_PACKED_FS 1 // Enable packed filesystem - -#define HTTP_URL "http://0.0.0.0" -#define HTTPS_URL "https://0.0.0.0" diff --git a/examples/arduino/w5500-http/mongoose_custom.h b/examples/arduino/w5500-http/mongoose_custom.h deleted file mode 100644 index 5dec7d0a2b..0000000000 --- a/examples/arduino/w5500-http/mongoose_custom.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -#include "Arduino.h" - -#include -#include -#include -#include - -#define MG_ARCH MG_ARCH_CUSTOM -#define MG_ENABLE_SOCKET 0 -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_DRIVER_W5500 1 -#define mkdir(a, b) (-1) -#define MG_IO_SIZE 128 -//#define MG_ENABLE_LOG 0 diff --git a/examples/arduino/w5500-mqtt/mongoose_custom.h b/examples/arduino/w5500-mqtt/mongoose_custom.h deleted file mode 100644 index 5abe044068..0000000000 --- a/examples/arduino/w5500-mqtt/mongoose_custom.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -#include "Arduino.h" - -#include -#include -#include -#include - -#define MG_ARCH MG_ARCH_CUSTOM -#define MG_ENABLE_SOCKET 0 -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_DRIVER_W5500 1 -#define mkdir(a, b) (-1) -#define MG_IO_SIZE 512 -//#define MG_ENABLE_LOG 0 diff --git a/examples/esp32/micropython/mongoose/mongoose_custom.h b/examples/esp32/micropython/mongoose/mongoose_custom.h deleted file mode 100644 index d5b597a6c1..0000000000 --- a/examples/esp32/micropython/mongoose/mongoose_custom.h +++ /dev/null @@ -1,2 +0,0 @@ -// For some reason, IDF detection at build time does not work here -#define MG_ARCH MG_ARCH_ESP32 diff --git a/examples/nxp/rt1020-evk-make-baremetal-builtin/Makefile b/examples/nxp/rt1020-evk-make-baremetal-builtin/Makefile index 1542b63d64..c0279a55ed 100644 --- a/examples/nxp/rt1020-evk-make-baremetal-builtin/Makefile +++ b/examples/nxp/rt1020-evk-make-baremetal-builtin/Makefile @@ -11,7 +11,7 @@ SOURCES = main.c syscalls.c sysinit.c SOURCES += cmsis_mcu/devices/MIMXRT1021/gcc/startup_MIMXRT1021.S # NXP startup file. Compiler-dependent! CFLAGS += -D__ATOLLIC__ -D__STARTUP_CLEAR_BSS # Make startup code work as expected -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md diff --git a/examples/nxp/rt1020-evk-make-baremetal-builtin/mongoose_custom.h b/examples/nxp/rt1020-evk-make-baremetal-builtin/mongoose_custom.h deleted file mode 100644 index 9918b8f665..0000000000 --- a/examples/nxp/rt1020-evk-make-baremetal-builtin/mongoose_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB -#define MG_OTA MG_OTA_FLASH -#define MG_DEVICE MG_DEVICE_RT1020 - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_DRIVER_IMXRT 1 -#define MG_IO_SIZE 256 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 - diff --git a/examples/nxp/rt1020-evk-make-freertos-builtin/Makefile b/examples/nxp/rt1020-evk-make-freertos-builtin/Makefile index 843b22ded8..14d755d7fe 100644 --- a/examples/nxp/rt1020-evk-make-freertos-builtin/Makefile +++ b/examples/nxp/rt1020-evk-make-freertos-builtin/Makefile @@ -17,7 +17,7 @@ SOURCES += FreeRTOS-Kernel/portable/GCC/ARM_CM4F/port.c CFLAGS += -IFreeRTOS-Kernel/include CFLAGS += -IFreeRTOS-Kernel/portable/GCC/ARM_CM4F -Wno-conversion -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md @@ -38,7 +38,7 @@ ram: firmware.bin firmware.bin: firmware.elf arm-none-eabi-objcopy -O binary $< $@ -firmware.elf: FreeRTOS-Kernel cmsis_core cmsis_mcu $(SOURCES) hal.h link_ram.ld link.ld mongoose_custom.h +firmware.elf: FreeRTOS-Kernel cmsis_core cmsis_mcu $(SOURCES) hal.h link_ram.ld link.ld mongoose_config.h arm-none-eabi-gcc $(SOURCES) $(wildcard FreeRTOS-Kernel/*.c) $(CFLAGS) $(LDFLAGS) -o $@ flash: firmware.bin diff --git a/examples/nxp/rt1020-evk-make-freertos-builtin/mongoose_custom.h b/examples/nxp/rt1020-evk-make-freertos-builtin/mongoose_custom.h deleted file mode 100644 index 449f9af063..0000000000 --- a/examples/nxp/rt1020-evk-make-freertos-builtin/mongoose_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include // we are not using lwIP - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_FREERTOS - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_DRIVER_IMXRT 1 -#define MG_IO_SIZE 256 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 - diff --git a/examples/nxp/rt1060-evk-make-baremetal-builtin/Makefile b/examples/nxp/rt1060-evk-make-baremetal-builtin/Makefile index 902ffcd43b..324c921dd0 100644 --- a/examples/nxp/rt1060-evk-make-baremetal-builtin/Makefile +++ b/examples/nxp/rt1060-evk-make-baremetal-builtin/Makefile @@ -11,7 +11,7 @@ SOURCES = main.c syscalls.c sysinit.c SOURCES += cmsis_mcu/devices/MIMXRT1062/gcc/startup_MIMXRT1062.S # NXP startup file. Compiler-dependent! CFLAGS += -D__ATOLLIC__ -D__STARTUP_CLEAR_BSS # Make startup code work as expected -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md diff --git a/examples/nxp/rt1060-evk-make-baremetal-builtin/mongoose_custom.h b/examples/nxp/rt1060-evk-make-baremetal-builtin/mongoose_custom.h deleted file mode 100644 index 55503eaa33..0000000000 --- a/examples/nxp/rt1060-evk-make-baremetal-builtin/mongoose_custom.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB -#define MG_OTA MG_OTA_FLASH -#define MG_DEVICE MG_DEVICE_RT1060 - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_DRIVER_IMXRT 1 -#define MG_IO_SIZE 256 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 - diff --git a/examples/nxp/rt1060-evk-make-freertos-builtin/Makefile b/examples/nxp/rt1060-evk-make-freertos-builtin/Makefile index f926b1c8b9..7e550c8c70 100644 --- a/examples/nxp/rt1060-evk-make-freertos-builtin/Makefile +++ b/examples/nxp/rt1060-evk-make-freertos-builtin/Makefile @@ -17,7 +17,7 @@ SOURCES += FreeRTOS-Kernel/portable/GCC/ARM_CM4F/port.c CFLAGS += -IFreeRTOS-Kernel/include CFLAGS += -IFreeRTOS-Kernel/portable/GCC/ARM_CM4F -Wno-conversion -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md @@ -38,7 +38,7 @@ ram: firmware.bin firmware.bin: firmware.elf arm-none-eabi-objcopy -O binary $< $@ -firmware.elf: FreeRTOS-Kernel cmsis_core cmsis_mcu $(SOURCES) hal.h link_ram.ld link.ld mongoose_custom.h +firmware.elf: FreeRTOS-Kernel cmsis_core cmsis_mcu $(SOURCES) hal.h link_ram.ld link.ld mongoose_config.h arm-none-eabi-gcc $(SOURCES) $(wildcard FreeRTOS-Kernel/*.c) $(CFLAGS) $(LDFLAGS) -o $@ flash: firmware.bin diff --git a/examples/nxp/rt1060-evk-make-freertos-builtin/mongoose_custom.h b/examples/nxp/rt1060-evk-make-freertos-builtin/mongoose_custom.h deleted file mode 100644 index 449f9af063..0000000000 --- a/examples/nxp/rt1060-evk-make-freertos-builtin/mongoose_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include // we are not using lwIP - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_FREERTOS - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_DRIVER_IMXRT 1 -#define MG_IO_SIZE 256 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 - diff --git a/examples/nxp/rt1060-evk-xpresso-baremetal-builtin/source/mongoose_custom.h b/examples/nxp/rt1060-evk-xpresso-baremetal-builtin/source/mongoose_custom.h deleted file mode 100644 index 6fc75d8e4a..0000000000 --- a/examples/nxp/rt1060-evk-xpresso-baremetal-builtin/source/mongoose_custom.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_DRIVER_IMXRT 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 - diff --git a/examples/nxp/rt1170-evk-make-baremetal-builtin/Makefile b/examples/nxp/rt1170-evk-make-baremetal-builtin/Makefile index b3a07fbbde..38e43b7c74 100644 --- a/examples/nxp/rt1170-evk-make-baremetal-builtin/Makefile +++ b/examples/nxp/rt1170-evk-make-baremetal-builtin/Makefile @@ -13,7 +13,7 @@ SOURCES += cmsis_mcu/devices/MIMXRT1176/gcc/startup_MIMXRT1176_cm7.S # NXP start SOURCES += cmsis_mcu/devices/MIMXRT1176/drivers/fsl_clock.c cmsis_mcu/devices/MIMXRT1176/drivers/fsl_anatop_ai.c cmsis_mcu/devices/MIMXRT1176/drivers/fsl_pmu.c cmsis_mcu/devices/MIMXRT1176/drivers/fsl_dcdc.c cmsis_mcu/devices/MIMXRT1176/drivers/fsl_common_arm.c # NXP support files CFLAGS += -D__ATOLLIC__ -D__STARTUP_CLEAR_BSS # Make startup code work as expected -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md diff --git a/examples/nxp/rt1170-evk-make-baremetal-builtin/mongoose_custom.h b/examples/nxp/rt1170-evk-make-baremetal-builtin/mongoose_custom.h deleted file mode 100644 index 61211e1967..0000000000 --- a/examples/nxp/rt1170-evk-make-baremetal-builtin/mongoose_custom.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB -#define MG_OTA MG_OTA_FLASH -#define MG_DEVICE MG_DEVICE_RT1060 - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_DRIVER_IMXRT 1 -#define MG_DRIVER_IMXRT_RT11 1 -#define MG_ENABLE_TCPIP_DRIVER_INIT 0 -#define MG_IO_SIZE 256 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 0 -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_TCPIP_PRINT_DEBUG_STATS 1 diff --git a/examples/renesas/ek-ra6m4-make-baremetal-builtin/mongoose_custom.h b/examples/renesas/ek-ra6m4-make-baremetal-builtin/mongoose_custom.h deleted file mode 100644 index 91e1a0745c..0000000000 --- a/examples/renesas/ek-ra6m4-make-baremetal-builtin/mongoose_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB -#define MG_OTA MG_OTA_FLASH -#define MG_DEVICE MG_DEVICE_STM32H5 - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 0 -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_DRIVER_RA 1 -//#define MG_ENABLE_LINES 1 diff --git a/examples/stm32/nucleo-f429zi-cube-baremetal-builtin/Core/Inc/mongoose_custom.h b/examples/stm32/nucleo-f429zi-cube-baremetal-builtin/Core/Inc/mongoose_custom.h deleted file mode 100644 index 6cd87208cc..0000000000 --- a/examples/stm32/nucleo-f429zi-cube-baremetal-builtin/Core/Inc/mongoose_custom.h +++ /dev/null @@ -1,32 +0,0 @@ - -// If we could guess an MG_ARCH so far, preserve it, otherwise try GCC-based -#if defined(MG_ARCH) -#define MG_STMPACK_ARCH MG_ARCH -#undef MG_ARCH -#elif defined(__GNUC__) -#define MG_STMPACK_ARCH MG_ARCH_NEWLIB -#endif - -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_MBEDTLS 0 -#define MG_ARCH MG_STMPACK_ARCH -#define MG_STMPACK_NET 0 -#define MG_ENABLE_CUSTOM_RANDOM 1 - -// Translate to Mongoose macros -#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 - -#if MG_ENABLE_PACKED_FS -#define MG_ENABLE_POSIX_FS 0 -#endif - -// See https://mongoose.ws/documentation/#build-options diff --git a/examples/stm32/nucleo-f429zi-cube-freertos-builtin/Core/Inc/mongoose_custom.h b/examples/stm32/nucleo-f429zi-cube-freertos-builtin/Core/Inc/mongoose_custom.h deleted file mode 100644 index 956a921de1..0000000000 --- a/examples/stm32/nucleo-f429zi-cube-freertos-builtin/Core/Inc/mongoose_custom.h +++ /dev/null @@ -1,32 +0,0 @@ - -// If we could guess an MG_ARCH so far, preserve it, otherwise try GCC-based -#if defined(MG_ARCH) -#define MG_STMPACK_ARCH MG_ARCH -#undef MG_ARCH -#elif defined(__GNUC__) -#define MG_STMPACK_ARCH MG_ARCH_NEWLIB -#endif - -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_CUSTOM_MILLIS 0 -#define MG_ENABLE_MBEDTLS 0 -#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#define MG_STMPACK_NET 0 -#define MG_ENABLE_CUSTOM_RANDOM 1 - -// Translate to Mongoose macros -#if MG_STMPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_STMPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_STMPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_STMPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - -#if MG_ENABLE_PACKED_FS -#define MG_ENABLE_POSIX_FS 0 -#endif - -// See https://mongoose.ws/documentation/#build-options diff --git a/examples/stm32/nucleo-f429zi-cube-freertos-lwip/Core/Inc/mongoose_custom.h b/examples/stm32/nucleo-f429zi-cube-freertos-lwip/Core/Inc/mongoose_custom.h deleted file mode 100644 index b6a9622de7..0000000000 --- a/examples/stm32/nucleo-f429zi-cube-freertos-lwip/Core/Inc/mongoose_custom.h +++ /dev/null @@ -1,32 +0,0 @@ - -// If we could guess an MG_ARCH so far, preserve it, otherwise try GCC-based -#if defined(MG_ARCH) -#define MG_STMPACK_ARCH MG_ARCH -#undef MG_ARCH -#elif defined(__GNUC__) -#define MG_STMPACK_ARCH MG_ARCH_NEWLIB -#endif - -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_CUSTOM_MILLIS 0 -#define MG_ENABLE_MBEDTLS 0 -#define MG_ARCH MG_ARCH_FREERTOS -#define MG_STMPACK_NET 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 - -// Translate to Mongoose macros -#if MG_STMPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_STMPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_STMPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_STMPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - -#if MG_ENABLE_PACKED_FS -#define MG_ENABLE_POSIX_FS 0 -#endif - -// See https://mongoose.ws/documentation/#build-options diff --git a/examples/stm32/nucleo-f429zi-keil-baremetal/device-dashboard.uvguix b/examples/stm32/nucleo-f429zi-keil-baremetal/device-dashboard.uvguix index 53824fcb19..026f132f35 100644 --- a/examples/stm32/nucleo-f429zi-keil-baremetal/device-dashboard.uvguix +++ b/examples/stm32/nucleo-f429zi-keil-baremetal/device-dashboard.uvguix @@ -3641,7 +3641,7 @@ 0 - .\mongoose_custom.h + .\mongoose_config.h 0 1 1 diff --git a/examples/stm32/nucleo-f429zi-keil-baremetal/device-dashboard.uvoptx b/examples/stm32/nucleo-f429zi-keil-baremetal/device-dashboard.uvoptx index 93fbefa520..8768257b27 100644 --- a/examples/stm32/nucleo-f429zi-keil-baremetal/device-dashboard.uvoptx +++ b/examples/stm32/nucleo-f429zi-keil-baremetal/device-dashboard.uvoptx @@ -533,8 +533,8 @@ 0 0 0 - .\mongoose_custom.h - mongoose_custom.h + .\mongoose_config.h + mongoose_config.h 0 0 diff --git a/examples/stm32/nucleo-f429zi-keil-baremetal/device-dashboard.uvprojx b/examples/stm32/nucleo-f429zi-keil-baremetal/device-dashboard.uvprojx index dae37ef8bf..ade5ebb397 100644 --- a/examples/stm32/nucleo-f429zi-keil-baremetal/device-dashboard.uvprojx +++ b/examples/stm32/nucleo-f429zi-keil-baremetal/device-dashboard.uvprojx @@ -414,9 +414,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h @@ -859,9 +859,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h diff --git a/examples/stm32/nucleo-f429zi-keil-baremetal/mongoose_custom.h b/examples/stm32/nucleo-f429zi-keil-baremetal/mongoose_custom.h deleted file mode 100644 index 31a9cab89c..0000000000 --- a/examples/stm32/nucleo-f429zi-keil-baremetal/mongoose_custom.h +++ /dev/null @@ -1,53 +0,0 @@ -// See https://mongoose.ws/documentation/#build-options -#pragma once - -// <<< Use Configuration Wizard in Context Menu >>> - -// 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 - -// 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 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 - -// - -// TLS support -// None -// Built-in TLS 1.3 stack -// MbedTLS -#define MG_TLS MG_TLS_NONE - -// Enable custom mg_millis() -#define MG_ENABLE_CUSTOM_MILLIS 1 - -// 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 - diff --git a/examples/stm32/nucleo-f429zi-keil-freertos/device-dashboard.uvguix b/examples/stm32/nucleo-f429zi-keil-freertos/device-dashboard.uvguix index 53824fcb19..026f132f35 100644 --- a/examples/stm32/nucleo-f429zi-keil-freertos/device-dashboard.uvguix +++ b/examples/stm32/nucleo-f429zi-keil-freertos/device-dashboard.uvguix @@ -3641,7 +3641,7 @@ 0 - .\mongoose_custom.h + .\mongoose_config.h 0 1 1 diff --git a/examples/stm32/nucleo-f429zi-keil-freertos/device-dashboard.uvoptx b/examples/stm32/nucleo-f429zi-keil-freertos/device-dashboard.uvoptx index 9cca035626..da310c5bb3 100644 --- a/examples/stm32/nucleo-f429zi-keil-freertos/device-dashboard.uvoptx +++ b/examples/stm32/nucleo-f429zi-keil-freertos/device-dashboard.uvoptx @@ -521,8 +521,8 @@ 0 0 0 - .\mongoose_custom.h - mongoose_custom.h + .\mongoose_config.h + mongoose_config.h 0 0 diff --git a/examples/stm32/nucleo-f429zi-keil-freertos/device-dashboard.uvprojx b/examples/stm32/nucleo-f429zi-keil-freertos/device-dashboard.uvprojx index 8bd2a3f876..28e938fb19 100644 --- a/examples/stm32/nucleo-f429zi-keil-freertos/device-dashboard.uvprojx +++ b/examples/stm32/nucleo-f429zi-keil-freertos/device-dashboard.uvprojx @@ -414,9 +414,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h @@ -862,9 +862,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h diff --git a/examples/stm32/nucleo-f429zi-keil-freertos/mongoose_custom.h b/examples/stm32/nucleo-f429zi-keil-freertos/mongoose_custom.h deleted file mode 100644 index 390a615770..0000000000 --- a/examples/stm32/nucleo-f429zi-keil-freertos/mongoose_custom.h +++ /dev/null @@ -1,53 +0,0 @@ -// See https://mongoose.ws/documentation/#build-options -#pragma once - -// <<< Use Configuration Wizard in Context Menu >>> - -// 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 - -// 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 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 - -// - -// TLS support -// None -// Built-in TLS 1.3 stack -// MbedTLS -#define MG_TLS MG_TLS_NONE - -// Enable custom mg_millis() -#define MG_ENABLE_CUSTOM_MILLIS 0 - -// 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 - diff --git a/examples/stm32/nucleo-f429zi-make-baremetal-builtin-rndis/Makefile b/examples/stm32/nucleo-f429zi-make-baremetal-builtin-rndis/Makefile index 9b8eb52b90..1475e20fff 100644 --- a/examples/stm32/nucleo-f429zi-make-baremetal-builtin-rndis/Makefile +++ b/examples/stm32/nucleo-f429zi-make-baremetal-builtin-rndis/Makefile @@ -22,7 +22,7 @@ CFLAGS += -Itinyusb/src -Itinyusb/lib/networking CFLAGS += -DSTM32F429xx CFLAGS += -Wno-conversion -Wno-sign-conversion -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c ifeq ($(OS),Windows_NT) diff --git a/examples/stm32/nucleo-f429zi-make-baremetal-builtin-rndis/mongoose_custom.h b/examples/stm32/nucleo-f429zi-make-baremetal-builtin-rndis/mongoose_custom.h deleted file mode 100644 index 02c6900a10..0000000000 --- a/examples/stm32/nucleo-f429zi-make-baremetal-builtin-rndis/mongoose_custom.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 -#define MG_IO_SIZE 512 -#define MG_ENABLE_LINES 1 diff --git a/examples/stm32/nucleo-f429zi-make-baremetal-builtin/Makefile b/examples/stm32/nucleo-f429zi-make-baremetal-builtin/Makefile index 67757c70e1..5052d35809 100644 --- a/examples/stm32/nucleo-f429zi-make-baremetal-builtin/Makefile +++ b/examples/stm32/nucleo-f429zi-make-baremetal-builtin/Makefile @@ -8,7 +8,7 @@ LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,-- SOURCES = main.c syscalls.c sysinit.c SOURCES += cmsis_f4/Source/Templates/gcc/startup_stm32f429xx.s # ST startup file. Compiler-dependent! -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md diff --git a/examples/stm32/nucleo-f429zi-make-baremetal-builtin/mongoose_custom.h b/examples/stm32/nucleo-f429zi-make-baremetal-builtin/mongoose_custom.h deleted file mode 100644 index 4ce3a48f4d..0000000000 --- a/examples/stm32/nucleo-f429zi-make-baremetal-builtin/mongoose_custom.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_DRIVER_STM32F 1 -#define MG_ENABLE_LINES 1 diff --git a/examples/stm32/nucleo-f429zi-make-freertos-builtin/Makefile b/examples/stm32/nucleo-f429zi-make-freertos-builtin/Makefile index 7725962347..f734447e85 100644 --- a/examples/stm32/nucleo-f429zi-make-freertos-builtin/Makefile +++ b/examples/stm32/nucleo-f429zi-make-freertos-builtin/Makefile @@ -14,7 +14,7 @@ SOURCES += FreeRTOS-Kernel/portable/GCC/ARM_CM4F/port.c CFLAGS += -IFreeRTOS-Kernel/include CFLAGS += -IFreeRTOS-Kernel/portable/GCC/ARM_CM4F -Wno-conversion -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md diff --git a/examples/stm32/nucleo-f429zi-make-freertos-builtin/mongoose_custom.h b/examples/stm32/nucleo-f429zi-make-freertos-builtin/mongoose_custom.h deleted file mode 100644 index 89f25b7638..0000000000 --- a/examples/stm32/nucleo-f429zi-make-freertos-builtin/mongoose_custom.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_FREERTOS - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_DRIVER_STM32F 1 -#define MG_IO_SIZE 256 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 - diff --git a/examples/stm32/nucleo-f746zg-cube-baremetal-builtin/Core/Inc/mongoose_custom.h b/examples/stm32/nucleo-f746zg-cube-baremetal-builtin/Core/Inc/mongoose_custom.h deleted file mode 100644 index 6cd87208cc..0000000000 --- a/examples/stm32/nucleo-f746zg-cube-baremetal-builtin/Core/Inc/mongoose_custom.h +++ /dev/null @@ -1,32 +0,0 @@ - -// If we could guess an MG_ARCH so far, preserve it, otherwise try GCC-based -#if defined(MG_ARCH) -#define MG_STMPACK_ARCH MG_ARCH -#undef MG_ARCH -#elif defined(__GNUC__) -#define MG_STMPACK_ARCH MG_ARCH_NEWLIB -#endif - -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_MBEDTLS 0 -#define MG_ARCH MG_STMPACK_ARCH -#define MG_STMPACK_NET 0 -#define MG_ENABLE_CUSTOM_RANDOM 1 - -// Translate to Mongoose macros -#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 - -#if MG_ENABLE_PACKED_FS -#define MG_ENABLE_POSIX_FS 0 -#endif - -// See https://mongoose.ws/documentation/#build-options diff --git a/examples/stm32/nucleo-f746zg-cube-freertos-builtin/Core/Inc/mongoose_custom.h b/examples/stm32/nucleo-f746zg-cube-freertos-builtin/Core/Inc/mongoose_custom.h deleted file mode 100644 index 956a921de1..0000000000 --- a/examples/stm32/nucleo-f746zg-cube-freertos-builtin/Core/Inc/mongoose_custom.h +++ /dev/null @@ -1,32 +0,0 @@ - -// If we could guess an MG_ARCH so far, preserve it, otherwise try GCC-based -#if defined(MG_ARCH) -#define MG_STMPACK_ARCH MG_ARCH -#undef MG_ARCH -#elif defined(__GNUC__) -#define MG_STMPACK_ARCH MG_ARCH_NEWLIB -#endif - -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_CUSTOM_MILLIS 0 -#define MG_ENABLE_MBEDTLS 0 -#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#define MG_STMPACK_NET 0 -#define MG_ENABLE_CUSTOM_RANDOM 1 - -// Translate to Mongoose macros -#if MG_STMPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_STMPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_STMPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_STMPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - -#if MG_ENABLE_PACKED_FS -#define MG_ENABLE_POSIX_FS 0 -#endif - -// See https://mongoose.ws/documentation/#build-options diff --git a/examples/stm32/nucleo-f746zg-cube-freertos-lwip/Core/Inc/mongoose_custom.h b/examples/stm32/nucleo-f746zg-cube-freertos-lwip/Core/Inc/mongoose_custom.h deleted file mode 100644 index b6a9622de7..0000000000 --- a/examples/stm32/nucleo-f746zg-cube-freertos-lwip/Core/Inc/mongoose_custom.h +++ /dev/null @@ -1,32 +0,0 @@ - -// If we could guess an MG_ARCH so far, preserve it, otherwise try GCC-based -#if defined(MG_ARCH) -#define MG_STMPACK_ARCH MG_ARCH -#undef MG_ARCH -#elif defined(__GNUC__) -#define MG_STMPACK_ARCH MG_ARCH_NEWLIB -#endif - -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_CUSTOM_MILLIS 0 -#define MG_ENABLE_MBEDTLS 0 -#define MG_ARCH MG_ARCH_FREERTOS -#define MG_STMPACK_NET 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 - -// Translate to Mongoose macros -#if MG_STMPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_STMPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_STMPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_STMPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - -#if MG_ENABLE_PACKED_FS -#define MG_ENABLE_POSIX_FS 0 -#endif - -// See https://mongoose.ws/documentation/#build-options diff --git a/examples/stm32/nucleo-f746zg-keil-baremetal/device-dashboard.uvguix b/examples/stm32/nucleo-f746zg-keil-baremetal/device-dashboard.uvguix index 6f13971bc6..6c75693950 100644 --- a/examples/stm32/nucleo-f746zg-keil-baremetal/device-dashboard.uvguix +++ b/examples/stm32/nucleo-f746zg-keil-baremetal/device-dashboard.uvguix @@ -3641,7 +3641,7 @@ 0 - C:\Users\scaprile\mongoose\examples\stm32\nucleo-f746zg-keil-baremetal\mongoose_custom.h + C:\Users\scaprile\mongoose\examples\stm32\nucleo-f746zg-keil-baremetal\mongoose_config.h 0 1 15 diff --git a/examples/stm32/nucleo-f746zg-keil-baremetal/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-baremetal/mongoose_custom.h deleted file mode 100644 index 31a9cab89c..0000000000 --- a/examples/stm32/nucleo-f746zg-keil-baremetal/mongoose_custom.h +++ /dev/null @@ -1,53 +0,0 @@ -// See https://mongoose.ws/documentation/#build-options -#pragma once - -// <<< Use Configuration Wizard in Context Menu >>> - -// 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 - -// 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 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 - -// - -// TLS support -// None -// Built-in TLS 1.3 stack -// MbedTLS -#define MG_TLS MG_TLS_NONE - -// Enable custom mg_millis() -#define MG_ENABLE_CUSTOM_MILLIS 1 - -// 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 - diff --git a/examples/stm32/nucleo-f746zg-keil-freertos-lwip/device-dashboard.uvguix b/examples/stm32/nucleo-f746zg-keil-freertos-lwip/device-dashboard.uvguix index e1dc2f9efe..f8a7c7d85b 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos-lwip/device-dashboard.uvguix +++ b/examples/stm32/nucleo-f746zg-keil-freertos-lwip/device-dashboard.uvguix @@ -3688,7 +3688,7 @@ 0 - .\mongoose_custom.h + .\mongoose_config.h 0 1 1 diff --git a/examples/stm32/nucleo-f746zg-keil-freertos-lwip/device-dashboard.uvoptx b/examples/stm32/nucleo-f746zg-keil-freertos-lwip/device-dashboard.uvoptx index 32f2a4be27..cb8832d056 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos-lwip/device-dashboard.uvoptx +++ b/examples/stm32/nucleo-f746zg-keil-freertos-lwip/device-dashboard.uvoptx @@ -536,8 +536,8 @@ 0 0 0 - .\mongoose_custom.h - mongoose_custom.h + .\mongoose_config.h + mongoose_config.h 0 0 diff --git a/examples/stm32/nucleo-f746zg-keil-freertos-lwip/device-dashboard.uvprojx b/examples/stm32/nucleo-f746zg-keil-freertos-lwip/device-dashboard.uvprojx index 3872f89996..f3315c2e34 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos-lwip/device-dashboard.uvprojx +++ b/examples/stm32/nucleo-f746zg-keil-freertos-lwip/device-dashboard.uvprojx @@ -414,9 +414,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h @@ -868,9 +868,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h diff --git a/examples/stm32/nucleo-f746zg-keil-freertos-lwip/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-freertos-lwip/mongoose_custom.h deleted file mode 100644 index 18aca30321..0000000000 --- a/examples/stm32/nucleo-f746zg-keil-freertos-lwip/mongoose_custom.h +++ /dev/null @@ -1,55 +0,0 @@ -// See https://mongoose.ws/documentation/#build-options -#pragma once - -// <<< Use Configuration Wizard in Context Menu >>> - -// 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 - -// 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 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 - -// - -// TLS support -// None -// Built-in TLS 1.3 stack -// MbedTLS -#define MG_TLS MG_TLS_NONE - -// Enable custom mg_millis() -#define MG_ENABLE_CUSTOM_MILLIS 0 - -// 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/device-dashboard.uvguix b/examples/stm32/nucleo-f746zg-keil-freertos-tcp/device-dashboard.uvguix index 2cf6691803..f65556c3fd 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos-tcp/device-dashboard.uvguix +++ b/examples/stm32/nucleo-f746zg-keil-freertos-tcp/device-dashboard.uvguix @@ -3677,7 +3677,7 @@ 0 - .\mongoose_custom.h + .\mongoose_config.h 0 1 1 diff --git a/examples/stm32/nucleo-f746zg-keil-freertos-tcp/device-dashboard.uvoptx b/examples/stm32/nucleo-f746zg-keil-freertos-tcp/device-dashboard.uvoptx index 47fb9999fe..f2f6b6bff6 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos-tcp/device-dashboard.uvoptx +++ b/examples/stm32/nucleo-f746zg-keil-freertos-tcp/device-dashboard.uvoptx @@ -530,8 +530,8 @@ 0 0 0 - .\mongoose_custom.h - mongoose_custom.h + .\mongoose_config.h + mongoose_config.h 0 0 diff --git a/examples/stm32/nucleo-f746zg-keil-freertos-tcp/device-dashboard.uvprojx b/examples/stm32/nucleo-f746zg-keil-freertos-tcp/device-dashboard.uvprojx index 73caedbd4d..21ff758284 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos-tcp/device-dashboard.uvprojx +++ b/examples/stm32/nucleo-f746zg-keil-freertos-tcp/device-dashboard.uvprojx @@ -424,9 +424,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h @@ -885,9 +885,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h diff --git a/examples/stm32/nucleo-f746zg-keil-freertos-tcp/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-freertos-tcp/mongoose_custom.h deleted file mode 100644 index 2eba659460..0000000000 --- a/examples/stm32/nucleo-f746zg-keil-freertos-tcp/mongoose_custom.h +++ /dev/null @@ -1,53 +0,0 @@ -// See https://mongoose.ws/documentation/#build-options -#pragma once - -// <<< Use Configuration Wizard in Context Menu >>> - -// 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 - -// 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 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 - -// - -// TLS support -// None -// Built-in TLS 1.3 stack -// MbedTLS -#define MG_TLS MG_TLS_NONE - -// Enable custom mg_millis() -#define MG_ENABLE_CUSTOM_MILLIS 0 - -// 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_FREERTOS_TCP 1 diff --git a/examples/stm32/nucleo-f746zg-keil-freertos/device-dashboard.uvguix b/examples/stm32/nucleo-f746zg-keil-freertos/device-dashboard.uvguix index 9531e16a59..65b6e2ddb8 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos/device-dashboard.uvguix +++ b/examples/stm32/nucleo-f746zg-keil-freertos/device-dashboard.uvguix @@ -3659,7 +3659,7 @@ 0 - .\mongoose_custom.h + .\mongoose_config.h 0 1 1 diff --git a/examples/stm32/nucleo-f746zg-keil-freertos/device-dashboard.uvoptx b/examples/stm32/nucleo-f746zg-keil-freertos/device-dashboard.uvoptx index eb96396925..e7fb3d2a82 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos/device-dashboard.uvoptx +++ b/examples/stm32/nucleo-f746zg-keil-freertos/device-dashboard.uvoptx @@ -550,8 +550,8 @@ 0 0 0 - .\mongoose_custom.h - mongoose_custom.h + .\mongoose_config.h + mongoose_config.h 0 0 diff --git a/examples/stm32/nucleo-f746zg-keil-freertos/device-dashboard.uvprojx b/examples/stm32/nucleo-f746zg-keil-freertos/device-dashboard.uvprojx index e658ed29b6..199215e4d7 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos/device-dashboard.uvprojx +++ b/examples/stm32/nucleo-f746zg-keil-freertos/device-dashboard.uvprojx @@ -414,9 +414,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h @@ -862,9 +862,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h diff --git a/examples/stm32/nucleo-f746zg-keil-freertos/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-freertos/mongoose_custom.h deleted file mode 100644 index 390a615770..0000000000 --- a/examples/stm32/nucleo-f746zg-keil-freertos/mongoose_custom.h +++ /dev/null @@ -1,53 +0,0 @@ -// See https://mongoose.ws/documentation/#build-options -#pragma once - -// <<< Use Configuration Wizard in Context Menu >>> - -// 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 - -// 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 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 - -// - -// TLS support -// None -// Built-in TLS 1.3 stack -// MbedTLS -#define MG_TLS MG_TLS_NONE - -// Enable custom mg_millis() -#define MG_ENABLE_CUSTOM_MILLIS 0 - -// 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 - diff --git a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/device-dashboard.uvguix b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/device-dashboard.uvguix index 9d66536957..c5784fa2ed 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/device-dashboard.uvguix +++ b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/device-dashboard.uvguix @@ -3688,7 +3688,7 @@ 0 - .\mongoose_custom.h + .\mongoose_config.h 0 1 1 diff --git a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/device-dashboard.uvoptx b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/device-dashboard.uvoptx index 4a9fee0f3f..89ddd52482 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/device-dashboard.uvoptx +++ b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/device-dashboard.uvoptx @@ -536,8 +536,8 @@ 0 0 0 - .\mongoose_custom.h - mongoose_custom.h + .\mongoose_config.h + mongoose_config.h 0 0 diff --git a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/device-dashboard.uvprojx b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/device-dashboard.uvprojx index efea8fb0f7..5efca32e4f 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/device-dashboard.uvprojx +++ b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/device-dashboard.uvprojx @@ -414,9 +414,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h @@ -868,9 +868,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h 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 deleted file mode 100644 index b179d99acb..0000000000 --- a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2-lwip/mongoose_custom.h +++ /dev/null @@ -1,55 +0,0 @@ -// See https://mongoose.ws/documentation/#build-options -#pragma once - -// <<< Use Configuration Wizard in Context Menu >>> - -// 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 - -// 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 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 - -// - -// TLS support -// None -// Built-in TLS 1.3 stack -// MbedTLS -#define MG_TLS MG_TLS_NONE - -// Enable custom mg_millis() -#define MG_ENABLE_CUSTOM_MILLIS 0 - -// 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/device-dashboard.uvguix b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/device-dashboard.uvguix index 72edc7058f..db285c8435 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/device-dashboard.uvguix +++ b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/device-dashboard.uvguix @@ -3648,7 +3648,7 @@ 0 - .\mongoose_custom.h + .\mongoose_config.h 0 1 1 diff --git a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/device-dashboard.uvoptx b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/device-dashboard.uvoptx index f6fb245416..aaf5b01661 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/device-dashboard.uvoptx +++ b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/device-dashboard.uvoptx @@ -492,8 +492,8 @@ 0 0 0 - .\mongoose_custom.h - mongoose_custom.h + .\mongoose_config.h + mongoose_config.h 0 0 diff --git a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/device-dashboard.uvprojx b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/device-dashboard.uvprojx index 1d177d51b2..d13b5c4637 100644 --- a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/device-dashboard.uvprojx +++ b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/device-dashboard.uvprojx @@ -414,9 +414,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h @@ -862,9 +862,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h diff --git a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/mongoose_custom.h deleted file mode 100644 index 26fb707197..0000000000 --- a/examples/stm32/nucleo-f746zg-keil-freertos_cmsis2/mongoose_custom.h +++ /dev/null @@ -1,53 +0,0 @@ -// See https://mongoose.ws/documentation/#build-options -#pragma once - -// <<< Use Configuration Wizard in Context Menu >>> - -// 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 - -// 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 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 - -// - -// TLS support -// None -// Built-in TLS 1.3 stack -// MbedTLS -#define MG_TLS MG_TLS_NONE - -// Enable custom mg_millis() -#define MG_ENABLE_CUSTOM_MILLIS 0 - -// 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 - diff --git a/examples/stm32/nucleo-f746zg-keil-rtx-mdk/device-dashboard.uvguix b/examples/stm32/nucleo-f746zg-keil-rtx-mdk/device-dashboard.uvguix index d1d6cb8a7b..748bd43310 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx-mdk/device-dashboard.uvguix +++ b/examples/stm32/nucleo-f746zg-keil-rtx-mdk/device-dashboard.uvguix @@ -3704,7 +3704,7 @@ 0 - .\mongoose_custom.h + .\mongoose_config.h 0 1 1 diff --git a/examples/stm32/nucleo-f746zg-keil-rtx-mdk/device-dashboard.uvoptx b/examples/stm32/nucleo-f746zg-keil-rtx-mdk/device-dashboard.uvoptx index 0c7f31fa0a..0a25b91420 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx-mdk/device-dashboard.uvoptx +++ b/examples/stm32/nucleo-f746zg-keil-rtx-mdk/device-dashboard.uvoptx @@ -506,8 +506,8 @@ 0 0 0 - .\mongoose_custom.h - mongoose_custom.h + .\mongoose_config.h + mongoose_config.h 0 0 diff --git a/examples/stm32/nucleo-f746zg-keil-rtx-mdk/device-dashboard.uvprojx b/examples/stm32/nucleo-f746zg-keil-rtx-mdk/device-dashboard.uvprojx index 651d255786..0c95049386 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx-mdk/device-dashboard.uvprojx +++ b/examples/stm32/nucleo-f746zg-keil-rtx-mdk/device-dashboard.uvprojx @@ -414,9 +414,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h @@ -865,9 +865,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h diff --git a/examples/stm32/nucleo-f746zg-keil-rtx-mdk/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-rtx-mdk/mongoose_custom.h deleted file mode 100644 index 964ab1292d..0000000000 --- a/examples/stm32/nucleo-f746zg-keil-rtx-mdk/mongoose_custom.h +++ /dev/null @@ -1,54 +0,0 @@ -// See https://mongoose.ws/documentation/#build-options -#pragma once - -// <<< Use Configuration Wizard in Context Menu >>> - -// 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 - -// 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 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 - -// - -// TLS support -// None -// Built-in TLS 1.3 stack -// MbedTLS -#define MG_TLS MG_TLS_NONE - -// Enable custom mg_millis() -#define MG_ENABLE_CUSTOM_MILLIS 0 - -// 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/device-dashboard.uvguix b/examples/stm32/nucleo-f746zg-keil-rtx/device-dashboard.uvguix index e73c399545..24a6d9cbb6 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx/device-dashboard.uvguix +++ b/examples/stm32/nucleo-f746zg-keil-rtx/device-dashboard.uvguix @@ -3650,7 +3650,7 @@ 0 - .\mongoose_custom.h + .\mongoose_config.h 0 1 1 diff --git a/examples/stm32/nucleo-f746zg-keil-rtx/device-dashboard.uvoptx b/examples/stm32/nucleo-f746zg-keil-rtx/device-dashboard.uvoptx index 4745c9ab57..1e54a5d935 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx/device-dashboard.uvoptx +++ b/examples/stm32/nucleo-f746zg-keil-rtx/device-dashboard.uvoptx @@ -496,8 +496,8 @@ 0 0 0 - .\mongoose_custom.h - mongoose_custom.h + .\mongoose_config.h + mongoose_config.h 0 0 diff --git a/examples/stm32/nucleo-f746zg-keil-rtx/device-dashboard.uvprojx b/examples/stm32/nucleo-f746zg-keil-rtx/device-dashboard.uvprojx index 3a645faa6d..af10878ff6 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx/device-dashboard.uvprojx +++ b/examples/stm32/nucleo-f746zg-keil-rtx/device-dashboard.uvprojx @@ -414,9 +414,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h @@ -859,9 +859,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h diff --git a/examples/stm32/nucleo-f746zg-keil-rtx/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-rtx/mongoose_custom.h deleted file mode 100644 index e5a681c12f..0000000000 --- a/examples/stm32/nucleo-f746zg-keil-rtx/mongoose_custom.h +++ /dev/null @@ -1,53 +0,0 @@ -// See https://mongoose.ws/documentation/#build-options -#pragma once - -// <<< Use Configuration Wizard in Context Menu >>> - -// 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 - -// 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 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 - -// - -// TLS support -// None -// Built-in TLS 1.3 stack -// MbedTLS -#define MG_TLS MG_TLS_NONE - -// Enable custom mg_millis() -#define MG_ENABLE_CUSTOM_MILLIS 0 - -// 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 - diff --git a/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/device-dashboard.uvguix b/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/device-dashboard.uvguix index 35280a0abf..98de9d223d 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/device-dashboard.uvguix +++ b/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/device-dashboard.uvguix @@ -3668,7 +3668,7 @@ 0 - .\mongoose_custom.h + .\mongoose_config.h 0 1 1 diff --git a/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/device-dashboard.uvoptx b/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/device-dashboard.uvoptx index abb054056a..4a5c3e7b63 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/device-dashboard.uvoptx +++ b/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/device-dashboard.uvoptx @@ -516,8 +516,8 @@ 0 0 0 - .\mongoose_custom.h - mongoose_custom.h + .\mongoose_config.h + mongoose_config.h 0 0 diff --git a/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/device-dashboard.uvprojx b/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/device-dashboard.uvprojx index da08ef3164..0b3f025f2f 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/device-dashboard.uvprojx +++ b/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/device-dashboard.uvprojx @@ -414,9 +414,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h @@ -865,9 +865,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h diff --git a/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/mongoose_custom.h deleted file mode 100644 index 46cde88f40..0000000000 --- a/examples/stm32/nucleo-f746zg-keil-rtx5-lwip/mongoose_custom.h +++ /dev/null @@ -1,54 +0,0 @@ -// See https://mongoose.ws/documentation/#build-options -#pragma once - -// <<< Use Configuration Wizard in Context Menu >>> - -// 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 - -// 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 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 - -// - -// TLS support -// None -// Built-in TLS 1.3 stack -// MbedTLS -#define MG_TLS MG_TLS_NONE - -// Enable custom mg_millis() -#define MG_ENABLE_CUSTOM_MILLIS 0 - -// 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/device-dashboard.uvguix b/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/device-dashboard.uvguix index c107c15d7c..5cfad84ac0 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/device-dashboard.uvguix +++ b/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/device-dashboard.uvguix @@ -3695,7 +3695,7 @@ 0 - .\mongoose_custom.h + .\mongoose_config.h 0 1 1 diff --git a/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/device-dashboard.uvoptx b/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/device-dashboard.uvoptx index 08ed511ca1..136c241598 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/device-dashboard.uvoptx +++ b/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/device-dashboard.uvoptx @@ -502,8 +502,8 @@ 0 0 0 - .\mongoose_custom.h - mongoose_custom.h + .\mongoose_config.h + mongoose_config.h 0 0 diff --git a/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/device-dashboard.uvprojx b/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/device-dashboard.uvprojx index 19a0a2a74c..6dec394d44 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/device-dashboard.uvprojx +++ b/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/device-dashboard.uvprojx @@ -414,9 +414,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h @@ -865,9 +865,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h diff --git a/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/mongoose_custom.h deleted file mode 100644 index 34800f7510..0000000000 --- a/examples/stm32/nucleo-f746zg-keil-rtx5-mdk/mongoose_custom.h +++ /dev/null @@ -1,54 +0,0 @@ -// See https://mongoose.ws/documentation/#build-options -#pragma once - -// <<< Use Configuration Wizard in Context Menu >>> - -// 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 - -// 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 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 - -// - -// TLS support -// None -// Built-in TLS 1.3 stack -// MbedTLS -#define MG_TLS MG_TLS_NONE - -// Enable custom mg_millis() -#define MG_ENABLE_CUSTOM_MILLIS 0 - -// 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/device-dashboard.uvguix b/examples/stm32/nucleo-f746zg-keil-rtx5/device-dashboard.uvguix index 681904bf6a..1441c69627 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx5/device-dashboard.uvguix +++ b/examples/stm32/nucleo-f746zg-keil-rtx5/device-dashboard.uvguix @@ -3650,7 +3650,7 @@ 0 - .\mongoose_custom.h + .\mongoose_config.h 0 1 1 diff --git a/examples/stm32/nucleo-f746zg-keil-rtx5/device-dashboard.uvoptx b/examples/stm32/nucleo-f746zg-keil-rtx5/device-dashboard.uvoptx index 63d31a6b43..93743cd89e 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx5/device-dashboard.uvoptx +++ b/examples/stm32/nucleo-f746zg-keil-rtx5/device-dashboard.uvoptx @@ -476,8 +476,8 @@ 0 0 0 - .\mongoose_custom.h - mongoose_custom.h + .\mongoose_config.h + mongoose_config.h 0 0 diff --git a/examples/stm32/nucleo-f746zg-keil-rtx5/device-dashboard.uvprojx b/examples/stm32/nucleo-f746zg-keil-rtx5/device-dashboard.uvprojx index de4acc5b72..6d3e7cb0d6 100644 --- a/examples/stm32/nucleo-f746zg-keil-rtx5/device-dashboard.uvprojx +++ b/examples/stm32/nucleo-f746zg-keil-rtx5/device-dashboard.uvprojx @@ -414,9 +414,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h @@ -859,9 +859,9 @@ .\mongoose.c - mongoose_custom.h + mongoose_config.h 5 - .\mongoose_custom.h + .\mongoose_config.h diff --git a/examples/stm32/nucleo-f746zg-keil-rtx5/mongoose_custom.h b/examples/stm32/nucleo-f746zg-keil-rtx5/mongoose_custom.h deleted file mode 100644 index 26fb707197..0000000000 --- a/examples/stm32/nucleo-f746zg-keil-rtx5/mongoose_custom.h +++ /dev/null @@ -1,53 +0,0 @@ -// See https://mongoose.ws/documentation/#build-options -#pragma once - -// <<< Use Configuration Wizard in Context Menu >>> - -// 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 - -// 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 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 - -// - -// TLS support -// None -// Built-in TLS 1.3 stack -// MbedTLS -#define MG_TLS MG_TLS_NONE - -// Enable custom mg_millis() -#define MG_ENABLE_CUSTOM_MILLIS 0 - -// 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 - diff --git a/examples/stm32/nucleo-f746zg-make-baremetal-builtin-cmsis_driver/Makefile b/examples/stm32/nucleo-f746zg-make-baremetal-builtin-cmsis_driver/Makefile index 6ac400fdd1..f971f9e9f9 100644 --- a/examples/stm32/nucleo-f746zg-make-baremetal-builtin-cmsis_driver/Makefile +++ b/examples/stm32/nucleo-f746zg-make-baremetal-builtin-cmsis_driver/Makefile @@ -25,7 +25,7 @@ SOURCES += cmsis_mcu/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_eth.c # HAL SOURCES += cmsis_mcu/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc.c SOURCES += cmsis_mcu/Drivers/CMSIS/Device/ST/STM32F7xx/Source/Templates/gcc/startup_stm32f746xx.s # ST startup file. Compiler-dependent! -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md diff --git a/examples/stm32/nucleo-f746zg-make-baremetal-builtin-cmsis_driver/mongoose_custom.h b/examples/stm32/nucleo-f746zg-make-baremetal-builtin-cmsis_driver/mongoose_custom.h deleted file mode 100644 index fd9509a656..0000000000 --- a/examples/stm32/nucleo-f746zg-make-baremetal-builtin-cmsis_driver/mongoose_custom.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_DRIVER_CMSIS 1 -#define MG_ENABLE_LINES 1 diff --git a/examples/stm32/nucleo-f746zg-make-baremetal-builtin-rndis/Makefile b/examples/stm32/nucleo-f746zg-make-baremetal-builtin-rndis/Makefile index b6724ecf2f..a171b35633 100644 --- a/examples/stm32/nucleo-f746zg-make-baremetal-builtin-rndis/Makefile +++ b/examples/stm32/nucleo-f746zg-make-baremetal-builtin-rndis/Makefile @@ -22,7 +22,7 @@ CFLAGS += -Itinyusb/src -Itinyusb/lib/networking CFLAGS += -DSTM32F746xx CFLAGS += -Wno-conversion -Wno-sign-conversion -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c ifeq ($(OS),Windows_NT) diff --git a/examples/stm32/nucleo-f746zg-make-baremetal-builtin-rndis/mongoose_custom.h b/examples/stm32/nucleo-f746zg-make-baremetal-builtin-rndis/mongoose_custom.h deleted file mode 100644 index 02c6900a10..0000000000 --- a/examples/stm32/nucleo-f746zg-make-baremetal-builtin-rndis/mongoose_custom.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 -#define MG_IO_SIZE 512 -#define MG_ENABLE_LINES 1 diff --git a/examples/stm32/nucleo-f746zg-make-baremetal-builtin/Makefile b/examples/stm32/nucleo-f746zg-make-baremetal-builtin/Makefile index 28a3b61b9c..4976bf9e32 100644 --- a/examples/stm32/nucleo-f746zg-make-baremetal-builtin/Makefile +++ b/examples/stm32/nucleo-f746zg-make-baremetal-builtin/Makefile @@ -8,7 +8,7 @@ LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,-- SOURCES = main.c syscalls.c sysinit.c SOURCES += cmsis_f7/Source/Templates/gcc/startup_stm32f746xx.s # ST startup file. Compiler-dependent! -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md diff --git a/examples/stm32/nucleo-f746zg-make-baremetal-builtin/mongoose_custom.h b/examples/stm32/nucleo-f746zg-make-baremetal-builtin/mongoose_custom.h deleted file mode 100644 index 415a61070e..0000000000 --- a/examples/stm32/nucleo-f746zg-make-baremetal-builtin/mongoose_custom.h +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_DRIVER_STM32F 1 -#define MG_ENABLE_LINES 1 -#define MG_ENABLE_TCPIP_PRINT_DEBUG_STATS 1 - -// For static IP configuration, define MG_TCPIP_{IP,MASK,GW} -// By default, those are set to zero, meaning that DHCP is used -// -// #define MG_TCPIP_IP MG_IPV4(192, 168, 0, 10) -// #define MG_TCPIP_GW MG_IPV4(192, 168, 0, 1) -// #define MG_TCPIP_MASK MG_IPV4(255, 255, 255, 0) - -// Set custom MAC address. By default, it is randomly generated -// Using a build-time constant: -// #define MG_SET_MAC_ADDRESS(mac) do { uint8_t buf_[6] = {2,3,4,5,6,7}; memmove(mac, buf_, sizeof(buf_)); } while (0) -// -// Using custom function: -// extern void my_function(unsigned char *mac); -// #define MG_SET_MAC_ADDRESS(mac) my_function(mac) diff --git a/examples/stm32/nucleo-f746zg-make-freertos-builtin/Makefile b/examples/stm32/nucleo-f746zg-make-freertos-builtin/Makefile index 31710c35a7..73e4009a62 100644 --- a/examples/stm32/nucleo-f746zg-make-freertos-builtin/Makefile +++ b/examples/stm32/nucleo-f746zg-make-freertos-builtin/Makefile @@ -14,7 +14,7 @@ SOURCES += FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1/port.c CFLAGS += -IFreeRTOS-Kernel/include CFLAGS += -IFreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1 -Wno-conversion -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md diff --git a/examples/stm32/nucleo-f746zg-make-freertos-builtin/mongoose_custom.h b/examples/stm32/nucleo-f746zg-make-freertos-builtin/mongoose_custom.h deleted file mode 100644 index 89f25b7638..0000000000 --- a/examples/stm32/nucleo-f746zg-make-freertos-builtin/mongoose_custom.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_FREERTOS - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_DRIVER_STM32F 1 -#define MG_IO_SIZE 256 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 - diff --git a/examples/stm32/nucleo-f746zg-make-freertos-tcp/Makefile b/examples/stm32/nucleo-f746zg-make-freertos-tcp/Makefile index 65aecf63eb..eaf2cb9637 100644 --- a/examples/stm32/nucleo-f746zg-make-freertos-tcp/Makefile +++ b/examples/stm32/nucleo-f746zg-make-freertos-tcp/Makefile @@ -28,7 +28,7 @@ CFLAGS += -DSTM32F7xx -Wno-unused-parameter # HAL CFLAGS += -DSTM32F746xx -Wno-sign-compare -Wno-undef -Wno-shadow -Wno-array-bounds -Wno-error -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md diff --git a/examples/stm32/nucleo-f746zg-make-freertos-tcp/mongoose_custom.h b/examples/stm32/nucleo-f746zg-make-freertos-tcp/mongoose_custom.h deleted file mode 100644 index 4f1c189ea2..0000000000 --- a/examples/stm32/nucleo-f746zg-make-freertos-tcp/mongoose_custom.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_FREERTOS - -#define MG_ENABLE_FREERTOS_TCP 1 -#define MG_ENABLE_DRIVER_STM32F 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 - diff --git a/examples/stm32/nucleo-g031-make-baremetal-builtin/Makefile b/examples/stm32/nucleo-g031-make-baremetal-builtin/Makefile index b8134cbd55..5f1cc96e6f 100644 --- a/examples/stm32/nucleo-g031-make-baremetal-builtin/Makefile +++ b/examples/stm32/nucleo-g031-make-baremetal-builtin/Makefile @@ -8,7 +8,7 @@ LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,-- SOURCES = main.c syscalls.c SOURCES += cmsis_g0/Source/Templates/gcc/startup_stm32g031xx.s # ST startup file. Compiler-dependent! -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c # Example specific build options. See README.md @@ -25,7 +25,7 @@ all build example: firmware.bin firmware.bin: firmware.elf arm-none-eabi-objcopy -O binary $< $@ -firmware.elf: cmsis_core cmsis_g0 $(SOURCES) hal.h link.ld Makefile mongoose_custom.h +firmware.elf: cmsis_core cmsis_g0 $(SOURCES) hal.h link.ld Makefile mongoose_config.h arm-none-eabi-gcc $(SOURCES) $(CFLAGS) $(LDFLAGS) -o $@ flash: firmware.bin diff --git a/examples/stm32/nucleo-g031-make-baremetal-builtin/mongoose_custom.h b/examples/stm32/nucleo-g031-make-baremetal-builtin/mongoose_custom.h deleted file mode 100644 index e84b05094b..0000000000 --- a/examples/stm32/nucleo-g031-make-baremetal-builtin/mongoose_custom.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_DRIVER_W5500 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_IO_SIZE 128 -#define MG_ENABLE_LINES 1 diff --git a/examples/stm32/nucleo-h563zi-make-baremetal-builtin/Makefile b/examples/stm32/nucleo-h563zi-make-baremetal-builtin/Makefile index e9405b407f..da19483f61 100644 --- a/examples/stm32/nucleo-h563zi-make-baremetal-builtin/Makefile +++ b/examples/stm32/nucleo-h563zi-make-baremetal-builtin/Makefile @@ -8,7 +8,7 @@ LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,-- SOURCES = main.c syscalls.c sysinit.c SOURCES += cmsis_h5/Source/Templates/gcc/startup_stm32h563xx.s # ST startup file. Compiler-dependent! -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md diff --git a/examples/stm32/nucleo-h563zi-make-baremetal-builtin/mongoose_custom.h b/examples/stm32/nucleo-h563zi-make-baremetal-builtin/mongoose_custom.h deleted file mode 100644 index 351924e1fb..0000000000 --- a/examples/stm32/nucleo-h563zi-make-baremetal-builtin/mongoose_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB -#define MG_OTA MG_OTA_FLASH -#define MG_DEVICE MG_DEVICE_STM32H5 - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_DRIVER_STM32H 1 -#define MG_ENABLE_LINES 1 diff --git a/examples/stm32/nucleo-h563zi-make-freertos-builtin/Makefile b/examples/stm32/nucleo-h563zi-make-freertos-builtin/Makefile index 53d1a83c97..92cab4d20c 100644 --- a/examples/stm32/nucleo-h563zi-make-freertos-builtin/Makefile +++ b/examples/stm32/nucleo-h563zi-make-freertos-builtin/Makefile @@ -15,7 +15,7 @@ SOURCES += FreeRTOS-Kernel/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c CFLAGS += -IFreeRTOS-Kernel/include CFLAGS += -IFreeRTOS-Kernel/portable/GCC/ARM_CM33_NTZ/non_secure -Wno-conversion -Wno-unused-parameter -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md @@ -32,7 +32,7 @@ all build example: firmware.bin firmware.bin: firmware.elf arm-none-eabi-objcopy -O binary $< $@ -firmware.elf: FreeRTOS-Kernel cmsis_core cmsis_h5 $(SOURCES) hal.h link.ld mongoose_custom.h FreeRTOSConfig.h Makefile +firmware.elf: FreeRTOS-Kernel cmsis_core cmsis_h5 $(SOURCES) hal.h link.ld mongoose_config.h FreeRTOSConfig.h Makefile arm-none-eabi-gcc $(SOURCES) $(wildcard FreeRTOS-Kernel/*.c) $(CFLAGS) $(LDFLAGS) -o $@ flash: firmware.bin diff --git a/examples/stm32/nucleo-h563zi-make-freertos-builtin/mongoose_custom.h b/examples/stm32/nucleo-h563zi-make-freertos-builtin/mongoose_custom.h deleted file mode 100644 index 954efdd489..0000000000 --- a/examples/stm32/nucleo-h563zi-make-freertos-builtin/mongoose_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include // we are not using lwIP - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_FREERTOS - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_DRIVER_STM32H 1 -#define MG_IO_SIZE 256 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 - diff --git a/examples/stm32/nucleo-h723zg-make-baremetal-builtin/Makefile b/examples/stm32/nucleo-h723zg-make-baremetal-builtin/Makefile index a7a0a122ec..62adf0c8e4 100644 --- a/examples/stm32/nucleo-h723zg-make-baremetal-builtin/Makefile +++ b/examples/stm32/nucleo-h723zg-make-baremetal-builtin/Makefile @@ -8,7 +8,7 @@ LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,-- SOURCES = main.c syscalls.c sysinit.c SOURCES += cmsis_h7/Source/Templates/gcc/startup_stm32h723xx.s # ST startup file. Compiler-dependent! -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md diff --git a/examples/stm32/nucleo-h723zg-make-baremetal-builtin/mongoose_custom.h b/examples/stm32/nucleo-h723zg-make-baremetal-builtin/mongoose_custom.h deleted file mode 100644 index 338d6b4347..0000000000 --- a/examples/stm32/nucleo-h723zg-make-baremetal-builtin/mongoose_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB -#define MG_OTA MG_OTA_FLASH -#define MG_DEVICE MG_DEVICE_STM32H7 - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_DRIVER_STM32H 1 -#define MG_ENABLE_LINES 1 diff --git a/examples/stm32/nucleo-h723zg-make-freertos-builtin/Makefile b/examples/stm32/nucleo-h723zg-make-freertos-builtin/Makefile index f244d80202..17450e5a88 100644 --- a/examples/stm32/nucleo-h723zg-make-freertos-builtin/Makefile +++ b/examples/stm32/nucleo-h723zg-make-freertos-builtin/Makefile @@ -14,7 +14,7 @@ SOURCES += FreeRTOS-Kernel/portable/GCC/ARM_CM4F/port.c CFLAGS += -IFreeRTOS-Kernel/include CFLAGS += -IFreeRTOS-Kernel/portable/GCC/ARM_CM4F -Wno-conversion -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md @@ -31,7 +31,7 @@ all build example: firmware.bin firmware.bin: firmware.elf arm-none-eabi-objcopy -O binary $< $@ -firmware.elf: FreeRTOS-Kernel cmsis_core cmsis_h7 $(SOURCES) hal.h link.ld mongoose_custom.h +firmware.elf: FreeRTOS-Kernel cmsis_core cmsis_h7 $(SOURCES) hal.h link.ld mongoose_config.h arm-none-eabi-gcc $(SOURCES) $(wildcard FreeRTOS-Kernel/*.c) $(CFLAGS) $(LDFLAGS) -o $@ flash: firmware.bin diff --git a/examples/stm32/nucleo-h723zg-make-freertos-builtin/mongoose_custom.h b/examples/stm32/nucleo-h723zg-make-freertos-builtin/mongoose_custom.h deleted file mode 100644 index 954efdd489..0000000000 --- a/examples/stm32/nucleo-h723zg-make-freertos-builtin/mongoose_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include // we are not using lwIP - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_FREERTOS - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_DRIVER_STM32H 1 -#define MG_IO_SIZE 256 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 - diff --git a/examples/stm32/nucleo-h743zi-cube-baremetal-builtin/Core/Inc/mongoose_custom.h b/examples/stm32/nucleo-h743zi-cube-baremetal-builtin/Core/Inc/mongoose_custom.h deleted file mode 100644 index 6cd87208cc..0000000000 --- a/examples/stm32/nucleo-h743zi-cube-baremetal-builtin/Core/Inc/mongoose_custom.h +++ /dev/null @@ -1,32 +0,0 @@ - -// If we could guess an MG_ARCH so far, preserve it, otherwise try GCC-based -#if defined(MG_ARCH) -#define MG_STMPACK_ARCH MG_ARCH -#undef MG_ARCH -#elif defined(__GNUC__) -#define MG_STMPACK_ARCH MG_ARCH_NEWLIB -#endif - -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_MBEDTLS 0 -#define MG_ARCH MG_STMPACK_ARCH -#define MG_STMPACK_NET 0 -#define MG_ENABLE_CUSTOM_RANDOM 1 - -// Translate to Mongoose macros -#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 - -#if MG_ENABLE_PACKED_FS -#define MG_ENABLE_POSIX_FS 0 -#endif - -// See https://mongoose.ws/documentation/#build-options diff --git a/examples/stm32/nucleo-h743zi-cube-freertos-builtin/Core/Inc/mongoose_custom.h b/examples/stm32/nucleo-h743zi-cube-freertos-builtin/Core/Inc/mongoose_custom.h deleted file mode 100644 index 956a921de1..0000000000 --- a/examples/stm32/nucleo-h743zi-cube-freertos-builtin/Core/Inc/mongoose_custom.h +++ /dev/null @@ -1,32 +0,0 @@ - -// If we could guess an MG_ARCH so far, preserve it, otherwise try GCC-based -#if defined(MG_ARCH) -#define MG_STMPACK_ARCH MG_ARCH -#undef MG_ARCH -#elif defined(__GNUC__) -#define MG_STMPACK_ARCH MG_ARCH_NEWLIB -#endif - -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_CUSTOM_MILLIS 0 -#define MG_ENABLE_MBEDTLS 0 -#define MG_ARCH MG_ARCH_CMSIS_RTOS2 -#define MG_STMPACK_NET 0 -#define MG_ENABLE_CUSTOM_RANDOM 1 - -// Translate to Mongoose macros -#if MG_STMPACK_NET == 0 -#define MG_ENABLE_TCPIP 1 -#elif MG_STMPACK_NET == 1 -#define MG_ENABLE_LWIP 1 -#elif MG_STMPACK_NET == 2 -#define MG_ENABLE_FREERTOS_TCP 1 -#elif MG_STMPACK_NET == 3 -#define MG_ENABLE_RL 1 -#endif - -#if MG_ENABLE_PACKED_FS -#define MG_ENABLE_POSIX_FS 0 -#endif - -// See https://mongoose.ws/documentation/#build-options diff --git a/examples/stm32/nucleo-h743zi-make-baremetal-builtin/Makefile b/examples/stm32/nucleo-h743zi-make-baremetal-builtin/Makefile index 92e00b9271..39f0847882 100644 --- a/examples/stm32/nucleo-h743zi-make-baremetal-builtin/Makefile +++ b/examples/stm32/nucleo-h743zi-make-baremetal-builtin/Makefile @@ -8,7 +8,7 @@ LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,-- SOURCES = main.c syscalls.c sysinit.c SOURCES += cmsis_h7/Source/Templates/gcc/startup_stm32h743xx.s # ST startup file. Compiler-dependent! -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md diff --git a/examples/stm32/nucleo-h743zi-make-baremetal-builtin/mongoose_custom.h b/examples/stm32/nucleo-h743zi-make-baremetal-builtin/mongoose_custom.h deleted file mode 100644 index 338d6b4347..0000000000 --- a/examples/stm32/nucleo-h743zi-make-baremetal-builtin/mongoose_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB -#define MG_OTA MG_OTA_FLASH -#define MG_DEVICE MG_DEVICE_STM32H7 - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_DRIVER_STM32H 1 -#define MG_ENABLE_LINES 1 diff --git a/examples/stm32/nucleo-h743zi-make-freertos-builtin/Makefile b/examples/stm32/nucleo-h743zi-make-freertos-builtin/Makefile index 9b688aab19..3ea7ef4e51 100644 --- a/examples/stm32/nucleo-h743zi-make-freertos-builtin/Makefile +++ b/examples/stm32/nucleo-h743zi-make-freertos-builtin/Makefile @@ -14,7 +14,7 @@ SOURCES += FreeRTOS-Kernel/portable/GCC/ARM_CM4F/port.c CFLAGS += -IFreeRTOS-Kernel/include CFLAGS += -IFreeRTOS-Kernel/portable/GCC/ARM_CM4F -Wno-conversion -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md @@ -31,7 +31,7 @@ all build example: firmware.bin firmware.bin: firmware.elf arm-none-eabi-objcopy -O binary $< $@ -firmware.elf: FreeRTOS-Kernel cmsis_core cmsis_h7 $(SOURCES) hal.h link.ld mongoose_custom.h +firmware.elf: FreeRTOS-Kernel cmsis_core cmsis_h7 $(SOURCES) hal.h link.ld mongoose_config.h arm-none-eabi-gcc $(SOURCES) $(wildcard FreeRTOS-Kernel/*.c) $(CFLAGS) $(LDFLAGS) -o $@ flash: firmware.bin diff --git a/examples/stm32/nucleo-h743zi-make-freertos-builtin/mongoose_custom.h b/examples/stm32/nucleo-h743zi-make-freertos-builtin/mongoose_custom.h deleted file mode 100644 index 954efdd489..0000000000 --- a/examples/stm32/nucleo-h743zi-make-freertos-builtin/mongoose_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include // we are not using lwIP - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_FREERTOS - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_DRIVER_STM32H 1 -#define MG_IO_SIZE 256 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 - diff --git a/examples/stm32/stm32h573i-dk-make-baremetal-builtin/Makefile b/examples/stm32/stm32h573i-dk-make-baremetal-builtin/Makefile index 1edb5e71dd..36011272e5 100644 --- a/examples/stm32/stm32h573i-dk-make-baremetal-builtin/Makefile +++ b/examples/stm32/stm32h573i-dk-make-baremetal-builtin/Makefile @@ -8,7 +8,7 @@ LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,-- SOURCES = main.c syscalls.c sysinit.c SOURCES += cmsis_h5/Source/Templates/gcc/startup_stm32h573xx.s # ST startup file. Compiler-dependent! -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md diff --git a/examples/stm32/stm32h573i-dk-make-baremetal-builtin/mongoose_custom.h b/examples/stm32/stm32h573i-dk-make-baremetal-builtin/mongoose_custom.h deleted file mode 100644 index 351924e1fb..0000000000 --- a/examples/stm32/stm32h573i-dk-make-baremetal-builtin/mongoose_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB -#define MG_OTA MG_OTA_FLASH -#define MG_DEVICE MG_DEVICE_STM32H5 - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_DRIVER_STM32H 1 -#define MG_ENABLE_LINES 1 diff --git a/examples/stm32/stm32h573i-dk-make-freertos-builtin/Makefile b/examples/stm32/stm32h573i-dk-make-freertos-builtin/Makefile index 4cf13c7716..f19dbd6f3f 100644 --- a/examples/stm32/stm32h573i-dk-make-freertos-builtin/Makefile +++ b/examples/stm32/stm32h573i-dk-make-freertos-builtin/Makefile @@ -15,7 +15,7 @@ SOURCES += FreeRTOS-Kernel/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c CFLAGS += -IFreeRTOS-Kernel/include CFLAGS += -IFreeRTOS-Kernel/portable/GCC/ARM_CM33_NTZ/non_secure -Wno-conversion -Wno-unused-parameter -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md @@ -32,7 +32,7 @@ all build example: firmware.bin firmware.bin: firmware.elf arm-none-eabi-objcopy -O binary $< $@ -firmware.elf: FreeRTOS-Kernel cmsis_core cmsis_h5 $(SOURCES) hal.h link.ld mongoose_custom.h FreeRTOSConfig.h Makefile +firmware.elf: FreeRTOS-Kernel cmsis_core cmsis_h5 $(SOURCES) hal.h link.ld mongoose_config.h FreeRTOSConfig.h Makefile arm-none-eabi-gcc $(SOURCES) $(wildcard FreeRTOS-Kernel/*.c) $(CFLAGS) $(LDFLAGS) -o $@ flash: firmware.bin diff --git a/examples/stm32/stm32h573i-dk-make-freertos-builtin/mongoose_custom.h b/examples/stm32/stm32h573i-dk-make-freertos-builtin/mongoose_custom.h deleted file mode 100644 index 954efdd489..0000000000 --- a/examples/stm32/stm32h573i-dk-make-freertos-builtin/mongoose_custom.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include // we are not using lwIP - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_FREERTOS - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_DRIVER_STM32H 1 -#define MG_IO_SIZE 256 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 - diff --git a/examples/stm32/stm32h747i-disco-make-baremetal-builtin/Makefile b/examples/stm32/stm32h747i-disco-make-baremetal-builtin/Makefile index 24dc8e8e4b..140aa3de58 100644 --- a/examples/stm32/stm32h747i-disco-make-baremetal-builtin/Makefile +++ b/examples/stm32/stm32h747i-disco-make-baremetal-builtin/Makefile @@ -8,7 +8,7 @@ LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,-- SOURCES = main.c syscalls.c sysinit.c SOURCES += cmsis_h7/Source/Templates/gcc/startup_stm32h747xx.s # ST startup file. Compiler-dependent! -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md diff --git a/examples/stm32/stm32h747i-disco-make-baremetal-builtin/mongoose_custom.h b/examples/stm32/stm32h747i-disco-make-baremetal-builtin/mongoose_custom.h deleted file mode 100644 index 50fd16b9f7..0000000000 --- a/examples/stm32/stm32h747i-disco-make-baremetal-builtin/mongoose_custom.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB -#define MG_OTA MG_OTA_FLASH -#define MG_DEVICE MG_DEVICE_STM32H7 - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_DRIVER_STM32H 1 diff --git a/examples/ti/ek-tm4c1294xl-make-baremetal-builtin-rndis/Makefile b/examples/ti/ek-tm4c1294xl-make-baremetal-builtin-rndis/Makefile index c3367ebfe8..9ebe119ae7 100644 --- a/examples/ti/ek-tm4c1294xl-make-baremetal-builtin-rndis/Makefile +++ b/examples/ti/ek-tm4c1294xl-make-baremetal-builtin-rndis/Makefile @@ -22,7 +22,7 @@ CFLAGS += -Itinyusb/src -Itinyusb/lib/networking CFLAGS += -DTM4C1294NCPDT CFLAGS += -Wno-conversion -Wno-sign-conversion -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c ifeq ($(OS),Windows_NT) diff --git a/examples/ti/ek-tm4c1294xl-make-baremetal-builtin-rndis/mongoose_custom.h b/examples/ti/ek-tm4c1294xl-make-baremetal-builtin-rndis/mongoose_custom.h deleted file mode 100644 index 2accd1c2b5..0000000000 --- a/examples/ti/ek-tm4c1294xl-make-baremetal-builtin-rndis/mongoose_custom.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_PACKED_FS 1 -#define MG_IO_SIZE 256 -#define MG_ENABLE_LINES 1 diff --git a/examples/ti/ek-tm4c1294xl-make-baremetal-builtin/Makefile b/examples/ti/ek-tm4c1294xl-make-baremetal-builtin/Makefile index e268db9a96..1ae8b50b33 100644 --- a/examples/ti/ek-tm4c1294xl-make-baremetal-builtin/Makefile +++ b/examples/ti/ek-tm4c1294xl-make-baremetal-builtin/Makefile @@ -8,7 +8,7 @@ LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,-- SOURCES = main.c syscalls.c sysinit.c SOURCES += startup.c # startup file. Compiler-dependent! -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md diff --git a/examples/ti/ek-tm4c1294xl-make-baremetal-builtin/mongoose_custom.h b/examples/ti/ek-tm4c1294xl-make-baremetal-builtin/mongoose_custom.h deleted file mode 100644 index 522311f1e7..0000000000 --- a/examples/ti/ek-tm4c1294xl-make-baremetal-builtin/mongoose_custom.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_IO_SIZE 256 -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_DRIVER_TM4C 1 -#define MG_ENABLE_LINES 1 diff --git a/examples/ti/ek-tm4c1294xl-make-freertos-builtin/Makefile b/examples/ti/ek-tm4c1294xl-make-freertos-builtin/Makefile index 0fbd8aeb2b..e98b1c75f7 100644 --- a/examples/ti/ek-tm4c1294xl-make-freertos-builtin/Makefile +++ b/examples/ti/ek-tm4c1294xl-make-freertos-builtin/Makefile @@ -14,7 +14,7 @@ SOURCES += FreeRTOS-Kernel/portable/GCC/ARM_CM4F/port.c CFLAGS += -IFreeRTOS-Kernel/include CFLAGS += -IFreeRTOS-Kernel/portable/GCC/ARM_CM4F -Wno-conversion -# Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_config.h SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md diff --git a/examples/ti/ek-tm4c1294xl-make-freertos-builtin/mongoose_custom.h b/examples/ti/ek-tm4c1294xl-make-freertos-builtin/mongoose_custom.h deleted file mode 100644 index c6b9afb6bc..0000000000 --- a/examples/ti/ek-tm4c1294xl-make-freertos-builtin/mongoose_custom.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_FREERTOS - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_DRIVER_TM4C 1 -#define MG_IO_SIZE 256 -#define MG_ENABLE_PACKED_FS 1 - diff --git a/examples/wch/ch32v307-make-baremetal-builtin/Makefile b/examples/wch/ch32v307-make-baremetal-builtin/Makefile index 3e52679ab4..14b77f438d 100644 --- a/examples/wch/ch32v307-make-baremetal-builtin/Makefile +++ b/examples/wch/ch32v307-make-baremetal-builtin/Makefile @@ -27,7 +27,7 @@ firmware.bin: firmware.elf $(PREFIX)-objcopy -O binary $< $@ $(PREFIX)-size --format=berkeley $< -firmware.elf: $(SOURCES) hal.h mongoose_custom.h Makefile +firmware.elf: $(SOURCES) hal.h mongoose_config.h Makefile $(PREFIX)-gcc $(SOURCES) $(CFLAGS) $(LDFLAGS) $(CFLAGS_EXTRA) -o $@ flash: firmware.bin diff --git a/examples/wch/ch32v307-make-baremetal-builtin/mongoose_custom.h b/examples/wch/ch32v307-make-baremetal-builtin/mongoose_custom.h deleted file mode 100644 index d4d0185167..0000000000 --- a/examples/wch/ch32v307-make-baremetal-builtin/mongoose_custom.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -// See https://mongoose.ws/documentation/#build-options -#define MG_ARCH MG_ARCH_NEWLIB -#define MG_OTA MG_OTA_FLASH -#define MG_DEVICE MG_DEVICE_CH32V307 - -#define MG_ENABLE_TCPIP 1 -#define MG_ENABLE_CUSTOM_MILLIS 1 -#define MG_ENABLE_CUSTOM_RANDOM 1 -#define MG_ENABLE_PACKED_FS 1 -#define MG_ENABLE_POSIX_FS 0 -#define MG_ENABLE_DRIVER_STM32F 1 -#define MG_ENABLE_LINES 1 -#define MG_IO_SIZE 256 diff --git a/mongoose.c b/mongoose.c index 9fff495224..bb9c36dae6 100644 --- a/mongoose.c +++ b/mongoose.c @@ -15559,11 +15559,12 @@ struct mg_tcpip_driver mg_tcpip_driver_imxrt = {mg_tcpip_driver_imxrt_init, #endif -enum { // ID1 ID2 - MG_PHY_KSZ8x = 0x22, // 0022 1561 - KSZ8081RNB - MG_PHY_DP83x = 0x2000, // 2000 a140 - TI DP83825I - MG_PHY_LAN87x = 0x7, // 0007 c0fx - LAN8720 - MG_PHY_RTL8201 = 0x1C // 001c c816 - RTL8201 +enum { // ID1 ID2 + MG_PHY_KSZ8x = 0x22, // 0022 1561 - KSZ8081RNB + MG_PHY_DP83x = 0x2000, // 2000 a140 - TI DP83825I + MG_PHY_DP83867 = 0xa231, // 2000 a231 - TI DP83867I + MG_PHY_LAN87x = 0x7, // 0007 c0fx - LAN8720 + MG_PHY_RTL8201 = 0x1C // 001c c816 - RTL8201 }; enum { @@ -15572,6 +15573,7 @@ enum { MG_PHY_REG_ID1 = 2, MG_PHY_REG_ID2 = 3, MG_PHY_DP83x_REG_PHYSTS = 16, + MG_PHY_DP83867_REG_PHYSTS = 17, MG_PHY_DP83x_REG_RCSR = 23, MG_PHY_DP83x_REG_LEDCR = 24, MG_PHY_KSZ8x_REG_PC1R = 30, @@ -15584,7 +15586,12 @@ enum { static const char *mg_phy_id_to_str(uint16_t id1, uint16_t id2) { switch (id1) { case MG_PHY_DP83x: - return "DP83x"; + switch (id2) { + case MG_PHY_DP83867: + return "DP83867"; + default: + return "DP83x"; + } case MG_PHY_KSZ8x: return "KSZ8x"; case MG_PHY_LAN87x: @@ -15609,9 +15616,9 @@ void mg_phy_init(struct mg_phy *phy, uint8_t phy_addr, uint8_t config) { if (config & MG_PHY_CLOCKS_MAC) { // Use PHY crystal oscillator (preserve defaults) // nothing to do - } else { // MAC clocks PHY, PHY has no xtal + } else { // MAC clocks PHY, PHY has no xtal // Enable 50 MHz external ref clock at XI (preserve defaults) - if (id1 == MG_PHY_DP83x) { + if (id1 == MG_PHY_DP83x && id2 != MG_PHY_DP83867) { phy->write_reg(phy_addr, MG_PHY_DP83x_REG_RCSR, MG_BIT(7) | MG_BIT(0)); } else if (id1 == MG_PHY_KSZ8x) { phy->write_reg(phy_addr, MG_PHY_KSZ8x_REG_PC2R, @@ -15644,9 +15651,18 @@ bool mg_phy_up(struct mg_phy *phy, uint8_t phy_addr, bool *full_duplex, if (up && full_duplex != NULL && speed != NULL) { uint16_t id1 = phy->read_reg(phy_addr, MG_PHY_REG_ID1); if (id1 == MG_PHY_DP83x) { - uint16_t physts = phy->read_reg(phy_addr, MG_PHY_DP83x_REG_PHYSTS); - *full_duplex = physts & MG_BIT(2); - *speed = (physts & MG_BIT(1)) ? MG_PHY_SPEED_10M : MG_PHY_SPEED_100M; + uint16_t id2 = phy->read_reg(phy_addr, MG_PHY_REG_ID2); + if (id2 == MG_PHY_DP83867) { + uint16_t physts = phy->read_reg(phy_addr, MG_PHY_DP83867_REG_PHYSTS); + *full_duplex = physts & MG_BIT(13); + *speed = (physts & MG_BIT(15)) ? MG_PHY_SPEED_1000M + : (physts & MG_BIT(14)) ? MG_PHY_SPEED_100M + : MG_PHY_SPEED_10M; + } else { + uint16_t physts = phy->read_reg(phy_addr, MG_PHY_DP83x_REG_PHYSTS); + *full_duplex = physts & MG_BIT(2); + *speed = (physts & MG_BIT(1)) ? MG_PHY_SPEED_10M : MG_PHY_SPEED_100M; + } } else if (id1 == MG_PHY_KSZ8x) { uint16_t pc1r = phy->read_reg(phy_addr, MG_PHY_KSZ8x_REG_PC1R); *full_duplex = pc1r & MG_BIT(2); diff --git a/mongoose.h b/mongoose.h index 8da1e4f327..f37edc1029 100644 --- a/mongoose.h +++ b/mongoose.h @@ -27,7 +27,7 @@ extern "C" { #endif -#define MG_ARCH_CUSTOM 0 // User creates its own mongoose_custom.h +#define MG_ARCH_CUSTOM 0 // User creates its own mongoose_config.h #define MG_ARCH_UNIX 1 // Linux, BSD, Mac, ... #define MG_ARCH_WIN32 2 // Windows #define MG_ARCH_ESP32 3 // ESP32 @@ -67,7 +67,7 @@ extern "C" { #endif // !defined(MG_ARCH) #if !defined(MG_ARCH) || (MG_ARCH == MG_ARCH_CUSTOM) -#include "mongoose_custom.h" // keep this include +#include "mongoose_config.h" // keep this include #endif #if !defined(MG_ARCH) diff --git a/src/arch.h b/src/arch.h index cf93f31db4..ac0282901e 100644 --- a/src/arch.h +++ b/src/arch.h @@ -1,6 +1,6 @@ #pragma once -#define MG_ARCH_CUSTOM 0 // User creates its own mongoose_custom.h +#define MG_ARCH_CUSTOM 0 // User creates its own mongoose_config.h #define MG_ARCH_UNIX 1 // Linux, BSD, Mac, ... #define MG_ARCH_WIN32 2 // Windows #define MG_ARCH_ESP32 3 // ESP32 @@ -40,7 +40,7 @@ #endif // !defined(MG_ARCH) #if !defined(MG_ARCH) || (MG_ARCH == MG_ARCH_CUSTOM) -#include "mongoose_custom.h" // keep this include +#include "mongoose_config.h" // keep this include #endif #if !defined(MG_ARCH)