File tree Expand file tree Collapse file tree 3 files changed +68
-1
lines changed
targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52 Expand file tree Collapse file tree 3 files changed +68
-1
lines changed Original file line number Diff line number Diff line change 57
57
uint32_t nrf_dispatch_vector [NVIC_NUM_VECTORS ] @ ".nvictable" ;
58
58
#endif
59
59
60
+ #include "platform/mbed_toolchain.h"
61
+ #include "subtarget_init.h"
62
+
60
63
extern uint32_t __Vectors [];
61
64
62
65
#define VECTORS_FLASH_START __Vectors
@@ -113,7 +116,6 @@ void nrf_reloc_vector_table(void)
113
116
#endif
114
117
}
115
118
116
-
117
119
void mbed_sdk_init (void )
118
120
{
119
121
if (STDIO_UART_RTS != NC ) {
@@ -122,4 +124,6 @@ void mbed_sdk_init(void)
122
124
/* Set STDIO_UART_RTS as gpio driven low */
123
125
gpio_write (& rts , 0 );
124
126
}
127
+
128
+ subtarget_sdk_init ();
125
129
}
Original file line number Diff line number Diff line change
1
+ /* mbed Microcontroller Library
2
+ * Copyright (c) 2021 ARM Limited
3
+ * Copyright (c) 2021 Embedded Planet, Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * 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, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ #include "subtarget_init.h"
20
+ #include "platform/mbed_toolchain.h"
21
+
22
+ MBED_WEAK void subtarget_sdk_init (void ) {
23
+ /* Do nothing by default */
24
+ }
Original file line number Diff line number Diff line change
1
+ /* mbed Microcontroller Library
2
+ * Copyright (c) 2021 ARM Limited
3
+ * Copyright (c) 2021 Embedded Planet, Inc.
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * 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, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ #ifndef _NORDIC_SUBTARGET_INIT_
20
+ #define _NORDIC_SUBTARGET_INIT_
21
+
22
+ #ifdef __cplusplus
23
+ extern "C" {
24
+ #endif
25
+
26
+ /**
27
+ * Since Mbed's `mbed_sdk_init` hook is used by the NRF52 family code, this
28
+ * initialization hook is provided so subtargets may implement their own startup
29
+ * initialization code, if necessary.
30
+ *
31
+ * By default, it is a blank function that is declared a "weak" symbol
32
+ */
33
+ void subtarget_sdk_init (void );
34
+
35
+ #ifdef __cplusplus
36
+ }
37
+ #endif
38
+
39
+ #endif /* _NORDIC_SUBTARGET_INIT_ */
You can’t perform that action at this time.
0 commit comments