diff --git a/builder/family/realtek-ambz2.py b/builder/family/realtek-ambz2.py index acdb0fc..c6b2bbe 100644 --- a/builder/family/realtek-ambz2.py +++ b/builder/family/realtek-ambz2.py @@ -116,11 +116,6 @@ queue.AddLibrary( "+", "+", "+", - # os - freertos - "+", - # os - freertos - portable - "+", - "+", # peripheral - api "+", # peripheral - hal @@ -157,8 +152,6 @@ queue.AddLibrary( "+", "+", "+", - "+", - "+", "+", "+", "+", @@ -191,6 +184,11 @@ queue.AddLibrary( ), ) +# Sources - FreeRTOS +env.Replace(FREERTOS_PORT=env["FAMILY_NAME"], FREERTOS_PORT_DEFINE="REALTEK_AMBZ2") +queue.AddExternalLibrary("freertos") +queue.AddExternalLibrary("freertos-port") + # Sources - network utilities queue.AddLibrary( name="ambz2_net", diff --git a/cores/realtek-ambz/base/fixups/cmsis_ipsr.c b/cores/realtek-amb/base/fixups/cmsis_ipsr.c similarity index 100% rename from cores/realtek-ambz/base/fixups/cmsis_ipsr.c rename to cores/realtek-amb/base/fixups/cmsis_ipsr.c diff --git a/cores/realtek-ambz2/base/fixups/rtl8710c_freertos_pmu.h b/cores/realtek-ambz2/base/fixups/rtl8710c_freertos_pmu.h new file mode 100644 index 0000000..ab014d8 --- /dev/null +++ b/cores/realtek-ambz2/base/fixups/rtl8710c_freertos_pmu.h @@ -0,0 +1,11 @@ +/* Copyright (c) Kuba SzczodrzyƄski 2023-05-23. */ + +#include + +// rtl8710c_freertos_pmu.h needs the u32/u16/u8 integer typedefs, +// so it relies on the caller (freertos_pmu.c) to provide these, +// which relies on FreeRTOS.h to include FreeRTOSConfig.h, +// which relies on diag.h included to get printf() functions, +// which just happens to include basic_types.h as well, +// and that's what makes the whole thing even compile +#include_next "rtl8710c_freertos_pmu.h" diff --git a/platform.json b/platform.json index abff61d..dad8560 100644 --- a/platform.json +++ b/platform.json @@ -43,6 +43,9 @@ "version_prefix": true, "toolchains": { "any": "gccarmnoneeabi@~1.100301.0" + }, + "libraries": { + "freertos": "10.0.1" } }, "framework-beken-bdk": { @@ -80,7 +83,7 @@ }, "library-freertos-port": { "type": "framework", - "version": "https://github.com/libretiny-eu/library-freertos-port#2023.03.13" + "version": "https://github.com/libretiny-eu/library-freertos-port#2023.05.23" }, "library-flashdb": { "type": "framework",