mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-21 11:30:01 +00:00
FreeRTOS: arch_ -> os_
This commit is contained in:
1 parent
87a0aa057d
commit
3f1ae66a3d
28 files changed
+122
-235
No files matched your search
+7
-8
@@ -24474,15 +24474,8 @@ bool mg_path_is_sane(const struct mg_str path) {
|
||||
#if MG_ENABLE_CUSTOM_MILLIS
|
||||
#else
|
||||
uint64_t mg_millis(void) {
|
||||
#if MG_ARCH == MG_ARCH_WIN32
|
||||
return GetTickCount();
|
||||
#elif MG_ARCH == MG_ARCH_PICOSDK
|
||||
return time_us_64() / 1000;
|
||||
#elif MG_ARCH == MG_ARCH_ESP8266 || MG_ARCH == MG_ARCH_ESP32 || \
|
||||
MG_ARCH == MG_ARCH_FREERTOS
|
||||
#if MG_ARCH == MG_ARCH_ESP8266 || MG_ARCH == MG_ARCH_ESP32 || MG_ENABLE_FREERTOS
|
||||
return xTaskGetTickCount() * portTICK_PERIOD_MS;
|
||||
#elif MG_ARCH == MG_ARCH_CUBE
|
||||
return (uint64_t) HAL_GetTick();
|
||||
#elif MG_ARCH == MG_ARCH_THREADX
|
||||
return tx_time_get() * (1000 /* MS per SEC */ / TX_TIMER_TICKS_PER_SECOND);
|
||||
#elif MG_ARCH == MG_ARCH_TIRTOS
|
||||
@@ -24495,6 +24488,12 @@ uint64_t mg_millis(void) {
|
||||
return (uint64_t) ((osKernelGetTickCount() * 1000) / osKernelGetTickFreq());
|
||||
#elif MG_ARCH == MG_ARCH_RTTHREAD
|
||||
return (uint64_t) ((rt_tick_get() * 1000) / RT_TICK_PER_SECOND);
|
||||
#elif MG_ARCH == MG_ARCH_WIN32
|
||||
return GetTickCount();
|
||||
#elif MG_ARCH == MG_ARCH_PICOSDK
|
||||
return time_us_64() / 1000;
|
||||
#elif MG_ARCH == MG_ARCH_CUBE
|
||||
return (uint64_t) HAL_GetTick();
|
||||
#elif MG_ARCH == MG_ARCH_UNIX && defined(__APPLE__)
|
||||
// Apple CLOCK_MONOTONIC_RAW is equivalent to CLOCK_BOOTTIME on linux
|
||||
// Apple CLOCK_UPTIME_RAW is equivalent to CLOCK_MONOTONIC_RAW on linux
|
||||
|
||||
+46
-58
@@ -32,7 +32,9 @@ extern "C" {
|
||||
#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_FREERTOS 5 // FreeRTOS <-- DEPRECATED !!!
|
||||
|
||||
#define MG_ARCH_THREADX 6 // Eclipse ThreadX (former MS Azure RTOS)
|
||||
#define MG_ARCH_ZEPHYR 7 // Zephyr RTOS
|
||||
#define MG_ARCH_ARMGCC 8 // Plain ARM GCC
|
||||
@@ -61,6 +63,11 @@ extern "C" {
|
||||
|
||||
#if !defined(MG_ARCH)
|
||||
#error "MG_ARCH is not specified and we couldn't guess it. Define MG_ARCH=... in mongoose_config.h"
|
||||
#elif MG_ARCH == MG_ARCH_FREERTOS
|
||||
#error "MG_ARCH_FREERTOS has been deprecated, set MG_ARCH=your_build_environment and MG_ENABLE_FREERTOS=1 instead"
|
||||
#undef MG_ARCH // avoid errors piling up, provide a clean environment so the error above is seen
|
||||
#define MG_ARCH MG_ARCH_ARMGCC
|
||||
#define MG_ENABLE_FREERTOS 1
|
||||
#endif
|
||||
|
||||
// http://esr.ibiblio.org/?p=5095
|
||||
@@ -82,6 +89,7 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
|
||||
#if MG_ARCH == MG_ARCH_ARMCGT
|
||||
|
||||
#include <ctype.h>
|
||||
@@ -95,7 +103,6 @@ extern "C" {
|
||||
#include <time.h>
|
||||
|
||||
#define MG_PATH_MAX 100
|
||||
#define MG_ENABLE_SOCKET 0
|
||||
#define MG_ENABLE_DIRLIST 0
|
||||
|
||||
#endif
|
||||
@@ -105,7 +112,9 @@ extern "C" {
|
||||
#define _POSIX_TIMERS
|
||||
|
||||
#include <ctype.h>
|
||||
#if !defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
@@ -118,7 +127,6 @@ extern "C" {
|
||||
#include <unistd.h>
|
||||
|
||||
#define MG_PATH_MAX 100
|
||||
#define MG_ENABLE_SOCKET 0
|
||||
#define MG_ENABLE_DIRLIST 0
|
||||
|
||||
#endif
|
||||
@@ -127,7 +135,9 @@ extern "C" {
|
||||
#if MG_ARCH == MG_ARCH_CUBE
|
||||
|
||||
#include <ctype.h>
|
||||
#if !defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
@@ -151,9 +161,6 @@ extern "C" {
|
||||
#define MG_ENABLE_DIRLIST 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_SOCKET
|
||||
#define MG_ENABLE_SOCKET 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_TCPIP
|
||||
#define MG_ENABLE_TCPIP 1 // Enable built-in TCP/IP stack
|
||||
@@ -281,57 +288,6 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#if MG_ARCH == MG_ARCH_FREERTOS
|
||||
|
||||
#include <ctype.h>
|
||||
#if !defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> // rand(), strtol(), atoi()
|
||||
#include <string.h>
|
||||
#if defined(__ARMCC_VERSION)
|
||||
#define mode_t size_t
|
||||
#include <alloca.h>
|
||||
#include <time.h>
|
||||
#define strdup(s) ((char *) mg_strdup(mg_str(s)).buf)
|
||||
#elif defined(__CCRH__)
|
||||
#else
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#include <FreeRTOS.h>
|
||||
#include <task.h>
|
||||
|
||||
#define MG_ENABLE_CUSTOM_CALLOC 1
|
||||
|
||||
static inline void mg_free(void *ptr) {
|
||||
vPortFree(ptr);
|
||||
}
|
||||
|
||||
// Re-route calloc/free to the FreeRTOS's functions, don't use stdlib
|
||||
static inline void *mg_calloc(size_t cnt, size_t size) {
|
||||
void *p = pvPortMalloc(cnt * size);
|
||||
if (p != NULL) memset(p, 0, size * cnt);
|
||||
return p;
|
||||
}
|
||||
|
||||
#if !defined(MG_ENABLE_POSIX_FS) || !MG_ENABLE_POSIX_FS
|
||||
#else
|
||||
#define mkdir(a, b) mg_mkdir(a, b)
|
||||
static inline int mg_mkdir(const char *path, mode_t mode) {
|
||||
(void) path, (void) mode;
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // MG_ARCH == MG_ARCH_FREERTOS
|
||||
|
||||
|
||||
#if MG_ARCH == MG_ARCH_PICOSDK
|
||||
#if !defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP
|
||||
#include <errno.h>
|
||||
@@ -406,12 +362,15 @@ extern uint32_t rt_time_get(void);
|
||||
|
||||
#if defined(__ARMCC_VERSION)
|
||||
#define mode_t size_t
|
||||
#if !defined(MG_ENABLE_POSIX_FS) || !MG_ENABLE_POSIX_FS
|
||||
#else
|
||||
#define mkdir(a, b) mg_mkdir(a, b)
|
||||
static inline int mg_mkdir(const char *path, mode_t mode) {
|
||||
(void) path, (void) mode;
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (MG_ARCH == MG_ARCH_CMSIS_RTOS1 || MG_ARCH == MG_ARCH_CMSIS_RTOS2) && \
|
||||
!defined MG_ENABLE_RL && (!defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP) && \
|
||||
@@ -504,7 +463,9 @@ static inline int mg_mkdir(const char *path, mode_t mode) {
|
||||
#include <arpa/inet.h>
|
||||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
#if !defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
@@ -597,7 +558,9 @@ static inline int mg_mkdir(const char *path, mode_t mode) {
|
||||
|
||||
#include <ctype.h>
|
||||
#include <direct.h>
|
||||
#if !defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
@@ -779,6 +742,27 @@ int sscanf(const char *, const char *, ...);
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(MG_ENABLE_FREERTOS) && MG_ENABLE_FREERTOS
|
||||
|
||||
#include <FreeRTOS.h>
|
||||
#include <task.h>
|
||||
|
||||
#define MG_ENABLE_CUSTOM_CALLOC 1
|
||||
|
||||
static inline void mg_free(void *ptr) {
|
||||
vPortFree(ptr);
|
||||
}
|
||||
|
||||
// Re-route calloc/free to FreeRTOS functions, don't use stdlib
|
||||
static inline void *mg_calloc(size_t cnt, size_t size) {
|
||||
void *p = pvPortMalloc(cnt * size);
|
||||
if (p != NULL) memset(p, 0, size * cnt);
|
||||
return p;
|
||||
}
|
||||
|
||||
#endif // MG_ENABLE_FREERTOS
|
||||
|
||||
|
||||
#if defined(MG_ENABLE_FREERTOS_TCP) && MG_ENABLE_FREERTOS_TCP
|
||||
|
||||
#include <limits.h>
|
||||
@@ -913,12 +897,16 @@ struct timeval {
|
||||
#define MG_ENABLE_CUSTOM_LOG 0 // Let user define their own MG_LOG
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_FREERTOS
|
||||
#define MG_ENABLE_FREERTOS 0 // FreeRTOS RTOS
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_TCPIP
|
||||
#define MG_ENABLE_TCPIP 0 // Mongoose built-in network stack
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_LWIP
|
||||
#define MG_ENABLE_LWIP 0 // lWIP network stack
|
||||
#define MG_ENABLE_LWIP 0 // lwIP network stack
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_FREERTOS_TCP
|
||||
|
||||
+10
-2
@@ -5,7 +5,9 @@
|
||||
#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_FREERTOS 5 // FreeRTOS <-- DEPRECATED !!!
|
||||
|
||||
#define MG_ARCH_THREADX 6 // Eclipse ThreadX (former MS Azure RTOS)
|
||||
#define MG_ARCH_ZEPHYR 7 // Zephyr RTOS
|
||||
#define MG_ARCH_ARMGCC 8 // Plain ARM GCC
|
||||
@@ -34,6 +36,11 @@
|
||||
|
||||
#if !defined(MG_ARCH)
|
||||
#error "MG_ARCH is not specified and we couldn't guess it. Define MG_ARCH=... in mongoose_config.h"
|
||||
#elif MG_ARCH == MG_ARCH_FREERTOS
|
||||
#error "MG_ARCH_FREERTOS has been deprecated, set MG_ARCH=your_build_environment and MG_ENABLE_FREERTOS=1 instead"
|
||||
#undef MG_ARCH // avoid errors piling up, provide a clean environment so the error above is seen
|
||||
#define MG_ARCH MG_ARCH_ARMGCC
|
||||
#define MG_ENABLE_FREERTOS 1
|
||||
#endif
|
||||
|
||||
// http://esr.ibiblio.org/?p=5095
|
||||
@@ -43,13 +50,14 @@
|
||||
#include "arch_cube.h"
|
||||
#include "arch_esp32.h"
|
||||
#include "arch_esp8266.h"
|
||||
#include "arch_freertos.h"
|
||||
#include "arch_rtx.h"
|
||||
#include "arch_threadx.h"
|
||||
#include "arch_unix.h"
|
||||
#include "arch_win32.h"
|
||||
#include "arch_zephyr.h"
|
||||
|
||||
#include "os_freertos.h"
|
||||
|
||||
#include "net_ft.h"
|
||||
#include "net_lwip.h"
|
||||
#include "net_rl.h"
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <time.h>
|
||||
|
||||
#define MG_PATH_MAX 100
|
||||
#define MG_ENABLE_SOCKET 0
|
||||
#define MG_ENABLE_DIRLIST 0
|
||||
|
||||
#endif
|
||||
+2
-1
@@ -4,7 +4,9 @@
|
||||
#define _POSIX_TIMERS
|
||||
|
||||
#include <ctype.h>
|
||||
#if !defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
@@ -17,7 +19,6 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#define MG_PATH_MAX 100
|
||||
#define MG_ENABLE_SOCKET 0
|
||||
#define MG_ENABLE_DIRLIST 0
|
||||
|
||||
#endif
|
||||
+2
-3
@@ -3,7 +3,9 @@
|
||||
#if MG_ARCH == MG_ARCH_CUBE
|
||||
|
||||
#include <ctype.h>
|
||||
#if !defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
@@ -27,9 +29,6 @@
|
||||
#define MG_ENABLE_DIRLIST 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_SOCKET
|
||||
#define MG_ENABLE_SOCKET 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_TCPIP
|
||||
#define MG_ENABLE_TCPIP 1 // Enable built-in TCP/IP stack
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#if MG_ARCH == MG_ARCH_FREERTOS
|
||||
|
||||
#include <ctype.h>
|
||||
#if !defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> // rand(), strtol(), atoi()
|
||||
#include <string.h>
|
||||
#if defined(__ARMCC_VERSION)
|
||||
#define mode_t size_t
|
||||
#include <alloca.h>
|
||||
#include <time.h>
|
||||
#define strdup(s) ((char *) mg_strdup(mg_str(s)).buf)
|
||||
#elif defined(__CCRH__)
|
||||
#else
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#include <FreeRTOS.h>
|
||||
#include <task.h>
|
||||
|
||||
#define MG_ENABLE_CUSTOM_CALLOC 1
|
||||
|
||||
static inline void mg_free(void *ptr) {
|
||||
vPortFree(ptr);
|
||||
}
|
||||
|
||||
// Re-route calloc/free to the FreeRTOS's functions, don't use stdlib
|
||||
static inline void *mg_calloc(size_t cnt, size_t size) {
|
||||
void *p = pvPortMalloc(cnt * size);
|
||||
if (p != NULL) memset(p, 0, size * cnt);
|
||||
return p;
|
||||
}
|
||||
|
||||
#if !defined(MG_ENABLE_POSIX_FS) || !MG_ENABLE_POSIX_FS
|
||||
#else
|
||||
#define mkdir(a, b) mg_mkdir(a, b)
|
||||
static inline int mg_mkdir(const char *path, mode_t mode) {
|
||||
(void) path, (void) mode;
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // MG_ARCH == MG_ARCH_FREERTOS
|
||||
@@ -26,12 +26,15 @@ extern uint32_t rt_time_get(void);
|
||||
|
||||
#if defined(__ARMCC_VERSION)
|
||||
#define mode_t size_t
|
||||
#if !defined(MG_ENABLE_POSIX_FS) || !MG_ENABLE_POSIX_FS
|
||||
#else
|
||||
#define mkdir(a, b) mg_mkdir(a, b)
|
||||
static inline int mg_mkdir(const char *path, mode_t mode) {
|
||||
(void) path, (void) mode;
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (MG_ARCH == MG_ARCH_CMSIS_RTOS1 || MG_ARCH == MG_ARCH_CMSIS_RTOS2) && \
|
||||
!defined MG_ENABLE_RL && (!defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP) && \
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
#if !defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
|
||||
@@ -43,7 +43,9 @@
|
||||
|
||||
#include <ctype.h>
|
||||
#include <direct.h>
|
||||
#if !defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
|
||||
+5
-1
@@ -12,12 +12,16 @@
|
||||
#define MG_ENABLE_CUSTOM_LOG 0 // Let user define their own MG_LOG
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_FREERTOS
|
||||
#define MG_ENABLE_FREERTOS 0 // FreeRTOS RTOS
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_TCPIP
|
||||
#define MG_ENABLE_TCPIP 0 // Mongoose built-in network stack
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_LWIP
|
||||
#define MG_ENABLE_LWIP 0 // lWIP network stack
|
||||
#define MG_ENABLE_LWIP 0 // lwIP network stack
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_FREERTOS_TCP
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#if defined(MG_ENABLE_FREERTOS) && MG_ENABLE_FREERTOS
|
||||
|
||||
#include <FreeRTOS.h>
|
||||
#include <task.h>
|
||||
|
||||
#define MG_ENABLE_CUSTOM_CALLOC 1
|
||||
|
||||
static inline void mg_free(void *ptr) {
|
||||
vPortFree(ptr);
|
||||
}
|
||||
|
||||
// Re-route calloc/free to FreeRTOS functions, don't use stdlib
|
||||
static inline void *mg_calloc(size_t cnt, size_t size) {
|
||||
void *p = pvPortMalloc(cnt * size);
|
||||
if (p != NULL) memset(p, 0, size * cnt);
|
||||
return p;
|
||||
}
|
||||
|
||||
#endif // MG_ENABLE_FREERTOS
|
||||
+7
-8
@@ -156,15 +156,8 @@ bool mg_path_is_sane(const struct mg_str path) {
|
||||
#if MG_ENABLE_CUSTOM_MILLIS
|
||||
#else
|
||||
uint64_t mg_millis(void) {
|
||||
#if MG_ARCH == MG_ARCH_WIN32
|
||||
return GetTickCount();
|
||||
#elif MG_ARCH == MG_ARCH_PICOSDK
|
||||
return time_us_64() / 1000;
|
||||
#elif MG_ARCH == MG_ARCH_ESP8266 || MG_ARCH == MG_ARCH_ESP32 || \
|
||||
MG_ARCH == MG_ARCH_FREERTOS
|
||||
#if MG_ARCH == MG_ARCH_ESP8266 || MG_ARCH == MG_ARCH_ESP32 || MG_ENABLE_FREERTOS
|
||||
return xTaskGetTickCount() * portTICK_PERIOD_MS;
|
||||
#elif MG_ARCH == MG_ARCH_CUBE
|
||||
return (uint64_t) HAL_GetTick();
|
||||
#elif MG_ARCH == MG_ARCH_THREADX
|
||||
return tx_time_get() * (1000 /* MS per SEC */ / TX_TIMER_TICKS_PER_SECOND);
|
||||
#elif MG_ARCH == MG_ARCH_TIRTOS
|
||||
@@ -177,6 +170,12 @@ uint64_t mg_millis(void) {
|
||||
return (uint64_t) ((osKernelGetTickCount() * 1000) / osKernelGetTickFreq());
|
||||
#elif MG_ARCH == MG_ARCH_RTTHREAD
|
||||
return (uint64_t) ((rt_tick_get() * 1000) / RT_TICK_PER_SECOND);
|
||||
#elif MG_ARCH == MG_ARCH_WIN32
|
||||
return GetTickCount();
|
||||
#elif MG_ARCH == MG_ARCH_PICOSDK
|
||||
return time_us_64() / 1000;
|
||||
#elif MG_ARCH == MG_ARCH_CUBE
|
||||
return (uint64_t) HAL_GetTick();
|
||||
#elif MG_ARCH == MG_ARCH_UNIX && defined(__APPLE__)
|
||||
// Apple CLOCK_MONOTONIC_RAW is equivalent to CLOCK_BOOTTIME on linux
|
||||
// Apple CLOCK_UPTIME_RAW is equivalent to CLOCK_MONOTONIC_RAW on linux
|
||||
|
||||
+1
-1
@@ -251,7 +251,7 @@ mongoose.c: Makefile $(wildcard ../src/*.c) $(wildcard ../src/drivers/*.c)
|
||||
cd .. && (export LC_ALL=C ; cat src/license.h; echo; echo '#include "mongoose.h"' ; (for F in src/*.c src/drivers/*.c ; do echo; echo '#ifdef MG_ENABLE_LINES'; echo "#line 1 \"$$F\""; echo '#endif'; cat $$F | sed -e 's,#include ".*,,'; done))> $@
|
||||
|
||||
mongoose.h: $(HDRS) Makefile
|
||||
cd .. && (cat src/license.h; echo; echo '#ifndef MONGOOSE_H'; echo '#define MONGOOSE_H'; echo; cat src/version.h ; echo; echo '#ifdef __cplusplus'; echo 'extern "C" {'; echo '#endif'; cat src/arch.h src/arch_*.h src/net_ft.h src/net_lwip.h src/net_rl.h src/config.h src/profile.h src/str.h src/queue.h src/fmt.h src/printf.h src/log.h src/timer.h src/fs.h src/util.h src/url.h src/iobuf.h src/base64.h src/md5.h src/sha1.h src/sha256.h src/event.h src/net.h src/http.h src/ssi.h src/tls.h src/tls_x25519.h src/tls_aes128.h src/tls_uecc.h src/tls_chacha20.h src/tls_rsa.h src/tls_mbed.h src/tls_openssl.h src/ws.h src/sntp.h src/mqtt.h src/dns.h src/modbus.h src/json.h src/rpc.h src/dash.h src/ota.h src/flash.h src/wifi.h src/l2.h src/net_builtin.h src/drivers/*.h | sed -e '/keep/! s,#include ".*,,' -e 's,^#pragma once,,'; echo; echo '#ifdef __cplusplus'; echo '}'; echo '#endif'; echo '#endif // MONGOOSE_H')> $@
|
||||
cd .. && (cat src/license.h; echo; echo '#ifndef MONGOOSE_H'; echo '#define MONGOOSE_H'; echo; cat src/version.h ; echo; echo '#ifdef __cplusplus'; echo 'extern "C" {'; echo '#endif'; cat src/arch.h src/arch_*.h src/os_*.h src/net_ft.h src/net_lwip.h src/net_rl.h src/config.h src/profile.h src/str.h src/queue.h src/fmt.h src/printf.h src/log.h src/timer.h src/fs.h src/util.h src/url.h src/iobuf.h src/base64.h src/md5.h src/sha1.h src/sha256.h src/event.h src/net.h src/http.h src/ssi.h src/tls.h src/tls_x25519.h src/tls_aes128.h src/tls_uecc.h src/tls_chacha20.h src/tls_rsa.h src/tls_mbed.h src/tls_openssl.h src/ws.h src/sntp.h src/mqtt.h src/dns.h src/modbus.h src/json.h src/rpc.h src/dash.h src/ota.h src/flash.h src/wifi.h src/l2.h src/net_builtin.h src/drivers/*.h | sed -e '/keep/! s,#include ".*,,' -e 's,^#pragma once,,'; echo; echo '#ifdef __cplusplus'; echo '}'; echo '#endif'; echo '#endif // MONGOOSE_H')> $@
|
||||
|
||||
|
||||
clean: clean_tutorials clean_tutorials_embedded
|
||||
|
||||
@@ -42,8 +42,8 @@ firmware.bin: wizard
|
||||
$(BUILD) && rm -rf wizard*
|
||||
|
||||
wizard: FORCE
|
||||
hash=$$(curl -s -X POST -H "Content-Type: application/json" -d '{"build":{"board":"$(BOARD)","ide":"$(IDE)","rtos":"$(RTOS)"}}' $(WIZARD_URL)/api/hash | jq -r '.hash') \
|
||||
&& curl -s $(WIZARD_URL)/api/zip/$(BOARD)/$(IDE)/$(RTOS)/$$hash -o wizard.zip
|
||||
hash=$$(curl -H 'Cookie: mongoose_wizard_uid=F2PPlAgQCqSthV1g' -s -X POST -H "Content-Type: application/json" -d '{"build":{"board":"$(BOARD)","ide":"$(IDE)","rtos":"$(RTOS)"},"http":{"http": true}}' $(WIZARD_URL)/api/hash | jq -r '.hash') \
|
||||
&& curl -H 'Cookie: mongoose_wizard_uid=F2PPlAgQCqSthV1g' -s $(WIZARD_URL)/api/zip -o wizard.zip
|
||||
unzip wizard.zip
|
||||
|
||||
FORCE:
|
||||
@@ -1,7 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
// See https://mongoose.ws/documentation/#build-options
|
||||
#define MG_ARCH MG_ARCH_FREERTOS
|
||||
#define MG_ARCH MG_ARCH_ARMGCC
|
||||
#define MG_ENABLE_FREERTOS 1
|
||||
|
||||
#define MG_ENABLE_TCPIP 1
|
||||
#define MG_ENABLE_DRIVER_NXP_WIFI 1
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
// See https://mongoose.ws/documentation/#build-options
|
||||
#define MG_ARCH MG_ARCH_FREERTOS
|
||||
#define MG_ARCH MG_ARCH_ARMGCC
|
||||
#define MG_ENABLE_FREERTOS 1
|
||||
|
||||
#define MG_ENABLE_LWIP 1
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
// See https://mongoose.ws/documentation/#build-options
|
||||
#define MG_ARCH MG_ARCH_FREERTOS
|
||||
#define MG_ARCH MG_ARCH_ARMGCC
|
||||
#define MG_ENABLE_FREERTOS 1
|
||||
|
||||
#define MG_ENABLE_LWIP 1
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
sfrviewstate={"fFavorites"\:{"fLists"\:{}},"fProperties"\:{"fNodeProperties"\:{}}}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project>
|
||||
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1104970859" name="Debug">
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-68109283237235655" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
</extension>
|
||||
</configuration>
|
||||
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1035494833" name="Release">
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-68109283237235655" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
</extension>
|
||||
</configuration>
|
||||
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.1104970859.1778565727" name="Test">
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="-68109283237235655" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
</extension>
|
||||
</configuration>
|
||||
</project>
|
||||
@@ -1,6 +0,0 @@
|
||||
doxygen/doxygen_new_line_after_brief=true
|
||||
doxygen/doxygen_use_brief_tag=false
|
||||
doxygen/doxygen_use_javadoc_tags=true
|
||||
doxygen/doxygen_use_pre_tag=false
|
||||
doxygen/doxygen_use_structural_commands=false
|
||||
eclipse.preferences.version=1
|
||||
@@ -1,5 +0,0 @@
|
||||
635E684B79701B039C64EA45C3F84D30=1767C1FD5A90CBA93D279BE91F305A67
|
||||
66BE74F758C12D739921AEA421D593D3=0
|
||||
8DF89ED150041C4CBC7CB9A9CAA90856=7FFD126C0666B803FF7CCACF304BE6C0
|
||||
DC22A860405A8BF2F2C095E5B6529F12=7FFD126C0666B803FF7CCACF304BE6C0
|
||||
eclipse.preferences.version=1
|
||||
@@ -9,7 +9,8 @@
|
||||
|
||||
#define MG_ENABLE_CUSTOM_MILLIS 0
|
||||
#define MG_ENABLE_MBEDTLS 0
|
||||
#define MG_ARCH MG_ARCH_FREERTOS
|
||||
#define MG_ARCH MG_ARCH_ARMGCC
|
||||
#define MG_ENABLE_FREERTOS 1
|
||||
#define MG_STMPACK_NET 1
|
||||
#define MG_ENABLE_CUSTOM_RANDOM 1
|
||||
|
||||
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
sfrviewstate={"fFavorites"\:{"fLists"\:{}},"fProperties"\:{"fNodeProperties"\:{}}}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project>
|
||||
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.580693022" name="Debug">
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1809213655705399316" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
</extension>
|
||||
</configuration>
|
||||
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.2111642516" name="Release">
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1809213655705399316" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
</extension>
|
||||
</configuration>
|
||||
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.580693022.670759058" name="Test">
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="1809213655705399316" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
</extension>
|
||||
</configuration>
|
||||
</project>
|
||||
@@ -1,5 +0,0 @@
|
||||
635E684B79701B039C64EA45C3F84D30=7EC62A8EEAB33E6B6251E64B7094FD8B
|
||||
66BE74F758C12D739921AEA421D593D3=1
|
||||
8DF89ED150041C4CBC7CB9A9CAA90856=B51B08583BFB231F447A5555C047C200
|
||||
DC22A860405A8BF2F2C095E5B6529F12=B51B08583BFB231F447A5555C047C200
|
||||
eclipse.preferences.version=1
|
||||
@@ -9,7 +9,8 @@
|
||||
|
||||
#define MG_ENABLE_CUSTOM_MILLIS 0
|
||||
#define MG_ENABLE_MBEDTLS 0
|
||||
#define MG_ARCH MG_ARCH_FREERTOS
|
||||
#define MG_ARCH MG_ARCH_ARMGCC
|
||||
#define MG_ENABLE_FREERTOS 1
|
||||
#define MG_STMPACK_NET 1
|
||||
#define MG_ENABLE_CUSTOM_RANDOM 1
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
// See https://mongoose.ws/documentation/#build-options
|
||||
#define MG_ARCH MG_ARCH_FREERTOS
|
||||
#define MG_ARCH MG_ARCH_ARMGCC
|
||||
#define MG_ENABLE_FREERTOS 1
|
||||
|
||||
#define MG_ENABLE_FREERTOS_TCP 1
|
||||
#define MG_ENABLE_DRIVER_STM32F 1
|
||||
#define MG_ENABLE_CUSTOM_RANDOM 1
|
||||
|
||||
Reference in new issue
Block a user