From ac17df0c65bc38d029799197be39c8304379a636 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Tue, 24 Sep 2024 18:45:58 -0300 Subject: [PATCH] Add ARMCGT arch --- mongoose.h | 68 ++++++++++++++++++++++++++++++----------------- src/arch.h | 1 + src/arch_armcgt.h | 19 +++++++++++++ 3 files changed, 64 insertions(+), 24 deletions(-) create mode 100644 src/arch_armcgt.h diff --git a/mongoose.h b/mongoose.h index 923144b4..f8057e4d 100644 --- a/mongoose.h +++ b/mongoose.h @@ -42,6 +42,7 @@ extern "C" { #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 #if !defined(MG_ARCH) #if defined(__unix__) || defined(__APPLE__) @@ -76,6 +77,25 @@ extern "C" { +#if MG_ARCH == MG_ARCH_ARMCGT + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define MG_PATH_MAX 100 +#define MG_ENABLE_SOCKET 0 +#define MG_ENABLE_DIRLIST 0 + +#endif + + #if MG_ARCH == MG_ARCH_AZURERTOS #include @@ -236,30 +256,30 @@ static inline int mg_mkdir(const char *path, mode_t mode) { #include int mkdir(const char *, mode_t); #endif - - -#if MG_ARCH == MG_ARCH_RTTHREAD - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef MG_IO_SIZE -#define MG_IO_SIZE 1460 -#endif - -#endif // MG_ARCH == MG_ARCH_RTTHREAD + + +#if MG_ARCH == MG_ARCH_RTTHREAD + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef MG_IO_SIZE +#define MG_IO_SIZE 1460 +#endif + +#endif // MG_ARCH == MG_ARCH_RTTHREAD #if MG_ARCH == MG_ARCH_ARMCC || MG_ARCH == MG_ARCH_CMSIS_RTOS1 || \ diff --git a/src/arch.h b/src/arch.h index f01ca6bb..9f43b751 100644 --- a/src/arch.h +++ b/src/arch.h @@ -15,6 +15,7 @@ #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 #if !defined(MG_ARCH) #if defined(__unix__) || defined(__APPLE__) diff --git a/src/arch_armcgt.h b/src/arch_armcgt.h new file mode 100644 index 00000000..42626ed3 --- /dev/null +++ b/src/arch_armcgt.h @@ -0,0 +1,19 @@ +#pragma once + +#if MG_ARCH == MG_ARCH_ARMCGT + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define MG_PATH_MAX 100 +#define MG_ENABLE_SOCKET 0 +#define MG_ENABLE_DIRLIST 0 + +#endif