diff --git a/pkg/flashdb/Makefile b/pkg/flashdb/Makefile index 8782ee26204d7..904e8ce1bd281 100644 --- a/pkg/flashdb/Makefile +++ b/pkg/flashdb/Makefile @@ -1,7 +1,7 @@ PKG_NAME=flashdb PKG_URL=https://github.com/armink/FlashDB.git -# 1.1.2 -PKG_VERSION=7062902a3e7b6b8a7e8f5886ae242271a0164e05 +# 2.0.0 +PKG_VERSION=4e5677408256f82d47cd56a6b04605dcee35ed9a PKG_LICENSE=Apache-2.0 include $(RIOTBASE)/pkg/pkg.mk @@ -11,6 +11,8 @@ CFLAGS += -Wno-cast-align CFLAGS += -Wno-unused CFLAGS += -Wno-unused-parameter CFLAGS += -Wno-format +# can be dropped if #226 is merged +CFLAGS += -Wno-sign-compare .PHONY: flashdb_fal diff --git a/pkg/flashdb/Makefile.dep b/pkg/flashdb/Makefile.dep index 7538c7dee4e19..98f771e1a2cd8 100644 --- a/pkg/flashdb/Makefile.dep +++ b/pkg/flashdb/Makefile.dep @@ -1,5 +1,6 @@ # FlashDB is only supported by 32 bit architectures FEATURES_REQUIRED += arch_32bit +CFLAGS += -DFDB_USING_NATIVE_ASSERT ifneq (,$(filter flashdb_tsdb,$(USEMODULE))) CFLAGS += -DFDB_USING_TSDB diff --git a/pkg/flashdb/patches/0002-port-fal-add-option-to-use-native-assert.patch b/pkg/flashdb/patches/0002-port-fal-add-option-to-use-native-assert.patch new file mode 100644 index 0000000000000..aff1225be9108 --- /dev/null +++ b/pkg/flashdb/patches/0002-port-fal-add-option-to-use-native-assert.patch @@ -0,0 +1,55 @@ +From 4daeb0a609e6b5bfea608900576109e8d4fa604c Mon Sep 17 00:00:00 2001 +From: Benjamin Valentin +Date: Mon, 7 Aug 2023 17:23:48 +0200 +Subject: [PATCH] [port/fal] add option to use native assert() + +--- + port/fal/inc/fal_def.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/port/fal/inc/fal_def.h b/port/fal/inc/fal_def.h +index f558598..de8aada 100644 +--- a/port/fal/inc/fal_def.h ++++ b/port/fal/inc/fal_def.h +@@ -13,6 +13,9 @@ + + #include + #include ++#ifdef FDB_USING_NATIVE_ASSERT ++#include ++#endif + + #define FAL_SW_VERSION "0.5.99" + +@@ -50,6 +53,7 @@ + #endif + + #if FAL_DEBUG ++#ifndef FDB_USING_NATIVE_ASSERT + #ifdef assert + #undef assert + #endif +@@ -59,6 +63,7 @@ if (!(EXPR)) \ + FAL_PRINTF("(%s) has assert failed at %s.\n", #EXPR, __func__ ); \ + while (1); \ + } ++#endif + + /* debug level log */ + #ifdef log_d +@@ -69,10 +74,12 @@ if (!(EXPR)) \ + + #else + ++#ifndef FDB_USING_NATIVE_ASSERT + #ifdef assert + #undef assert + #endif + #define assert(EXPR) ((void)0); ++#endif + + /* debug level log */ + #ifdef log_d +-- +2.39.2 + diff --git a/pkg/flashdb/patches/0002-remove-assert-definition.patch b/pkg/flashdb/patches/0002-remove-assert-definition.patch deleted file mode 100644 index 2cae1d41a8574..0000000000000 --- a/pkg/flashdb/patches/0002-remove-assert-definition.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 8c798a4fb33dbafec6a05735537f77e281bf11db Mon Sep 17 00:00:00 2001 -From: Benjamin Valentin -Date: Wed, 2 Feb 2022 22:03:41 +0100 -Subject: [PATCH] remove assert() definition - ---- - port/fal/inc/fal_def.h | 15 +-------------- - 1 file changed, 1 insertion(+), 14 deletions(-) - -diff --git a/port/fal/inc/fal_def.h b/port/fal/inc/fal_def.h -index f432c26..6ba206b 100644 ---- a/port/fal/inc/fal_def.h -+++ b/port/fal/inc/fal_def.h -@@ -25,6 +25,7 @@ - #ifndef _FAL_DEF_H_ - #define _FAL_DEF_H_ - -+#include - #include - #include - -@@ -64,15 +65,6 @@ - #endif - - #if FAL_DEBUG --#ifdef assert --#undef assert --#endif --#define assert(EXPR) \ --if (!(EXPR)) \ --{ \ -- FAL_PRINTF("(%s) has assert failed at %s.\n", #EXPR, __FUNCTION__); \ -- while (1); \ --} - - /* debug level log */ - #ifdef log_d -@@ -82,11 +74,6 @@ if (!(EXPR)) \ - - #else - --#ifdef assert --#undef assert --#endif --#define assert(EXPR) ((void)0); -- - /* debug level log */ - #ifdef log_d - #undef log_d --- -2.32.0 -