mirror of https://github.com/ARMmbed/mbed-os.git
__IAR_SYSTEMS_ICC__ macro had issues when 7.5 and 8.11 both workbench are installed
parent
5875569070
commit
7d98eebf2a
|
|
@ -843,7 +843,7 @@ std::FILE *mbed_fdopen(FileHandle *fh, const char *mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
int mbed_getc(std::FILE *_file){
|
int mbed_getc(std::FILE *_file){
|
||||||
#if (defined (__ICCARM__) && (__IAR_SYSTEMS_ICC__ < 8) )
|
#if defined(__IAR_SYSTEMS_ICC__ ) && (__VER__ < 8000000)
|
||||||
/*This is only valid for unbuffered streams*/
|
/*This is only valid for unbuffered streams*/
|
||||||
int res = std::fgetc(_file);
|
int res = std::fgetc(_file);
|
||||||
if (res>=0){
|
if (res>=0){
|
||||||
|
|
@ -858,7 +858,7 @@ int mbed_getc(std::FILE *_file){
|
||||||
}
|
}
|
||||||
|
|
||||||
char* mbed_gets(char*s, int size, std::FILE *_file){
|
char* mbed_gets(char*s, int size, std::FILE *_file){
|
||||||
#if (defined (__ICCARM__) && (__IAR_SYSTEMS_ICC__ < 8))
|
#if defined(__IAR_SYSTEMS_ICC__ ) && (__VER__ < 8000000)
|
||||||
/*This is only valid for unbuffered streams*/
|
/*This is only valid for unbuffered streams*/
|
||||||
char *str = fgets(s,size,_file);
|
char *str = fgets(s,size,_file);
|
||||||
if (str!=NULL){
|
if (str!=NULL){
|
||||||
|
|
@ -884,8 +884,8 @@ extern "C" WEAK void __iar_file_Mtxinit(__iar_Rmtx *mutex) {}
|
||||||
extern "C" WEAK void __iar_file_Mtxdst(__iar_Rmtx *mutex) {}
|
extern "C" WEAK void __iar_file_Mtxdst(__iar_Rmtx *mutex) {}
|
||||||
extern "C" WEAK void __iar_file_Mtxlock(__iar_Rmtx *mutex) {}
|
extern "C" WEAK void __iar_file_Mtxlock(__iar_Rmtx *mutex) {}
|
||||||
extern "C" WEAK void __iar_file_Mtxunlock(__iar_Rmtx *mutex) {}
|
extern "C" WEAK void __iar_file_Mtxunlock(__iar_Rmtx *mutex) {}
|
||||||
#if (__IAR_SYSTEMS_ICC__ >= 8)
|
#if defined(__IAR_SYSTEMS_ICC__ ) && (__VER__ >= 8000000)
|
||||||
extern "C" WEAK void *__aeabi_read_tp (void) {}
|
extern "C" WEAK void *__aeabi_read_tp (void) { return NULL ;}
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__CC_ARM)
|
#elif defined(__CC_ARM)
|
||||||
// Do nothing
|
// Do nothing
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@
|
||||||
#include "cmsis_os2.h"
|
#include "cmsis_os2.h"
|
||||||
#include "mbed_toolchain.h"
|
#include "mbed_toolchain.h"
|
||||||
#include "mbed_error.h"
|
#include "mbed_error.h"
|
||||||
#if (defined(__ICCARM__) && (__IAR_SYSTEMS_ICC__ >= 8) )
|
#if defined(__IAR_SYSTEMS_ICC__ ) && (__VER__ >= 8000000)
|
||||||
#include <DLib_Threads.h>
|
#include <DLib_Threads.h>
|
||||||
#endif
|
#endif
|
||||||
/* Heap limits - only used if set */
|
/* Heap limits - only used if set */
|
||||||
|
|
@ -576,7 +576,7 @@ void pre_main(void)
|
||||||
singleton_mutex_attr.cb_mem = &singleton_mutex_obj;
|
singleton_mutex_attr.cb_mem = &singleton_mutex_obj;
|
||||||
singleton_mutex_id = osMutexNew(&singleton_mutex_attr);
|
singleton_mutex_id = osMutexNew(&singleton_mutex_attr);
|
||||||
|
|
||||||
#if (__IAR_SYSTEMS_ICC__ >= 8)
|
#if defined(__IAR_SYSTEMS_ICC__ ) && (__VER__ >= 8000000)
|
||||||
__iar_Initlocks();
|
__iar_Initlocks();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue