mirror of https://github.com/ARMmbed/mbed-os.git
Stop using the patched microlib
parent
170b1f8f49
commit
5020b9ad3b
|
|
@ -120,6 +120,13 @@ static inline int openmode_to_posix(int openmode) {
|
|||
}
|
||||
|
||||
extern "C" FILEHANDLE PREFIX(_open)(const char* name, int openmode) {
|
||||
#if defined(__MICROLIB) && (__ARMCC_VERSION>5030000)
|
||||
// Before version 5.03, we were using a patched version of microlib with proper names
|
||||
// This is the workaround that the microlib author suggested us
|
||||
static int n = 0;
|
||||
if (!std::strcmp(name, ":tt")) return n++;
|
||||
|
||||
#else
|
||||
/* Use the posix convention that stdin,out,err are filehandles 0,1,2.
|
||||
*/
|
||||
if (std::strcmp(name, __stdin_name) == 0) {
|
||||
|
|
@ -132,7 +139,8 @@ extern "C" FILEHANDLE PREFIX(_open)(const char* name, int openmode) {
|
|||
init_serial();
|
||||
return 2;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// find the first empty slot in filehandles
|
||||
unsigned int fh_i;
|
||||
for (fh_i = 0; fh_i < sizeof(filehandles)/sizeof(*filehandles); fh_i++) {
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class ARM_STD(ARM):
|
|||
|
||||
|
||||
class ARM_MICRO(ARM):
|
||||
PATCHED_LIBRARY = True
|
||||
PATCHED_LIBRARY = False
|
||||
|
||||
def __init__(self, target, options=None, notify=None):
|
||||
ARM.__init__(self, target, notify)
|
||||
|
|
|
|||
Loading…
Reference in New Issue