diff --git a/platform/mbed_retarget.cpp b/platform/mbed_retarget.cpp index 5b7150d58d..3e6cbba1fb 100644 --- a/platform/mbed_retarget.cpp +++ b/platform/mbed_retarget.cpp @@ -56,7 +56,7 @@ static SingletonPtr _mutex; # define OPEN_MAX _SYS_OPEN # ifdef __MICROLIB # if __ARMCC_VERSION >= 6010050 - asm(" .global __use_full_stdio\n"); +asm(" .global __use_full_stdio\n"); # else # pragma import(__use_full_stdio) # endif @@ -1255,7 +1255,7 @@ extern "C" WEAK caddr_t _sbrk(int incr) /* __HeapLimit is end of heap section */ if (new_heap > (uint32_t) &__HeapLimit) { errno = ENOMEM; - return (caddr_t) -1; + return (caddr_t) - 1; } heap = new_heap; diff --git a/tools/test/build_api/build_api_test.py b/tools/test/build_api/build_api_test.py index 376d0ea000..be26b6e16d 100755 --- a/tools/test/build_api/build_api_test.py +++ b/tools/test/build_api/build_api_test.py @@ -30,8 +30,11 @@ from intelhex import IntelHex Tests for build_api.py """ make_mock_target = namedtuple( - "Target", "init_hooks name features core supported_toolchains") - + "Target", "init_hooks name features core supported_toolchains build_tools_metadata") +#Add ARMC5 to the supported_toolchains list as ARMC5 actually refers ARM Compiler 5 and is needed by ARM/ARM_STD classes when it checks for supported toolchains +TOOLCHAINS.add("ARMC5") +#Make a mock build_tools_metadata +mock_build_tools_metadata = {u'version':0, u'public':False} class BuildApiTests(unittest.TestCase): """ @@ -92,7 +95,7 @@ class BuildApiTests(unittest.TestCase): """ app_config = "app_config" mock_target = make_mock_target(lambda _, __ : None, - "Junk", [], "Cortex-M3", TOOLCHAINS) + "Junk", [], "Cortex-M3", TOOLCHAINS, mock_build_tools_metadata) mock_config_init.return_value = namedtuple( "Config", "target has_regions name")(mock_target, False, None) @@ -111,7 +114,7 @@ class BuildApiTests(unittest.TestCase): :return: """ mock_target = make_mock_target(lambda _, __ : None, - "Junk", [], "Cortex-M3", TOOLCHAINS) + "Junk", [], "Cortex-M3", TOOLCHAINS, mock_build_tools_metadata) mock_config_init.return_value = namedtuple( "Config", "target has_regions name")(mock_target, False, None)