Skip to content

Commit f17280e

Browse files
committed
Enabling small C library option and deprecating uARM toolchain
- By default, Mbed OS build tools use standard C library for all supported toolchains. It is possible to use smaller C libraries by overriding the "target.default_lib" option with "small". This option is only currently supported for the GCC_ARM toolchain. This override config option is now extended in the build tool for ARM toolchain. - Add configuration option to specify libraries supported for each toolchain per targets. - Move __aeabi_assert function from rtos to retarget code so it’s available for bare metal. - Use 2 memory region model for ARM toolchain scatter file for the following targets: NUCLEO_F207ZG, STM32F411xE, STM32F429xI, NUCLEO_L073RZ, STM32F303xE - Add a warning message in the build tools to deprecate uARM toolchain. - NewLib-Nano C library is not supporting floating-point and printf with %hhd,%hhu,%hhX,%lld,%llu,%llX format specifier so skipping those green tea test cases.
1 parent f2a1804 commit f17280e

File tree

18 files changed

+438
-91
lines changed

18 files changed

+438
-91
lines changed

TESTS/configs/baremetal.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
],
3737
"target_overrides": {
3838
"*": {
39+
"target.default_lib": "small",
3940
"mbed-trace.fea-ipv6": false
4041
}
4142
}

TESTS/mbed_drivers/c_strings/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ void test_case_c_string_x_X()
5454
TEST_ASSERT_EQUAL_STRING("8000 C8E 3e7 64 1 0 1 1087 3e7 101B 7ff8 1869F", buffer);
5555
}
5656

57+
#if !defined(__NEWLIB_NANO)
5758
void test_case_c_string_f_f()
5859
{
5960
CLEAN_BUFFER;
@@ -74,6 +75,7 @@ void test_case_c_string_e_E()
7475
sprintf(buffer, "%e %E %e %E %e %E %e %E %e %E %e", FLOATS);
7576
TEST_ASSERT_EQUAL_STRING("2.000000e-03 9.243000E-01 1.591320e+01 7.917737E+02 6.208200e+03 2.571950E+04 4.268160e+05 6.429271E+06 4.246802e+07 2.120065E+08 6.579048e+03", buffer);
7677
}
78+
#endif
7779

7880
void test_case_c_string_strtok()
7981
{
@@ -113,11 +115,13 @@ Case cases[] = {
113115
Case("C strings: %i %d integer formatting", test_case_c_string_i_d, greentea_failure_handler),
114116
Case("C strings: %u %d integer formatting", test_case_c_string_u_d, greentea_failure_handler),
115117
Case("C strings: %x %E integer formatting", test_case_c_string_x_X, greentea_failure_handler),
118+
#if !defined(__NEWLIB_NANO)
116119
Case("C strings: %f %f float formatting", test_case_c_string_f_f, greentea_failure_handler),
117120
#ifndef MBED_MINIMAL_PRINTF
118121
Case("C strings: %e %E float formatting", test_case_c_string_e_E, greentea_failure_handler),
119122
Case("C strings: %g %g float formatting", test_case_c_string_g_g, greentea_failure_handler),
120123
#endif
124+
#endif
121125
};
122126

123127
utest::v1::status_t greentea_test_setup(const size_t number_of_cases)

TESTS/mbed_platform/minimal-printf/compliance/main.cpp

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ static control_t test_printf_d(const size_t call_count)
5151

5252
/*************************************************************************/
5353
/*************************************************************************/
54+
#if !defined(__NEWLIB_NANO)
5455
result_minimal = mbed_printf("hhd: %hhd\r\n", SCHAR_MIN);
5556
result_file = mbed_fprintf(stderr, "hhd: %hhd\r\n", SCHAR_MIN);
5657
result_baseline = printf("hhd: %hhd\r\n", SCHAR_MIN);
@@ -62,6 +63,7 @@ static control_t test_printf_d(const size_t call_count)
6263
result_baseline = printf("hhd: %hhd\r\n", SCHAR_MAX);
6364
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
6465
TEST_ASSERT_EQUAL_INT(result_baseline, result_file);
66+
#endif
6567

6668
result_minimal = mbed_printf("hd: %hd\r\n", SHRT_MIN);
6769
result_file = mbed_fprintf(stderr, "hd: %hd\r\n", SHRT_MIN);
@@ -99,6 +101,7 @@ static control_t test_printf_d(const size_t call_count)
99101
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
100102
TEST_ASSERT_EQUAL_INT(result_baseline, result_file);
101103

104+
#if !defined(__NEWLIB_NANO)
102105
result_minimal = mbed_printf("lld: %lld\r\n", LLONG_MIN);
103106
result_file = mbed_fprintf(stderr, "lld: %lld\r\n", LLONG_MIN);
104107
result_baseline = printf("lld: %lld\r\n", LLONG_MIN);
@@ -110,6 +113,7 @@ static control_t test_printf_d(const size_t call_count)
110113
result_baseline = printf("lld: %lld\r\n", LLONG_MAX);
111114
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
112115
TEST_ASSERT_EQUAL_INT(result_baseline, result_file);
116+
#endif
113117

114118
#ifdef TARGET_LIKE_MBED
115119
printf("%%jd not supported by mbed\r\n");
@@ -170,6 +174,7 @@ static control_t test_printf_u(const size_t call_count)
170174

171175
/*************************************************************************/
172176
/*************************************************************************/
177+
#if !defined(__NEWLIB_NANO)
173178
result_minimal = mbed_printf("hhu: %hhu\r\n", 0);
174179
result_file = mbed_fprintf(stderr, "hhu: %hhu\r\n", 0);
175180
result_baseline = printf("hhu: %hhu\r\n", 0);
@@ -181,6 +186,7 @@ static control_t test_printf_u(const size_t call_count)
181186
result_baseline = printf("hhu: %hhu\r\n", UCHAR_MAX);
182187
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
183188
TEST_ASSERT_EQUAL_INT(result_baseline, result_file);
189+
#endif
184190

185191
result_minimal = mbed_printf("hu: %hu\r\n", 0);
186192
result_file = mbed_fprintf(stderr, "hu: %hu\r\n", 0);
@@ -217,7 +223,7 @@ static control_t test_printf_u(const size_t call_count)
217223
result_baseline = printf("lu: %lu\r\n", ULONG_MAX);
218224
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
219225
TEST_ASSERT_EQUAL_INT(result_baseline, result_file);
220-
226+
#if !defined(__NEWLIB_NANO)
221227
result_minimal = mbed_printf("llu: %llu\r\n", 0ULL);
222228
result_file = mbed_fprintf(stderr, "llu: %llu\r\n", 0ULL);
223229
result_baseline = printf("llu: %llu\r\n", 0ULL);
@@ -229,6 +235,7 @@ static control_t test_printf_u(const size_t call_count)
229235
result_baseline = printf("llu: %llu\r\n", ULLONG_MAX);
230236
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
231237
TEST_ASSERT_EQUAL_INT(result_baseline, result_file);
238+
#endif
232239

233240
#ifdef TARGET_LIKE_MBED
234241
printf("%%ju not supported by mbed\r\n");
@@ -289,6 +296,7 @@ static control_t test_printf_x(const size_t call_count)
289296

290297
/*************************************************************************/
291298
/*************************************************************************/
299+
#if !defined(__NEWLIB_NANO)
292300
result_minimal = mbed_printf("hhX: %hhX\r\n", 0);
293301
result_file = mbed_fprintf(stderr, "hhX: %hhX\r\n", 0);
294302
result_baseline = printf("hhX: %hhX\r\n", 0);
@@ -300,6 +308,7 @@ static control_t test_printf_x(const size_t call_count)
300308
result_baseline = printf("hhX: %hhX\r\n", UCHAR_MAX);
301309
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
302310
TEST_ASSERT_EQUAL_INT(result_baseline, result_file);
311+
#endif
303312

304313
result_minimal = mbed_printf("hX: %hX\r\n", 0);
305314
result_file = mbed_fprintf(stderr, "hX: %hX\r\n", 0);
@@ -336,7 +345,7 @@ static control_t test_printf_x(const size_t call_count)
336345
result_baseline = printf("lX: %lX\r\n", ULONG_MAX);
337346
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
338347
TEST_ASSERT_EQUAL_INT(result_baseline, result_file);
339-
348+
#if !defined(__NEWLIB_NANO)
340349
result_minimal = mbed_printf("llX: %llX\r\n", 0ULL);
341350
result_file = mbed_fprintf(stderr, "llX: %llX\r\n", 0ULL);
342351
result_baseline = printf("llX: %llX\r\n", 0ULL);
@@ -348,6 +357,7 @@ static control_t test_printf_x(const size_t call_count)
348357
result_baseline = printf("llX: %llX\r\n", ULLONG_MAX);
349358
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
350359
TEST_ASSERT_EQUAL_INT(result_baseline, result_file);
360+
#endif
351361

352362
#ifdef TARGET_LIKE_MBED
353363
printf("%%jX not supported by mbed\r\n");
@@ -434,6 +444,7 @@ static control_t test_snprintf_d(const size_t call_count)
434444

435445
/*************************************************************************/
436446
/*************************************************************************/
447+
#if !defined(__NEWLIB_NANO)
437448
result_minimal = mbed_snprintf(buffer_minimal, sizeof(buffer_minimal), "hhd: %hhd\r\n", SCHAR_MIN);
438449
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "hhd: %hhd\r\n", SCHAR_MIN);
439450
TEST_ASSERT_EQUAL_STRING(buffer_baseline, buffer_minimal);
@@ -443,6 +454,7 @@ static control_t test_snprintf_d(const size_t call_count)
443454
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "hhd: %hhd\r\n", SCHAR_MAX);
444455
TEST_ASSERT_EQUAL_STRING(buffer_baseline, buffer_minimal);
445456
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
457+
#endif
446458

447459
result_minimal = mbed_snprintf(buffer_minimal, sizeof(buffer_minimal), "hd: %hd\r\n", SHRT_MIN);
448460
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "hd: %hd\r\n", SHRT_MIN);
@@ -474,6 +486,7 @@ static control_t test_snprintf_d(const size_t call_count)
474486
TEST_ASSERT_EQUAL_STRING(buffer_baseline, buffer_minimal);
475487
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
476488

489+
#if !defined(__NEWLIB_NANO)
477490
result_minimal = mbed_snprintf(buffer_minimal, sizeof(buffer_minimal), "lld: %lld\r\n", LLONG_MIN);
478491
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "lld: %lld\r\n", LLONG_MIN);
479492
TEST_ASSERT_EQUAL_STRING(buffer_baseline, buffer_minimal);
@@ -483,6 +496,7 @@ static control_t test_snprintf_d(const size_t call_count)
483496
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "lld: %lld\r\n", LLONG_MAX);
484497
TEST_ASSERT_EQUAL_STRING(buffer_baseline, buffer_minimal);
485498
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
499+
#endif
486500

487501
#ifdef TARGET_LIKE_MBED
488502
printf("%%jd not supported by mbed\r\n");
@@ -538,6 +552,7 @@ static control_t test_snprintf_u(const size_t call_count)
538552

539553
/*************************************************************************/
540554
/*************************************************************************/
555+
#if !defined(__NEWLIB_NANO)
541556
result_minimal = mbed_snprintf(buffer_minimal, sizeof(buffer_minimal), "hhu: %hhu\r\n", 0);
542557
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "hhu: %hhu\r\n", 0);
543558
TEST_ASSERT_EQUAL_STRING(buffer_baseline, buffer_minimal);
@@ -547,6 +562,7 @@ static control_t test_snprintf_u(const size_t call_count)
547562
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "hhu: %hhu\r\n", UCHAR_MAX);
548563
TEST_ASSERT_EQUAL_STRING(buffer_baseline, buffer_minimal);
549564
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
565+
#endif
550566

551567
result_minimal = mbed_snprintf(buffer_minimal, sizeof(buffer_minimal), "hu: %hu\r\n", 0);
552568
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "hu: %hu\r\n", 0);
@@ -577,7 +593,7 @@ static control_t test_snprintf_u(const size_t call_count)
577593
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "lu: %lu\r\n", ULONG_MAX);
578594
TEST_ASSERT_EQUAL_STRING(buffer_baseline, buffer_minimal);
579595
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
580-
596+
#if !defined(__NEWLIB_NANO)
581597
result_minimal = mbed_snprintf(buffer_minimal, sizeof(buffer_minimal), "llu: %llu\r\n", 0ULL);
582598
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "llu: %llu\r\n", 0ULL);
583599
TEST_ASSERT_EQUAL_STRING(buffer_baseline, buffer_minimal);
@@ -587,6 +603,7 @@ static control_t test_snprintf_u(const size_t call_count)
587603
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "llu: %llu\r\n", ULLONG_MAX);
588604
TEST_ASSERT_EQUAL_STRING(buffer_baseline, buffer_minimal);
589605
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
606+
#endif
590607

591608
#ifdef TARGET_LIKE_MBED
592609
printf("%%ju not supported by mbed\r\n");
@@ -642,6 +659,7 @@ static control_t test_snprintf_x(const size_t call_count)
642659

643660
/*************************************************************************/
644661
/*************************************************************************/
662+
#if !defined(__NEWLIB_NANO)
645663
result_minimal = mbed_snprintf(buffer_minimal, sizeof(buffer_minimal), "hhX: %hhX\r\n", 0);
646664
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "hhX: %hhX\r\n", 0);
647665
TEST_ASSERT_EQUAL_STRING(buffer_baseline, buffer_minimal);
@@ -651,6 +669,7 @@ static control_t test_snprintf_x(const size_t call_count)
651669
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "hhX: %hhX\r\n", UCHAR_MAX);
652670
TEST_ASSERT_EQUAL_STRING(buffer_baseline, buffer_minimal);
653671
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
672+
#endif
654673

655674
result_minimal = mbed_snprintf(buffer_minimal, sizeof(buffer_minimal), "hX: %hX\r\n", 0);
656675
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "hX: %hX\r\n", 0);
@@ -680,7 +699,7 @@ static control_t test_snprintf_x(const size_t call_count)
680699
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "lX: %lX\r\n", ULONG_MAX);
681700
TEST_ASSERT_EQUAL_STRING(buffer_baseline, buffer_minimal);
682701
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
683-
702+
#if !defined(__NEWLIB_NANO)
684703
result_minimal = mbed_snprintf(buffer_minimal, sizeof(buffer_minimal), "llX: %llX\r\n", 0ULL);
685704
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "llX: %llX\r\n", 0ULL);
686705
TEST_ASSERT_EQUAL_STRING(buffer_baseline, buffer_minimal);
@@ -690,6 +709,7 @@ static control_t test_snprintf_x(const size_t call_count)
690709
result_baseline = snprintf(buffer_baseline, sizeof(buffer_baseline), "llX: %llX\r\n", ULLONG_MAX);
691710
TEST_ASSERT_EQUAL_STRING(buffer_baseline, buffer_minimal);
692711
TEST_ASSERT_EQUAL_INT(result_baseline, result_minimal);
712+
#endif
693713

694714
#ifdef TARGET_LIKE_MBED
695715
printf("%%jX not supported by mbed\r\n");
@@ -902,10 +922,12 @@ static control_t test_snprintf_buffer_overflow_ld(const size_t call_count)
902922
return test_snprintf_buffer_overflow_generic<long, sizeof("ld: -1048576")>("ld: %ld", -1048576L);
903923
}
904924

925+
#if !defined(__NEWLIB_NANO)
905926
static control_t test_snprintf_buffer_overflow_lld(const size_t call_count)
906927
{
907928
return test_snprintf_buffer_overflow_generic<long long, sizeof("lld: -1099511627776")>("lld: %lld", -1099511627776LL);
908929
}
930+
#endif
909931

910932
static control_t test_snprintf_buffer_overflow_u(const size_t call_count)
911933
{
@@ -917,10 +939,12 @@ static control_t test_snprintf_buffer_overflow_lu(const size_t call_count)
917939
return test_snprintf_buffer_overflow_generic<unsigned long, sizeof("lu: 1048576")>("lu: %lu", 1048576UL);
918940
}
919941

942+
#if !defined(__NEWLIB_NANO)
920943
static control_t test_snprintf_buffer_overflow_llu(const size_t call_count)
921944
{
922945
return test_snprintf_buffer_overflow_generic<unsigned long long, sizeof("llu: 1099511627776")>("llu: %llu", 1099511627776ULL);
923946
}
947+
#endif
924948

925949
static control_t test_snprintf_buffer_overflow_x(const size_t call_count)
926950
{
@@ -932,10 +956,12 @@ static control_t test_snprintf_buffer_overflow_lx(const size_t call_count)
932956
return test_snprintf_buffer_overflow_generic<unsigned long, sizeof("lx: 0x100000")>("lx: 0x%lx", 0x100000UL);
933957
}
934958

959+
#if !defined(__NEWLIB_NANO)
935960
static control_t test_snprintf_buffer_overflow_llx(const size_t call_count)
936961
{
937962
return test_snprintf_buffer_overflow_generic<unsigned long long, sizeof("llx: 0x10000000000")>("llx: 0x%llx", 0x10000000000ULL);
938963
}
964+
#endif
939965

940966
utest::v1::status_t greentea_setup(const size_t number_of_cases)
941967
{
@@ -959,13 +985,15 @@ Case cases[] = {
959985
#endif
960986
Case("snprintf buffer overflow %d", test_snprintf_buffer_overflow_d),
961987
Case("snprintf buffer overflow %ld", test_snprintf_buffer_overflow_ld),
962-
Case("snprintf buffer overflow %lld", test_snprintf_buffer_overflow_lld),
963988
Case("snprintf buffer overflow %u", test_snprintf_buffer_overflow_u),
964989
Case("snprintf buffer overflow %lu", test_snprintf_buffer_overflow_lu),
965-
Case("snprintf buffer overflow %llu", test_snprintf_buffer_overflow_llu),
966990
Case("snprintf buffer overflow %x", test_snprintf_buffer_overflow_x),
967991
Case("snprintf buffer overflow %lx", test_snprintf_buffer_overflow_lx),
992+
#if !defined(__NEWLIB_NANO)
993+
Case("snprintf buffer overflow %lld", test_snprintf_buffer_overflow_lld),
994+
Case("snprintf buffer overflow %llu", test_snprintf_buffer_overflow_llu),
968995
Case("snprintf buffer overflow %llx", test_snprintf_buffer_overflow_llx),
996+
#endif
969997
};
970998

971999
Specification specification(greentea_setup, cases, greentea_test_teardown_handler);

platform/source/mbed_retarget.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,6 +1568,14 @@ extern "C" {
15681568

15691569
} // end of extern "C"
15701570

1571+
#if defined(__MICROLIB)
1572+
extern "C" {
1573+
MBED_WEAK void __aeabi_assert(const char *expr, const char *file, int line)
1574+
{
1575+
mbed_assert_internal(expr, file, line);
1576+
}
1577+
} // end of extern "C"
1578+
#endif
15711579
#endif
15721580

15731581

rtos/source/TARGET_CORTEX/TOOLCHAIN_ARM_MICRO/mbed_boot_arm_micro.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,3 @@ void mbed_toolchain_init()
6363
/* Run the C++ global object constructors */
6464
$Super$$__cpp_initialize__aeabi_();
6565
}
66-
67-
MBED_WEAK void __aeabi_assert(const char *expr, const char *file, int line)
68-
{
69-
mbed_assert_internal(expr, file, line);
70-
}

rtos/source/TARGET_CORTEX/TOOLCHAIN_ARM_STD/mbed_boot_arm_std.c

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,21 @@
1616
*/
1717
#include <stdlib.h>
1818
#include <string.h>
19+
#include "mbed_boot.h"
20+
21+
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Base[];
22+
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Length[];
1923

24+
#if !defined(__MICROLIB)
2025
#include "cmsis.h"
2126
#include "mbed_critical.h"
22-
#include "mbed_boot.h"
2327
#include <rt_misc.h>
2428
#include "mbed_rtos_storage.h"
2529
#include "cmsis_os2.h"
2630

2731
__value_in_regs struct __argc_argv __rt_lib_init(unsigned heapbase, unsigned heaptop);
2832
void _platform_post_stackheap_init(void);
2933

30-
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Base[];
31-
extern uint32_t Image$$ARM_LIB_STACK$$ZI$$Length[];
3234

3335
#if !defined(HEAP_START)
3436
// Heap here is considered starting after ZI ends to Stack start
@@ -252,3 +254,47 @@ __USED void _mutex_free(mutex *m)
252254
}
253255

254256
#endif /* RTX_NO_MULTITHREAD_CLIB */
257+
#else
258+
#include <stdint.h>
259+
260+
extern uint32_t Image$$ARM_LIB_HEAP$$ZI$$Base[];
261+
extern uint32_t Image$$ARM_LIB_HEAP$$ZI$$Length[];
262+
263+
/*
264+
* mbed entry point for the MICROLIB toolchain
265+
*
266+
* Override the microlib function _main_init to run code earlier in
267+
* the boot sequence. The function _main_init is responsible for invoking main.
268+
* This function must be placed in the ".ARM.Collect" section
269+
* or it won't get called.
270+
*/
271+
void _main_init(void) __attribute__((section(".ARM.Collect$$$$000000FF")));
272+
void _main_init(void)
273+
{
274+
/* microlib only supports the two region memory model */
275+
mbed_stack_isr_start = (unsigned char *) Image$$ARM_LIB_STACK$$ZI$$Base;
276+
mbed_stack_isr_size = (uint32_t) Image$$ARM_LIB_STACK$$ZI$$Length;
277+
278+
mbed_heap_start = (unsigned char *) Image$$ARM_LIB_HEAP$$ZI$$Base;
279+
mbed_heap_size = (uint32_t) Image$$ARM_LIB_HEAP$$ZI$$Length;
280+
281+
mbed_init();
282+
mbed_rtos_start();
283+
}
284+
285+
void $Sub$$__cpp_initialize__aeabi_(void);
286+
void $Super$$__cpp_initialize__aeabi_(void);
287+
void $Sub$$__cpp_initialize__aeabi_(void)
288+
{
289+
/* This should invoke C++ initializers but we keep
290+
* this empty and invoke them RTX is initialized.
291+
*/
292+
}
293+
294+
void mbed_toolchain_init()
295+
{
296+
/* Run the C++ global object constructors */
297+
$Super$$__cpp_initialize__aeabi_();
298+
}
299+
300+
#endif // !defined(__MICROLIB)

0 commit comments

Comments
 (0)