File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,20 @@ static inline int openmode_to_posix(int openmode) {
177
177
* */
178
178
extern " C" FILEHANDLE PREFIX (_open)(const char * name, int openmode) {
179
179
#if defined(__MICROLIB) && (__ARMCC_VERSION>5030000)
180
+ #if !defined(MBED_CONF_RTOS_PRESENT)
181
+ // valid only for mbed 2
182
+ // for ulib, this is invoked after RAM init, prior c++
183
+ // used as hook, as post stack/heap is not active there
184
+ extern void mbed_copy_nvic (void );
185
+ extern void mbed_sdk_init (void );
186
+
187
+ static int mbed_sdk_inited = 0 ;
188
+ if (!mbed_sdk_inited) {
189
+ mbed_copy_nvic ();
190
+ mbed_sdk_init ();
191
+ mbed_sdk_inited = 1 ;
192
+ }
193
+ #endif
180
194
// Before version 5.03, we were using a patched version of microlib with proper names
181
195
// This is the workaround that the microlib author suggested us
182
196
static int n = 0 ;
You can’t perform that action at this time.
0 commit comments