Skip to content

Commit 7954074

Browse files
authored
Merge pull request #10704 from hugueskamba/fix-microlib-with-arm-compiler-6
microlib support: Fix build with Arm Compiler 6 and MicroLib
2 parents 6229322 + e12889d commit 7954074

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

rtos/TARGET_CORTEX/TOOLCHAIN_ARM_MICRO/mbed_boot_arm_micro.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,20 @@ MBED_WEAK void __aeabi_assert(const char *expr, const char *file, int line)
6868
{
6969
mbed_assert_internal(expr, file, line);
7070
}
71+
72+
// The below resolves the linker error generated by a bug in Arm Compiler 6
73+
// When building with MicroLib, the compiler inadvertently introduces the
74+
// _scanf_mbtowc symbol to the build. The code below provides a weak reference
75+
// for the missing symbol
76+
#include <stdio.h>
77+
typedef int ScanfReadRec;
78+
MBED_WEAK long int _scanf_mbtowc(
79+
int ignored,
80+
FILE *p,
81+
ScanfReadRec *sr,
82+
int *charmap,
83+
int exact
84+
)
85+
{
86+
return 0;
87+
}

0 commit comments

Comments
 (0)