From abdd14b0a1b2b051be3095e590710a99d519991a Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Tue, 7 Nov 2023 16:47:04 -0300 Subject: [PATCH] standardize build options --- .../Makefile | 6 ++---- .../mongoose_custom.h | 11 +++++++++++ .../nucleo-f429zi-make-baremetal-builtin/Makefile | 6 ++---- .../mongoose_custom.h | 11 +++++++++++ .../nucleo-f429zi-make-freertos-builtin/Makefile | 6 +++--- .../mongoose_custom.h | 1 + .../Makefile | 7 ++----- .../mongoose_custom.h | 11 +++++++++++ .../Makefile | 6 ++---- .../mongoose_custom.h | 11 +++++++++++ .../nucleo-f746zg-make-baremetal-builtin/Makefile | 7 ++----- .../mongoose_custom.h | 11 +++++++++++ .../nucleo-f746zg-make-freertos-builtin/Makefile | 6 +++--- .../mongoose_custom.h | 1 + .../stm32/nucleo-f746zg-make-freertos-tcp/Makefile | 6 +++--- .../nucleo-f746zg-make-freertos-tcp/mongoose_custom.h | 1 + .../stm32/nucleo-g031-make-baremetal-builtin/Makefile | 9 +++++++-- .../mongoose_custom.h | 1 + .../nucleo-h563zi-make-baremetal-builtin/Makefile | 5 ++++- .../mongoose_custom.h | 1 + .../nucleo-h563zi-make-freertos-builtin/Makefile | 6 +++--- .../mongoose_custom.h | 1 + .../nucleo-h723zg-make-baremetal-builtin/Makefile | 5 ++++- .../mongoose_custom.h | 1 + .../nucleo-h723zg-make-freertos-builtin/Makefile | 6 +++--- .../mongoose_custom.h | 1 + .../nucleo-h743zi-make-baremetal-builtin/Makefile | 5 ++++- .../mongoose_custom.h | 1 + .../nucleo-h743zi-make-freertos-builtin/Makefile | 6 +++--- .../mongoose_custom.h | 1 + 30 files changed, 112 insertions(+), 45 deletions(-) create mode 100644 examples/stm32/nucleo-f429zi-make-baremetal-builtin-rndis/mongoose_custom.h create mode 100644 examples/stm32/nucleo-f429zi-make-baremetal-builtin/mongoose_custom.h create mode 100644 examples/stm32/nucleo-f746zg-make-baremetal-builtin-cmsis_driver/mongoose_custom.h create mode 100644 examples/stm32/nucleo-f746zg-make-baremetal-builtin-rndis/mongoose_custom.h create mode 100644 examples/stm32/nucleo-f746zg-make-baremetal-builtin/mongoose_custom.h diff --git a/examples/stm32/nucleo-f429zi-make-baremetal-builtin-rndis/Makefile b/examples/stm32/nucleo-f429zi-make-baremetal-builtin-rndis/Makefile index f6531fb152..9b8eb52b90 100644 --- a/examples/stm32/nucleo-f429zi-make-baremetal-builtin-rndis/Makefile +++ b/examples/stm32/nucleo-f429zi-make-baremetal-builtin-rndis/Makefile @@ -2,7 +2,7 @@ CFLAGS = -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion CFLAGS += -Wformat-truncation -fno-common -Wconversion -Wno-sign-conversion CFLAGS += -g3 -Os -ffunction-sections -fdata-sections CFLAGS += -I. -Icmsis_core/CMSIS/Core/Include -Icmsis_f4/Include -CFLAGS += -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 +CFLAGS += -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 $(CFLAGS_EXTRA) LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map SOURCES = main.c syscalls.c sysinit.c @@ -22,10 +22,8 @@ CFLAGS += -Itinyusb/src -Itinyusb/lib/networking CFLAGS += -DSTM32F429xx CFLAGS += -Wno-conversion -Wno-sign-conversion -# Mongoose-specific. See https://mongoose.ws/documentation/#build-options +# Mongoose options are defined in mongoose_custom.h SOURCES += mongoose.c -CFLAGS += -DMG_ENABLE_TCPIP=1 -DMG_ARCH=MG_ARCH_NEWLIB -DMG_ENABLE_CUSTOM_MILLIS=1 -CFLAGS += -DMG_ENABLE_CUSTOM_RANDOM=1 -DMG_IO_SIZE=512 -DMG_ENABLE_DRIVER_STM32=1 $(CFLAGS_EXTRA) ifeq ($(OS),Windows_NT) RM = cmd /C del /Q /F /S 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 new file mode 100644 index 0000000000..02c6900a10 --- /dev/null +++ b/examples/stm32/nucleo-f429zi-make-baremetal-builtin-rndis/mongoose_custom.h @@ -0,0 +1,11 @@ +#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 dd98fbc1ff..67757c70e1 100644 --- a/examples/stm32/nucleo-f429zi-make-baremetal-builtin/Makefile +++ b/examples/stm32/nucleo-f429zi-make-baremetal-builtin/Makefile @@ -2,16 +2,14 @@ CFLAGS = -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion CFLAGS += -Wformat-truncation -fno-common -Wconversion -Wno-sign-conversion CFLAGS += -g3 -Os -ffunction-sections -fdata-sections CFLAGS += -I. -Icmsis_core/CMSIS/Core/Include -Icmsis_f4/Include -CFLAGS += -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 +CFLAGS += -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 $(CFLAGS_EXTRA) LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map SOURCES = main.c syscalls.c sysinit.c SOURCES += cmsis_f4/Source/Templates/gcc/startup_stm32f429xx.s # ST startup file. Compiler-dependent! -# Mongoose-specific source code files and build options. See https://mongoose.ws/documentation/#build-options +# Mongoose options are defined in mongoose_custom.h SOURCES += mongoose.c net.c packed_fs.c -CFLAGS += -DMG_ENABLE_TCPIP=1 -DMG_ARCH=MG_ARCH_NEWLIB -DMG_ENABLE_CUSTOM_MILLIS=1 -CFLAGS += -DMG_ENABLE_CUSTOM_RANDOM=1 -DMG_ENABLE_PACKED_FS=1 -DMG_ENABLE_DRIVER_STM32=1 $(CFLAGS_EXTRA) # Example specific build options. See README.md CFLAGS += -DHTTP_URL=\"http://0.0.0.0/\" diff --git a/examples/stm32/nucleo-f429zi-make-baremetal-builtin/mongoose_custom.h b/examples/stm32/nucleo-f429zi-make-baremetal-builtin/mongoose_custom.h new file mode 100644 index 0000000000..04aa160a22 --- /dev/null +++ b/examples/stm32/nucleo-f429zi-make-baremetal-builtin/mongoose_custom.h @@ -0,0 +1,11 @@ +#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_STM32 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 33732751c1..7725962347 100644 --- a/examples/stm32/nucleo-f429zi-make-freertos-builtin/Makefile +++ b/examples/stm32/nucleo-f429zi-make-freertos-builtin/Makefile @@ -2,7 +2,7 @@ CFLAGS = -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion CFLAGS += -Wformat-truncation -fno-common -Wconversion -Wno-sign-conversion CFLAGS += -g3 -Os -ffunction-sections -fdata-sections CFLAGS += -I. -Icmsis_core/CMSIS/Core/Include -Icmsis_f4/Include -CFLAGS += -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 +CFLAGS += -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 $(CFLAGS_EXTRA) LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map SOURCES = main.c syscalls.c sysinit.c @@ -14,8 +14,8 @@ SOURCES += FreeRTOS-Kernel/portable/GCC/ARM_CM4F/port.c CFLAGS += -IFreeRTOS-Kernel/include CFLAGS += -IFreeRTOS-Kernel/portable/GCC/ARM_CM4F -Wno-conversion -SOURCES += mongoose.c net.c packed_fs.c -CFLAGS += -DMG_ENABLE_DRIVER_STM32=1 $(CFLAGS_EXTRA) # Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_custom.h +SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md CFLAGS += -DHTTP_URL=\"http://0.0.0.0/\" diff --git a/examples/stm32/nucleo-f429zi-make-freertos-builtin/mongoose_custom.h b/examples/stm32/nucleo-f429zi-make-freertos-builtin/mongoose_custom.h index 22def7938c..d4a1b6a89d 100644 --- a/examples/stm32/nucleo-f429zi-make-freertos-builtin/mongoose_custom.h +++ b/examples/stm32/nucleo-f429zi-make-freertos-builtin/mongoose_custom.h @@ -2,6 +2,7 @@ // See https://mongoose.ws/documentation/#build-options #define MG_ARCH MG_ARCH_FREERTOS + #define MG_ENABLE_TCPIP 1 #define MG_ENABLE_DRIVER_STM32 1 #define MG_IO_SIZE 256 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 a9548799b2..6ac400fdd1 100644 --- a/examples/stm32/nucleo-f746zg-make-baremetal-builtin-cmsis_driver/Makefile +++ b/examples/stm32/nucleo-f746zg-make-baremetal-builtin-cmsis_driver/Makefile @@ -13,7 +13,7 @@ CFLAGS += -Icmsis_mcu/MDK/Templates/Inc/ # pull stm32f7xx CFLAGS += -DRTE_DEVICE_HAL_ETH -DRTE_DEVICE_HAL_GPIO -DRTE_DEVICE_HAL_RCC # configure it CFLAGS += -DRTE_DEVICE_HAL_COMMON -DRTE_DEVICE_FRAMEWORK_CUBE_MX -CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 +CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 $(CFLAGS_EXTRA) LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map SOURCES = main.c syscalls.c sysinit.c @@ -25,11 +25,8 @@ 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-specific. See https://mongoose.ws/documentation/#build-options +# Mongoose options are defined in mongoose_custom.h SOURCES += mongoose.c net.c packed_fs.c -CFLAGS += -DMG_ENABLE_TCPIP=1 -DMG_ARCH=MG_ARCH_NEWLIB -DMG_ENABLE_CUSTOM_MILLIS=1 -CFLAGS += -DMG_ENABLE_CUSTOM_RANDOM=1 -DMG_ENABLE_PACKED_FS=1 -CFLAGS += -DMG_ENABLE_DRIVER_CMSIS=1 $(CFLAGS_EXTRA) # Example specific build options. See README.md CFLAGS += -DHTTP_URL=\"http://0.0.0.0/\" -DHTTPS_URL=\"https://0.0.0.0/\" 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 new file mode 100644 index 0000000000..fd9509a656 --- /dev/null +++ b/examples/stm32/nucleo-f746zg-make-baremetal-builtin-cmsis_driver/mongoose_custom.h @@ -0,0 +1,11 @@ +#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 8f25ac9ebb..b6724ecf2f 100644 --- a/examples/stm32/nucleo-f746zg-make-baremetal-builtin-rndis/Makefile +++ b/examples/stm32/nucleo-f746zg-make-baremetal-builtin-rndis/Makefile @@ -2,7 +2,7 @@ CFLAGS = -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion CFLAGS += -Wformat-truncation -fno-common -Wconversion -Wno-sign-conversion CFLAGS += -g3 -Os -ffunction-sections -fdata-sections CFLAGS += -I. -Icmsis_core/CMSIS/Core/Include -Icmsis_f7/Include -CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 +CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 $(CFLAGS_EXTRA) LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map SOURCES = main.c syscalls.c sysinit.c @@ -22,10 +22,8 @@ CFLAGS += -Itinyusb/src -Itinyusb/lib/networking CFLAGS += -DSTM32F746xx CFLAGS += -Wno-conversion -Wno-sign-conversion -# Mongoose-specific. See https://mongoose.ws/documentation/#build-options +# Mongoose options are defined in mongoose_custom.h SOURCES += mongoose.c -CFLAGS += -DMG_ENABLE_TCPIP=1 -DMG_ARCH=MG_ARCH_NEWLIB -DMG_ENABLE_CUSTOM_MILLIS=1 -CFLAGS += -DMG_ENABLE_CUSTOM_RANDOM=1 -DMG_IO_SIZE=512 -DMG_ENABLE_DRIVER_STM32=1 $(CFLAGS_EXTRA) ifeq ($(OS),Windows_NT) RM = cmd /C del /Q /F /S 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 new file mode 100644 index 0000000000..02c6900a10 --- /dev/null +++ b/examples/stm32/nucleo-f746zg-make-baremetal-builtin-rndis/mongoose_custom.h @@ -0,0 +1,11 @@ +#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 c92dd61f33..28a3b61b9c 100644 --- a/examples/stm32/nucleo-f746zg-make-baremetal-builtin/Makefile +++ b/examples/stm32/nucleo-f746zg-make-baremetal-builtin/Makefile @@ -2,17 +2,14 @@ CFLAGS = -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion CFLAGS += -Wformat-truncation -fno-common -Wconversion -Wno-sign-conversion CFLAGS += -g3 -Os -ffunction-sections -fdata-sections CFLAGS += -I. -Icmsis_core/CMSIS/Core/Include -Icmsis_f7/Include -CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 +CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 $(CFLAGS_EXTRA) LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map SOURCES = main.c syscalls.c sysinit.c SOURCES += cmsis_f7/Source/Templates/gcc/startup_stm32f746xx.s # ST startup file. Compiler-dependent! -# Mongoose-specific. See https://mongoose.ws/documentation/#build-options +# Mongoose options are defined in mongoose_custom.h SOURCES += mongoose.c net.c packed_fs.c -CFLAGS += -DMG_ENABLE_TCPIP=1 -DMG_ARCH=MG_ARCH_NEWLIB -DMG_ENABLE_CUSTOM_MILLIS=1 -CFLAGS += -DMG_ENABLE_CUSTOM_RANDOM=1 -DMG_ENABLE_PACKED_FS=1 -CFLAGS += -DMG_ENABLE_DRIVER_STM32=1 $(CFLAGS_EXTRA) # Example specific build options. See README.md CFLAGS += -DHTTP_URL=\"http://0.0.0.0/\" -DHTTPS_URL=\"https://0.0.0.0/\" diff --git a/examples/stm32/nucleo-f746zg-make-baremetal-builtin/mongoose_custom.h b/examples/stm32/nucleo-f746zg-make-baremetal-builtin/mongoose_custom.h new file mode 100644 index 0000000000..04aa160a22 --- /dev/null +++ b/examples/stm32/nucleo-f746zg-make-baremetal-builtin/mongoose_custom.h @@ -0,0 +1,11 @@ +#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_STM32 1 +#define MG_ENABLE_LINES 1 diff --git a/examples/stm32/nucleo-f746zg-make-freertos-builtin/Makefile b/examples/stm32/nucleo-f746zg-make-freertos-builtin/Makefile index 2e2e97381e..31710c35a7 100644 --- a/examples/stm32/nucleo-f746zg-make-freertos-builtin/Makefile +++ b/examples/stm32/nucleo-f746zg-make-freertos-builtin/Makefile @@ -2,7 +2,7 @@ CFLAGS = -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion CFLAGS += -Wformat-truncation -fno-common -Wconversion -Wno-sign-conversion CFLAGS += -g3 -Os -ffunction-sections -fdata-sections CFLAGS += -I. -Icmsis_core/CMSIS/Core/Include -Icmsis_f7/Include -CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 +CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 $(CFLAGS_EXTRA) LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map SOURCES = main.c syscalls.c sysinit.c @@ -14,8 +14,8 @@ SOURCES += FreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1/port.c CFLAGS += -IFreeRTOS-Kernel/include CFLAGS += -IFreeRTOS-Kernel/portable/GCC/ARM_CM7/r0p1 -Wno-conversion -SOURCES += mongoose.c net.c packed_fs.c -CFLAGS += -DMG_ENABLE_DRIVER_STM32=1 $(CFLAGS_EXTRA) # Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_custom.h +SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md CFLAGS += -DHTTP_URL=\"http://0.0.0.0/\" diff --git a/examples/stm32/nucleo-f746zg-make-freertos-builtin/mongoose_custom.h b/examples/stm32/nucleo-f746zg-make-freertos-builtin/mongoose_custom.h index 22def7938c..d4a1b6a89d 100644 --- a/examples/stm32/nucleo-f746zg-make-freertos-builtin/mongoose_custom.h +++ b/examples/stm32/nucleo-f746zg-make-freertos-builtin/mongoose_custom.h @@ -2,6 +2,7 @@ // See https://mongoose.ws/documentation/#build-options #define MG_ARCH MG_ARCH_FREERTOS + #define MG_ENABLE_TCPIP 1 #define MG_ENABLE_DRIVER_STM32 1 #define MG_IO_SIZE 256 diff --git a/examples/stm32/nucleo-f746zg-make-freertos-tcp/Makefile b/examples/stm32/nucleo-f746zg-make-freertos-tcp/Makefile index a28c1510bf..65aecf63eb 100644 --- a/examples/stm32/nucleo-f746zg-make-freertos-tcp/Makefile +++ b/examples/stm32/nucleo-f746zg-make-freertos-tcp/Makefile @@ -2,7 +2,7 @@ CFLAGS = -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion CFLAGS += -Wformat-truncation -fno-common -Wconversion -Wno-sign-conversion CFLAGS += -g3 -Os -ffunction-sections -fdata-sections CFLAGS += -I. -Icmsis_core/CMSIS/Core/Include -Icmsis_f7/Include -CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 +CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 $(CFLAGS_EXTRA) LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map SOURCES = main.c syscalls.c sysinit.c @@ -28,8 +28,8 @@ CFLAGS += -DSTM32F7xx -Wno-unused-parameter # HAL CFLAGS += -DSTM32F746xx -Wno-sign-compare -Wno-undef -Wno-shadow -Wno-array-bounds -Wno-error -SOURCES += mongoose.c net.c packed_fs.c -CFLAGS += -DMG_ENABLE_DRIVER_STM32=1 $(CFLAGS_EXTRA) # Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_custom.h +SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md CFLAGS += -DHTTP_URL=\"http://0.0.0.0/\" diff --git a/examples/stm32/nucleo-f746zg-make-freertos-tcp/mongoose_custom.h b/examples/stm32/nucleo-f746zg-make-freertos-tcp/mongoose_custom.h index 047eb45036..d15ee38afd 100644 --- a/examples/stm32/nucleo-f746zg-make-freertos-tcp/mongoose_custom.h +++ b/examples/stm32/nucleo-f746zg-make-freertos-tcp/mongoose_custom.h @@ -2,6 +2,7 @@ // See https://mongoose.ws/documentation/#build-options #define MG_ARCH MG_ARCH_FREERTOS + #define MG_ENABLE_FREERTOS_TCP 1 #define MG_ENABLE_DRIVER_STM32 1 #define MG_ENABLE_CUSTOM_RANDOM 1 diff --git a/examples/stm32/nucleo-g031-make-baremetal-builtin/Makefile b/examples/stm32/nucleo-g031-make-baremetal-builtin/Makefile index db60b75052..b8134cbd55 100644 --- a/examples/stm32/nucleo-g031-make-baremetal-builtin/Makefile +++ b/examples/stm32/nucleo-g031-make-baremetal-builtin/Makefile @@ -5,9 +5,14 @@ CFLAGS += -I. -Icmsis_core/CMSIS/Core/Include -Icmsis_g0/Include CFLAGS += -mcpu=cortex-m0 -mthumb -mfloat-abi=soft $(CFLAGS_EXTRA) LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map -SOURCES = main.c syscalls.c mongoose.c +SOURCES = main.c syscalls.c SOURCES += cmsis_g0/Source/Templates/gcc/startup_stm32g031xx.s # ST startup file. Compiler-dependent! -CFLAGS += -DHTTP_URL=\"http://0.0.0.0/\" # Example-specifig flags + +# Mongoose options are defined in mongoose_custom.h +SOURCES += mongoose.c + +# Example specific build options. See README.md +CFLAGS += -DHTTP_URL=\"http://0.0.0.0/\" ifeq ($(OS),Windows_NT) RM = cmd /C del /Q /F /S diff --git a/examples/stm32/nucleo-g031-make-baremetal-builtin/mongoose_custom.h b/examples/stm32/nucleo-g031-make-baremetal-builtin/mongoose_custom.h index 3f1a73720c..611b3b5ca3 100644 --- a/examples/stm32/nucleo-g031-make-baremetal-builtin/mongoose_custom.h +++ b/examples/stm32/nucleo-g031-make-baremetal-builtin/mongoose_custom.h @@ -1,5 +1,6 @@ #pragma once +// See https://mongoose.ws/documentation/#build-options #define MG_ARCH MG_ARCH_NEWLIB #define MG_ENABLE_TCPIP 1 diff --git a/examples/stm32/nucleo-h563zi-make-baremetal-builtin/Makefile b/examples/stm32/nucleo-h563zi-make-baremetal-builtin/Makefile index 21435a86fb..e9405b407f 100644 --- a/examples/stm32/nucleo-h563zi-make-baremetal-builtin/Makefile +++ b/examples/stm32/nucleo-h563zi-make-baremetal-builtin/Makefile @@ -5,9 +5,12 @@ CFLAGS += -I. -Icmsis_core/CMSIS/Core/Include -Icmsis_h5/Include CFLAGS += -mcpu=cortex-m33 -mthumb -mfpu=fpv5-sp-d16 -mfloat-abi=hard $(CFLAGS_EXTRA) LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map -SOURCES = main.c syscalls.c sysinit.c mongoose.c net.c packed_fs.c +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 +SOURCES += mongoose.c net.c packed_fs.c + # Example specific build options. See README.md CFLAGS += -DHTTP_URL=\"http://0.0.0.0/\" -DHTTPS_URL=\"https://0.0.0.0/\" diff --git a/examples/stm32/nucleo-h563zi-make-baremetal-builtin/mongoose_custom.h b/examples/stm32/nucleo-h563zi-make-baremetal-builtin/mongoose_custom.h index e751b193eb..351924e1fb 100644 --- a/examples/stm32/nucleo-h563zi-make-baremetal-builtin/mongoose_custom.h +++ b/examples/stm32/nucleo-h563zi-make-baremetal-builtin/mongoose_custom.h @@ -1,5 +1,6 @@ #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 diff --git a/examples/stm32/nucleo-h563zi-make-freertos-builtin/Makefile b/examples/stm32/nucleo-h563zi-make-freertos-builtin/Makefile index 48ec71c20a..53d1a83c97 100644 --- a/examples/stm32/nucleo-h563zi-make-freertos-builtin/Makefile +++ b/examples/stm32/nucleo-h563zi-make-freertos-builtin/Makefile @@ -2,7 +2,7 @@ CFLAGS = -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion CFLAGS += -Wformat-truncation -fno-common -Wconversion -Wno-sign-conversion CFLAGS += -g3 -Os -ffunction-sections -fdata-sections CFLAGS += -I. -Icmsis_core/CMSIS/Core/Include -Icmsis_h5/Include -CFLAGS += -mcpu=cortex-m33 -mthumb -mfpu=fpv5-sp-d16 -mfloat-abi=hard +CFLAGS += -mcpu=cortex-m33 -mthumb -mfpu=fpv5-sp-d16 -mfloat-abi=hard $(CFLAGS_EXTRA) LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map SOURCES = main.c syscalls.c sysinit.c @@ -15,8 +15,8 @@ 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 -SOURCES += mongoose.c net.c packed_fs.c -CFLAGS += $(CFLAGS_EXTRA) # Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_custom.h +SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md CFLAGS += -DHTTP_URL=\"http://0.0.0.0/\" diff --git a/examples/stm32/nucleo-h563zi-make-freertos-builtin/mongoose_custom.h b/examples/stm32/nucleo-h563zi-make-freertos-builtin/mongoose_custom.h index 29f88e0e02..954efdd489 100644 --- a/examples/stm32/nucleo-h563zi-make-freertos-builtin/mongoose_custom.h +++ b/examples/stm32/nucleo-h563zi-make-freertos-builtin/mongoose_custom.h @@ -4,6 +4,7 @@ // 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 diff --git a/examples/stm32/nucleo-h723zg-make-baremetal-builtin/Makefile b/examples/stm32/nucleo-h723zg-make-baremetal-builtin/Makefile index 15e621f1e8..da8c0650af 100644 --- a/examples/stm32/nucleo-h723zg-make-baremetal-builtin/Makefile +++ b/examples/stm32/nucleo-h723zg-make-baremetal-builtin/Makefile @@ -5,9 +5,12 @@ CFLAGS += -I. -Icmsis_core/CMSIS/Core/Include -Icmsis_h7/Include CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-d16 $(CFLAGS_EXTRA) LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map -SOURCES = main.c syscalls.c sysinit.c mongoose.c net.c packed_fs.c +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 +SOURCES += mongoose.c net.c packed_fs.c + # Example specific build options. See README.md CFLAGS += -DHTTP_URL=\"http://0.0.0.0/\" -DHTTPS_URL=\"https://0.0.0.0/\" diff --git a/examples/stm32/nucleo-h723zg-make-baremetal-builtin/mongoose_custom.h b/examples/stm32/nucleo-h723zg-make-baremetal-builtin/mongoose_custom.h index 29a55da21e..338d6b4347 100644 --- a/examples/stm32/nucleo-h723zg-make-baremetal-builtin/mongoose_custom.h +++ b/examples/stm32/nucleo-h723zg-make-baremetal-builtin/mongoose_custom.h @@ -1,5 +1,6 @@ #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 diff --git a/examples/stm32/nucleo-h723zg-make-freertos-builtin/Makefile b/examples/stm32/nucleo-h723zg-make-freertos-builtin/Makefile index 43406eff87..f244d80202 100644 --- a/examples/stm32/nucleo-h723zg-make-freertos-builtin/Makefile +++ b/examples/stm32/nucleo-h723zg-make-freertos-builtin/Makefile @@ -2,7 +2,7 @@ CFLAGS = -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion CFLAGS += -Wformat-truncation -fno-common -Wconversion -Wno-sign-conversion CFLAGS += -g3 -Os -ffunction-sections -fdata-sections CFLAGS += -I. -Icmsis_core/CMSIS/Core/Include -Icmsis_h7/Include -CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-d16 +CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-d16 $(CFLAGS_EXTRA) LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map SOURCES = main.c syscalls.c sysinit.c @@ -14,8 +14,8 @@ SOURCES += FreeRTOS-Kernel/portable/GCC/ARM_CM4F/port.c CFLAGS += -IFreeRTOS-Kernel/include CFLAGS += -IFreeRTOS-Kernel/portable/GCC/ARM_CM4F -Wno-conversion -SOURCES += mongoose.c net.c packed_fs.c -CFLAGS += $(CFLAGS_EXTRA) # Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_custom.h +SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md CFLAGS += -DHTTP_URL=\"http://0.0.0.0/\" diff --git a/examples/stm32/nucleo-h723zg-make-freertos-builtin/mongoose_custom.h b/examples/stm32/nucleo-h723zg-make-freertos-builtin/mongoose_custom.h index 29f88e0e02..954efdd489 100644 --- a/examples/stm32/nucleo-h723zg-make-freertos-builtin/mongoose_custom.h +++ b/examples/stm32/nucleo-h723zg-make-freertos-builtin/mongoose_custom.h @@ -4,6 +4,7 @@ // 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 diff --git a/examples/stm32/nucleo-h743zi-make-baremetal-builtin/Makefile b/examples/stm32/nucleo-h743zi-make-baremetal-builtin/Makefile index e5bb9a79fe..92e00b9271 100644 --- a/examples/stm32/nucleo-h743zi-make-baremetal-builtin/Makefile +++ b/examples/stm32/nucleo-h743zi-make-baremetal-builtin/Makefile @@ -5,9 +5,12 @@ CFLAGS += -I. -Icmsis_core/CMSIS/Core/Include -Icmsis_h7/Include CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-d16 $(CFLAGS_EXTRA) LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map -SOURCES = main.c syscalls.c sysinit.c mongoose.c net.c packed_fs.c +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 +SOURCES += mongoose.c net.c packed_fs.c + # Example specific build options. See README.md CFLAGS += -DHTTP_URL=\"http://0.0.0.0/\" -DHTTPS_URL=\"https://0.0.0.0/\" diff --git a/examples/stm32/nucleo-h743zi-make-baremetal-builtin/mongoose_custom.h b/examples/stm32/nucleo-h743zi-make-baremetal-builtin/mongoose_custom.h index 29a55da21e..338d6b4347 100644 --- a/examples/stm32/nucleo-h743zi-make-baremetal-builtin/mongoose_custom.h +++ b/examples/stm32/nucleo-h743zi-make-baremetal-builtin/mongoose_custom.h @@ -1,5 +1,6 @@ #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 diff --git a/examples/stm32/nucleo-h743zi-make-freertos-builtin/Makefile b/examples/stm32/nucleo-h743zi-make-freertos-builtin/Makefile index 47137db53f..9b688aab19 100644 --- a/examples/stm32/nucleo-h743zi-make-freertos-builtin/Makefile +++ b/examples/stm32/nucleo-h743zi-make-freertos-builtin/Makefile @@ -2,7 +2,7 @@ CFLAGS = -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion CFLAGS += -Wformat-truncation -fno-common -Wconversion -Wno-sign-conversion CFLAGS += -g3 -Os -ffunction-sections -fdata-sections CFLAGS += -I. -Icmsis_core/CMSIS/Core/Include -Icmsis_h7/Include -CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-d16 +CFLAGS += -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-d16 $(CFLAGS_EXTRA) LDFLAGS ?= -Tlink.ld -nostdlib -nostartfiles --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map SOURCES = main.c syscalls.c sysinit.c @@ -14,8 +14,8 @@ SOURCES += FreeRTOS-Kernel/portable/GCC/ARM_CM4F/port.c CFLAGS += -IFreeRTOS-Kernel/include CFLAGS += -IFreeRTOS-Kernel/portable/GCC/ARM_CM4F -Wno-conversion -SOURCES += mongoose.c net.c packed_fs.c -CFLAGS += $(CFLAGS_EXTRA) # Mongoose options are defined in mongoose_custom.h +# Mongoose options are defined in mongoose_custom.h +SOURCES += mongoose.c net.c packed_fs.c # Example specific build options. See README.md CFLAGS += -DHTTP_URL=\"http://0.0.0.0/\" diff --git a/examples/stm32/nucleo-h743zi-make-freertos-builtin/mongoose_custom.h b/examples/stm32/nucleo-h743zi-make-freertos-builtin/mongoose_custom.h index 29f88e0e02..954efdd489 100644 --- a/examples/stm32/nucleo-h743zi-make-freertos-builtin/mongoose_custom.h +++ b/examples/stm32/nucleo-h743zi-make-freertos-builtin/mongoose_custom.h @@ -4,6 +4,7 @@ // 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