Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions platform/source/mbed_retarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1735,3 +1735,21 @@ MBED_WEAK const ticker_info_t *lp_ticker_get_info()
};
return &info;
}


// The below resolves the linker error generated by a bug in Arm Compiler 6
// The compiler inadvertently introduces the
// _scanf_mbtowc symbol to the build. The code below provides a weak reference
// for the missing symbol.
// Arm Compiler 6 version 6.12 and earlier versions are affected.
typedef int ScanfReadRec;
extern "C" MBED_WEAK long int _scanf_mbtowc(
int ignored,
FILE *p,
ScanfReadRec *sr,
int *charmap,
int exact
)
{
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,3 @@ MBED_WEAK void __aeabi_assert(const char *expr, const char *file, int line)
{
mbed_assert_internal(expr, file, line);
}

// The below resolves the linker error generated by a bug in Arm Compiler 6
// When building with MicroLib, the compiler inadvertently introduces the
// _scanf_mbtowc symbol to the build. The code below provides a weak reference
// for the missing symbol.
// Arm Compiler 6 version 6.12 and earlier versions are affected.
#include <stdio.h>
typedef int ScanfReadRec;
MBED_WEAK long int _scanf_mbtowc(
int ignored,
FILE *p,
ScanfReadRec *sr,
int *charmap,
int exact
)
{
return 0;
}