Merge pull request #2711 from cesanta/nodetemb

remove arch autodetection for embedded
This commit is contained in:
Sergey Lyubka 2024-04-19 06:04:27 +01:00 committed by GitHub
commit ec5531dbf4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
26 changed files with 55 additions and 63 deletions

View File

@ -0,0 +1 @@
#define MG_ARCH MG_ARCH_ESP32

View File

@ -1,2 +1 @@
// For some reason, IDF detection at build time does not work here
#define MG_ARCH MG_ARCH_ESP32

View File

@ -0,0 +1 @@
#define MG_ARCH MG_ARCH_ESP32

View File

@ -7,4 +7,3 @@
# please read the ESP-IDF documents if you need to do this.
#
COMPONENT_INCLUDES += ../../../../../..

View File

@ -0,0 +1 @@
../../../../../mongoose.h

View File

@ -0,0 +1,2 @@
#define MG_ARCH MG_ARCH_ESP8266

View File

@ -17,8 +17,3 @@ pico_add_extra_outputs(firmware) # create map/bin/hex file etc.
pico_enable_stdio_usb(firmware 1) # Route stdio
pico_enable_stdio_uart(firmware 0) # to USB
# Mongoose build flags
add_definitions(-DMG_ENABLE_TCPIP=1)
add_definitions(-DMG_ENABLE_TCPIP_DRIVER_INIT=0)
add_definitions(-DMG_ENABLE_PACKED_FS=1)

View File

@ -0,0 +1,5 @@
#define MG_ARCH MG_ARCH_RP2040
#define MG_ENABLE_TCPIP 1
#define MG_ENABLE_TCPIP_DRIVER_INIT 0
#define MG_ENABLE_PACKED_FS 1

View File

@ -23,12 +23,7 @@ pico_add_extra_outputs(firmware) # create map/bin/hex file etc.
pico_enable_stdio_usb(firmware 0) # Route stdio
pico_enable_stdio_uart(firmware 1) # to the UART
# Mongoose build flags
add_definitions(-DMG_ENABLE_TCPIP=1)
add_definitions(-DMG_ENABLE_PACKED_FS=1)
add_definitions(-DMG_ENABLE_TCPIP_DRIVER_INIT=0)
add_definitions(-DMG_ENABLE_POSIX_FS=0)
add_definitions(-DDISABLE_ROUTING=1)
# Mongoose build flags in mongoose_config.h
# Example build options
add_definitions(-DHTTP_URL="http://0.0.0.0/")

View File

@ -0,0 +1,6 @@
#define MG_ARCH MG_ARCH_RP2040
#define MG_ENABLE_TCPIP 1
#define MG_ENABLE_TCPIP_DRIVER_INIT 0
#define MG_ENABLE_PACKED_FS 1
#define MG_ENABLE_POSIX_FS 0

View File

@ -21,9 +21,6 @@ pico_add_extra_outputs(firmware) # create map/bin/hex file etc.
pico_enable_stdio_usb(firmware 0) # Route stdio
pico_enable_stdio_uart(firmware 1) # to the UART
# Mongoose build flags
add_definitions(-DMG_ENABLE_TCPIP=1)
add_definitions(-DMG_ENABLE_TCPIP_DRIVER_INIT=0)
add_definitions(-DMG_ENABLE_POSIX_FS=0)
# Mongoose build flags in mongoose_config.h
# Example build options

View File

@ -0,0 +1,6 @@
#define MG_ARCH MG_ARCH_RP2040
#define MG_ENABLE_TCPIP 1
#define MG_ENABLE_TCPIP_DRIVER_INIT 0
#define MG_ENABLE_PACKED_FS 1
#define MG_ENABLE_POSIX_FS 0

View File

@ -12,12 +12,7 @@ pico_add_extra_outputs(firmware) # create map/bin/hex file etc.
pico_enable_stdio_usb(firmware 0) # Route stdio
pico_enable_stdio_uart(firmware 1) # to the UART, for remote testing
# Mongoose build flags
add_definitions(-DMG_ENABLE_TCPIP=1)
add_definitions(-DMG_ENABLE_DRIVER_W5500=1)
add_definitions(-DMG_ENABLE_PACKED_FS=1)
add_definitions(-DMG_ENABLE_CUSTOM_RANDOM=1)
add_definitions(-DMG_ENABLE_POSIX_FS=0)
# Mongoose build flags in mongoose_config.h
# Example build options
add_definitions(-DHTTP_URL="http://0.0.0.0/")

View File

@ -0,0 +1,8 @@
#define MG_ARCH MG_ARCH_RP2040
#define MG_ENABLE_TCPIP 1
#define MG_ENABLE_TCPIP_DRIVER_INIT 0
#define MG_ENABLE_DRIVER_W5500 1
#define MG_ENABLE_CUSTOM_RANDOM 1
#define MG_ENABLE_PACKED_FS 1
#define MG_ENABLE_POSIX_FS 0

View File

@ -6,5 +6,4 @@
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(device_dashboard)
add_definitions(-DMG_ENABLE_PACKED_FS=1)
target_sources(app PRIVATE src/main.c src/mongoose.c src/net.c src/packed_fs.c)

View File

@ -0,0 +1,4 @@
#define MG_ARCH MG_ARCH_ZEPHYR
#define MG_ENABLE_PACKED_FS 1
#define MG_TLS MG_TLS_MBED

View File

@ -6,6 +6,4 @@
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(http_client)
#add_definitions(-DMG_ENABLE_LINES=1)
add_definitions(-DMG_TLS=MG_TLS_MBED -DMG_MBEDTLS_DEBUG_LEVEL=4)
target_sources(app PRIVATE src/main.c src/mongoose.c)

View File

@ -0,0 +1,4 @@
#define MG_ARCH MG_ARCH_ZEPHYR
#define MG_ENABLE_PACKED_FS 1
#define MG_TLS MG_TLS_MBED

View File

@ -6,5 +6,4 @@
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(http_server)
add_definitions(-DMG_TLS=MG_TLS_MBED)
target_sources(app PRIVATE src/main.c src/mongoose.c)

View File

@ -0,0 +1,4 @@
#define MG_ARCH MG_ARCH_ZEPHYR
#define MG_ENABLE_PACKED_FS 1
#define MG_TLS MG_TLS_MBED

View File

@ -6,6 +6,4 @@
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(mqtt_aws_client)
#add_definitions(-DMG_ENABLE_LINES=1)
add_definitions(-DMG_TLS=MG_TLS_MBED -DMG_MBEDTLS_DEBUG_LEVEL=4)
target_sources(app PRIVATE src/main.c src/mongoose.c)

View File

@ -0,0 +1,4 @@
#define MG_ARCH MG_ARCH_ZEPHYR
#define MG_ENABLE_PACKED_FS 1
#define MG_TLS MG_TLS_MBED

View File

@ -6,6 +6,4 @@
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(websocket_server)
#add_definitions(-DMG_ENABLE_LINES=1)
add_definitions(-DMG_TLS=MG_TLS_MBED)
target_sources(app PRIVATE src/main.c src/mongoose.c)

View File

@ -0,0 +1,4 @@
#define MG_ARCH MG_ARCH_ZEPHYR
#define MG_ENABLE_PACKED_FS 1
#define MG_TLS MG_TLS_MBED

View File

@ -48,21 +48,6 @@ extern "C" {
#define MG_ARCH MG_ARCH_UNIX
#elif defined(_WIN32)
#define MG_ARCH MG_ARCH_WIN32
#elif defined(ICACHE_FLASH) || defined(ICACHE_RAM_ATTR)
#define MG_ARCH MG_ARCH_ESP8266
#elif defined(__ZEPHYR__)
#define MG_ARCH MG_ARCH_ZEPHYR
#elif defined(ESP_PLATFORM)
#define MG_ARCH MG_ARCH_ESP32
#elif defined(FREERTOS_IP_H)
#define MG_ARCH MG_ARCH_FREERTOS
#define MG_ENABLE_FREERTOS_TCP 1
#elif defined(AZURE_RTOS_THREADX)
#define MG_ARCH MG_ARCH_AZURERTOS
#elif defined(PICO_TARGET_NAME)
#define MG_ARCH MG_ARCH_RP2040
#elif defined(__RTTHREAD__)
#define MG_ARCH MG_ARCH_RTTHREAD
#endif
#endif // !defined(MG_ARCH)
@ -71,7 +56,7 @@ extern "C" {
#endif
#if !defined(MG_ARCH)
#error "MG_ARCH is not specified and we couldn't guess it. Set -D MG_ARCH=..."
#error "MG_ARCH is not specified and we couldn't guess it. Define MG_ARCH=... in your compiler"
#endif
// http://esr.ibiblio.org/?p=5095

View File

@ -21,21 +21,6 @@
#define MG_ARCH MG_ARCH_UNIX
#elif defined(_WIN32)
#define MG_ARCH MG_ARCH_WIN32
#elif defined(ICACHE_FLASH) || defined(ICACHE_RAM_ATTR)
#define MG_ARCH MG_ARCH_ESP8266
#elif defined(__ZEPHYR__)
#define MG_ARCH MG_ARCH_ZEPHYR
#elif defined(ESP_PLATFORM)
#define MG_ARCH MG_ARCH_ESP32
#elif defined(FREERTOS_IP_H)
#define MG_ARCH MG_ARCH_FREERTOS
#define MG_ENABLE_FREERTOS_TCP 1
#elif defined(AZURE_RTOS_THREADX)
#define MG_ARCH MG_ARCH_AZURERTOS
#elif defined(PICO_TARGET_NAME)
#define MG_ARCH MG_ARCH_RP2040
#elif defined(__RTTHREAD__)
#define MG_ARCH MG_ARCH_RTTHREAD
#endif
#endif // !defined(MG_ARCH)
@ -44,7 +29,7 @@
#endif
#if !defined(MG_ARCH)
#error "MG_ARCH is not specified and we couldn't guess it. Set -D MG_ARCH=..."
#error "MG_ARCH is not specified and we couldn't guess it. Define MG_ARCH=... in your compiler"
#endif
// http://esr.ibiblio.org/?p=5095