Skip to content

Commit 2a530a2

Browse files
Add dynamic memory allocator
1 parent 35c386f commit 2a530a2

File tree

8 files changed

+777
-0
lines changed

8 files changed

+777
-0
lines changed

.github/workflows/unit_tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
STAX=1 cmake -Bbuild -H. && make -C build && CTEST_OUTPUT_ON_FAILURE=1 make -C build test
3030
cd ../app_storage/
3131
cmake -Bbuild -H. && make -C build && make -C build test
32+
cd ../lib_alloc/
33+
cmake -Bbuild -H. && make -C build && make -C build test
3234
3335
- name: Generate code coverage
3436
run: |
@@ -38,6 +40,8 @@ jobs:
3840
../gen_coverage.sh
3941
cd ../app_storage/
4042
../gen_coverage.sh
43+
cd ../lib_alloc/
44+
../gen_coverage.sh
4145
4246
- uses: actions/upload-artifact@v4
4347
with:

Makefile.rules

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ else
2727
NBGL_INCLUDE_PATH := lib_nbgl
2828
endif
2929

30+
# include dynamic memory allocator, if asked (temporary flag)
31+
ifeq ($(ENABLE_DYNAMIC_ALLOC), 1)
32+
SDK_SOURCE_PATH += lib_alloc
33+
endif
34+
3035
define uniq =
3136
$(eval seen :=)
3237
$(foreach _,$1,$(if $(filter $_,${seen}),,$(eval seen += $_)))

include/errors.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,6 @@ enum sdk_generic_identifiers {
150150
#define EXCEPTION_IO_STATE 0x11 // keep original value // SWO_MUI_UNK_15
151151
#define EXCEPTION_CXPORT 0x12 // keep original value // SWO_MUI_UNK_16
152152
#define EXCEPTION_SYSTEM 0x13 // keep original value // SWO_MUI_UNK_17
153+
#define EXCEPTION_CORRUPT 0x14
153154

154155
#endif // ERRORS_H

0 commit comments

Comments
 (0)