Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: target-freescale
Fork of mbed-hal by
common/error.c@4:473d4af53300, 2016-04-04 (annotated)
- Committer:
- Alessandro Angelino
- Date:
- Mon Apr 04 14:24:07 2016 +0100
- Revision:
- 4:473d4af53300
- Parent:
- 0:9c59db1fbc9e
Fix function to get sp when in unprivileged mode
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
screamer | 0:9c59db1fbc9e | 1 | /* mbed Microcontroller Library |
screamer | 0:9c59db1fbc9e | 2 | * Copyright (c) 2006-2013 ARM Limited |
screamer | 0:9c59db1fbc9e | 3 | * |
screamer | 0:9c59db1fbc9e | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
screamer | 0:9c59db1fbc9e | 5 | * you may not use this file except in compliance with the License. |
screamer | 0:9c59db1fbc9e | 6 | * You may obtain a copy of the License at |
screamer | 0:9c59db1fbc9e | 7 | * |
screamer | 0:9c59db1fbc9e | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
screamer | 0:9c59db1fbc9e | 9 | * |
screamer | 0:9c59db1fbc9e | 10 | * Unless required by applicable law or agreed to in writing, software |
screamer | 0:9c59db1fbc9e | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
screamer | 0:9c59db1fbc9e | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
screamer | 0:9c59db1fbc9e | 13 | * See the License for the specific language governing permissions and |
screamer | 0:9c59db1fbc9e | 14 | * limitations under the License. |
screamer | 0:9c59db1fbc9e | 15 | */ |
screamer | 0:9c59db1fbc9e | 16 | #include <stdlib.h> |
screamer | 0:9c59db1fbc9e | 17 | #include <stdarg.h> |
screamer | 0:9c59db1fbc9e | 18 | #include "device.h" |
screamer | 0:9c59db1fbc9e | 19 | #include "toolchain.h" |
screamer | 0:9c59db1fbc9e | 20 | #include "mbed_error.h" |
screamer | 0:9c59db1fbc9e | 21 | #if DEVICE_STDIO_MESSAGES |
screamer | 0:9c59db1fbc9e | 22 | #include <stdio.h> |
screamer | 0:9c59db1fbc9e | 23 | #endif |
screamer | 0:9c59db1fbc9e | 24 | |
screamer | 0:9c59db1fbc9e | 25 | WEAK void error(const char* format, ...) { |
screamer | 0:9c59db1fbc9e | 26 | #if DEVICE_STDIO_MESSAGES |
screamer | 0:9c59db1fbc9e | 27 | va_list arg; |
screamer | 0:9c59db1fbc9e | 28 | va_start(arg, format); |
screamer | 0:9c59db1fbc9e | 29 | vfprintf(stderr, format, arg); |
screamer | 0:9c59db1fbc9e | 30 | va_end(arg); |
screamer | 0:9c59db1fbc9e | 31 | #endif |
screamer | 0:9c59db1fbc9e | 32 | exit(1); |
screamer | 0:9c59db1fbc9e | 33 | } |
screamer | 0:9c59db1fbc9e | 34 |