mirror of https://github.com/ARMmbed/mbed-os.git
rename error.c to mbed_error.c. add toolchain.h to mbed.h exposing to all. add extern filler to toolchain.h
parent
1fab13ea09
commit
47ee2ed90f
|
@ -18,6 +18,7 @@
|
|||
|
||||
#define MBED_LIBRARY_VERSION 117
|
||||
|
||||
#include "toolchain.h"
|
||||
#include "platform.h"
|
||||
|
||||
// Useful C libraries
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
typedef int FILEHANDLE;
|
||||
#endif
|
||||
|
||||
#ifndef EXTERN
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#if defined (__ICCARM__)
|
||||
# define WEAK __weak
|
||||
# define PACKED __packed
|
||||
|
|
|
@ -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 <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include "device.h"
|
||||
#include "toolchain.h"
|
||||
#include "mbed_error.h"
|
||||
#if DEVICE_STDIO_MESSAGES
|
||||
#include <stdio.h>
|
||||
#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);
|
||||
}
|
Loading…
Reference in New Issue