diff --git a/hal/api/mbed.h b/hal/api/mbed.h index b44d183122..9540ba65b4 100644 --- a/hal/api/mbed.h +++ b/hal/api/mbed.h @@ -18,6 +18,7 @@ #define MBED_LIBRARY_VERSION 117 +#include "toolchain.h" #include "platform.h" // Useful C libraries diff --git a/hal/api/toolchain.h b/hal/api/toolchain.h index b140643b38..7a79226941 100644 --- a/hal/api/toolchain.h +++ b/hal/api/toolchain.h @@ -24,6 +24,10 @@ typedef int FILEHANDLE; #endif +#ifndef EXTERN +#define EXTERN extern +#endif + #if defined (__ICCARM__) # define WEAK __weak # define PACKED __packed diff --git a/hal/common/error.c b/hal/common/error.c deleted file mode 100644 index b307d87565..0000000000 --- a/hal/common/error.c +++ /dev/null @@ -1,33 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include -#include -#include "device.h" -#include "toolchain.h" -#include "mbed_error.h" -#if DEVICE_STDIO_MESSAGES -#include -#endif - -WEAK void error(const char* format, ...) { -#if DEVICE_STDIO_MESSAGES - va_list arg; - va_start(arg, format); - vfprintf(stderr, format, arg); - va_end(arg); -#endif - exit(1); -}