Skip to content

Commit 8e20beb

Browse files
andriy-bilynskyyYuriy Vynnychek
authored and
Yuriy Vynnychek
committed
hal: telink: Introduce retention memory layout
By defining CONFIG_TELINK_B91_RETENTION only deep-sleep retention memory is used (first 64KB of ILM). Signed-off-by: Andrii Bilynskyi <andrii.bilynskyi@telink-semi.com>
1 parent c2ae1ba commit 8e20beb

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

tlsr9/common/compiler.h

+13-5
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,21 @@
3232
#define _attribute_ram_code_sec_noinline_ __attribute__((section(".ram_code"))) __attribute__((noinline))
3333
#define _attribute_ram_code_ _attribute_ram_code_sec_noinline_
3434
#define _attribute_text_sec_ __attribute__((section(".text")))
35-
#define _attribute_aes_data_sec_ __attribute__((section(".aes_data")))
36-
#define _attribute_data_retention_sec_ __attribute__((section(".retention_data")))
37-
#define _attribute_data_retention_ __attribute__((section(".retention_data")))
38-
#define _attribute_ble_data_retention_ __attribute__((section(".retention_data")))
35+
#if defined(CONFIG_TELINK_B91_RETENTION)
36+
#define _attribute_aes_data_sec_ __attribute__((section(".data")))
37+
#define _attribute_data_retention_sec_ __attribute__((section(".data")))
38+
#define _attribute_data_retention_ __attribute__((section(".data")))
39+
#define _attribute_ble_data_retention_ __attribute__((section(".data")))
40+
#define _attribute_data_dlm_ __attribute__((section(".data")))
41+
#else
42+
#define _attribute_aes_data_sec_ __attribute__((section(".aes_data")))
43+
#define _attribute_data_retention_sec_ __attribute__((section(".retention_data")))
44+
#define _attribute_data_retention_ __attribute__((section(".retention_data")))
45+
#define _attribute_ble_data_retention_ __attribute__((section(".retention_data")))
46+
#define _attribute_data_dlm_ __attribute__((section(".dlm_data")))
47+
#endif
3948
#define _attribute_aligned_(s) __attribute__((aligned(s)))
4049
#define _attribute_no_inline_ __attribute__((noinline))
41-
#define _attribute_data_dlm_ __attribute__((section(".dlm_data")))
4250
#define _attribute_session_(s) __attribute__((section(s)))
4351

4452
#endif

0 commit comments

Comments
 (0)