diff --git a/libraries/USBDevice/USBMSD/USBMSD.cpp b/libraries/USBDevice/USBMSD/USBMSD.cpp index 74c17c1843..c5ce390846 100644 --- a/libraries/USBDevice/USBMSD/USBMSD.cpp +++ b/libraries/USBDevice/USBMSD/USBMSD.cpp @@ -232,7 +232,7 @@ void USBMSD::memoryWrite (uint8_t * buf, uint16_t size) { // if the array is filled, write it in memory if (!((addr + size)%BlockSize)) { if (!(disk_status() & WRITE_PROTECT)) { - disk_write(page, addr/BlockSize); + disk_write(page, addr/BlockSize, 1); } } @@ -257,7 +257,7 @@ void USBMSD::memoryVerify (uint8_t * buf, uint16_t size) { // beginning of a new block -> load a whole block in RAM if (!(addr%BlockSize)) - disk_read(page, addr/BlockSize); + disk_read(page, addr/BlockSize, 1); // info are in RAM -> no need to re-read memory for (n = 0; n < size; n++) { @@ -505,7 +505,7 @@ void USBMSD::memoryRead (void) { // we read an entire block if (!(addr%BlockSize)) - disk_read(page, addr/BlockSize); + disk_read(page, addr/BlockSize, 1); // write data which are in RAM writeNB(EPBULK_IN, &page[addr%BlockSize], n, MAX_PACKET_SIZE_EPBULK); diff --git a/libraries/USBDevice/USBMSD/USBMSD.h b/libraries/USBDevice/USBMSD/USBMSD.h index b362f5618b..9bf48ed373 100644 --- a/libraries/USBDevice/USBMSD/USBMSD.h +++ b/libraries/USBDevice/USBMSD/USBMSD.h @@ -88,22 +88,24 @@ public: protected: /* - * read a block on a storage chip + * read one or more blocks on a storage chip * * @param data pointer where will be stored read data - * @param block block number + * @param block starting block number + * @param count number of blocks to read * @returns 0 if successful */ - virtual int disk_read(uint8_t * data, uint64_t block) = 0; + virtual int disk_read(uint8_t* data, uint64_t block, uint8_t count) = 0; /* - * write a block on a storage chip + * write one or more blocks on a storage chip * * @param data data to write - * @param block block number + * @param block starting block number + * @param count number of blocks to write * @returns 0 if successful */ - virtual int disk_write(const uint8_t * data, uint64_t block) = 0; + virtual int disk_write(const uint8_t* data, uint64_t block, uint8_t count) = 0; /* * Disk initilization diff --git a/libraries/USBHost/USBHostMSD/USBHostMSD.cpp b/libraries/USBHost/USBHostMSD/USBHostMSD.cpp index c8406494c6..f159d20d47 100644 --- a/libraries/USBHost/USBHostMSD/USBHostMSD.cpp +++ b/libraries/USBHost/USBHostMSD/USBHostMSD.cpp @@ -323,24 +323,34 @@ int USBHostMSD::disk_initialize() { return readCapacity(); } -int USBHostMSD::disk_write(const uint8_t *buffer, uint64_t block_number) { - USB_DBG("FILESYSTEM: write block: %lld", block_number); +int USBHostMSD::disk_write(const uint8_t* buffer, uint64_t block_number, uint8_t count) { + USB_DBG("FILESYSTEM: write block: %lld, count: %d", block_number, count); if (!disk_init) { disk_initialize(); } if (!disk_init) return -1; - return dataTransfer((uint8_t *)buffer, block_number, 1, HOST_TO_DEVICE); + for (uint64_t b = block_number; b < block_number + count; b++) { + if (dataTransfer((uint8_t*)buffer, b, 1, HOST_TO_DEVICE)) + return -1; + buffer += 512; + } + return 0; } -int USBHostMSD::disk_read(uint8_t * buffer, uint64_t block_number) { - USB_DBG("FILESYSTEM: read block %lld", block_number); +int USBHostMSD::disk_read(uint8_t* buffer, uint64_t block_number, uint8_t count) { + USB_DBG("FILESYSTEM: read block: %lld, count: %d", block_number, count); if (!disk_init) { disk_initialize(); } if (!disk_init) return -1; - return dataTransfer((uint8_t *)buffer, block_number, 1, DEVICE_TO_HOST); + for (uint64_t b = block_number; b < block_number + count; b++) { + if (dataTransfer((uint8_t*)buffer, b, 1, DEVICE_TO_HOST)) + return -1; + buffer += 512; + } + return 0; } uint64_t USBHostMSD::disk_sectors() { diff --git a/libraries/USBHost/USBHostMSD/USBHostMSD.h b/libraries/USBHost/USBHostMSD/USBHostMSD.h index b90cd2fe19..10c6025857 100644 --- a/libraries/USBHost/USBHostMSD/USBHostMSD.h +++ b/libraries/USBHost/USBHostMSD/USBHostMSD.h @@ -59,8 +59,8 @@ protected: // From FATFileSystem virtual int disk_initialize(); virtual int disk_status() {return 0;}; - virtual int disk_read(uint8_t * buffer, uint64_t sector); - virtual int disk_write(const uint8_t * buffer, uint64_t sector); + virtual int disk_read(uint8_t* buffer, uint64_t sector, uint8_t count); + virtual int disk_write(const uint8_t* buffer, uint64_t sector, uint8_t count); virtual int disk_sync() {return 0;}; virtual uint64_t disk_sectors(); diff --git a/libraries/fs/fat/ChaN/diskio.cpp b/libraries/fs/fat/ChaN/diskio.cpp index 5bffcd6d89..1f719725ed 100644 --- a/libraries/fs/fat/ChaN/diskio.cpp +++ b/libraries/fs/fat/ChaN/diskio.cpp @@ -36,15 +36,10 @@ DRESULT disk_read ( ) { debug_if(FFS_DBG, "disk_read(sector %d, count %d) on drv [%d]\n", sector, count, drv); - for(DWORD s=sector; sdisk_read((uint8_t*)buff, s); - if(res) { - return RES_PARERR; - } - buff += 512; - } - return RES_OK; + if (FATFileSystem::_ffs[drv]->disk_read((uint8_t*)buff, sector, count)) + return RES_PARERR; + else + return RES_OK; } #if _READONLY == 0 @@ -56,15 +51,10 @@ DRESULT disk_write ( ) { debug_if(FFS_DBG, "disk_write(sector %d, count %d) on drv [%d]\n", sector, count, drv); - for(DWORD s = sector; s < sector + count; s++) { - debug_if(FFS_DBG, " disk_write(sector %d)\n", s); - int res = FATFileSystem::_ffs[drv]->disk_write((uint8_t*)buff, s); - if(res) { - return RES_PARERR; - } - buff += 512; - } - return RES_OK; + if (FATFileSystem::_ffs[drv]->disk_write((uint8_t*)buff, sector, count)) + return RES_PARERR; + else + return RES_OK; } #endif /* _READONLY */ diff --git a/libraries/fs/fat/FATFileSystem.h b/libraries/fs/fat/FATFileSystem.h index 0e1cc6355b..ff137fed9b 100644 --- a/libraries/fs/fat/FATFileSystem.h +++ b/libraries/fs/fat/FATFileSystem.h @@ -29,6 +29,9 @@ using namespace mbed; +/** + * FATFileSystem based on ChaN's Fat Filesystem library v0.8 + */ class FATFileSystem : public FileSystemLike { public: @@ -39,19 +42,50 @@ public: FATFS _fs; // Work area (file system object) for logical drive int _fsid; + /** + * Opens a file on the filesystem + */ virtual FileHandle *open(const char* name, int flags); + + /** + * Removes a file path + */ virtual int remove(const char *filename); + + /** + * Renames a file + */ virtual int rename(const char *oldname, const char *newname); + + /** + * Formats a logical drive, FDISK artitioning rule, 512 bytes per cluster + */ virtual int format(); + + /** + * Opens a directory on the filesystem + */ virtual DirHandle *opendir(const char *name); + + /** + * Creates a directory path + */ virtual int mkdir(const char *name, mode_t mode); + + /** + * Mounts the filesystem + */ virtual int mount(); + + /** + * Unmounts the filesystem + */ virtual int unmount(); virtual int disk_initialize() { return 0; } virtual int disk_status() { return 0; } - virtual int disk_read(uint8_t * buffer, uint64_t sector) = 0; - virtual int disk_write(const uint8_t * buffer, uint64_t sector) = 0; + virtual int disk_read(uint8_t * buffer, uint64_t sector, uint8_t count) = 0; + virtual int disk_write(const uint8_t * buffer, uint64_t sector, uint8_t count) = 0; virtual int disk_sync() { return 0; } virtual uint64_t disk_sectors() = 0; diff --git a/libraries/fs/sd/SDFileSystem.cpp b/libraries/fs/sd/SDFileSystem.cpp index 2e7513b13d..054035553d 100644 --- a/libraries/fs/sd/SDFileSystem.cpp +++ b/libraries/fs/sd/SDFileSystem.cpp @@ -223,33 +223,41 @@ int SDFileSystem::disk_initialize() { return 0; } -int SDFileSystem::disk_write(const uint8_t *buffer, uint64_t block_number) { +int SDFileSystem::disk_write(const uint8_t* buffer, uint64_t block_number, uint8_t count) { if (!_is_initialized) { return -1; } - - // set write address for single block (CMD24) - if (_cmd(24, block_number * cdv) != 0) { - return 1; + + for (uint64_t b = block_number; b < block_number + count; b++) { + // set write address for single block (CMD24) + if (_cmd(24, b * cdv) != 0) { + return 1; + } + + // send the data block + _write(buffer, 512); + buffer += 512; } - - // send the data block - _write(buffer, 512); + return 0; } -int SDFileSystem::disk_read(uint8_t *buffer, uint64_t block_number) { +int SDFileSystem::disk_read(uint8_t* buffer, uint64_t block_number, uint8_t count) { if (!_is_initialized) { return -1; } - - // set read address for single block (CMD17) - if (_cmd(17, block_number * cdv) != 0) { - return 1; + + for (uint64_t b = block_number; b < block_number + count; b++) { + // set read address for single block (CMD17) + if (_cmd(17, b * cdv) != 0) { + return 1; + } + + // receive the data + _read(buffer, 512); + buffer += 512; } - // receive the data - _read(buffer, 512); return 0; } diff --git a/libraries/fs/sd/SDFileSystem.h b/libraries/fs/sd/SDFileSystem.h index bd74ebf94e..73aba494d7 100644 --- a/libraries/fs/sd/SDFileSystem.h +++ b/libraries/fs/sd/SDFileSystem.h @@ -54,8 +54,8 @@ public: SDFileSystem(PinName mosi, PinName miso, PinName sclk, PinName cs, const char* name); virtual int disk_initialize(); virtual int disk_status(); - virtual int disk_read(uint8_t * buffer, uint64_t block_number); - virtual int disk_write(const uint8_t * buffer, uint64_t block_number); + virtual int disk_read(uint8_t* buffer, uint64_t block_number, uint8_t count); + virtual int disk_write(const uint8_t* buffer, uint64_t block_number, uint8_t count); virtual int disk_sync(); virtual uint64_t disk_sectors(); diff --git a/libraries/mbed/api/mbed.h b/libraries/mbed/api/mbed.h index 2ea16a3269..e501c0dd06 100644 --- a/libraries/mbed/api/mbed.h +++ b/libraries/mbed/api/mbed.h @@ -16,7 +16,7 @@ #ifndef MBED_H #define MBED_H -#define MBED_LIBRARY_VERSION 86 +#define MBED_LIBRARY_VERSION 88 #include "platform.h" @@ -25,7 +25,7 @@ #include // mbed Debug libraries -#include "error.h" +#include "mbed_error.h" #include "mbed_interface.h" // mbed Peripheral components diff --git a/libraries/mbed/api/error.h b/libraries/mbed/api/mbed_error.h similarity index 100% rename from libraries/mbed/api/error.h rename to libraries/mbed/api/mbed_error.h diff --git a/libraries/mbed/common/error.c b/libraries/mbed/common/error.c index b5947cfa79..b307d87565 100644 --- a/libraries/mbed/common/error.c +++ b/libraries/mbed/common/error.c @@ -17,7 +17,7 @@ #include #include "device.h" #include "toolchain.h" -#include "error.h" +#include "mbed_error.h" #if DEVICE_STDIO_MESSAGES #include #endif diff --git a/libraries/mbed/common/mbed_interface.c b/libraries/mbed/common/mbed_interface.c index 9230c2d663..d018a5f64a 100644 --- a/libraries/mbed/common/mbed_interface.c +++ b/libraries/mbed/common/mbed_interface.c @@ -19,7 +19,7 @@ #include "gpio_api.h" #include "wait_api.h" #include "semihost_api.h" -#include "error.h" +#include "mbed_error.h" #include "toolchain.h" #if DEVICE_SEMIHOST diff --git a/libraries/mbed/common/pinmap_common.c b/libraries/mbed/common/pinmap_common.c index 837cd44ef3..284268c7e7 100644 --- a/libraries/mbed/common/pinmap_common.c +++ b/libraries/mbed/common/pinmap_common.c @@ -14,7 +14,7 @@ * limitations under the License. */ #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" void pinmap_pinout(PinName pin, const PinMap *map) { if (pin == NC) diff --git a/libraries/mbed/common/retarget.cpp b/libraries/mbed/common/retarget.cpp index 7362eddb3f..96f78d93a4 100644 --- a/libraries/mbed/common/retarget.cpp +++ b/libraries/mbed/common/retarget.cpp @@ -392,7 +392,7 @@ extern "C" int mkdir(const char *path, mode_t mode) { #if defined(TOOLCHAIN_GCC) /* prevents the exception handling name demangling code getting pulled in */ -#include "error.h" +#include "mbed_error.h" namespace __gnu_cxx { void __verbose_terminate_handler() { error("Exception"); diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F030R8/TOOLCHAIN_ARM_MICRO/startup_stm32f030.s b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F030R8/TOOLCHAIN_ARM_MICRO/startup_stm32f030.s index ae582b0d20..3f7d5c5704 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F030R8/TOOLCHAIN_ARM_MICRO/startup_stm32f030.s +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F030R8/TOOLCHAIN_ARM_MICRO/startup_stm32f030.s @@ -46,7 +46,7 @@ __initial_sp EQU 0x20002000 ; Top of RAM (8 KB for STM32F030R8) ; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; -Heap_Size EQU 0x00000000 +Heap_Size EQU 0x00000400 AREA HEAP, NOINIT, READWRITE, ALIGN=3 EXPORT __heap_base diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F072RB/TOOLCHAIN_ARM_MICRO/startup_stm32f072xb.s b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F072RB/TOOLCHAIN_ARM_MICRO/startup_stm32f072xb.s index 0d6e768ba8..83fa13af9a 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F072RB/TOOLCHAIN_ARM_MICRO/startup_stm32f072xb.s +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F072RB/TOOLCHAIN_ARM_MICRO/startup_stm32f072xb.s @@ -58,7 +58,7 @@ __initial_sp EQU 0x20004000 ; Top of RAM (16KB) ; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; -Heap_Size EQU 0x00000200 +Heap_Size EQU 0x00000400 AREA HEAP, NOINIT, READWRITE, ALIGN=3 EXPORT __heap_base diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F103RB/TOOLCHAIN_ARM_MICRO/startup_stm32f10x_md.s b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F103RB/TOOLCHAIN_ARM_MICRO/startup_stm32f10x_md.s index 502758c7c1..09e703914d 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F103RB/TOOLCHAIN_ARM_MICRO/startup_stm32f10x_md.s +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F103RB/TOOLCHAIN_ARM_MICRO/startup_stm32f10x_md.s @@ -46,7 +46,7 @@ __initial_sp EQU 0x20005000 ; Top of RAM ; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; -Heap_Size EQU 0x00000000 +Heap_Size EQU 0x00000400 AREA HEAP, NOINIT, READWRITE, ALIGN=3 EXPORT __heap_base diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F302R8/TOOLCHAIN_ARM_MICRO/startup_stm32f302x8.s b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F302R8/TOOLCHAIN_ARM_MICRO/startup_stm32f302x8.s index bdd37782df..5f04bf377c 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F302R8/TOOLCHAIN_ARM_MICRO/startup_stm32f302x8.s +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F302R8/TOOLCHAIN_ARM_MICRO/startup_stm32f302x8.s @@ -48,7 +48,7 @@ __initial_sp EQU 0x20004000 ; Top of RAM ; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; -Heap_Size EQU 0x00000000 +Heap_Size EQU 0x00000400 AREA HEAP, NOINIT, READWRITE, ALIGN=3 EXPORT __heap_base diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F334R8/TOOLCHAIN_ARM_MICRO/startup_stm32f334x8.s b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F334R8/TOOLCHAIN_ARM_MICRO/startup_stm32f334x8.s index 11d90e664f..43a043f0b3 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F334R8/TOOLCHAIN_ARM_MICRO/startup_stm32f334x8.s +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F334R8/TOOLCHAIN_ARM_MICRO/startup_stm32f334x8.s @@ -58,7 +58,7 @@ __initial_sp EQU 0x20003000 ; Top of RAM ; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; -Heap_Size EQU 0x00000000 +Heap_Size EQU 0x00000400 AREA HEAP, NOINIT, READWRITE, ALIGN=3 EXPORT __heap_base diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F411RE/TOOLCHAIN_ARM_MICRO/startup_stm32f411xe.s b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F411RE/TOOLCHAIN_ARM_MICRO/startup_stm32f411xe.s index 23a4c7b319..6c7de10290 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F411RE/TOOLCHAIN_ARM_MICRO/startup_stm32f411xe.s +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_F411RE/TOOLCHAIN_ARM_MICRO/startup_stm32f411xe.s @@ -58,7 +58,7 @@ __initial_sp EQU 0x20020000 ; Top of RAM ; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; -Heap_Size EQU 0x00000000 +Heap_Size EQU 0x00000400 AREA HEAP, NOINIT, READWRITE, ALIGN=3 EXPORT __heap_base diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_L053R8/TOOLCHAIN_ARM_MICRO/startup_stm32l053xx.s b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_L053R8/TOOLCHAIN_ARM_MICRO/startup_stm32l053xx.s index d3752c6119..b72443f197 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_L053R8/TOOLCHAIN_ARM_MICRO/startup_stm32l053xx.s +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_L053R8/TOOLCHAIN_ARM_MICRO/startup_stm32l053xx.s @@ -58,7 +58,7 @@ __initial_sp EQU 0x20002000 ; Top of RAM ; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; -Heap_Size EQU 0x00000000 +Heap_Size EQU 0x00000400 AREA HEAP, NOINIT, READWRITE, ALIGN=3 EXPORT __heap_base diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_L152RE/TOOLCHAIN_ARM_MICRO/startup_stm32l1xx_hd.s b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_L152RE/TOOLCHAIN_ARM_MICRO/startup_stm32l1xx_hd.s index 4c2c3a814a..e6216878b7 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_L152RE/TOOLCHAIN_ARM_MICRO/startup_stm32l1xx_hd.s +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_NUCLEO_L152RE/TOOLCHAIN_ARM_MICRO/startup_stm32l1xx_hd.s @@ -46,7 +46,7 @@ __initial_sp EQU 0x20014000 ; Top of RAM (80 KB for STM32L152RE) ; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8> ; -Heap_Size EQU 0x00000000 +Heap_Size EQU 0x00000400 AREA HEAP, NOINIT, READWRITE, ALIGN=3 EXPORT __heap_base diff --git a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20D50M/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20D50M/gpio_irq_api.c index 15f31b083a..05f3bea5fd 100644 --- a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20D50M/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20D50M/gpio_irq_api.c @@ -17,7 +17,7 @@ #include "cmsis.h" #include "gpio_irq_api.h" -#include "error.h" +#include "mbed_error.h" #define CHANNEL_NUM 160 diff --git a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL05Z/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL05Z/gpio_irq_api.c index 2d704e35f9..1720d1bc75 100644 --- a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL05Z/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL05Z/gpio_irq_api.c @@ -18,7 +18,7 @@ #include "gpio_irq_api.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" #define CHANNEL_NUM 64 // 31 pins on 2 ports diff --git a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL25Z/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL25Z/gpio_irq_api.c index 8d6c01ea6b..844007d7c2 100644 --- a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL25Z/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL25Z/gpio_irq_api.c @@ -18,7 +18,7 @@ #include "gpio_irq_api.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" #define CHANNEL_NUM 64 diff --git a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/gpio_irq_api.c index 76838c1dbe..5eb28a4fe0 100644 --- a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/gpio_irq_api.c @@ -18,7 +18,7 @@ #include "gpio_irq_api.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" #define CHANNEL_NUM 96 diff --git a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/analogout_api.c b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/analogout_api.c index fd0fa58cac..f0f839cda7 100644 --- a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/analogout_api.c +++ b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/analogout_api.c @@ -19,7 +19,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #include "PeripheralPins.h" #define RANGE_12BIT 0xFFF diff --git a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/gpio_irq_api.c index a7c6966886..d2944bb459 100644 --- a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/gpio_irq_api.c @@ -23,7 +23,7 @@ #include "gpio_api.h" #include "fsl_gpio_hal.h" #include "fsl_port_hal.h" -#include "error.h" +#include "mbed_error.h" #define CHANNEL_NUM 160 diff --git a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/pinmap.c b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/pinmap.c index ecd34ee9eb..f168646a17 100644 --- a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/pinmap.c @@ -15,7 +15,7 @@ */ #include "mbed_assert.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #include "fsl_clock_manager.h" #include "fsl_port_hal.h" diff --git a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/spi_api.c b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/spi_api.c index 2dd4514082..8efc794029 100644 --- a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/spi_api.c +++ b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/spi_api.c @@ -22,7 +22,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #include "fsl_clock_manager.h" #include "fsl_dspi_hal.h" #include "PeripheralPins.h" diff --git a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/PinNames.h b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/PinNames.h index bc5a2ae2f9..c4fe97e03b 100644 --- a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/PinNames.h +++ b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_NRF51822/PinNames.h @@ -114,7 +114,8 @@ typedef enum { // mBed interface Pins USBTX = TX_PIN_NUMBER, USBRX = RX_PIN_NUMBER, - + +/* SPI_PSELMOSI0 = p20, SPI_PSELMISO0 = p22, SPI_PSELSS0 = p24, @@ -124,43 +125,48 @@ typedef enum { SPI_PSELMISO1 = p13, SPI_PSELSS1 = p14, SPI_PSELSCK1 = p15, - - SPIS_PSELMOSI = p12, - SPIS_PSELMISO = p13, +*/ + + SPIS_PSELMOSI = p20, + SPIS_PSELMISO = p22, SPIS_PSELSS = p14, - SPIS_PSELSCK = p15, + SPIS_PSELSCK = p25, - I2C_SDA0 = p22, - I2C_SCL0 = p20, + I2C_SDA0 = p29, + I2C_SCL0 = p28, +/* I2C_SDA1 = p13, I2C_SCL1 = p15, - - D0 = p7, - D1 = p8, - D2 = p9, - D3 = p10, - D4 = p11, - D5 = p12, - D6 = p13, +*/ + + D0 = p11, + D1 = p9, + D2 = p10, + D3 = p8, + D4 = p21, + D5 = p23, + D6 = p16, D7 = p17, - D8 = p18, - D9 = p23, - D10 = p24, - D11 = p25, - D12 = p28, - D13 = p29, + D8 = p19, + D9 = p18, + D10 = p14, + D11 = p12, + D12 = p13, + D13 = p15, +/* D14 = p5, D15 = p6, +*/ - A0 = p1, - A1 = p2, - A2 = p3, - A3 = p4, - A4 = p5, - A5 = p6, + A0 = p6, + A1 = p5, + A2 = p4, + A3 = p3, + A4 = p2, + A5 = p1, // Not connected NC = (int)0xFFFFFFFF diff --git a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/gpio_irq_api.c index e23e293e1c..73c68af03f 100644 --- a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/gpio_irq_api.c @@ -17,7 +17,7 @@ #include "cmsis.h" #include "gpio_irq_api.h" -#include "error.h" +#include "mbed_error.h" #define CHANNEL_NUM 31 diff --git a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/pinmap.c b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/pinmap.c index 3e5f230741..9176da9e36 100644 --- a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/pinmap.c @@ -15,7 +15,7 @@ */ #include "mbed_assert.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" void pin_function(PinName pin, int function) { } diff --git a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/pwmout_api.c b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/pwmout_api.c index e2c641ea25..cc5ae6129b 100644 --- a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/pwmout_api.c +++ b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/pwmout_api.c @@ -17,7 +17,7 @@ #include "pwmout_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define NO_PWMS 3 #define TIMER_PRECISION 4 //4us ticks diff --git a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.c b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.c index b6dd1b0516..632182807d 100644 --- a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.c +++ b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.c @@ -27,16 +27,6 @@ ******************************************************************************/ #define UART_NUM 1 -static const PinMap PinMap_UART_TX[] = { - {TX_PIN_NUMBER, UART_0, 1}, - { NC , NC , 0} -}; - -static const PinMap PinMap_UART_RX[] = { - {RX_PIN_NUMBER, UART_0, 1}, - {NC , NC , 0} -}; - static uint32_t serial_irq_ids[UART_NUM] = {0}; static uart_irq_handler irq_handler; static uint32_t acceptedSpeeds[16][2] = {{1200,UART_BAUDRATE_BAUDRATE_Baud1200}, @@ -61,10 +51,7 @@ serial_t stdio_uart; void serial_init(serial_t *obj, PinName tx, PinName rx) { - // determine the UART to use -- for mcu's with multiple uart connections - UARTName uart_tx = (UARTName)pinmap_peripheral(tx, PinMap_UART_TX); - UARTName uart_rx = (UARTName)pinmap_peripheral(rx, PinMap_UART_RX); - UARTName uart = (UARTName)pinmap_merge(uart_tx, uart_rx); + UARTName uart = UART_0; MBED_ASSERT((int)uart != NC); diff --git a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/spi_api.c b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/spi_api.c index ebf5cb013b..237179e83e 100644 --- a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/spi_api.c +++ b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/spi_api.c @@ -18,7 +18,7 @@ #include "spi_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" static const PinMap PinMap_SPI_SCLK[] = { {SPI_PSELSCK0 , SPI_0, 0x01}, diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/analogin_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/analogin_api.c index 14a980da5d..419b473eea 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/analogin_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/analogin_api.c @@ -17,7 +17,7 @@ #include "analogin_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #if DEVICE_ANALOGIN diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/gpio_irq_api.c index a0e54ce37e..545defb56f 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/gpio_irq_api.c @@ -17,7 +17,7 @@ #include "cmsis.h" #include "gpio_irq_api.h" -#include "error.h" +#include "mbed_error.h" #if DEVICE_INTERRUPTIN diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/pinmap.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/pinmap.c index 366b2e8c8b..548d1d58ab 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/pinmap.c @@ -15,7 +15,7 @@ */ #include "mbed_assert.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" void pin_function(PinName pin, int function) { MBED_ASSERT(pin != (PinName)NC); diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/pwmout_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/pwmout_api.c index 92c93f34ef..d23a98b07f 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/pwmout_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/pwmout_api.c @@ -17,7 +17,7 @@ #include "pwmout_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #if DEVICE_PWMOUT diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/spi_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/spi_api.c index e6afbf19f3..d152794f8d 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/spi_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11U6X/spi_api.c @@ -19,7 +19,7 @@ #include "spi_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #if DEVICE_SPI diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_GHI_MBUINO/PeripheralNames.h b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_OC_MBUINO/PeripheralNames.h similarity index 100% rename from libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_GHI_MBUINO/PeripheralNames.h rename to libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_OC_MBUINO/PeripheralNames.h diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_GHI_MBUINO/PeripheralPins.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_OC_MBUINO/PeripheralPins.c similarity index 100% rename from libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_GHI_MBUINO/PeripheralPins.c rename to libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_OC_MBUINO/PeripheralPins.c diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_GHI_MBUINO/PinNames.h b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_OC_MBUINO/PinNames.h similarity index 100% rename from libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_GHI_MBUINO/PinNames.h rename to libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_OC_MBUINO/PinNames.h diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_GHI_MBUINO/device.h b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_OC_MBUINO/device.h similarity index 100% rename from libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_GHI_MBUINO/device.h rename to libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/TARGET_OC_MBUINO/device.h diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/analogin_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/analogin_api.c index 0f2abfa6bf..c2f3cff350 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/analogin_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/analogin_api.c @@ -17,7 +17,7 @@ #include "analogin_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #include "PeripheralPins.h" // For the Peripheral to Pin Definitions found in the individual Target's Platform #define ANALOGIN_MEDIAN_FILTER 1 diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/gpio_irq_api.c index 0a992633da..ef4e16c710 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/gpio_irq_api.c @@ -16,7 +16,7 @@ #include #include "cmsis.h" #include "gpio_irq_api.h" -#include "error.h" +#include "mbed_error.h" #define CHANNEL_NUM 8 #define LPC_GPIO_X LPC_GPIO_PIN_INT diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/pinmap.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/pinmap.c index e3b52e866b..9ca018c86a 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/pinmap.c @@ -15,7 +15,7 @@ */ #include "mbed_assert.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define LPC_IOCON0_BASE (LPC_IOCON_BASE) #define LPC_IOCON1_BASE (LPC_IOCON_BASE + 0x60) diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/spi_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/spi_api.c index ce3c6f0cb2..594f1f086b 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/spi_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11UXX/spi_api.c @@ -18,7 +18,7 @@ #include "spi_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #include "PeripheralPins.h" // For the Peripheral to Pin Definitions found in the individual Target's Platform static inline int ssp_disable(spi_t *obj); diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/TARGET_LPC11CXX/can_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/TARGET_LPC11CXX/can_api.c index 1415ee456d..b017d1ab25 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/TARGET_LPC11CXX/can_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/TARGET_LPC11CXX/can_api.c @@ -16,7 +16,7 @@ #include "can_api.h" #include "cmsis.h" -#include "error.h" +#include "mbed_error.h" #include #include diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/analogin_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/analogin_api.c index 96602bbce8..073d973693 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/analogin_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/analogin_api.c @@ -17,7 +17,7 @@ #include "analogin_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" static const PinMap PinMap_ADC[] = { {P0_11, ADC0_0, 2}, diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/gpio_irq_api.c index 0907c46b89..db111511d3 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/gpio_irq_api.c @@ -16,7 +16,7 @@ #include #include "cmsis.h" #include "gpio_irq_api.h" -#include "error.h" +#include "mbed_error.h" #include "gpio_api.h" // The chip is capable of 42 GPIO interrupts. diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/i2c_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/i2c_api.c index 71b1925c02..f4a271e1d0 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/i2c_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/i2c_api.c @@ -17,7 +17,7 @@ #include "i2c_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" static const PinMap PinMap_I2C_SDA[] = { {P0_5, I2C_0, 1}, diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/pinmap.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/pinmap.c index 9c76cea99f..7dbb40c386 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/pinmap.c @@ -15,7 +15,7 @@ */ #include "mbed_assert.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" void pin_function(PinName pin, int function) { MBED_ASSERT(pin != (PinName)NC); diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/spi_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/spi_api.c index a98dc182a1..b38f742d5e 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/spi_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11XX_11CXX/spi_api.c @@ -18,7 +18,7 @@ #include "spi_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" static const PinMap PinMap_SPI_SCLK[] = { {P0_6 , SPI_0, 0x02}, diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/analogin_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/analogin_api.c index 795f0dc476..5084bad02b 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/analogin_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/analogin_api.c @@ -17,7 +17,7 @@ #include "analogin_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define ANALOGIN_MEDIAN_FILTER 1 diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/gpio_irq_api.c index 74b3e280cc..4bb2e5b42d 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/gpio_irq_api.c @@ -16,7 +16,7 @@ #include #include "cmsis.h" #include "gpio_irq_api.h" -#include "error.h" +#include "mbed_error.h" #define CHANNEL_NUM 8 #define LPC_GPIO_X LPC_GPIO_PIN_INT diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/i2c_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/i2c_api.c index 5b671a4eed..a19a87deb5 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/i2c_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/i2c_api.c @@ -17,7 +17,7 @@ #include "i2c_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" static const PinMap PinMap_I2C_SDA[] = { {P0_5, I2C_0, 1}, diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/pinmap.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/pinmap.c index 70003372c3..b656b4fae4 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/pinmap.c @@ -15,7 +15,7 @@ */ #include "mbed_assert.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define LPC_IOCON0_BASE (LPC_IOCON_BASE) #define LPC_IOCON1_BASE (LPC_IOCON_BASE + 0x60) diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/spi_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/spi_api.c index cacd5a2a66..4581b07706 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/spi_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC13XX/spi_api.c @@ -18,7 +18,7 @@ #include "spi_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" static const PinMap PinMap_SPI_SCLK[] = { {P0_6 , SPI_0, 0x02}, diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/can_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/can_api.c index 31b5b6b1ee..bb738dbf2b 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/can_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/can_api.c @@ -17,7 +17,7 @@ #include "can_api.h" #include "cmsis.h" -#include "error.h" +#include "mbed_error.h" #include #include diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/gpio_irq_api.c index 8a73e9de03..f4b379295a 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/gpio_irq_api.c @@ -17,7 +17,7 @@ #include "cmsis.h" #include "gpio_irq_api.h" -#include "error.h" +#include "mbed_error.h" #define CHANNEL_NUM 8 #define LPC_GPIO_X LPC_PINT diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/pinmap.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/pinmap.c index abc15268ad..c466534cf9 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/pinmap.c @@ -15,7 +15,7 @@ */ #include "mbed_assert.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" void pin_function(PinName pin, int function) { } diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/pwmout_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/pwmout_api.c index 2ed50d37c7..0f32764d01 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/pwmout_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/pwmout_api.c @@ -17,7 +17,7 @@ #include "pwmout_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" static LPC_SCT0_Type *SCTs[4] = { (LPC_SCT0_Type*)LPC_SCT0, diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/serial_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/serial_api.c index cefa3f4e81..f839864f50 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/serial_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/serial_api.c @@ -21,7 +21,7 @@ #include "serial_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" /****************************************************************************** * INITIALIZATION diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/spi_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/spi_api.c index e59b367711..79d1d2aeef 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/spi_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/spi_api.c @@ -19,7 +19,7 @@ #include "spi_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" static const SWM_Map SWM_SPI_SSEL[] = { {4, 0}, diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/ethernet_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/ethernet_api.c index 8b0d9cf860..6790249a90 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/ethernet_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/ethernet_api.c @@ -19,7 +19,7 @@ #include "cmsis.h" #include "mbed_interface.h" #include "toolchain.h" -#include "error.h" +#include "mbed_error.h" #define NEW_LOGIC 0 #define NEW_ETH_BUFFER 0 diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/gpio_irq_api.c index 2a7936784c..f6ca2da1a1 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/gpio_irq_api.c @@ -16,7 +16,7 @@ #include #include "gpio_irq_api.h" -#include "error.h" +#include "mbed_error.h" #include "cmsis.h" #define CHANNEL_NUM 48 diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/pinmap.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/pinmap.c index c5619a86bb..d7af42e427 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/pinmap.c @@ -15,7 +15,7 @@ */ #include "mbed_assert.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" void pin_function(PinName pin, int function) { MBED_ASSERT(pin != (PinName)NC); diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/spi_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/spi_api.c index 27e9f1cf84..aee389df5e 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/spi_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/spi_api.c @@ -19,7 +19,7 @@ #include "spi_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" static const PinMap PinMap_SPI_SCLK[] = { {P0_7 , SPI_1, 2}, diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/ethernet_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/ethernet_api.c index 4b74b7295b..ba76cbc916 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/ethernet_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/ethernet_api.c @@ -19,7 +19,7 @@ #include "cmsis.h" #include "mbed_interface.h" #include "toolchain.h" -#include "error.h" +#include "mbed_error.h" #define NEW_LOGIC 0 #define NEW_ETH_BUFFER 0 diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/gpio_irq_api.c index 2518571362..40fcaa6dbe 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/gpio_irq_api.c @@ -14,7 +14,7 @@ * limitations under the License. */ #include "gpio_irq_api.h" -#include "error.h" +#include "mbed_error.h" #include #include "cmsis.h" diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/pinmap.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/pinmap.c index 1c82ad78cc..12636f5d69 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/pinmap.c @@ -15,7 +15,7 @@ */ #include "mbed_assert.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" void pin_function(PinName pin, int function) { MBED_ASSERT(pin != (PinName)NC); diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/spi_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/spi_api.c index 9247eedbda..b658769889 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/spi_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC23XX/spi_api.c @@ -19,7 +19,7 @@ #include "spi_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" static const PinMap PinMap_SPI_SCLK[] = { {P0_7 , SPI_1, 2}, diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/analogin_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/analogin_api.c index 7681e3f568..be53b09c04 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/analogin_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/analogin_api.c @@ -17,7 +17,7 @@ #include "analogin_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define ANALOGIN_MEDIAN_FILTER 1 diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/ethernet_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/ethernet_api.c index fe1d57542b..0a20a10a2e 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/ethernet_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/ethernet_api.c @@ -19,7 +19,7 @@ #include "cmsis.h" #include "mbed_interface.h" #include "toolchain.h" -#include "error.h" +#include "mbed_error.h" #define NEW_LOGIC 0 #define NEW_ETH_BUFFER 0 diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/gpio_irq_api.c index 85b16c888b..97a79de6d5 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/gpio_irq_api.c @@ -15,7 +15,7 @@ */ #include #include "gpio_irq_api.h" -#include "error.h" +#include "mbed_error.h" #include "cmsis.h" #define CHANNEL_NUM 64 diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/pinmap.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/pinmap.c index e10e0eb034..c72389d666 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/pinmap.c @@ -15,7 +15,7 @@ */ #include "mbed_assert.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" void pin_function(PinName pin, int function) { MBED_ASSERT(pin != (PinName)NC); diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/serial_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/serial_api.c index 202df6d340..4ab422312c 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/serial_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/serial_api.c @@ -21,7 +21,7 @@ #include "serial_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" /****************************************************************************** * INITIALIZATION diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/spi_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/spi_api.c index 3d790608a8..c88e8edd4f 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/spi_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC408X/spi_api.c @@ -18,7 +18,7 @@ #include "spi_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" static const PinMap PinMap_SPI_SCLK[] = { {P0_7 , SPI_1, 2}, diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/analogin_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/analogin_api.c index 357039a35b..f564717ac9 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/analogin_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/analogin_api.c @@ -19,7 +19,7 @@ #include "analogin_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #include "gpio_api.h" #define ANALOGIN_MEDIAN_FILTER 1 diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/analogout_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/analogout_api.c index 4a956e4411..009cce0d2a 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/analogout_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/analogout_api.c @@ -20,7 +20,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #include "gpio_api.h" static const PinMap PinMap_DAC[] = { diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/ethernet_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/ethernet_api.c index 17300dd65e..de22d493d8 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/ethernet_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/ethernet_api.c @@ -21,7 +21,7 @@ #include "cmsis.h" #include "mbed_interface.h" #include "toolchain.h" -#include "error.h" +#include "mbed_error.h" #define NEW_LOGIC 0 #define NEW_ETH_BUFFER 0 diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/gpio_irq_api.c index 504ed25f78..11979304ae 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/gpio_irq_api.c @@ -17,7 +17,7 @@ */ #include #include "gpio_irq_api.h" -#include "error.h" +#include "mbed_error.h" #include "cmsis.h" /* The LPC43xx implements GPIO pin and group interrupts. Any pin in the diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/i2c_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/i2c_api.c index 27c8f018b1..7b268274c2 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/i2c_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/i2c_api.c @@ -18,7 +18,7 @@ #include "i2c_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" // SCU mode for I2C SCL/SDA pins #define SCU_PINIO_I2C SCU_PINIO_PULLNONE diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/pinmap.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/pinmap.c index 983b0853f7..fd3ff7532e 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/pinmap.c @@ -17,7 +17,7 @@ */ #include "mbed_assert.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" void pin_function(PinName pin, int function) { MBED_ASSERT(pin != (PinName)NC); diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/pwmout_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/pwmout_api.c index c0491a89ca..d8f18a4786 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/pwmout_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/pwmout_api.c @@ -19,7 +19,7 @@ #include "pwmout_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" // PWM implementation for the LPC43xx using State Configurable Timer (SCT) // * PWM_0 to PWM_15 on mbed use CTOUT_0 to CTOUT_15 outputs on LPC43xx diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/serial_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/serial_api.c index 997581e552..85792efd73 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/serial_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/serial_api.c @@ -23,7 +23,7 @@ #include "serial_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #include "gpio_api.h" /****************************************************************************** diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/spi_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/spi_api.c index d5818cc97e..90be127a0f 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/spi_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC43XX/spi_api.c @@ -21,7 +21,7 @@ #include "spi_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" // SCU mode for SPI pins #define SCU_PINIO_SPI SCU_PINIO_FAST diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/gpio_irq_api.c index 95186d0228..cdc510cbe6 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/gpio_irq_api.c @@ -17,7 +17,7 @@ #include "cmsis.h" #include "gpio_irq_api.h" -#include "error.h" +#include "mbed_error.h" #define CHANNEL_NUM 8 #define LPC_GPIO_X LPC_PIN_INT diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/pinmap.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/pinmap.c index b75dfbe990..b68317d44a 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/pinmap.c @@ -15,7 +15,7 @@ */ #include "mbed_assert.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" __IO uint32_t* IOCON_REGISTERS[18] = { &LPC_IOCON->PIO0_0 , &LPC_IOCON->PIO0_1 , &LPC_IOCON->PIO0_2 , diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/serial_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/serial_api.c index e6d8da2f7f..5e83d9370c 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/serial_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/serial_api.c @@ -21,7 +21,7 @@ #include "serial_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" /****************************************************************************** * INITIALIZATION diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/spi_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/spi_api.c index 6634c57ac6..21a6432c0e 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/spi_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/spi_api.c @@ -19,7 +19,7 @@ #include "spi_api.h" #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" static const SWM_Map SWM_SPI_SSEL[] = { {4, 16}, diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/analogin_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/analogin_api.c index 4e639adbda..43a38b07f4 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/analogin_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/analogin_api.c @@ -32,7 +32,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #include "wait_api.h" static const PinMap PinMap_ADC[] = { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/gpio_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/gpio_api.c index 21b67056e7..73ebf42d21 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/gpio_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/gpio_api.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "gpio_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/gpio_irq_api.c index da641357a8..f541b90209 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/gpio_irq_api.c @@ -32,7 +32,7 @@ #include "gpio_irq_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define EDGE_NONE (0) #define EDGE_RISE (1) diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/pinmap.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/pinmap.c index 13bfc2226f..2f58a9de3c 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/pinmap.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "pinmap.h" #include "PortNames.h" -#include "error.h" +#include "mbed_error.h" // Enable GPIO clock and return GPIO base address uint32_t Set_GPIO_Clock(uint32_t port_idx) { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/port_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/port_api.c index 9166ecc630..193ba7f9ba 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/port_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F051R8/port_api.c @@ -33,7 +33,7 @@ #include "pinmap.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/gpio_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/gpio_api.c index e2751f3b67..4931950566 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/gpio_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/gpio_api.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "gpio_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/gpio_irq_api.c index 57ef8b13a1..df00593f79 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/gpio_irq_api.c @@ -32,7 +32,7 @@ #include "gpio_irq_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define EDGE_NONE (0) #define EDGE_RISE (1) diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/pinmap.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/pinmap.c index 57de90c400..7f1ab299f5 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/pinmap.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "device.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" // Alternate-function mapping static const uint32_t AF_mapping[] = { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/port_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/port_api.c index ea453d23b4..48447ce6a1 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/port_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F100RB/port_api.c @@ -30,7 +30,7 @@ #include "port_api.h" #include "pinmap.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" #if DEVICE_PORTIN || DEVICE_PORTOUT diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/gpio_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/gpio_api.c index 5b97612803..cd20adfb51 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/gpio_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/gpio_api.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "gpio_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/gpio_irq_api.c index 1138f4f37f..ac78a1f107 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/gpio_irq_api.c @@ -32,7 +32,7 @@ #include "gpio_irq_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define EDGE_NONE (0) #define EDGE_RISE (1) diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/i2c_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/i2c_api.c index 584a2fd1a2..a6a53f72a6 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/i2c_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/i2c_api.c @@ -34,7 +34,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" /* Timeout values for flags and events waiting loops. These timeouts are not based on accurate values, they just guarantee that the application will diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/pinmap.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/pinmap.c index 3c3f535c0a..7771138999 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/pinmap.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "pinmap.h" #include "PortNames.h" -#include "error.h" +#include "mbed_error.h" // Enable GPIO clock and return GPIO base address uint32_t Set_GPIO_Clock(uint32_t port_idx) { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/port_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/port_api.c index 9166ecc630..193ba7f9ba 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/port_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/port_api.c @@ -33,7 +33,7 @@ #include "pinmap.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/pwmout_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/pwmout_api.c index a9bef674dd..3961cdfcc2 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/pwmout_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F303VC/pwmout_api.c @@ -33,7 +33,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" // TIM2 cannot be used because already used by the us_ticker static const PinMap PinMap_PWM[] = { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/analogout_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/analogout_api.c index ba6510fa9e..c45d859ab7 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/analogout_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/analogout_api.c @@ -31,7 +31,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #include "stm32f4xx_hal.h" #define RANGE_12BIT (0xFFF) diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/gpio_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/gpio_api.c index b74cfc2ce5..ac68816d08 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/gpio_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/gpio_api.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "gpio_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/gpio_irq_api.c index 959bce8dc2..db8fdeed6c 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/gpio_irq_api.c @@ -32,7 +32,7 @@ #include "gpio_irq_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define EDGE_NONE (0) #define EDGE_RISE (1) diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/pinmap.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/pinmap.c index 397ecaf0af..db80f3fece 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/pinmap.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "pinmap.h" #include "PortNames.h" -#include "error.h" +#include "mbed_error.h" // GPIO mode look-up table static const uint32_t gpio_mode[12] = { @@ -68,10 +68,26 @@ uint32_t Set_GPIO_Clock(uint32_t port_idx) { gpio_add = GPIOD_BASE; __GPIOD_CLK_ENABLE(); break; + case PortE: + gpio_add = GPIOE_BASE; + __GPIOE_CLK_ENABLE(); + break; + case PortF: + gpio_add = GPIOF_BASE; + __GPIOF_CLK_ENABLE(); + break; + case PortG: + gpio_add = GPIOG_BASE; + __GPIOG_CLK_ENABLE(); + break; case PortH: gpio_add = GPIOH_BASE; __GPIOH_CLK_ENABLE(); break; + case PortI: + gpio_add = GPIOI_BASE; + __GPIOI_CLK_ENABLE(); + break; default: error("Pinmap error: wrong port number."); break; diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/port_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/port_api.c index f60110fd56..412967167d 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/port_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/port_api.c @@ -30,7 +30,7 @@ #include "port_api.h" #include "pinmap.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" #if DEVICE_PORTIN || DEVICE_PORTOUT diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/pwmout_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/pwmout_api.c index d66961b06a..71f4dff67b 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/pwmout_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/pwmout_api.c @@ -33,7 +33,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" // TIM5 cannot be used because already used by the us_ticker static const PinMap PinMap_PWM[] = { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/rtc_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/rtc_api.c index f76f9549c1..c9a55b55d0 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/rtc_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_DISCO_F407VG/rtc_api.c @@ -30,7 +30,7 @@ #include "rtc_api.h" #if DEVICE_RTC -#include "error.h" +#include "mbed_error.h" static int rtc_inited = 0; diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/analogin_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/analogin_api.c index 91701a8a5f..97f3060d83 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/analogin_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/analogin_api.c @@ -32,7 +32,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #include "wait_api.h" static const PinMap PinMap_ADC[] = { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/gpio_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/gpio_api.c index 5b97612803..cd20adfb51 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/gpio_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/gpio_api.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "gpio_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/gpio_irq_api.c index 3ec4449108..10819cfc83 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/gpio_irq_api.c @@ -32,7 +32,7 @@ #include "gpio_irq_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define EDGE_NONE (0) #define EDGE_RISE (1) diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/pinmap.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/pinmap.c index dca0305b81..3197e881b1 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/pinmap.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "pinmap.h" #include "PortNames.h" -#include "error.h" +#include "mbed_error.h" // Enable GPIO clock and return GPIO base address uint32_t Set_GPIO_Clock(uint32_t port_idx) { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/port_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/port_api.c index 78ae7da93c..9dc935435d 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/port_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F030R8/port_api.c @@ -33,7 +33,7 @@ #include "pinmap.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/analogout_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/analogout_api.c index 72c54a3b86..fddd540e67 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/analogout_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/analogout_api.c @@ -32,7 +32,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define DAC_RANGE (0xFFF) // 12 bits diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/gpio_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/gpio_api.c index 54f3157106..90ff9d61e7 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/gpio_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/gpio_api.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "gpio_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/gpio_irq_api.c index bfc8ae58b8..e35e1272c7 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/gpio_irq_api.c @@ -31,7 +31,7 @@ #include "cmsis.h" #include "gpio_irq_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define EDGE_NONE (0) #define EDGE_RISE (1) diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/pinmap.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/pinmap.c index fbd0a7c13c..09597e846e 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/pinmap.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "pinmap.h" #include "PortNames.h" -#include "error.h" +#include "mbed_error.h" // GPIO mode look-up table static const uint32_t gpio_mode[12] = { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/port_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/port_api.c index 9a6ad5e5f4..337a3af226 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/port_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/port_api.c @@ -30,7 +30,7 @@ #include "port_api.h" #include "pinmap.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" #if DEVICE_PORTIN || DEVICE_PORTOUT diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/pwmout_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/pwmout_api.c index 4f2790a556..12139424ef 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/pwmout_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/pwmout_api.c @@ -33,7 +33,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" // TIM2 cannot be used because already used by the us_ticker static const PinMap PinMap_PWM[] = { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/rtc_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/rtc_api.c index 10d34dfbbe..3cfc14bfc4 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/rtc_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F072RB/rtc_api.c @@ -31,7 +31,7 @@ #if DEVICE_RTC -#include "error.h" +#include "mbed_error.h" static int rtc_inited = 0; diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/gpio_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/gpio_api.c index 6ec02db5ad..d37ae7e721 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/gpio_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/gpio_api.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "gpio_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/gpio_irq_api.c index a776ff7c66..86a6ccaf13 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/gpio_irq_api.c @@ -31,7 +31,7 @@ #include "cmsis.h" #include "gpio_irq_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define EDGE_NONE (0) #define EDGE_RISE (1) diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/pinmap.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/pinmap.c index 7beb6e92e5..43d82f77df 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/pinmap.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "pinmap.h" #include "PortNames.h" -#include "error.h" +#include "mbed_error.h" // Alternate-function mapping #define AF_NUM (10) diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/port_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/port_api.c index bc0060014a..34598358be 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/port_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/port_api.c @@ -33,7 +33,7 @@ #include "pinmap.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/gpio_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/gpio_api.c index 5b97612803..cd20adfb51 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/gpio_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/gpio_api.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "gpio_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/gpio_irq_api.c index 9bdac95a88..86d433b30f 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/gpio_irq_api.c @@ -31,7 +31,7 @@ #include "cmsis.h" #include "gpio_irq_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define EDGE_NONE (0) #define EDGE_RISE (1) diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/i2c_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/i2c_api.c index 1c92c88a99..5760921ee2 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/i2c_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/i2c_api.c @@ -34,7 +34,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" /* Timeout values for flags and events waiting loops. These timeouts are not based on accurate values, they just guarantee that the application will diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/pinmap.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/pinmap.c index 50c7792349..a107987dd1 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/pinmap.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "pinmap.h" #include "PortNames.h" -#include "error.h" +#include "mbed_error.h" // Enable GPIO clock and return GPIO base address uint32_t Set_GPIO_Clock(uint32_t port_idx) { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/port_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/port_api.c index 78ae7da93c..9dc935435d 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/port_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/port_api.c @@ -33,7 +33,7 @@ #include "pinmap.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/pwmout_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/pwmout_api.c index 3405f27cc3..cc98fe2a0c 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/pwmout_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/pwmout_api.c @@ -33,7 +33,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" // TIM2 cannot be used because already used by the us_ticker static const PinMap PinMap_PWM[] = { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/analogout_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/analogout_api.c index 5679a345e2..a1fa26a3c0 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/analogout_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/analogout_api.c @@ -32,7 +32,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define DAC_RANGE (0xFFF) // 12 bits diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/gpio_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/gpio_api.c index 3ba161b961..b9ff5c114b 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/gpio_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/gpio_api.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "gpio_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/gpio_irq_api.c index 661b987c72..bc73112cb2 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/gpio_irq_api.c @@ -31,7 +31,7 @@ #include "cmsis.h" #include "gpio_irq_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define EDGE_NONE (0) #define EDGE_RISE (1) diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/pinmap.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/pinmap.c index 5a7d5a30c4..5daa0d9ce0 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/pinmap.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "pinmap.h" #include "PortNames.h" -#include "error.h" +#include "mbed_error.h" // GPIO mode look-up table static const uint32_t gpio_mode[12] = { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/port_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/port_api.c index 6281c31e52..e982858665 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/port_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/port_api.c @@ -30,7 +30,7 @@ #include "port_api.h" #include "pinmap.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" #if DEVICE_PORTIN || DEVICE_PORTOUT diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/pwmout_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/pwmout_api.c index 697ed1eb25..b2aa63a18e 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/pwmout_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/pwmout_api.c @@ -33,7 +33,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" // TIM2 cannot be used because already used by the us_ticker static const PinMap PinMap_PWM[] = { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/rtc_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/rtc_api.c index 28911960d0..6d49409b65 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/rtc_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/rtc_api.c @@ -31,7 +31,7 @@ #if DEVICE_RTC -#include "error.h" +#include "mbed_error.h" static int rtc_inited = 0; diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/gpio_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/gpio_api.c index 316295d4da..bcaa1f861c 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/gpio_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/gpio_api.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "gpio_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/gpio_irq_api.c index bad20e7360..47f0883692 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/gpio_irq_api.c @@ -31,7 +31,7 @@ #include "cmsis.h" #include "gpio_irq_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define EDGE_NONE (0) #define EDGE_RISE (1) diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/pinmap.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/pinmap.c index dd55e6dcac..01afd00dab 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/pinmap.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "pinmap.h" #include "PortNames.h" -#include "error.h" +#include "mbed_error.h" // GPIO mode look-up table static const uint32_t gpio_mode[12] = { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/port_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/port_api.c index 9a6ad5e5f4..337a3af226 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/port_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/port_api.c @@ -30,7 +30,7 @@ #include "port_api.h" #include "pinmap.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" #if DEVICE_PORTIN || DEVICE_PORTOUT diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/pwmout_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/pwmout_api.c index 934fb67b45..69c87706dd 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/pwmout_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/pwmout_api.c @@ -33,7 +33,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" // TIM5 cannot be used because already used by the us_ticker static const PinMap PinMap_PWM[] = { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/rtc_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/rtc_api.c index ee7e84242a..1c0bde768d 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/rtc_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F401RE/rtc_api.c @@ -31,7 +31,7 @@ #if DEVICE_RTC -#include "error.h" +#include "mbed_error.h" static int rtc_inited = 0; diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/gpio_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/gpio_api.c index a9c28ece8c..df6fd9c1f7 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/gpio_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/gpio_api.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "gpio_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/gpio_irq_api.c index e0b1c0e523..42ba48870b 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/gpio_irq_api.c @@ -31,7 +31,7 @@ #include "cmsis.h" #include "gpio_irq_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define EDGE_NONE (0) #define EDGE_RISE (1) diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/pinmap.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/pinmap.c index 56c02cb282..524733cdad 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/pinmap.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "pinmap.h" #include "PortNames.h" -#include "error.h" +#include "mbed_error.h" // GPIO mode look-up table static const uint32_t gpio_mode[12] = { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/port_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/port_api.c index 6281c31e52..e982858665 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/port_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/port_api.c @@ -30,7 +30,7 @@ #include "port_api.h" #include "pinmap.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" #if DEVICE_PORTIN || DEVICE_PORTOUT diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/pwmout_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/pwmout_api.c index 5349dedd7b..96bd95c96b 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/pwmout_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/pwmout_api.c @@ -33,7 +33,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" // TIM5 cannot be used because already used by the us_ticker static const PinMap PinMap_PWM[] = { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/rtc_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/rtc_api.c index d4627017d0..bd0f2c0140 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/rtc_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F411RE/rtc_api.c @@ -31,7 +31,7 @@ #if DEVICE_RTC -#include "error.h" +#include "mbed_error.h" static int rtc_inited = 0; diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/analogout_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/analogout_api.c index 991acd2a63..9b39aa54de 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/analogout_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/analogout_api.c @@ -32,7 +32,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define DAC_RANGE (0xFFF) // 12 bits diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/gpio_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/gpio_api.c index de541d16d7..6457f88f46 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/gpio_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/gpio_api.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "gpio_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/gpio_irq_api.c index 5ee15601c8..ba1ff31b2f 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/gpio_irq_api.c @@ -31,7 +31,7 @@ #include "cmsis.h" #include "gpio_irq_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define EDGE_NONE (0) #define EDGE_RISE (1) diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/i2c_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/i2c_api.c index 23c321c18d..837d355077 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/i2c_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/i2c_api.c @@ -34,7 +34,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" /* Timeout values for flags and events waiting loops. These timeouts are not based on accurate values, they just guarantee that the application will diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/pinmap.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/pinmap.c index 66292a3da2..85eef83575 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/pinmap.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "pinmap.h" #include "PortNames.h" -#include "error.h" +#include "mbed_error.h" // GPIO mode look-up table static const uint32_t gpio_mode[12] = { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/port_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/port_api.c index 9a6ad5e5f4..337a3af226 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/port_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/port_api.c @@ -30,7 +30,7 @@ #include "port_api.h" #include "pinmap.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" #if DEVICE_PORTIN || DEVICE_PORTOUT diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/pwmout_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/pwmout_api.c index 202d61dec3..accfb30ddb 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/pwmout_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/pwmout_api.c @@ -33,7 +33,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" // TIM21 cannot be used because already used by the us_ticker static const PinMap PinMap_PWM[] = { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/rtc_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/rtc_api.c index ee7e84242a..1c0bde768d 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/rtc_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/rtc_api.c @@ -31,7 +31,7 @@ #if DEVICE_RTC -#include "error.h" +#include "mbed_error.h" static int rtc_inited = 0; diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/gpio_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/gpio_api.c index 1183c2805c..81f28fc45c 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/gpio_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/gpio_api.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "gpio_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/gpio_irq_api.c index efd4558dd7..dbb8c8209d 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/gpio_irq_api.c @@ -31,7 +31,7 @@ #include "cmsis.h" #include "gpio_irq_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define EDGE_NONE (0) #define EDGE_RISE (1) diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/pinmap.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/pinmap.c index 0bfc6811c4..926c1b4bc7 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/pinmap.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "pinmap.h" #include "PortNames.h" -#include "error.h" +#include "mbed_error.h" // Enable GPIO clock and return GPIO base address uint32_t Set_GPIO_Clock(uint32_t port_idx) { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/port_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/port_api.c index 78ae7da93c..9dc935435d 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/port_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/port_api.c @@ -33,7 +33,7 @@ #include "pinmap.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/gpio_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/gpio_api.c index 6743f91187..50ab4dc856 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/gpio_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/gpio_api.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "gpio_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" extern uint32_t Set_GPIO_Clock(uint32_t port_idx); diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/gpio_irq_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/gpio_irq_api.c index f729c93d81..9a41e8be05 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/gpio_irq_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/gpio_irq_api.c @@ -32,7 +32,7 @@ #include "gpio_irq_api.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define EDGE_NONE (0) #define EDGE_RISE (1) diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/pinmap.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/pinmap.c index b8989a93c0..59618c5512 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/pinmap.c @@ -30,7 +30,7 @@ #include "mbed_assert.h" #include "pinmap.h" #include "PortNames.h" -#include "error.h" +#include "mbed_error.h" // Enable GPIO clock and return GPIO base address uint32_t Set_GPIO_Clock(uint32_t port_idx) { diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/port_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/port_api.c index b257b612d6..d09d416124 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/port_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F3XX/port_api.c @@ -30,7 +30,7 @@ #include "port_api.h" #include "pinmap.h" #include "gpio_api.h" -#include "error.h" +#include "mbed_error.h" #if DEVICE_PORTIN || DEVICE_PORTOUT diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4XX/analogin_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4XX/analogin_api.c index e2fdc6a513..fc9855511a 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4XX/analogin_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4XX/analogin_api.c @@ -20,7 +20,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" #define ADC_10BIT_RANGE 0x3FF #define ADC_12BIT_RANGE 0xFFF diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4XX/i2c_api.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4XX/i2c_api.c index b9e619bedc..3e9dc9a6e5 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4XX/i2c_api.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4XX/i2c_api.c @@ -20,7 +20,7 @@ #include "cmsis.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" static const PinMap PinMap_I2C_SDA[] = { {PB_7, I2C_1, STM_PIN_DATA(2, 4)}, diff --git a/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4XX/pinmap.c b/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4XX/pinmap.c index 33a08966f8..c3ad164795 100644 --- a/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4XX/pinmap.c +++ b/libraries/mbed/targets/hal/TARGET_STM/TARGET_STM32F4XX/pinmap.c @@ -15,7 +15,7 @@ */ #include "mbed_assert.h" #include "pinmap.h" -#include "error.h" +#include "mbed_error.h" /** * Set the pin into input, output, alternate function or analog mode diff --git a/libraries/net/lwip/lwip-sys/arch/sys_arch.c b/libraries/net/lwip/lwip-sys/arch/sys_arch.c index 31f69c6d84..9186ab6e0e 100644 --- a/libraries/net/lwip/lwip-sys/arch/sys_arch.c +++ b/libraries/net/lwip/lwip-sys/arch/sys_arch.c @@ -18,7 +18,7 @@ #include /* mbed includes */ -#include "error.h" +#include "mbed_error.h" #include "mbed_interface.h" #include "us_ticker_api.h" @@ -440,7 +440,7 @@ sys_thread_t sys_thread_new(const char *pcName, #endif -#ifdef LWIP_DEBUG +#ifdef LWIP_DEBUG /** \brief Displays an error message on assertion diff --git a/libraries/rtos/rtos/Mutex.cpp b/libraries/rtos/rtos/Mutex.cpp index c9b9c232df..d10e598297 100644 --- a/libraries/rtos/rtos/Mutex.cpp +++ b/libraries/rtos/rtos/Mutex.cpp @@ -22,7 +22,7 @@ #include "Mutex.h" #include -#include "error.h" +#include "mbed_error.h" namespace rtos { diff --git a/libraries/rtos/rtos/Queue.h b/libraries/rtos/rtos/Queue.h index f4b316a9b2..6e55e02db6 100644 --- a/libraries/rtos/rtos/Queue.h +++ b/libraries/rtos/rtos/Queue.h @@ -26,7 +26,7 @@ #include #include "cmsis_os.h" -#include "error.h" +#include "mbed_error.h" namespace rtos { diff --git a/libraries/rtos/rtos/RtosTimer.cpp b/libraries/rtos/rtos/RtosTimer.cpp index 2138d3311a..f546183f49 100644 --- a/libraries/rtos/rtos/RtosTimer.cpp +++ b/libraries/rtos/rtos/RtosTimer.cpp @@ -24,7 +24,7 @@ #include #include "cmsis_os.h" -#include "error.h" +#include "mbed_error.h" namespace rtos { diff --git a/libraries/rtos/rtos/Semaphore.cpp b/libraries/rtos/rtos/Semaphore.cpp index aa749bd5a4..ee356b2eaf 100644 --- a/libraries/rtos/rtos/Semaphore.cpp +++ b/libraries/rtos/rtos/Semaphore.cpp @@ -22,7 +22,6 @@ #include "Semaphore.h" #include -#include "error.h" namespace rtos { diff --git a/libraries/rtos/rtos/Thread.cpp b/libraries/rtos/rtos/Thread.cpp index ef5ea3a8b5..527484137a 100644 --- a/libraries/rtos/rtos/Thread.cpp +++ b/libraries/rtos/rtos/Thread.cpp @@ -21,7 +21,7 @@ */ #include "Thread.h" -#include "error.h" +#include "mbed_error.h" namespace rtos { diff --git a/libraries/rtos/rtx/RTX_CM_lib.h b/libraries/rtos/rtx/RTX_CM_lib.h index 09e72d833f..33b058c3c4 100755 --- a/libraries/rtos/rtx/RTX_CM_lib.h +++ b/libraries/rtos/rtx/RTX_CM_lib.h @@ -31,7 +31,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. *---------------------------------------------------------------------------*/ -#include "error.h" +#include "mbed_error.h" #if defined (__CC_ARM) #pragma O3 diff --git a/libraries/tests/rtos/mbed/mutex/main.cpp b/libraries/tests/rtos/mbed/mutex/main.cpp index 6353d8cbb3..9983c4228c 100644 --- a/libraries/tests/rtos/mbed/mutex/main.cpp +++ b/libraries/tests/rtos/mbed/mutex/main.cpp @@ -16,16 +16,17 @@ DigitalOut led(LED1); volatile int change_counter = 0; volatile bool changing_counter = false; +volatile bool mutex_defect = false; bool manipulate_protected_zone(const int thread_delay) { bool result = true; stdio_mutex.lock(); // LOCK if (changing_counter == true) { - print_char('e'); // if changing_counter is true access is not exclusively + // 'e' stands for error. If changing_counter is true access is not exclusively + print_char('e'); result = false; - notify_completion(false); - exit(1); + mutex_defect = true; } changing_counter = true; @@ -53,17 +54,19 @@ int main() { const int t3_delay = THREAD_DELAY * 3; Thread t2(test_thread, (void *)t2_delay); Thread t3(test_thread, (void *)t3_delay); - bool result = true; while (true) { // Thread 1 action Thread::wait(t1_delay); manipulate_protected_zone(t1_delay); - if (change_counter >= SIGNALS_TO_EMIT) { + if (change_counter >= SIGNALS_TO_EMIT or mutex_defect == true) { + t2.terminate(); + t3.terminate(); break; } } - notify_completion(result); + fflush(stdout); + notify_completion(!mutex_defect); return 0; } diff --git a/libraries/tests/rtos/mbed/semaphore/main.cpp b/libraries/tests/rtos/mbed/semaphore/main.cpp index 3cd97ebb43..15cb8ce793 100644 --- a/libraries/tests/rtos/mbed/semaphore/main.cpp +++ b/libraries/tests/rtos/mbed/semaphore/main.cpp @@ -2,7 +2,7 @@ #include "test_env.h" #include "rtos.h" -#define THREAD_DELAY 100 +#define THREAD_DELAY 75 #define SEMAPHORE_SLOTS 2 #define SEM_CHANGES 100 @@ -16,6 +16,7 @@ Semaphore two_slots(SEMAPHORE_SLOTS); volatile int change_counter = 0; volatile int sem_counter = 0; +volatile bool sem_defect = false; void test_thread(void const *delay) { const int thread_delay = int(delay); @@ -26,8 +27,7 @@ void test_thread(void const *delay) { const char msg = sem_lock_failed ? 'e' : sem_counter + '0'; print_char(msg); if (sem_lock_failed) { - notify_completion(false); - exit(1); + sem_defect = true; } Thread::wait(thread_delay); print_char('.'); @@ -46,10 +46,15 @@ int main (void) { Thread t3(test_thread, (void *)t3_delay); while (true) { - if (change_counter >= SEM_CHANGES) { - notify_completion(true); + if (change_counter >= SEM_CHANGES or sem_defect == true) { + t1.terminate(); + t2.terminate(); + t3.terminate(); break; } } + + fflush(stdout); + notify_completion(!sem_defect); return 0; } diff --git a/workspace_tools/build_api.py b/workspace_tools/build_api.py index f8862984dc..d1266fe595 100644 --- a/workspace_tools/build_api.py +++ b/workspace_tools/build_api.py @@ -15,17 +15,18 @@ See the License for the specific language governing permissions and limitations under the License. """ -import tempfile import re -from os.path import join, exists, basename -from shutil import rmtree +import tempfile + from types import ListType +from shutil import rmtree +from os.path import join, exists, basename from workspace_tools.utils import mkdir, run_cmd, run_cmd_ext -from workspace_tools.toolchains import TOOLCHAIN_CLASSES from workspace_tools.paths import MBED_TARGETS_PATH, MBED_LIBRARIES, MBED_API, MBED_HAL, MBED_COMMON -from workspace_tools.libraries import Library from workspace_tools.targets import TARGET_NAMES, TARGET_MAP +from workspace_tools.libraries import Library +from workspace_tools.toolchains import TOOLCHAIN_CLASSES def build_project(src_path, build_path, target, toolchain_name, diff --git a/workspace_tools/build_release.py b/workspace_tools/build_release.py index e1394626c5..54ed9932a4 100755 --- a/workspace_tools/build_release.py +++ b/workspace_tools/build_release.py @@ -58,13 +58,13 @@ OFFICIAL_MBED_LIBRARY_BUILD = ( ('NUCLEO_L053R8', ('ARM', 'uARM')), ('NUCLEO_L152RE', ('ARM', 'uARM')), - ('NRF51822', ('ARM', )), - ('HRM1017', ('ARM', )), - ('ARCH_BLE', ('ARM', )), - ('RBLAB_NRF51822', ('ARM', )), + ('NRF51822', ('ARM', 'GCC_ARM')), + ('HRM1017', ('ARM', 'GCC_ARM')), + ('ARCH_BLE', ('ARM', 'GCC_ARM')), + ('RBLAB_NRF51822', ('ARM', 'GCC_ARM')), ('LPC11U68', ('uARM','GCC_ARM','GCC_CR')), - ('GHI_MBUINO', ('ARM', 'uARM', 'GCC_ARM')), + ('OC_MBUINO', ('ARM', 'uARM', 'GCC_ARM')), ) diff --git a/workspace_tools/build_travis.py b/workspace_tools/build_travis.py index c6d0f6f321..d2bf861735 100644 --- a/workspace_tools/build_travis.py +++ b/workspace_tools/build_travis.py @@ -30,7 +30,7 @@ build_list = ( { "target": "LPC1768", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "eth", "usb_host", "usb", "ublox", "fat"] }, { "target": "LPC2368", "toolchains": "GCC_ARM", "libs": ["fat"] }, { "target": "LPC11U24", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "fat"] }, - { "target": "GHI_MBUINO", "toolchains": "GCC_ARM", "libs": ["fat"] }, + { "target": "OC_MBUINO", "toolchains": "GCC_ARM", "libs": ["fat"] }, { "target": "LPC11U24_301", "toolchains": "GCC_ARM", "libs": ["fat"] }, { "target": "NUCLEO_F103RB", "toolchains": "GCC_ARM", "libs": ["fat"] }, diff --git a/workspace_tools/export/exporters.py b/workspace_tools/export/exporters.py index a5114c23fc..e48b7e2333 100644 --- a/workspace_tools/export/exporters.py +++ b/workspace_tools/export/exporters.py @@ -3,7 +3,8 @@ import uuid, shutil, os, logging, fnmatch from os import walk, remove from os.path import join, dirname, isdir, split from copy import copy -from jinja2 import Template +from jinja2 import Template, FileSystemLoader +from jinja2.environment import Environment from contextlib import closing from zipfile import ZipFile, ZIP_DEFLATED @@ -23,6 +24,8 @@ class Exporter(): self.program_name = program_name self.toolchain = TOOLCHAIN_CLASSES[self.get_toolchain()](TARGET_MAP[target]) self.build_url_resolver = build_url_resolver + jinja_loader = FileSystemLoader(os.path.dirname(os.path.abspath(__file__))) + self.jinja_environment = Environment(loader=jinja_loader) def get_toolchain(self): return self.TOOLCHAIN @@ -87,8 +90,7 @@ class Exporter(): def gen_file(self, template_file, data, target_file): template_path = join(Exporter.TEMPLATE_DIR, template_file) - template_text = open(template_path).read() - template = Template(template_text) + template = self.jinja_environment.get_template(template_file) target_text = template.render(data) target_path = join(self.inputDir, target_file) diff --git a/workspace_tools/host_tests/hello_auto.py b/workspace_tools/host_tests/hello_auto.py index 4c33942e03..e69b740c5d 100644 --- a/workspace_tools/host_tests/hello_auto.py +++ b/workspace_tools/host_tests/hello_auto.py @@ -22,12 +22,27 @@ class HelloTest(DefaultTest): HELLO_WORLD = "Hello World\n" def run(self): - c = self.mbed.serial_read(len(self.HELLO_WORLD)) + c = self.mbed.serial_read(1) + if c is None: + self.print_result("ioerr_serial") + return + data_to_read = len(self.HELLO_WORLD) + read_buffer = '' + if c == '$': # target will printout TargetID e.g.: $$$$1040e649d5c09a09a3f6bc568adef61375c6 + #Read additional 39 bytes of TargetID + if self.mbed.serial_read(39) is None: + self.print_result("ioerr_serial") + return + else: + data_to_read -= 1 + read_buffer += c + c = self.mbed.serial_read(data_to_read) + read_buffer += c if c is None: self.print_result("ioerr_serial") return - stdout.write(c) - if c == self.HELLO_WORLD: # Hello World received + stdout.write(read_buffer) + if read_buffer == self.HELLO_WORLD: # Hello World received self.print_result('success') else: self.print_result('failure') diff --git a/workspace_tools/host_tests/stdio_auto.py b/workspace_tools/host_tests/stdio_auto.py index b262e065ba..9ebf05c075 100644 --- a/workspace_tools/host_tests/stdio_auto.py +++ b/workspace_tools/host_tests/stdio_auto.py @@ -22,7 +22,7 @@ from time import time from sys import stdout class StdioTest(DefaultTest): - PATTERN_INT_VALUE = "^Your value was: (-?\d+)" + PATTERN_INT_VALUE = "Your value was: (-?\d+)" re_detect_int_value = re.compile(PATTERN_INT_VALUE) def run(self): diff --git a/workspace_tools/host_tests/wait_us_auto.py b/workspace_tools/host_tests/wait_us_auto.py index 9171bdb2e8..a794cff442 100644 --- a/workspace_tools/host_tests/wait_us_auto.py +++ b/workspace_tools/host_tests/wait_us_auto.py @@ -32,7 +32,7 @@ class WaitusTest(DefaultTest): return if c == '$': # target will printout TargetID e.g.: $$$$1040e649d5c09a09a3f6bc568adef61375c6 #Read additional 39 bytes of TargetID - if not self.mbed.serial_read(39): + if self.mbed.serial_read(39) is None: self.print_result("ioerr_serial") return c = self.mbed.serial_read(1) # Re-read first 'tick' diff --git a/workspace_tools/targets.py b/workspace_tools/targets.py index d49e7f757c..b4e4d692b3 100644 --- a/workspace_tools/targets.py +++ b/workspace_tools/targets.py @@ -590,7 +590,7 @@ class RBLAB_NRF51822(NRF51822): self.macros = ['TARGET_NRF51822'] -class GHI_MBUINO(LPC11U24): +class OC_MBUINO(LPC11U24): def __init__(self): LPC11U24.__init__(self) self.core = "Cortex-M0" @@ -656,7 +656,7 @@ TARGETS = [ HRM1017(), ARM_MPS2(), RBLAB_NRF51822(), - GHI_MBUINO(), + OC_MBUINO(), MTS_GAMBIT(), ] diff --git a/workspace_tools/toolchains/__init__.py b/workspace_tools/toolchains/__init__.py index acc6d730b2..862db5a327 100644 --- a/workspace_tools/toolchains/__init__.py +++ b/workspace_tools/toolchains/__init__.py @@ -14,7 +14,7 @@ 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. """ -from os import stat, walk, remove +from os import stat, walk from os.path import join, splitext, exists, relpath, dirname, basename, split from shutil import copyfile from copy import copy @@ -23,12 +23,10 @@ from inspect import getmro from time import time from workspace_tools.utils import run_cmd, mkdir, rel_path, ToolException, split_path -from workspace_tools.patch import patch from workspace_tools.settings import BUILD_OPTIONS, MBED_ORG_USER -from multiprocessing import Pool, Manager, cpu_count +from multiprocessing import Pool, cpu_count from time import sleep -from pprint import pprint import workspace_tools.hooks as hooks import re @@ -58,7 +56,7 @@ def print_notify_verbose(event): elif event['type'] == 'cc': event['severity'] = event['severity'].title() event['file'] = basename(event['file']) - event['mcu_name'] = "None" + event['mcu_name'] = "None" event['toolchain'] = "None" event['target_name'] = event['target_name'].upper() if event['target_name'] else "Unknown" event['toolchain_name'] = event['toolchain_name'].upper() if event['toolchain_name'] else "Unknown" @@ -153,7 +151,7 @@ class Resources: self.linker_script = self.linker_script.replace('\\', '/') def __str__(self): - s = [] + s = [] for (label, resources) in ( ('Include Directories', self.inc_dirs), @@ -242,7 +240,7 @@ class mbedToolchain: self.mp_pool = None - def __exit__(): + def __exit__(self): if self.mp_pool is not None: self.mp_pool.terminate() @@ -366,7 +364,7 @@ class mbedToolchain: elif ext == '.o': resources.objects.append(file_path) - elif ext == self.LIBRARY_EXT: + elif ext == self.LIBRARY_EXT: resources.libraries.append(file_path) resources.lib_dirs.add(root) @@ -443,9 +441,9 @@ class mbedToolchain: if inc_dirs is not None: inc_paths.extend(inc_dirs) - objects=[] - queue=[] - prev_dir=None + objects = [] + queue = [] + prev_dir = None # The dependency checking for C/C++ is delegated to the compiler base_path = resources.base_path @@ -692,7 +690,8 @@ class mbedToolchain: from workspace_tools.toolchains.arm import ARM_STD, ARM_MICRO -from workspace_tools.toolchains.gcc import GCC_ARM, GCC_CS, GCC_CR, GCC_CW_EWL, GCC_CW_NEWLIB +from workspace_tools.toolchains.gcc import GCC_ARM, GCC_CS, GCC_CR +from workspace_tools.toolchains.gcc import GCC_CW_EWL, GCC_CW_NEWLIB from workspace_tools.toolchains.iar import IAR TOOLCHAIN_CLASSES = {