source from :https://github.com/cesanta/mongoose/
Easy to integrate: just copy mongoose.c and mongoose.h files to your source tree.
compile static lib with cmdline:
Code: Select all
gcc -c mongoose.c -DMG_ENABLE_MBEDTLS=1 -I ../mbedtls/include
ar rcs libmongoose.a mongoose.o
when use fbfrog to generate the bi file,we need to define the MG_ARCH LISTED.
Code: Select all
#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
#define MG_ARCH_ESP8266 4 // ESP8266
#define MG_ARCH_FREERTOS 5 // FreeRTOS
#define MG_ARCH_AZURERTOS 6 // MS Azure RTOS
#define MG_ARCH_ZEPHYR 7 // Zephyr RTOS
#define MG_ARCH_NEWLIB 8 // Bare metal ARM
#define MG_ARCH_CMSIS_RTOS1 9 // CMSIS-RTOS API v1 (Keil RTX)
#define MG_ARCH_TIRTOS 10 // Texas Semi TI-RTOS
#define MG_ARCH_PICOSDK 11 // Raspberry Pi Pico-SDK (RP2040, RP2350)
#define MG_ARCH_ARMCC 12 // Keil MDK-Core with Configuration Wizard
#define MG_ARCH_CMSIS_RTOS2 13 // CMSIS-RTOS API v2 (Keil RTX5, FreeRTOS)
#define MG_ARCH_RTTHREAD 14 // RT-Thread RTOS
#define MG_ARCH_ARMCGT 15 // Texas Semi ARM-CGT
Code: Select all
fbfrog.exe mongoose.h -removeinclude xxx.h -define MG_TLS_BUILTIN 3 -define MG_ARCH MG_ARCH_WIN32 -rename_ type
i just get the bi and test for windows platform.
bi and test files download