From bebc235ffb8f0625a0f5c40ab922818fefb10f7b Mon Sep 17 00:00:00 2001 From: tomoyuki yamanaka Date: Tue, 17 May 2016 20:35:49 +0900 Subject: [PATCH 1/2] Bug fix of Serial in IAR compile We fixed bug of Serial in IAR complie. We modified so as to have #if defined ( __ICCARM__ ) definition as well. --- .../targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/serial_api.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/serial_api.c b/libraries/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/serial_api.c index 0cb924904d8..e312a058c9e 100644 --- a/libraries/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/serial_api.c +++ b/libraries/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/serial_api.c @@ -524,7 +524,11 @@ static void uart_err_irq(IRQn_Type irq_num, uint32_t index) { } serial_rx_abort_asynch(obj); +#if defined ( __ICCARM__ ) + was_masked = __disable_irq_iar(); +#else was_masked = __disable_irq(); +#endif /* __ICCARM__ */ if (obj->serial.uart->SCFSR & 0x93) { err_read = obj->serial.uart->SCFSR; obj->serial.uart->SCFSR = (err_read & ~0x93); From 829b422a6deba17f78178d2cdf4309c53f7487e3 Mon Sep 17 00:00:00 2001 From: tomoyuki yamanaka Date: Wed, 18 May 2016 16:10:30 +0900 Subject: [PATCH 2/2] Bug fix for IAR support. We modified function definition for IAR support. --- libraries/mbed/targets/cmsis/core_caFunc.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libraries/mbed/targets/cmsis/core_caFunc.h b/libraries/mbed/targets/cmsis/core_caFunc.h index 9c1a37536a3..190a2ba1a0e 100644 --- a/libraries/mbed/targets/cmsis/core_caFunc.h +++ b/libraries/mbed/targets/cmsis/core_caFunc.h @@ -811,6 +811,15 @@ __asm( __STATIC_INLINE void __v7_inv_dcache_all(void) { __v7_all_cache(0); } +/** \brief Clean and Invalidate D$ by MVA + + DCCIMVAC. Data cache clean and invalidate by MVA to PoC + */ +__STATIC_INLINE void __v7_clean_inv_dcache_mva(void *va) { + __MCR(15, 0, (uint32_t)va, 7, 14, 1); + __DMB(); +} + #include "core_ca_mmu.h" #elif (defined (__GNUC__)) /*------------------ GNU Compiler ---------------------*/