From 180f321eb472bf95f9edd97013458eab6999ccb6 Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Tue, 5 Dec 2023 18:19:59 +0100 Subject: [PATCH 1/3] Fixed plugin SDK compatibility with ledger_assert --- src_plugin_sdk/standard_plugin.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src_plugin_sdk/standard_plugin.mk b/src_plugin_sdk/standard_plugin.mk index 6a2023f2e..0fd12d163 100644 --- a/src_plugin_sdk/standard_plugin.mk +++ b/src_plugin_sdk/standard_plugin.mk @@ -57,6 +57,8 @@ DISABLE_STANDARD_SNPRINTF = 1 DISABLE_STANDARD_USB = 1 DISABLE_STANDARD_WEBUSB = 1 DISABLE_STANDARD_BAGL_UX_FLOW = 1 +DISABLE_DEBUG_LEDGER_ASSERT = 1 +DISABLE_DEBUG_THROW = 1 # Required for PRINTFs to compile ifeq ($(DEBUG),0) From 0f2d026b4018efa6ef699f620e30cfbee7ac4523 Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Wed, 6 Dec 2023 14:31:50 +0100 Subject: [PATCH 2/3] Renamed plugin SDK utils to plugin_utils to prevent filename conflicts in plugins --- src_plugin_sdk/{utils.c => plugin_utils.c} | 2 +- src_plugin_sdk/{utils.h => plugin_utils.h} | 0 tools/build_sdk.py | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename src_plugin_sdk/{utils.c => plugin_utils.c} (97%) rename src_plugin_sdk/{utils.h => plugin_utils.h} (100%) diff --git a/src_plugin_sdk/utils.c b/src_plugin_sdk/plugin_utils.c similarity index 97% rename from src_plugin_sdk/utils.c rename to src_plugin_sdk/plugin_utils.c index 059430efd..42ecef09d 100644 --- a/src_plugin_sdk/utils.c +++ b/src_plugin_sdk/plugin_utils.c @@ -15,7 +15,7 @@ * limitations under the License. *****************************************************************************/ -#include "utils.h" +#include "plugin_utils.h" bool find_selector(uint32_t selector, const uint32_t *array, size_t size, size_t *idx) { for (size_t i = 0; i < size; ++i) { diff --git a/src_plugin_sdk/utils.h b/src_plugin_sdk/plugin_utils.h similarity index 100% rename from src_plugin_sdk/utils.h rename to src_plugin_sdk/plugin_utils.h diff --git a/tools/build_sdk.py b/tools/build_sdk.py index dfda9be77..a2763248e 100755 --- a/tools/build_sdk.py +++ b/tools/build_sdk.py @@ -210,8 +210,8 @@ def merge_c_files(sources, nodes_to_extract): files_to_copy = [ "main.c", - "utils.c", - "utils.h", + "plugin_utils.c", + "plugin_utils.h", ] for file in files_to_copy: shutil.copyfile("src_plugin_sdk/" + file, From 6c1567ae92df4459ecfc4cd45696b39830fc2214 Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Tue, 5 Dec 2023 18:20:12 +0100 Subject: [PATCH 3/3] Updated plugin SDK changelog --- src_plugin_sdk/CHANGELOG.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src_plugin_sdk/CHANGELOG.md b/src_plugin_sdk/CHANGELOG.md index d01453e61..f0bbbe9a7 100644 --- a/src_plugin_sdk/CHANGELOG.md +++ b/src_plugin_sdk/CHANGELOG.md @@ -5,7 +5,25 @@ | :rotating_light: | Breaks build | | :warning: | Breaks compatibility with app | -## [latest](/) - 2023/10/19 +## [latest](/) - 2023/12/06 + +### Fixed + +* standard\_plugin build ([this PR on the SDK](https://github.com/LedgerHQ/ledger-secure-sdk/pull/473) had broken it) + +### Changed + +* utils renamed to plugin\_utils to prevent filename conflicts in plugins + +## [4d8e044](/../../commit/4d8e044) - 2023/11/09 + +### Added + +* standard\_plugin Makefile so plugins can use it & have a really small Makefile +with only the relevant information +* Comments in the plugin interface header file + +## [1fe4085](/../../commit/1fe4085) - 2023/10/19 ### Changed