File tree 3 files changed +66
-2
lines changed
3 files changed +66
-2
lines changed Original file line number Diff line number Diff line change 30
30
#include "mcu/native_bsp.h"
31
31
#include "mcu/mcu_hal.h"
32
32
#include "hal/hal_i2c.h"
33
+ #include "defs/sections.h"
33
34
#include "ef_tinycrypt/ef_tinycrypt.h"
34
35
35
36
#if MYNEWT_VAL (SIM_ACCEL_PRESENT )
@@ -40,7 +41,7 @@ static struct sim_accel os_bsp_accel0;
40
41
static struct uart_dev os_bsp_uart0 ;
41
42
static struct uart_dev os_bsp_uart1 ;
42
43
43
- static struct eflash_tinycrypt_dev ef_dev0 = {
44
+ static sec_data_secret struct eflash_tinycrypt_dev ef_dev0 = {
44
45
.etd_dev = {
45
46
.efd_hal = {
46
47
.hf_itf = & enc_flash_funcs ,
Original file line number Diff line number Diff line change 29
29
#include "mcu/nrf52_hal.h"
30
30
#include "mcu/nrf52_periph.h"
31
31
#include "bsp/bsp.h"
32
+ #include "defs/sections.h"
32
33
#if MYNEWT_VAL (SOFT_PWM )
33
34
#include "pwm/pwm.h"
34
35
#include "soft_pwm/soft_pwm.h"
@@ -63,7 +64,7 @@ static const struct hal_bsp_mem_dump dump_cfg[] = {
63
64
};
64
65
65
66
#if MYNEWT_VAL (ENC_FLASH_DEV )
66
- struct eflash_nrf5x_dev enc_flash_dev0 = {
67
+ static sec_data_secret struct eflash_nrf5x_dev enc_flash_dev0 = {
67
68
.end_dev = {
68
69
.efd_hal = {
69
70
.hf_itf = & enc_flash_funcs ,
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Licensed to the Apache Software Foundation (ASF) under one
3
+ * or more contributor license agreements. See the NOTICE file
4
+ * distributed with this work for additional information
5
+ * regarding copyright ownership. The ASF licenses this file
6
+ * to you under the Apache License, Version 2.0 (the
7
+ * "License"); you may not use this file except in compliance
8
+ * with the License. You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing,
13
+ * software distributed under the License is distributed on an
14
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ * KIND, either express or implied. See the License for the
16
+ * specific language governing permissions and limitations
17
+ * under the License.
18
+ */
19
+
20
+ #ifndef H_DEFS_SECTIONS_
21
+ #define H_DEFS_SECTIONS_
22
+
23
+ #include <bsp/bsp.h>
24
+
25
+ #ifdef __cplusplus
26
+ extern "C" {
27
+ #endif
28
+
29
+ /**
30
+ * BSP/MCU can specify special sections it wants to use.
31
+ * But it does not have to, and if it doesn't define them, then here is the
32
+ * default.
33
+ */
34
+ /*
35
+ * XXX explanation of when to use these 3?
36
+ */
37
+ #ifndef sec_data_core
38
+ #define sec_data_core
39
+ #endif
40
+ #ifndef sec_bss_core
41
+ #define sec_bss_core
42
+ #endif
43
+ #ifndef sec_bss_nz_core
44
+ #define sec_bss_nz_core
45
+ #endif
46
+
47
+ /**
48
+ * Sensitive data (eg keys), which should be excluded from corefiles.
49
+ */
50
+ #ifndef sec_bss_secret
51
+ #define sec_bss_secret
52
+ #endif
53
+ #ifndef sec_data_secret
54
+ #define sec_data_secret
55
+ #endif
56
+
57
+ #ifdef __cplusplus
58
+ }
59
+ #endif
60
+
61
+
62
+ #endif /* H_DEFS_SECTIONS_ */
You can’t perform that action at this time.
0 commit comments