From bc90ca469d2a7ec881a7713be32a31003f6dc304 Mon Sep 17 00:00:00 2001 From: Julian Arevalo Date: Mon, 20 May 2024 09:14:02 +0200 Subject: [PATCH 1/5] lib_cxng: use types with fixed size for portability between 32/64 bit Avoid unit tests errors that are run on x86 64 bit (cherry picked from commit baa266c1dcc421ea6ffbbc535e1ec7c3cdd1d12a) --- include/ox_aes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ox_aes.h b/include/ox_aes.h index b702e368c..f09cf751d 100644 --- a/include/ox_aes.h +++ b/include/ox_aes.h @@ -76,8 +76,8 @@ * @details Such container should be initialized with #cx_aes_init_key_no_throw. */ struct cx_aes_key_s { - size_t size; ///< key size - uint8_t keys[32]; ///< key value + uint32_t size; ///< key size + uint8_t keys[32]; ///< key value }; /** Convenience type. See #cx_aes_key_s. */ typedef struct cx_aes_key_s cx_aes_key_t; From 3318d2a59560fb51203dd72d35d89c34f4275eaf Mon Sep 17 00:00:00 2001 From: Julian Arevalo Date: Mon, 20 May 2024 09:15:13 +0200 Subject: [PATCH 2/5] lib_cxng: use types that clearly express their width (cherry picked from commit 989963226717da2ef154661954ed3c5c0381256b) (cherry picked from commit 82f6f52245d8723f15a0071a1e457958cedc3296) --- lib_cxng/include/lcx_cipher.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_cxng/include/lcx_cipher.h b/lib_cxng/include/lcx_cipher.h index e007031e1..415ed58b2 100644 --- a/lib_cxng/include/lcx_cipher.h +++ b/lib_cxng/include/lcx_cipher.h @@ -42,8 +42,8 @@ typedef enum { /** Generic key structure */ typedef struct { - unsigned int size; - unsigned char keys[32]; + uint32_t size; + uint8_t keys[32]; } cipher_key_t; /** Base cipher information */ From e08bc562f64e9eac34d9b18776f71a4a5c8afb04 Mon Sep 17 00:00:00 2001 From: Francois Beutin Date: Tue, 28 May 2024 09:49:46 +0200 Subject: [PATCH 3/5] Add WEAK attribute to main functions of standard app (cherry picked from commit 8cb7abc061644614ab84e5660e0f45641902ad9b) (cherry picked from commit b8df925c951345ba69788b428eb1f38a5c3592dd) --- lib_standard_app/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib_standard_app/main.c b/lib_standard_app/main.c index e82647eac..a04b360e2 100644 --- a/lib_standard_app/main.c +++ b/lib_standard_app/main.c @@ -40,7 +40,7 @@ WEAK void __attribute__((noreturn)) app_exit(void) os_sched_exit(-1); } -static void common_app_init(void) +WEAK void common_app_init(void) { UX_INIT(); @@ -55,7 +55,7 @@ static void common_app_init(void) #endif // HAVE_BLE } -static void standalone_app_main(void) +WEAK void standalone_app_main(void) { #ifdef HAVE_SWAP G_called_from_swap = false; @@ -102,7 +102,7 @@ static void standalone_app_main(void) } #ifdef HAVE_SWAP -static void library_app_main(libargs_t *args) +WEAK void library_app_main(libargs_t *args) { BEGIN_TRY { @@ -152,7 +152,7 @@ static void library_app_main(libargs_t *args) } #endif // HAVE_SWAP -__attribute__((section(".boot"))) int main(int arg0) +WEAK __attribute__((section(".boot"))) int main(int arg0) { // exit critical section __asm volatile("cpsie i"); From fef3459410688329551ffc328915fb05ac8868bc Mon Sep 17 00:00:00 2001 From: abonnaudet-ledger <71646516+abonnaudet-ledger@users.noreply.github.com> Date: Thu, 6 Jun 2024 09:58:53 +0200 Subject: [PATCH 4/5] README.md: Update API LEVEL documentation (cherry picked from commit 45c01e6840b0ad83eaae2a8b6e2885ac2957f129) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c581aec6..ca3e89f9a 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ OS release candidates are only kept in the list when a corresponding OS release | 16 | europa_0.1.0-re1 | :x: | 17 | europa_0.1.0-re2 | :x: | 18 | europa_0.1.0-re3
flex_0.2.0-rc1
flex_0.2.0-rc2
nanox_2.3.0-rc5
nanos+_1.2.0-rc5 | :heavy_check_mark: -| 19 | flex_1.0.0-rc1 | :heavy_check_mark: +| 19 | flex_1.0.0-rc1
flex_1.0.0-rc2
flex_1.0.0
flex_1.0.1
| :heavy_check_mark: ### Cherry-picking process: From f085c8dbbbba82c43684e7dfcd6de2942672d534 Mon Sep 17 00:00:00 2001 From: Xavier Chapron Date: Fri, 17 May 2024 14:20:20 +0200 Subject: [PATCH 5/5] script.ld: Fix LNX and LNSP SRAM size (cherry picked from commit e502be105bbfb67ea964b992fd1b2a653b62dca3) --- target/nanos2/script.ld | 2 +- target/nanox/script.ld | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/nanos2/script.ld b/target/nanos2/script.ld index c775ab1f0..94b0b2e18 100644 --- a/target/nanos2/script.ld +++ b/target/nanos2/script.ld @@ -26,7 +26,7 @@ MEMORY FLASH (rx) : ORIGIN = 0xc0de0000, LENGTH = 400K DATA (r) : ORIGIN = 0xc0de0000, LENGTH = 400K - SRAM (rwx) : ORIGIN = 0xda7a0000, LENGTH = 30K + SRAM (rwx) : ORIGIN = 0xda7a0000, LENGTH = 44K } PAGE_SIZE = 512; diff --git a/target/nanox/script.ld b/target/nanox/script.ld index 44cd6d66f..cfca329f1 100644 --- a/target/nanox/script.ld +++ b/target/nanox/script.ld @@ -26,7 +26,7 @@ MEMORY FLASH (rx) : ORIGIN = 0xc0de0000, LENGTH = 400K DATA (r) : ORIGIN = 0xc0de0000, LENGTH = 400K - SRAM (rwx) : ORIGIN = 0xda7a0000, LENGTH = 30K + SRAM (rwx) : ORIGIN = 0xda7a0000, LENGTH = 28K } PAGE_SIZE = 256;