From 7a4a82e8721418d3956e526cebef9f52b93d80d6 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Mon, 29 May 2023 18:38:49 -0300 Subject: [PATCH] Add HTTP_URL --- examples/mip-tap/Makefile | 3 +++ examples/rp2040/pico-rndis-dashboard/CMakeLists.txt | 3 +++ examples/rp2040/pico-w5500/CMakeLists.txt | 4 ++++ examples/stm32/nucleo-f429zi-baremetal/Makefile | 3 +++ examples/stm32/nucleo-f429zi-freertos/Makefile | 3 +++ examples/stm32/nucleo-f746zg-baremetal/Makefile | 3 +++ examples/stm32/nucleo-f746zg-cube-baremetal/.cproject | 1 + .../.settings/language.settings.xml | 4 ++-- examples/stm32/nucleo-f746zg-cube-freertos-lwip/.cproject | 1 + .../.settings/language.settings.xml | 4 ++-- examples/stm32/nucleo-f746zg-cube-freertos/.cproject | 1 + .../.settings/language.settings.xml | 4 ++-- examples/stm32/nucleo-f746zg-freertos-tcp/Makefile | 3 +++ examples/stm32/nucleo-f746zg-freertos/Makefile | 3 +++ examples/stm32/nucleo-h743zi-baremetal/Makefile | 3 +++ examples/ti/ek-tm4c1294xl-baremetal/Makefile | 3 +++ examples/ti/ek-tm4c1294xl-freertos/Makefile | 3 +++ 17 files changed, 43 insertions(+), 6 deletions(-) diff --git a/examples/mip-tap/Makefile b/examples/mip-tap/Makefile index b8271495..f03a8f94 100644 --- a/examples/mip-tap/Makefile +++ b/examples/mip-tap/Makefile @@ -7,6 +7,9 @@ CFLAGS = -W -Wall -Wextra -g -I. # Build options # Mongoose build options. See https://mongoose.ws/documentation/#build-options CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1 -DMG_ENABLE_TCPIP=1 -DMG_ENABLE_SOCKET=0 -DMG_ENABLE_PACKED_FS=1 +# Example specific build options. See README.md +CFLAGS += -DHTTP_URL=\"http://0.0.0.0/\" + ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe PROG ?= example.exe # Use .exe suffix for the binary CC = gcc # Use MinGW gcc compiler diff --git a/examples/rp2040/pico-rndis-dashboard/CMakeLists.txt b/examples/rp2040/pico-rndis-dashboard/CMakeLists.txt index e8bdcb99..14545da3 100644 --- a/examples/rp2040/pico-rndis-dashboard/CMakeLists.txt +++ b/examples/rp2040/pico-rndis-dashboard/CMakeLists.txt @@ -29,5 +29,8 @@ add_definitions(-DMG_ENABLE_PACKED_FS=1) add_definitions(-DMG_ENABLE_FILE=0) add_definitions(-DDISABLE_ROUTING=1) +# Example build options +add_definitions(-DHTTP_URL="http://0.0.0.0/") + # Extra build flags (enable if needed) add_definitions(-DDUAL_CONFIG=0) diff --git a/examples/rp2040/pico-w5500/CMakeLists.txt b/examples/rp2040/pico-w5500/CMakeLists.txt index 077f8b01..6f3ef30d 100644 --- a/examples/rp2040/pico-w5500/CMakeLists.txt +++ b/examples/rp2040/pico-w5500/CMakeLists.txt @@ -22,3 +22,7 @@ add_definitions(-DMG_ENABLE_PACKED_FS=1) add_definitions(-DMG_ENABLE_MBEDTLS=0) # TODO(cpq): enable add_definitions(-DMG_ENABLE_CUSTOM_RANDOM=1) add_definitions(-DMG_ENABLE_FILE=0) + +# Example build options +add_definitions(-DHTTP_URL="http://0.0.0.0/") +add_definitions(-DHTTPS_URL="https://0.0.0.0/") diff --git a/examples/stm32/nucleo-f429zi-baremetal/Makefile b/examples/stm32/nucleo-f429zi-baremetal/Makefile index 76eb7165..213971ab 100644 --- a/examples/stm32/nucleo-f429zi-baremetal/Makefile +++ b/examples/stm32/nucleo-f429zi-baremetal/Makefile @@ -13,6 +13,9 @@ 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_EXTRA) +# 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 else diff --git a/examples/stm32/nucleo-f429zi-freertos/Makefile b/examples/stm32/nucleo-f429zi-freertos/Makefile index 0d99378f..87f204bc 100644 --- a/examples/stm32/nucleo-f429zi-freertos/Makefile +++ b/examples/stm32/nucleo-f429zi-freertos/Makefile @@ -17,6 +17,9 @@ 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 +# 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 else diff --git a/examples/stm32/nucleo-f746zg-baremetal/Makefile b/examples/stm32/nucleo-f746zg-baremetal/Makefile index 564292bd..e483a850 100644 --- a/examples/stm32/nucleo-f746zg-baremetal/Makefile +++ b/examples/stm32/nucleo-f746zg-baremetal/Makefile @@ -13,6 +13,9 @@ 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_EXTRA) +# 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 else diff --git a/examples/stm32/nucleo-f746zg-cube-baremetal/.cproject b/examples/stm32/nucleo-f746zg-cube-baremetal/.cproject index 6d073ca2..ab4a166d 100644 --- a/examples/stm32/nucleo-f746zg-cube-baremetal/.cproject +++ b/examples/stm32/nucleo-f746zg-cube-baremetal/.cproject @@ -39,6 +39,7 @@ diff --git a/examples/stm32/nucleo-f746zg-cube-baremetal/.settings/language.settings.xml b/examples/stm32/nucleo-f746zg-cube-baremetal/.settings/language.settings.xml index 63940852..6270f1c1 100644 --- a/examples/stm32/nucleo-f746zg-cube-baremetal/.settings/language.settings.xml +++ b/examples/stm32/nucleo-f746zg-cube-baremetal/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/examples/stm32/nucleo-f746zg-cube-freertos-lwip/.cproject b/examples/stm32/nucleo-f746zg-cube-freertos-lwip/.cproject index c976a9b3..980ad123 100644 --- a/examples/stm32/nucleo-f746zg-cube-freertos-lwip/.cproject +++ b/examples/stm32/nucleo-f746zg-cube-freertos-lwip/.cproject @@ -39,6 +39,7 @@