diff --git a/builder/frameworks/realtek-ambz-sdk.py b/builder/frameworks/realtek-ambz-sdk.py index ec5d6c7..3721300 100644 --- a/builder/frameworks/realtek-ambz-sdk.py +++ b/builder/frameworks/realtek-ambz-sdk.py @@ -194,8 +194,8 @@ env.AddLibrary( ], ) -# Sources - lwIP 2.0.0 -env.AddLibraryLwIP(version="2.0.0", port="amb1") +# Sources - lwIP 2.1.3 +env.AddLibraryLwIP(version="2.1.3", port="amb1") # Sources - mbedTLS env.AddLibrary( diff --git a/builder/main.py b/builder/main.py index ea07f21..d2f8c69 100644 --- a/builder/main.py +++ b/builder/main.py @@ -27,7 +27,6 @@ if env.get("PROGNAME", "program") == "program": env.Replace(PROGNAME="firmware") env.Replace(PROGSUFFIX=".elf") -# Toolchain config - TODO multiple arch, specified in board.json prefix = board.get("build.prefix", "") env.Replace( AR=prefix + "gcc-ar", diff --git a/platform.json b/platform.json index 6f0db2f..e838ddb 100644 --- a/platform.json +++ b/platform.json @@ -49,7 +49,7 @@ "toolchain": "gccarmnoneeabi@~1.50201.0", "libraries": { "lwip": [ - "v2.0.0-amb1" + "v2.1.3-amb1" ] } }, diff --git a/platform/realtek-ambz/fixups/inc/strproc.h b/platform/realtek-ambz/fixups/inc/strproc.h new file mode 100644 index 0000000..21e8b45 --- /dev/null +++ b/platform/realtek-ambz/fixups/inc/strproc.h @@ -0,0 +1,22 @@ +/* Copyright (c) Kuba SzczodrzyƄski 2022-11-26. */ + +// make not #define isprint, isdigit, isxdigit, islower and isspace +// this conflicts with stdlib , if is included before it + +// include before to get all its macros +#include + +// make 'static inline int _tolower' unused +#undef _tolower +#define _tolower _tolower_dummy + +#include_next + +// restore _tolower to ctype's macro +#undef _tolower +#define _tolower(__c) ((unsigned char)(__c) - 'A' + 'a') + +// dirty fix for compiling mbedTLS which uses _B as variable name +#ifdef CONFIG_SSL_RSA +#undef _B +#endif \ No newline at end of file