You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2026/07/07 09:17:44 UTC

(mynewt-core) branch master updated (33c449c7f -> 618e8ebab)

This is an automated email from the ASF dual-hosted git repository.

kasjer pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


    from 33c449c7f stm32_eth: Add configuration support
     new b0a9264e6 arch/arc: Remove support for arc
     new 618e8ebab ci: Remove references to arc architecture

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/test_build_blinky.sh                       |    2 +-
 .github/test_build_bootloader.sh                   |    2 +-
 .rat-excludes                                      |    8 -
 LICENSE                                            |    9 -
 compiler/arc/compiler.yml                          |   36 -
 compiler/arc/pkg.yml                               |   27 -
 hw/bsp/embarc_emsk/arc_core.ld                     |  132 --
 hw/bsp/embarc_emsk/bsp.yml                         |   65 -
 hw/bsp/embarc_emsk/include/bsp/arc_core_config.h   |  179 ---
 hw/bsp/embarc_emsk/include/bsp/bsp.h               |   39 -
 hw/bsp/embarc_emsk/include/bsp/embARC_BSP_config.h |   66 -
 hw/bsp/embarc_emsk/pkg.yml                         |   33 -
 hw/bsp/embarc_emsk/src/board.c                     |   50 -
 hw/bsp/embarc_emsk/src/hal_bsp.c                   |  111 --
 hw/bsp/embarc_emsk/syscfg.yml                      |   40 -
 hw/mcu/arc/pkg.yml                                 |   39 -
 hw/mcu/arc/snps/include/mcu/mcu_arc.h              |   37 -
 hw/mcu/arc/snps/pkg.yml                            |   29 -
 hw/mcu/arc/snps/src/arch/arc/arc_startup.S         |  264 ----
 hw/mcu/arc/snps/src/hal_os_tick.c                  |  102 --
 hw/mcu/arc/snps/src/hal_system.c                   |   68 -
 hw/mcu/arc/snps/src/hal_timer.c                    |  199 ---
 hw/mcu/arc/snps/src/hal_watchdog.c                 |   39 -
 hw/mcu/arc/snps/syscfg.yml                         |   20 -
 hw/mcu/arc/src/ext/sdk/README.md                   |   22 -
 hw/mcu/arc/src/ext/sdk/arc/arc_cache.c             |  420 ------
 hw/mcu/arc/src/ext/sdk/arc/arc_exc_asm.S           |  202 ---
 hw/mcu/arc/src/ext/sdk/arc/arc_exception.c         |  514 -------
 hw/mcu/arc/src/ext/sdk/arc/arc_timer.c             |  211 ---
 .../arc/src/ext/sdk/arc/startup/arc_cxx_support.c  |  168 ---
 hw/mcu/arc/src/ext/sdk/arc/startup/arc_startup.S   |  266 ----
 hw/mcu/arc/src/ext/sdk/board/board.h               |   68 -
 .../arc/src/ext/sdk/board/emsk/common/emsk_init.c  |  116 --
 .../arc/src/ext/sdk/board/emsk/common/emsk_timer.c |  189 ---
 .../arc/src/ext/sdk/board/emsk/common/emsk_timer.h |   63 -
 hw/mcu/arc/src/ext/sdk/board/emsk/common/mux.c     |  116 --
 hw/mcu/arc/src/ext/sdk/board/emsk/common/mux.h     |  186 ---
 hw/mcu/arc/src/ext/sdk/board/emsk/common/mux_hal.h |   69 -
 hw/mcu/arc/src/ext/sdk/board/emsk/emsk.h           |  128 --
 hw/mcu/arc/src/ext/sdk/board/emsk/emsk_hardware.h  |  119 --
 .../arc/src/ext/sdk/board/emsk/gpio/dw_gpio_obj.c  |  379 -----
 .../arc/src/ext/sdk/board/emsk/gpio/dw_gpio_obj.h  |   90 --
 hw/mcu/arc/src/ext/sdk/board/emsk/gpio/emsk_gpio.c |  199 ---
 hw/mcu/arc/src/ext/sdk/board/emsk/gpio/emsk_gpio.h |   96 --
 hw/mcu/arc/src/ext/sdk/board/emsk/iic/dw_iic_obj.c |  302 ----
 hw/mcu/arc/src/ext/sdk/board/emsk/iic/dw_iic_obj.h |   83 -
 hw/mcu/arc/src/ext/sdk/board/emsk/spi/dw_spi_obj.c |  322 ----
 hw/mcu/arc/src/ext/sdk/board/emsk/spi/dw_spi_obj.h |   82 -
 .../arc/src/ext/sdk/board/emsk/uart/dw_uart_obj.c  |  266 ----
 .../arc/src/ext/sdk/board/emsk/uart/dw_uart_obj.h  |   89 --
 hw/mcu/arc/src/ext/sdk/common/console_io.c         |  164 --
 hw/mcu/arc/src/ext/sdk/common/console_io.h         |   57 -
 hw/mcu/arc/src/ext/sdk/common/xprintf.c            |  391 -----
 hw/mcu/arc/src/ext/sdk/common/xprintf.h            |   48 -
 .../src/ext/sdk/device/designware/gpio/dw_gpio.c   |  481 ------
 .../src/ext/sdk/device/designware/gpio/dw_gpio.h   |  145 --
 .../arc/src/ext/sdk/device/designware/iic/dw_iic.c | 1584 --------------------
 .../arc/src/ext/sdk/device/designware/iic/dw_iic.h |  242 ---
 .../src/ext/sdk/device/designware/iic/dw_iic_hal.h |  186 ---
 .../ext/sdk/device/designware/iic/dw_iic_hal_cfg.h |   82 -
 .../arc/src/ext/sdk/device/designware/spi/dw_spi.c | 1337 -----------------
 .../arc/src/ext/sdk/device/designware/spi/dw_spi.h |  190 ---
 .../src/ext/sdk/device/designware/spi/dw_spi_hal.h |  141 --
 .../ext/sdk/device/designware/spi/dw_spi_hal_cfg.h |   58 -
 .../src/ext/sdk/device/designware/uart/dw_uart.c   |  956 ------------
 .../src/ext/sdk/device/designware/uart/dw_uart.h   |  141 --
 .../ext/sdk/device/designware/uart/dw_uart_hal.h   |  253 ----
 .../src/ext/sdk/device/device_hal/inc/dev_common.h |  173 ---
 .../src/ext/sdk/device/device_hal/inc/dev_gpio.h   |  424 ------
 .../src/ext/sdk/device/device_hal/inc/dev_iic.h    |  526 -------
 .../src/ext/sdk/device/device_hal/inc/dev_spi.h    |  577 -------
 .../src/ext/sdk/device/device_hal/inc/dev_uart.h   |  475 ------
 hw/mcu/arc/src/ext/sdk/inc/arc/arc.h               |  436 ------
 hw/mcu/arc/src/ext/sdk/inc/arc/arc_asm_common.h    |  541 -------
 hw/mcu/arc/src/ext/sdk/inc/arc/arc_builtin.h       |  301 ----
 hw/mcu/arc/src/ext/sdk/inc/arc/arc_cache.h         |  321 ----
 hw/mcu/arc/src/ext/sdk/inc/arc/arc_em.h            |  133 --
 hw/mcu/arc/src/ext/sdk/inc/arc/arc_exception.h     |  466 ------
 .../arc/src/ext/sdk/inc/arc/arc_feature_config.h   |  397 -----
 hw/mcu/arc/src/ext/sdk/inc/arc/arc_timer.h         |   99 --
 hw/mcu/arc/src/ext/sdk/inc/embARC_debug.h          |   94 --
 hw/mcu/arc/src/ext/sdk/inc/embARC_error.h          |  156 --
 hw/mcu/arc/src/ext/sdk/inc/embARC_toolchain.h      |  121 --
 kernel/os/src/arch/arc/os_arc.s                    |  253 ----
 kernel/os/src/arch/arc/os_arch_arc.c               |  340 -----
 kernel/os/src/arch/arc/os_fault.c                  |  182 ---
 86 files changed, 2 insertions(+), 18830 deletions(-)
 delete mode 100644 compiler/arc/compiler.yml
 delete mode 100644 compiler/arc/pkg.yml
 delete mode 100644 hw/bsp/embarc_emsk/arc_core.ld
 delete mode 100644 hw/bsp/embarc_emsk/bsp.yml
 delete mode 100644 hw/bsp/embarc_emsk/include/bsp/arc_core_config.h
 delete mode 100644 hw/bsp/embarc_emsk/include/bsp/bsp.h
 delete mode 100644 hw/bsp/embarc_emsk/include/bsp/embARC_BSP_config.h
 delete mode 100644 hw/bsp/embarc_emsk/pkg.yml
 delete mode 100644 hw/bsp/embarc_emsk/src/board.c
 delete mode 100644 hw/bsp/embarc_emsk/src/hal_bsp.c
 delete mode 100644 hw/bsp/embarc_emsk/syscfg.yml
 delete mode 100644 hw/mcu/arc/pkg.yml
 delete mode 100644 hw/mcu/arc/snps/include/mcu/mcu_arc.h
 delete mode 100644 hw/mcu/arc/snps/pkg.yml
 delete mode 100644 hw/mcu/arc/snps/src/arch/arc/arc_startup.S
 delete mode 100644 hw/mcu/arc/snps/src/hal_os_tick.c
 delete mode 100644 hw/mcu/arc/snps/src/hal_system.c
 delete mode 100644 hw/mcu/arc/snps/src/hal_timer.c
 delete mode 100644 hw/mcu/arc/snps/src/hal_watchdog.c
 delete mode 100644 hw/mcu/arc/snps/syscfg.yml
 delete mode 100644 hw/mcu/arc/src/ext/sdk/README.md
 delete mode 100644 hw/mcu/arc/src/ext/sdk/arc/arc_cache.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/arc/arc_exc_asm.S
 delete mode 100644 hw/mcu/arc/src/ext/sdk/arc/arc_exception.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/arc/arc_timer.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/arc/startup/arc_cxx_support.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/arc/startup/arc_startup.S
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/board.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/common/emsk_init.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/common/emsk_timer.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/common/emsk_timer.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/common/mux.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/common/mux.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/common/mux_hal.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/emsk.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/emsk_hardware.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/gpio/dw_gpio_obj.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/gpio/dw_gpio_obj.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/gpio/emsk_gpio.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/gpio/emsk_gpio.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/iic/dw_iic_obj.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/iic/dw_iic_obj.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/spi/dw_spi_obj.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/spi/dw_spi_obj.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/uart/dw_uart_obj.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/board/emsk/uart/dw_uart_obj.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/common/console_io.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/common/console_io.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/common/xprintf.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/common/xprintf.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/designware/gpio/dw_gpio.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/designware/gpio/dw_gpio.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/designware/iic/dw_iic.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/designware/iic/dw_iic.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/designware/iic/dw_iic_hal.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/designware/iic/dw_iic_hal_cfg.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/designware/spi/dw_spi.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/designware/spi/dw_spi.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/designware/spi/dw_spi_hal.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/designware/spi/dw_spi_hal_cfg.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/designware/uart/dw_uart.c
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/designware/uart/dw_uart.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/designware/uart/dw_uart_hal.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/device_hal/inc/dev_common.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/device_hal/inc/dev_gpio.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/device_hal/inc/dev_iic.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/device_hal/inc/dev_spi.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/device/device_hal/inc/dev_uart.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/inc/arc/arc.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/inc/arc/arc_asm_common.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/inc/arc/arc_builtin.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/inc/arc/arc_cache.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/inc/arc/arc_em.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/inc/arc/arc_exception.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/inc/arc/arc_feature_config.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/inc/arc/arc_timer.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/inc/embARC_debug.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/inc/embARC_error.h
 delete mode 100644 hw/mcu/arc/src/ext/sdk/inc/embARC_toolchain.h
 delete mode 100644 kernel/os/src/arch/arc/os_arc.s
 delete mode 100644 kernel/os/src/arch/arc/os_arch_arc.c
 delete mode 100644 kernel/os/src/arch/arc/os_fault.c


(mynewt-core) 01/02: arch/arc: Remove support for arc

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kasjer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit b0a9264e60c2cb0a5b0a2d554c1bc099d8fe7122
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Tue Jul 7 10:31:34 2026 +0200

    arch/arc: Remove support for arc
    
    Arc was never fully implemented and architecture
    is not longer alive.
    
    All file releated to arc platform are now removed
    
    Signed-off-by: Jerzy Kasenberg <je...@codecoup.pl>
---
 .rat-excludes                                      |    8 -
 LICENSE                                            |    9 -
 compiler/arc/compiler.yml                          |   36 -
 compiler/arc/pkg.yml                               |   27 -
 hw/bsp/embarc_emsk/arc_core.ld                     |  132 --
 hw/bsp/embarc_emsk/bsp.yml                         |   65 -
 hw/bsp/embarc_emsk/include/bsp/arc_core_config.h   |  179 ---
 hw/bsp/embarc_emsk/include/bsp/bsp.h               |   39 -
 hw/bsp/embarc_emsk/include/bsp/embARC_BSP_config.h |   66 -
 hw/bsp/embarc_emsk/pkg.yml                         |   33 -
 hw/bsp/embarc_emsk/src/board.c                     |   50 -
 hw/bsp/embarc_emsk/src/hal_bsp.c                   |  111 --
 hw/bsp/embarc_emsk/syscfg.yml                      |   40 -
 hw/mcu/arc/pkg.yml                                 |   39 -
 hw/mcu/arc/snps/include/mcu/mcu_arc.h              |   37 -
 hw/mcu/arc/snps/pkg.yml                            |   29 -
 hw/mcu/arc/snps/src/arch/arc/arc_startup.S         |  264 ----
 hw/mcu/arc/snps/src/hal_os_tick.c                  |  102 --
 hw/mcu/arc/snps/src/hal_system.c                   |   68 -
 hw/mcu/arc/snps/src/hal_timer.c                    |  199 ---
 hw/mcu/arc/snps/src/hal_watchdog.c                 |   39 -
 hw/mcu/arc/snps/syscfg.yml                         |   20 -
 hw/mcu/arc/src/ext/sdk/README.md                   |   22 -
 hw/mcu/arc/src/ext/sdk/arc/arc_cache.c             |  420 ------
 hw/mcu/arc/src/ext/sdk/arc/arc_exc_asm.S           |  202 ---
 hw/mcu/arc/src/ext/sdk/arc/arc_exception.c         |  514 -------
 hw/mcu/arc/src/ext/sdk/arc/arc_timer.c             |  211 ---
 .../arc/src/ext/sdk/arc/startup/arc_cxx_support.c  |  168 ---
 hw/mcu/arc/src/ext/sdk/arc/startup/arc_startup.S   |  266 ----
 hw/mcu/arc/src/ext/sdk/board/board.h               |   68 -
 .../arc/src/ext/sdk/board/emsk/common/emsk_init.c  |  116 --
 .../arc/src/ext/sdk/board/emsk/common/emsk_timer.c |  189 ---
 .../arc/src/ext/sdk/board/emsk/common/emsk_timer.h |   63 -
 hw/mcu/arc/src/ext/sdk/board/emsk/common/mux.c     |  116 --
 hw/mcu/arc/src/ext/sdk/board/emsk/common/mux.h     |  186 ---
 hw/mcu/arc/src/ext/sdk/board/emsk/common/mux_hal.h |   69 -
 hw/mcu/arc/src/ext/sdk/board/emsk/emsk.h           |  128 --
 hw/mcu/arc/src/ext/sdk/board/emsk/emsk_hardware.h  |  119 --
 .../arc/src/ext/sdk/board/emsk/gpio/dw_gpio_obj.c  |  379 -----
 .../arc/src/ext/sdk/board/emsk/gpio/dw_gpio_obj.h  |   90 --
 hw/mcu/arc/src/ext/sdk/board/emsk/gpio/emsk_gpio.c |  199 ---
 hw/mcu/arc/src/ext/sdk/board/emsk/gpio/emsk_gpio.h |   96 --
 hw/mcu/arc/src/ext/sdk/board/emsk/iic/dw_iic_obj.c |  302 ----
 hw/mcu/arc/src/ext/sdk/board/emsk/iic/dw_iic_obj.h |   83 -
 hw/mcu/arc/src/ext/sdk/board/emsk/spi/dw_spi_obj.c |  322 ----
 hw/mcu/arc/src/ext/sdk/board/emsk/spi/dw_spi_obj.h |   82 -
 .../arc/src/ext/sdk/board/emsk/uart/dw_uart_obj.c  |  266 ----
 .../arc/src/ext/sdk/board/emsk/uart/dw_uart_obj.h  |   89 --
 hw/mcu/arc/src/ext/sdk/common/console_io.c         |  164 --
 hw/mcu/arc/src/ext/sdk/common/console_io.h         |   57 -
 hw/mcu/arc/src/ext/sdk/common/xprintf.c            |  391 -----
 hw/mcu/arc/src/ext/sdk/common/xprintf.h            |   48 -
 .../src/ext/sdk/device/designware/gpio/dw_gpio.c   |  481 ------
 .../src/ext/sdk/device/designware/gpio/dw_gpio.h   |  145 --
 .../arc/src/ext/sdk/device/designware/iic/dw_iic.c | 1584 --------------------
 .../arc/src/ext/sdk/device/designware/iic/dw_iic.h |  242 ---
 .../src/ext/sdk/device/designware/iic/dw_iic_hal.h |  186 ---
 .../ext/sdk/device/designware/iic/dw_iic_hal_cfg.h |   82 -
 .../arc/src/ext/sdk/device/designware/spi/dw_spi.c | 1337 -----------------
 .../arc/src/ext/sdk/device/designware/spi/dw_spi.h |  190 ---
 .../src/ext/sdk/device/designware/spi/dw_spi_hal.h |  141 --
 .../ext/sdk/device/designware/spi/dw_spi_hal_cfg.h |   58 -
 .../src/ext/sdk/device/designware/uart/dw_uart.c   |  956 ------------
 .../src/ext/sdk/device/designware/uart/dw_uart.h   |  141 --
 .../ext/sdk/device/designware/uart/dw_uart_hal.h   |  253 ----
 .../src/ext/sdk/device/device_hal/inc/dev_common.h |  173 ---
 .../src/ext/sdk/device/device_hal/inc/dev_gpio.h   |  424 ------
 .../src/ext/sdk/device/device_hal/inc/dev_iic.h    |  526 -------
 .../src/ext/sdk/device/device_hal/inc/dev_spi.h    |  577 -------
 .../src/ext/sdk/device/device_hal/inc/dev_uart.h   |  475 ------
 hw/mcu/arc/src/ext/sdk/inc/arc/arc.h               |  436 ------
 hw/mcu/arc/src/ext/sdk/inc/arc/arc_asm_common.h    |  541 -------
 hw/mcu/arc/src/ext/sdk/inc/arc/arc_builtin.h       |  301 ----
 hw/mcu/arc/src/ext/sdk/inc/arc/arc_cache.h         |  321 ----
 hw/mcu/arc/src/ext/sdk/inc/arc/arc_em.h            |  133 --
 hw/mcu/arc/src/ext/sdk/inc/arc/arc_exception.h     |  466 ------
 .../arc/src/ext/sdk/inc/arc/arc_feature_config.h   |  397 -----
 hw/mcu/arc/src/ext/sdk/inc/arc/arc_timer.h         |   99 --
 hw/mcu/arc/src/ext/sdk/inc/embARC_debug.h          |   94 --
 hw/mcu/arc/src/ext/sdk/inc/embARC_error.h          |  156 --
 hw/mcu/arc/src/ext/sdk/inc/embARC_toolchain.h      |  121 --
 kernel/os/src/arch/arc/os_arc.s                    |  253 ----
 kernel/os/src/arch/arc/os_arch_arc.c               |  340 -----
 kernel/os/src/arch/arc/os_fault.c                  |  182 ---
 84 files changed, 18828 deletions(-)

diff --git a/.rat-excludes b/.rat-excludes
index a4ffe8ecc..15d4450c1 100644
--- a/.rat-excludes
+++ b/.rat-excludes
@@ -329,14 +329,6 @@ hw/mcu/ambiq/apollo3/src/ext/AmbiqSuite
 hw/bsp/apollo2_evb/src/arch/cortex_m4/gcc_startup.s
 hw/bsp/apollo3_evb/src/system_apollo3.c
 
-# ARC - BSD License
-hw/mcu/arc/src/ext/sdk
-hw/mcu/arc/snps/src/arch/arc/arc_startup.S
-hw/bsp/embarc_emsk/arc_core.ld
-hw/bsp/embarc_emsk/include/bsp/arc_core_config.h
-hw/bsp/embarc_emsk/include/bsp/embARC_BSP_config.h
-hw/bsp/embarc_emsk/src/board.c
-
 # bluepill BSP - BSD License
 hw/bsp/bluepill/boot-bluepill.ld
 
diff --git a/LICENSE b/LICENSE
index 769b796f2..35e84ccc4 100644
--- a/LICENSE
+++ b/LICENSE
@@ -591,15 +591,6 @@ This product bundles tinycbor by Intel Corporation, which is available under
 the MIT license. For details see:
     * encoding/tinycbor
 
-This product bundles part of embARC BSP SDK by Synopsys, which is available
-under the "3-clause BSD" license. Bundled files are:
-    * hw/mcu/arc/src/ext/sdk
-    * hw/mcu/arc/snps/src/arch/arc/arc_startup.S
-    * hw/bsp/embarc_emsk/arc_core.ld
-    * hw/bsp/embarc_emsk/include/bsp/arc_core_config.h
-    * hw/bsp/embarc_emsk/include/bsp/embARC_BSP_config.h
-    * hw/bsp/embarc_emsk/src/board.c
-
 This product bundles part of IoTivity-Constrained, which is partially available
 under the "3-clause BSD" license. Bundled files are:
     * net/oic/include/oic/messaging/coap/
diff --git a/compiler/arc/compiler.yml b/compiler/arc/compiler.yml
deleted file mode 100644
index df2567572..000000000
--- a/compiler/arc/compiler.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-compiler.path.cc: arc-elf32-gcc
-compiler.path.cpp: arc-elf32-g++
-compiler.path.archive: arc-elf32-ar
-compiler.path.as: arc-elf32-gcc
-compiler.path.objdump: arc-elf32-objdump
-compiler.path.objsize: arc-elf32-size
-compiler.path.objcopy: arc-elf32-objcopy
-
-compiler.flags.default: [-mno-sdata, -Wall, -Werror, -fno-exceptions, -fomit-frame-pointer, -ffunction-sections, -fdata-sections, -fno-common]
-compiler.flags.optimized: [compiler.flags.default, -Os, -ggdb]
-compiler.flags.debug: [compiler.flags.default, -Og, -ggdb]
-
-compiler.as.flags: [-x, assembler-with-cpp]
-
-compiler.ld.flags: -static -lgcc -Wl,--gc-sections -nostartfiles
-compiler.ld.resolve_circular_deps: true
-compiler.ld.mapfile: true
diff --git a/compiler/arc/pkg.yml b/compiler/arc/pkg.yml
deleted file mode 100644
index 680d5a4cf..000000000
--- a/compiler/arc/pkg.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-pkg.name: compiler/arc
-pkg.type: compiler
-pkg.description: Compiler definition for ARC gcc cross compiler.
-pkg.author: "Apache Mynewt <de...@mynewt.apache.org>"
-pkg.homepage: "http://mynewt.apache.org/"
-pkg.keywords:
-    - arc
-    - compiler
diff --git a/hw/bsp/embarc_emsk/arc_core.ld b/hw/bsp/embarc_emsk/arc_core.ld
deleted file mode 100644
index df9064763..000000000
--- a/hw/bsp/embarc_emsk/arc_core.ld
+++ /dev/null
@@ -1,132 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2017, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------- */
-MEMORY
-{
-    ICCM : ORIGIN = 0x00000000, LENGTH = 0x40000
-    DCCM : ORIGIN = 0x80000000, LENGTH = 0x40000
-    DMP : ORIGIN = 0xf0000000, LENGTH = 0x10000000
-}
-ENTRY(_start)
-SECTIONS
-{
-    .vector : ALIGN(1024)
-    {
-         _f_vector = .;
-         *(.vector)
-         _e_vector = .;
-    } > ICCM
-
-    __text = .;
-
-    .init :
-    {
-        _f_init = .;
-        KEEP (*(.init_vector))
-        KEEP (*(.init_bootstrap))
-        _e_init = .;
-    } > ICCM
-
-    .text : ALIGN(4)
-    {
-        _f_text = .;
-        *(.text .text.* .gnu.linkonce.t.*)
-        _e_text = .;
-    } > ICCM
-
-    __etext = .;
-
-    .rodata : ALIGN(4)
-    {
-        _f_rodata = .;
-        . = ALIGN(4);
-        __CTOR_LIST__ = .;
-        LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
-        KEEP(*(SORT_BY_NAME(".ctors*")))
-        LONG(0)
-        __CTOR_END__ = .;
-        . = ALIGN(4);
-        __init_array_start = .;
-        KEEP(*(SORT_BY_NAME(".init_array*")))
-        __init_array_end = .;
-        . = ALIGN(4);
-        __DTOR_LIST__ = .;
-        LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
-        KEEP(*(SORT_BY_NAME(".dtors*")))
-        LONG(0)
-        __DTOR_END__ = .;
-        *(.rodata .rodata.* .gnu.linkonce.r.*)
-        _e_rodata = .;
-    } > ICCM
-
-    .data : ALIGN(4)
-    {
-        _ram_start = .;
-        _f_data = .;
-        *(.data .data.* .gnu.linkonce.d.*)
-        _f_sdata = .;
-        __SDATA_BEGIN__ = .;
-        *(.sdata .sdata.* .gnu.linkonce.s.*)
-        _e_sdata = .;
-        _e_data = .;
-    } > DCCM AT > ICCM
-
-    .bss (NOLOAD) : ALIGN(8)
-    {
-        PROVIDE (__sbss_start = .);
-        PROVIDE (___sbss_start = .);
-        _f_bss = .;
-        _f_sbss = .;
-        *(.dynsbss)
-        *(.sbss .sbss.* .gnu.linkonce.sb.*)
-        *(.scommon)
-        _e_sbss = .;
-        PROVIDE (__sbss_end = .);
-        PROVIDE (___sbss_end = .);
-        *(.dynbss)
-        *(.bss .bss.* .gnu.linkonce.b.*)
-        *(COMMON)
-        _e_bss = .;
-    } > DCCM
-
-    /* Allocate remaining RAM (RAM between _e_bss and __StackLimit to heap */
-    . = ALIGN(8);
-    __HeapBase = .;
-
-    __StackTop = ORIGIN(DCCM) + LENGTH(DCCM);
-    __StackLimit = __StackTop - 2048;
-    _e_stack = __StackTop;
-
-    /* Top of heap is the bottom of the stack */
-    __HeapLimit = __StackLimit;
-
-    _load_addr_text = LOADADDR(.text);
-    _load_addr_rodata = LOADADDR(.rodata);
-    _load_addr_data = LOADADDR(.data);
-    _ram_start = _load_addr_data;
-}
diff --git a/hw/bsp/embarc_emsk/bsp.yml b/hw/bsp/embarc_emsk/bsp.yml
deleted file mode 100644
index e177133dd..000000000
--- a/hw/bsp/embarc_emsk/bsp.yml
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-bsp.name: "EM Starter Kit (EMSK)"
-bsp.url: https://embarc.org/project/arc-em-starter-kit-emsk/
-bsp.maker: "Synopsys, Inc."
-bsp.arch: arc
-bsp.compiler: compiler/arc
-bsp.linkerscript:
-    - "hw/bsp/embarc_emsk/arc_core.ld"
-bsp.linkerscript.BOOT_LOADER.OVERWRITE:
-    - "hw/bsp/embarc_emsk/arc_core.ld"
-bsp.part2linkerscript: "hw/bsp/embarc_emsk/arc_core.ld"
-bsp.downloadscript: "hw/bsp/embarc_emsk/embarc_emsk_download.sh"
-bsp.debugscript: "hw/bsp/embarc_emsk/embarc_emsk_debug.sh"
-bsp.downloadscript.WINDOWS.OVERWRITE: "hw/bsp/embarc_emsk/embarc_emsk_download.cmd"
-bsp.debugscript.WINDOWS.OVERWRITE: "hw/bsp/embarc_emsk/embarc_emsk_debug.cmd"
-
-bsp.flash_map:
-    areas:
-        # System areas.
-        FLASH_AREA_BOOTLOADER:
-            device: 0
-            offset: 0x10000000
-            size: 16kB
-        FLASH_AREA_IMAGE_0:
-            device: 0
-            offset: 0x10008000
-            size: 232kB
-        FLASH_AREA_IMAGE_1:
-            device: 0
-            offset: 0x10042000
-            size: 232kB
-        FLASH_AREA_IMAGE_SCRATCH:
-            device: 0
-            offset: 0x1007c000
-            size: 4kB
-
-        # User areas.
-        FLASH_AREA_REBOOT_LOG:
-            user_id: 0
-            device: 0
-            offset: 0x10004000
-            size: 16kB
-        FLASH_AREA_NFFS:
-            user_id: 1
-            device: 0
-            offset: 0x1007d000
-            size: 12kB
diff --git a/hw/bsp/embarc_emsk/include/bsp/arc_core_config.h b/hw/bsp/embarc_emsk/include/bsp/arc_core_config.h
deleted file mode 100644
index 6c06ce94c..000000000
--- a/hw/bsp/embarc_emsk/include/bsp/arc_core_config.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2017, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------- */
-#ifndef __core_config_h
-	#define __core_config_h  1
-	#define	core_config_cir_identity	0x00000142
-	#define	core_config_cir_identity_chipid	0
-	#define	core_config_cir_identity_arcnum	1
-	#define	core_config_cir_identity_arcver	66
-	#define	core_config_cir_identity_family	4
-	#define	core_config_cir_identity_corever	2
-	#define	core_config_cir_aux_dccm	0x80000000
-	#define	core_config_bcr_bcr_ver	0x00000002
-	#define	core_config_bcr_bcr_ver_version	2
-	#define	core_config_bcr_vecbase_ac_build	0x00000010
-	#define	core_config_bcr_rf_build	0x0000c802
-	#define	core_config_bcr_rf_build_version	2
-	#define	core_config_bcr_rf_build_p	0
-	#define	core_config_bcr_rf_build_e	0
-	#define	core_config_bcr_rf_build_r	0
-	#define	core_config_bcr_rf_build_b	1
-	#define	core_config_bcr_rf_build_d	3
-	#define	core_config_bcr_dccm_build	0x00000a04
-	#define	core_config_bcr_dccm_build_w	0
-	#define	core_config_bcr_dccm_build_cycles	0
-	#define	core_config_bcr_dccm_build_interleave	0
-	#define	core_config_bcr_dccm_build_size1	0
-	#define	core_config_bcr_dccm_build_size0	10
-	#define	core_config_bcr_dccm_build_version	4
-	#define	core_config_bcr_timer_build	0x00010304
-	#define	core_config_bcr_timer_build_sp1	0
-	#define	core_config_bcr_timer_build_sp0	0
-	#define	core_config_bcr_timer_build_p1	0
-	#define	core_config_bcr_timer_build_p0	1
-	#define	core_config_bcr_timer_build_st1	0
-	#define	core_config_bcr_timer_build_st0	0
-	#define	core_config_bcr_timer_build_rtc	0
-	#define	core_config_bcr_timer_build_rtsc_ver	1
-	#define	core_config_bcr_timer_build_rtsc	0
-	#define	core_config_bcr_timer_build_t0	1
-	#define	core_config_bcr_timer_build_t1	1
-	#define	core_config_bcr_timer_build_version	4
-	#define	core_config_bcr_iccm_build	0x00000a04
-	#define	core_config_bcr_iccm_build_iccm1_size1	0
-	#define	core_config_bcr_iccm_build_iccm0_size1	0
-	#define	core_config_bcr_iccm_build_iccm1_size0	0
-	#define	core_config_bcr_iccm_build_iccm0_size0	10
-	#define	core_config_bcr_iccm_build_version	4
-	#define	core_config_bcr_dsp_build	0x00001121
-	#define	core_config_bcr_dsp_build_wide	0
-	#define	core_config_bcr_dsp_build_itu_pa	0
-	#define	core_config_bcr_dsp_build_acc_shift	2
-	#define	core_config_bcr_dsp_build_comp	0
-	#define	core_config_bcr_dsp_build_divsqrt	1
-	#define	core_config_bcr_dsp_build_version	33
-	#define	core_config_bcr_multiply_build	0x00022a06
-	#define	core_config_bcr_multiply_build_version16x16	2
-	#define	core_config_bcr_multiply_build_dsp	2
-	#define	core_config_bcr_multiply_build_cyc	2
-	#define	core_config_bcr_multiply_build_type	2
-	#define	core_config_bcr_multiply_build_version32x32	6
-	#define	core_config_bcr_swap_build	0x00000003
-	#define	core_config_bcr_swap_build_version	3
-	#define	core_config_bcr_norm_build	0x00000003
-	#define	core_config_bcr_norm_build_version	3
-	#define	core_config_bcr_minmax_build	0x00000002
-	#define	core_config_bcr_minmax_build_version	2
-	#define	core_config_bcr_barrel_build	0x00000303
-	#define	core_config_bcr_barrel_build_version	3
-	#define	core_config_bcr_barrel_build_shift_option	3
-	#define	core_config_bcr_isa_config	0x12447402
-	#define	core_config_bcr_isa_config_res1	0
-	#define	core_config_bcr_isa_config_d	1
-	#define	core_config_bcr_isa_config_res2	0
-	#define	core_config_bcr_isa_config_f	0
-	#define	core_config_bcr_isa_config_c	2
-	#define	core_config_bcr_isa_config_l	0
-	#define	core_config_bcr_isa_config_n	1
-	#define	core_config_bcr_isa_config_a	0
-	#define	core_config_bcr_isa_config_b	0
-	#define	core_config_bcr_isa_config_addr_size	4
-	#define	core_config_bcr_isa_config_lpc_size	7
-	#define	core_config_bcr_isa_config_pc_size	4
-	#define	core_config_bcr_isa_config_version	2
-	#define	core_config_bcr_stack_region_build	0x00000002
-	#define	core_config_bcr_cprot_build	0x00000001
-	#define	core_config_bcr_core_config	0x00000101
-	#define	core_config_bcr_core_config_turbo_boost	1
-	#define	core_config_bcr_core_config_version	1
-	#define	core_config_bcr_irq_build	0x030b1401
-	#define	core_config_bcr_irq_build_raz	0
-	#define	core_config_bcr_irq_build_f	0
-	#define	core_config_bcr_irq_build_p	3
-	#define	core_config_bcr_irq_build_exts	11
-	#define	core_config_bcr_irq_build_irqs	20
-	#define	core_config_bcr_irq_build_version	1
-	#define	core_config_cir_aux_iccm	0x00000000
-	#define	core_config_cir_dmp_peripheral	0xf0000000
-	#define	core_config_family	4
-	#define	core_config_core_version	2
-	#define	core_config_family_name	"arcv2em"
-	#define	core_config_rgf_num_banks	2
-	#define	core_config_rgf_banked_regs	32
-	#define	core_config_rgf_num_wr_ports	1
-	#define	core_config_endian	"little"
-	#define	core_config_endian_little	1
-	#define	core_config_endian_big	0
-	#define	core_config_lpc_size	32
-	#define	core_config_pc_size	32
-	#define	core_config_addr_size	32
-	#define	core_config_unaligned	1
-	#define	core_config_code_density	1
-	#define	core_config_div_rem	"radix2"
-	#define	core_config_div_rem_radix2	1
-	#define	core_config_turbo_boost	1
-	#define	core_config_swap	1
-	#define	core_config_bitscan	1
-	#define	core_config_mpy_option	"mpyd"
-	#define	core_config_mpy_option_num	8
-	#define	core_config_shift_assist	1
-	#define	core_config_barrel_shifter	1
-	#define	core_config_dsp	1
-	#define	core_config_dsp2	1
-	#define	core_config_dsp_divsqrt	"radix2"
-	#define	core_config_dsp_divsqrt_radix2	1
-	#define	core_config_dsp_accshift	"full"
-	#define	core_config_dsp_accshift_full	1
-	#define	core_config_timer0	1
-	#define	core_config_timer0_level	1
-	#define	core_config_timer0_vector	16
-	#define	core_config_timer1	1
-	#define	core_config_timer1_level	0
-	#define	core_config_timer1_vector	17
-	#define	core_config_stack_check	1
-	#define	core_config_code_protection	1
-	#define	core_config_interrupts_present	1
-	#define	core_config_interrupts_number	20
-	#define	core_config_interrupts_priorities	4
-	#define	core_config_interrupts_externals	11
-	#define	core_config_interrupts	20
-	#define	core_config_interrupt_priorities	4
-	#define	core_config_ext_interrupts	11
-	#define	core_config_interrupts_base	0x0
-	#define	core_config_dccm_present	1
-	#define	core_config_dccm_size	0x40000
-	#define	core_config_dccm_base	0x80000000
-	#define	core_config_iccm_present	1
-	#define	core_config_iccm0_present	1
-	#define	core_config_iccm_size	0x40000
-	#define	core_config_iccm0_size	0x40000
-	#define	core_config_iccm_base	0x00000000
-	#define	core_config_iccm0_base	0x00000000
-    #define	core_config_clock_speed	40
-#endif /* __core_config_h */
diff --git a/hw/bsp/embarc_emsk/include/bsp/bsp.h b/hw/bsp/embarc_emsk/include/bsp/bsp.h
deleted file mode 100644
index b35a7711a..000000000
--- a/hw/bsp/embarc_emsk/include/bsp/bsp.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef H_BSP_H
-#define H_BSP_H
-
-#include <inttypes.h>
-
-#include "os/mynewt.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* XXX: a hack for now. Just allocate 262K of ram. Only used for coredump */
-extern uint32_t _ram_start;
-#define RAM_SIZE        0x40000
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  /* H_BSP_H */
diff --git a/hw/bsp/embarc_emsk/include/bsp/embARC_BSP_config.h b/hw/bsp/embarc_emsk/include/bsp/embARC_BSP_config.h
deleted file mode 100644
index 4598b003d..000000000
--- a/hw/bsp/embarc_emsk/include/bsp/embARC_BSP_config.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-12-25
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-
-#ifndef _EMBARC_BSP_CONFIG_H_
-#define _EMBARC_BSP_CONFIG_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define BOARD_EMSK
-/****************************************************************************
- * BSP Definitions
- ****************************************************************************/
-/**
- *  Toolchain Definition for MetaWare or GNU
- */
-//#define __MW__
-#define __GNU__
-
-/**
- *  Must be set.
- *  If changed, modify .lcf file for
- *	.stack ALIGN(4) SIZE(524288): {}
- *	.heap? ALIGN(4) SIZE(524288): {}
- */
-#define _STACKSIZE			8192
-#define _HEAPSZ				8192
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _EMBARC_CONFIG_BSP_H_ */
diff --git a/hw/bsp/embarc_emsk/pkg.yml b/hw/bsp/embarc_emsk/pkg.yml
deleted file mode 100644
index ef0c700a4..000000000
--- a/hw/bsp/embarc_emsk/pkg.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-pkg.name: hw/bsp/embarc_emsk
-pkg.type: bsp
-pkg.description: BSP definition for the embarc emsk Development Kit.
-pkg.author: "Apache Mynewt <de...@mynewt.apache.org>"
-pkg.homepage: "http://mynewt.apache.org/"
-pkg.keywords:
-    - arc
-    - embarc_emsk
-
-pkg.deps:
-    - "@apache-mynewt-core/hw/mcu/arc/snps"
-    - "@apache-mynewt-core/libc"
-
-pkg.cflags: -mcpu=em4_dmips -mlittle-endian -mcode-density -mdiv-rem -mswap -mbarrel-shifter
diff --git a/hw/bsp/embarc_emsk/src/board.c b/hw/bsp/embarc_emsk/src/board.c
deleted file mode 100644
index 634c7e40f..000000000
--- a/hw/bsp/embarc_emsk/src/board.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2017, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2017.03
- * \date 2016-01-20
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-#include "inc/arc/arc_builtin.h"
-#include "board/board.h"
-#include "string.h"
-
-extern uint32_t __HeapBase;
-extern uint32_t __HeapLimit;
-
-extern void _start(void);
-extern void _sbrkInit(char *base, char *limit);
-
-void board_main(void)
-{
-/* board level hardware init */
-    board_init();
-    cpu_unlock();	/* unlock cpu to let interrupt work */
-    _sbrkInit((char *)&__HeapBase, (char *)&__HeapLimit);
-    _start();
-}
diff --git a/hw/bsp/embarc_emsk/src/hal_bsp.c b/hw/bsp/embarc_emsk/src/hal_bsp.c
deleted file mode 100644
index dc91a13e8..000000000
--- a/hw/bsp/embarc_emsk/src/hal_bsp.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include <stdint.h>
-#include <stddef.h>
-#include <assert.h>
-#include "os/mynewt.h"
-#include "flash_map/flash_map.h"
-#include "hal/hal_bsp.h"
-#include "hal/hal_system.h"
-#include "hal/hal_flash.h"
-#include "hal/hal_spi.h"
-#include "hal/hal_watchdog.h"
-#include "hal/hal_i2c.h"
-#if MYNEWT_VAL(UART_0) || MYNEWT_VAL(UART_1)
-#include "uart/uart.h"
-#endif
-#if MYNEWT_VAL(UART_0)
-#include "uart_hal/uart_hal.h"
-#endif
-#if MYNEWT_VAL(UART_1)
-#include "uart_bitbang/uart_bitbang.h"
-#endif
-#include "bsp/bsp.h"
-
-/*
- * What memory to include in coredump.
- */
-static const struct hal_bsp_mem_dump dump_cfg[] = {
-    [0] = {
-        .hbmd_start = &_ram_start,
-        .hbmd_size = RAM_SIZE
-    }
-};
-
-const struct hal_flash *
-hal_bsp_flash_dev(uint8_t id)
-{
-    return NULL;
-}
-
-const struct hal_bsp_mem_dump *
-hal_bsp_core_dump(int *area_cnt)
-{
-    *area_cnt = sizeof(dump_cfg) / sizeof(dump_cfg[0]);
-    return dump_cfg;
-}
-
-int
-hal_bsp_power_state(int state)
-{
-    return (0);
-}
-
-/**
- * Returns the configured priority for the given interrupt. If no priority
- * configured, return the priority passed in
- *
- * @param irq_num
- * @param pri
- *
- * @return uint32_t
- */
-uint32_t
-hal_bsp_get_nvic_priority(int irq_num, uint32_t pri)
-{
-    return pri;
-}
-
-void
-hal_bsp_init(void)
-{
-    int rc;
-
-    (void)rc;
-
-    /* Make sure system clocks have started */
-    hal_system_clock_start();
-
-#if MYNEWT_VAL(TIMER_0)
-    rc = hal_timer_init(0, NULL);
-    assert(rc == 0);
-#endif
-
-#if (MYNEWT_VAL(OS_CPUTIME_TIMER_NUM) >= 0)
-    rc = os_cputime_init(MYNEWT_VAL(OS_CPUTIME_FREQ));
-    assert(rc == 0);
-#endif
-
-}
-
-void
-hal_bsp_deinit(void)
-{
-}
diff --git a/hw/bsp/embarc_emsk/syscfg.yml b/hw/bsp/embarc_emsk/syscfg.yml
deleted file mode 100644
index 3bce0e72d..000000000
--- a/hw/bsp/embarc_emsk/syscfg.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-syscfg.defs:
-    UART_0:
-        description: 'Whether to enable UART0'
-        value:  0
-    UART_0_PIN_TX:
-        description: 'TX pin for UART0'
-        value:  -1
-    UART_0_PIN_RX:
-        description: 'RX pin for UART0'
-        value:  -1
-    UART_0_PIN_RTS:
-        description: 'RTS pin for UART0'
-        value:  -1
-    UART_0_PIN_CTS:
-        description: 'CTS pin for UART0'
-        value: -1
-
-syscfg.vals:
-    CONFIG_FCB_FLASH_AREA: FLASH_AREA_NFFS
-    REBOOT_LOG_FLASH_AREA: FLASH_AREA_REBOOT_LOG
-    NFFS_FLASH_AREA: FLASH_AREA_NFFS
-    COREDUMP_FLASH_AREA: FLASH_AREA_IMAGE_1
diff --git a/hw/mcu/arc/pkg.yml b/hw/mcu/arc/pkg.yml
deleted file mode 100644
index eed5fa1e2..000000000
--- a/hw/mcu/arc/pkg.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-pkg.name: hw/mcu/arc
-pkg.description: Common MCU definitions for ARC chips.
-pkg.author: "Apache Mynewt <de...@mynewt.apache.org>"
-pkg.homepage: "http://mynewt.apache.org/"
-pkg.keywords:
-    - arc
-
-pkg.type: sdk
-
-pkg.ign_dirs:
-    - "src/ext/sdk/example/"
-    - "src/ext/sdk/doc/"
-
-pkg.cflags: -Wno-unused-but-set-variable -Wno-unused-function
-
-pkg.src_dirs:
-    - "src/ext/sdk/"
-
-pkg.deps:
-    - "@apache-mynewt-core/hw/hal"
diff --git a/hw/mcu/arc/snps/include/mcu/mcu_arc.h b/hw/mcu/arc/snps/include/mcu/mcu_arc.h
deleted file mode 100644
index 28e82454a..000000000
--- a/hw/mcu/arc/snps/include/mcu/mcu_arc.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef __MCU_ARC_H__
-#define __MCU_ARC_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-static inline void
-hal_debug_break(void)
-{
-    asm("BRK_S");
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MCU_ARC_H__ */
diff --git a/hw/mcu/arc/snps/pkg.yml b/hw/mcu/arc/snps/pkg.yml
deleted file mode 100644
index d58f7ac24..000000000
--- a/hw/mcu/arc/snps/pkg.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-pkg.name: hw/mcu/arc/snps
-pkg.description: MCU definition for synopsis ARC.
-pkg.author: "Apache Mynewt <de...@mynewt.apache.org>"
-pkg.homepage: "http://mynewt.apache.org/"
-pkg.keywords:
-    - arc
-
-pkg.deps:
-    - "@apache-mynewt-core/hw/hal"
-    - "@apache-mynewt-core/hw/mcu/arc"
diff --git a/hw/mcu/arc/snps/src/arch/arc/arc_startup.S b/hw/mcu/arc/snps/src/arch/arc/arc_startup.S
deleted file mode 100644
index fbcf0d884..000000000
--- a/hw/mcu/arc/snps/src/arch/arc/arc_startup.S
+++ /dev/null
@@ -1,264 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-15
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-
-/**
- * \file
- * \ingroup ARC_HAL_STARTUP
- * \brief assembly part of startup process
- */
-
-/**
- * \addtogroup ARC_HAL_STARTUP
- * @{
- */
-/** @cond STARTUP_ASM */
-
-#define __ASSEMBLY__
-#include "embARC_BSP_config.h"
-#include "inc/arc/arc.h"
-
-	.file "arc_startup.S"
-
-.weak	_f_sdata		/* start of small data, defined in link script */
-.weak	init_hardware_hook	/* app hardware init hook */
-.weak	init_software_hook	/* app software init hook */
-
-.extern	board_main
-.extern exc_entry_table
-
-/* initial vector table */
-	.section .init_vector, "a"
-	.long _arc_reset
-	.section .init_bootstrap, "ax"
-	.global _arc_reset
-	.align 4
-_arc_reset:
-_arc_reset_stage1:
-	kflag	STATUS32_RESET_VALUE
-
-/* STAGE 1 */
-
-/* necessary hardware should be done first to speed up initialization
-	1. system clk
-	2. mem controller must be initialized before any access to external
-	mem.
-	3. others
-*/
-_arc_cache_init_start:
-	lr	r0, [AUX_BCR_D_CACHE]
-	cmp	r0, 2
-	/* invalidate dcache */
-	jle	_arc_icache_init
-	mov	r0, 1
-	sr	r0, [AUX_DC_IVDC]
-	sr	r0, [AUX_DC_CTRL]
-_arc_icache_init:
-	lr	r0, [AUX_BCR_I_CACHE]
-	cmp	r0, 2
-	jle	_arc_cache_init_end
-	/* invalidate icache */
-	mov	r0, 1
-	sr	r0, [AUX_IC_IVIC]
-	nop_s
-	nop_s
-	nop_s
-	sr	r0, [AUX_IC_CTRL]
-
-_arc_cache_init_end:
-	mov	r0, init_hardware_hook
-	cmp	r0, 0
-	jlne	[r0]
-
-/* STAGE 2: init necessary registers */
-
-_arc_reset_stage2:
-	mov	r0, 0
-
-/* interrupt related init */
-	sr	r0, [AUX_IRQ_ACT]
-	sr	r0, [AUX_IRQ_CTRL]
-	sr	r0, [AUX_IRQ_HINT]
-
-/* use the new vector table to replace the old one */
-#if defined(ARC_FEATURE_SEC_PRESENT) && (SECURESHIELD_VERSION < 2)
-	sr	exc_entry_table, [AUX_INT_VECT_BASE_S]
-#else
-	sr	exc_entry_table, [AUX_INT_VECT_BASE]
-#endif
-
-/* init stack */
-#if ARC_FEATURE_RGF_BANKED_REGS >= 16 && ARC_FEATURE_RGF_BANKED_REGS > 1 && ARC_FEATURE_FIRQ == 1
-#if _STACKSIZE < 512
-#error "not enough stack size for irq and firq"
-#endif
-
-/* switch to register bank1 */
-	lr      r0, [AUX_STATUS32]
-	bic     r0, r0, 0x70000
-	or      r0, r0, 0x10000
-	kflag   r0
-/* set sp, gp, fp in bank1 */
-	mov     sp, _e_stack
-	mov     gp, _f_sdata
-	mov     fp, 0
-/* come back to bank0 */
-	lr      r0, [AUX_STATUS32]
-	bic     r0, r0, 0x70000
-	kflag   r0
-	mov	sp, _e_stack-256
-#else
-	mov	sp, _e_stack	/* init stack pointer */
-#endif
-	mov	gp, _f_sdata	/* init small-data base register */
-	mov	fp, 0		/* init fp register */
-
-_arc_reset_stage3:
-_s3_copy_text:
-	mov	r0, _f_text
-	mov	r1, _load_addr_text
-	cmp	r0, r1
-
-/* if load addr == run addr, no need to copy */
-	jeq	_s3_copy_rodata
-	mov	r3, _e_text
-_s3_copy_text_loop:
-	ld.ab	r2, [r1, 4]
-	st.ab	r2, [r0, 4]
-	cmp	r0, r3
-	jlt	_s3_copy_text_loop
-_s3_copy_rodata:
-	mov	r0, _f_rodata
-	mov	r1, _load_addr_rodata
-	cmp	r0, r1
-
-/* if load addr == run addr, no need to copy */
-	jeq	_s3_copy_data
-	mov	r3, _e_rodata
-_s3_copy_rodata_loop:
-	ld.ab	r2, [r1, 4]
-	st.ab	r2, [r0, 4]
-	cmp	r0, r3
-	jlt	_s3_copy_rodata_loop
-_s3_copy_data:
-	mov	r0, _f_data
-	mov	r1, _load_addr_data
-	cmp	r0, r1
-	jeq	_s3_clear_bss
-
-/* if load addr == run addr, no need to copy */
-	mov	r3, _e_data
-_s3_copy_data_loop:
-	ld.ab	r2, [r1, 4]
-	st.ab	r2, [r0, 4]
-	cmp	r0, r3
-	jlt	_s3_copy_data_loop
-_s3_clear_bss:
-	mov	r0, _f_bss
-	mov	r1, _e_bss
-	cmp	r0, r1
-	jge	_arc_reset_call_main
-	mov	r2, 0
-_s3_clear_bss_loop:
-	st.ab	r2, [r0, 4]
-	cmp	r0, r1
-	jlt	_s3_clear_bss_loop
-
-/* STAGE 3: go to main */
-
-_arc_reset_call_main:
-
-/* \todo add cpp init here */
-	mov	r0, init_software_hook
-	cmp	r0, 0
-	jlne	[r0]
-/* board level library init */
-#ifdef	LIB_SECURESHIELD
-	jl 	secureshield_start
-#else
-/* early init of interrupt and exception */
-	jl	exc_int_init
-#endif
-/* init cache */
-	jl	arc_cache_init
-#if defined(__MW__)
-	jl	_init
-#elif defined(__GNU__)
-	jl	__do_global_ctors_aux
-	jl	__do_init_array_aux
-#endif
-	jl	board_main	/* board-level main */
-#if defined(__MW__)
-	jl	_fini
-#elif defined(__GNU__)
-	jl	__do_global_dtors_aux
-#endif
-	.global _exit_loop
-	.global _exit_halt
-	.align 4
-_exit_halt:
-_exit_loop:
-	flag	0x1
-	nop
-	nop
-	nop
-	b	_exit_loop
-
-#if defined(__MW__)
-	.global _init, _fini
-	.section ".init",text
-_init:
-	.cfa_bf	_init
-	push	%blink
-	.cfa_push	{%blink}
-
-	.section ".init$999999", text, 1, 2, check_text_align=0
-	pop	%blink
-	.cfa_pop	{%blink}
-	j	[%blink]
-	.cfa_ef
-
-	.section ".fini", text
-_fini:
-	.cfa_bf	_fini
-	push	%blink
-	.cfa_push	{%blink}
-
-	.section ".fini$999999", text, 1, 2, check_text_align=0
-	pop	%blink
-	.cfa_pop	{%blink}
-	j	[%blink]
-	.cfa_ef
-#endif
-/** @endcond */
-
-/** }@*/
diff --git a/hw/mcu/arc/snps/src/hal_os_tick.c b/hw/mcu/arc/snps/src/hal_os_tick.c
deleted file mode 100644
index 7eb7968f5..000000000
--- a/hw/mcu/arc/snps/src/hal_os_tick.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-#include <assert.h>
-#include "os/mynewt.h"
-#include "hal/hal_os_tick.h"
-#include "inc/arc/arc.h"
-#include "inc/arc/arc_exception.h"
-#include "inc/arc/arc_timer.h"
-
-struct hal_os_tick
-{
-    uint8_t timer_num;
-    uint8_t vecnum;
-    int ticks_per_ostick;
-    os_time_t max_idle_ticks;
-    uint32_t lastocmp;
-};
-
-struct hal_os_tick g_hal_os_tick;
-
-void
-os_tick_idle(os_time_t ticks)
-{
-    (void)ticks;
-}
-
-static void
-arc_timer_handler(void *arg)
-{
-    uint32_t sr;
-
-    os_trace_isr_enter();
-    arc_timer_int_clear(g_hal_os_tick.timer_num);
-
-    OS_ENTER_CRITICAL(sr);
-
-    /* TODO: for now, just advance one tick */
-    os_time_advance(1);
-
-    OS_EXIT_CRITICAL(sr);
-    os_trace_isr_exit();
-}
-
-void
-os_tick_init(uint32_t os_ticks_per_sec, int prio)
-{
-    int32_t rc;
-    uint32_t sr;
-
-    assert(ARC_FEATURE_CPU_CLOCK_FREQ % os_ticks_per_sec == 0);
-
-    g_hal_os_tick.ticks_per_ostick = ARC_FEATURE_CPU_CLOCK_FREQ /
-        os_ticks_per_sec;
-
-    /* Determine if timer 0 or timer 1 present */
-    if (arc_timer_present(TIMER_0)) {
-        g_hal_os_tick.timer_num = TIMER_0;
-        g_hal_os_tick.vecnum = 16;
-    } else if (arc_timer_present(TIMER_1)) {
-        g_hal_os_tick.timer_num = TIMER_1;
-        g_hal_os_tick.vecnum = 17;
-    } else {
-        /* Must be at least timer */
-        assert(0);
-    }
-
-    /* disable interrupts */
-    OS_ENTER_CRITICAL(sr);
-
-    /* Set isr in vector table and enable interrupt */
-    rc = int_pri_set(g_hal_os_tick.vecnum, (uint32_t)prio);
-    assert(rc == 0);
-
-    rc = int_handler_install(g_hal_os_tick.vecnum, arc_timer_handler);
-    assert(rc == 0);
-
-    rc = int_enable(g_hal_os_tick.vecnum);
-    assert(rc == 0);
-
-    arc_timer_stop(g_hal_os_tick.timer_num);
-    arc_timer_start(g_hal_os_tick.timer_num,
-                    TIMER_CTRL_IE | TIMER_CTRL_NH,
-                    g_hal_os_tick.ticks_per_ostick);
-
-    OS_EXIT_CRITICAL(sr);
-}
diff --git a/hw/mcu/arc/snps/src/hal_system.c b/hw/mcu/arc/snps/src/hal_system.c
deleted file mode 100644
index 758f88e46..000000000
--- a/hw/mcu/arc/snps/src/hal_system.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "hal/hal_system.h"
-
-/**
- * Function called at startup. Called after BSS and .data initialized but
- * prior to the _start function.
- *
- * NOTE: this function is called by both the bootloader and the application.
- * If you add code here that you do not want executed in either case you need
- * to conditionally compile it using the config variable BOOT_LOADER (will
- * be set to 1 in case of bootloader build)
- *
- */
-void
-hal_system_init(void)
-{
-/* TDOD: anything needed here? */
-}
-
-void
-hal_system_reset(void)
-{
-
-#if MYNEWT_VAL(HAL_SYSTEM_RESET_CB)
-    hal_system_reset_cb();
-#endif
-
-    while (1) {
-        HAL_DEBUG_BREAK();
-/* TODO: Reset system! */
-        //NVIC_SystemReset();
-    }
-}
-
-int
-hal_debugger_connected(void)
-{
-    return 0;
-}
-
-/**
- * hal system clock start
- *
- * Makes sure the LFCLK and/or HFCLK is started.
- */
-void
-hal_system_clock_start(void)
-{
-/* TODO: do I need to deal with this? */
-}
diff --git a/hw/mcu/arc/snps/src/hal_timer.c b/hw/mcu/arc/snps/src/hal_timer.c
deleted file mode 100644
index 55fdd00bf..000000000
--- a/hw/mcu/arc/snps/src/hal_timer.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include <string.h>
-#include <stdint.h>
-#include <assert.h>
-#include <errno.h>
-#include "hal/hal_timer.h"
-
-/* IRQ prototype */
-typedef void (*hal_timer_irq_handler_t)(void);
-
-/* TODO: port to peripheral timers */
-
-/**
- * hal timer init
- *
- * Initialize platform specific timer items
- *
- * @param timer_num     Timer number to initialize
- * @param cfg           Pointer to platform specific configuration
- *
- * @return int          0: success; error code otherwise
- */
-int
-hal_timer_init(int timer_num, void *cfg)
-{
-    (void)timer_num;
-    (void)cfg;
-    return 0;
-}
-
-/**
- * hal timer config
- *
- * Configure a timer to run at the desired frequency. This starts the timer.
- *
- * @param timer_num
- * @param freq_hz
- *
- * @return int
- */
-int
-hal_timer_config(int timer_num, uint32_t freq_hz)
-{
-    (void)timer_num;
-    (void)freq_hz;
-    return 0;
-}
-
-/**
- * hal timer deinit
- *
- * De-initialize a HW timer.
- *
- * @param timer_num
- *
- * @return int
- */
-int
-hal_timer_deinit(int timer_num)
-{
-    (void)timer_num;
-    return 0;
-}
-
-/**
- * hal timer get resolution
- *
- * Get the resolution of the timer. This is the timer period, in nanoseconds
- *
- * @param timer_num
- *
- * @return uint32_t The
- */
-uint32_t
-hal_timer_get_resolution(int timer_num)
-{
-    (void)timer_num;
-    return 0;
-}
-
-/**
- * hal timer read
- *
- * Returns the timer counter. NOTE: if the timer is a 16-bit timer, only
- * the lower 16 bits are valid. If the timer is a 64-bit timer, only the
- * low 32-bits are returned.
- *
- * @return uint32_t The timer counter register.
- */
-uint32_t
-hal_timer_read(int timer_num)
-{
-    (void)timer_num;
-    return 0;
-}
-
-/**
- * hal timer delay
- *
- * Blocking delay for n ticks
- *
- * @param timer_num
- * @param ticks
- *
- * @return int 0 on success; error code otherwise.
- */
-int
-hal_timer_delay(int timer_num, uint32_t ticks)
-{
-    uint32_t until;
-
-    until = hal_timer_read(timer_num) + ticks;
-    while ((int32_t)(hal_timer_read(timer_num) - until) <= 0) {
-        /* Loop here till finished */
-    }
-
-    return 0;
-}
-
-/**
- *
- * Initialize the HAL timer structure with the callback and the callback
- * argument. Also initializes the HW specific timer pointer.
- *
- * @param cb_func
- *
- * @return int
- */
-int
-hal_timer_set_cb(int timer_num, struct hal_timer *timer, hal_timer_cb cb_func,
-                 void *arg)
-{
-
-    timer->cb_func = cb_func;
-    timer->cb_arg = arg;
-    timer->link.tqe_prev = NULL;
-    timer->bsp_timer = NULL;
-
-    return 0;
-}
-
-int
-hal_timer_start(struct hal_timer *timer, uint32_t ticks)
-{
-    int rc;
-    uint32_t tick;
-
-    tick = ticks;
-    rc = hal_timer_start_at(timer, tick);
-    return rc;
-}
-
-int
-hal_timer_start_at(struct hal_timer *timer, uint32_t tick)
-{
-    (void)tick;
-    if ((timer == NULL) || (timer->link.tqe_prev != NULL) ||
-        (timer->cb_func == NULL)) {
-        return EINVAL;
-    }
-
-    return 0;
-}
-
-/**
- * hal timer stop
- *
- * Stop a timer.
- *
- * @param timer
- *
- * @return int
- */
-int
-hal_timer_stop(struct hal_timer *timer)
-{
-    if (timer == NULL) {
-        return EINVAL;
-    }
-    return 0;
-}
diff --git a/hw/mcu/arc/snps/src/hal_watchdog.c b/hw/mcu/arc/snps/src/hal_watchdog.c
deleted file mode 100644
index 930fc22eb..000000000
--- a/hw/mcu/arc/snps/src/hal_watchdog.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include <assert.h>
-#include "hal/hal_watchdog.h"
-
-int
-hal_watchdog_init(uint32_t expire_msecs)
-{
-    (void)expire_msecs;
-    return (0);
-}
-
-void
-hal_watchdog_enable(void)
-{
-}
-
-void
-hal_watchdog_tickle(void)
-{
-}
-
diff --git a/hw/mcu/arc/snps/syscfg.yml b/hw/mcu/arc/snps/syscfg.yml
deleted file mode 100644
index 21ddbb41e..000000000
--- a/hw/mcu/arc/snps/syscfg.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-syscfg.vals:
-    OS_TICKS_PER_SEC: 100
diff --git a/hw/mcu/arc/src/ext/sdk/README.md b/hw/mcu/arc/src/ext/sdk/README.md
deleted file mode 100644
index 7614d85e5..000000000
--- a/hw/mcu/arc/src/ext/sdk/README.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# embARC BSP for EMSK
-## Introduction
-The embARC Board support Package (BSP) for DesignWare® ARC® EM Starter Kit (EMSK) is a software distribution aimed at facilitating the development and evaluation of embedded systems based on ARCv2 processors.
-
-It is designed to provide a board support package for ARC EMSK users by defining consistent and simple software interfaces to the processors and onboard devices.
-
-## embARC BSP Features
-embARC BSP architecture is shown in the block diagram below.
-
-![embARC BSP Architecture](doc/documents/pic/embarc_bsp_arch.jpg)
-
-embARC BSP provides ARC Hardware Abstraction Layer (HAL), device HAL and driver implementation for UART, I2C, GPIO and SPI. A group of driver implementations for DesignWare IP peripherals are provided in embARC BSP for EMSK.
-
-[ARC Development Tools](https://www.synopsys.com/designware-ip/processor-solutions/arc-processors/arc-development-tools.html) are supported in embARC BSP, [Premium MetaWare Development Toolkit (>=2016.12)](http://www.synopsys.com/dw/ipdir.php?ds=sw_metaware) and [Opensource ARC GNU IDE(>=2016.09)](https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases).
-
-### embARC BSP & embARC OSP
-
-embARC BSP code is originated from [embARC OSP](https://github.com/foss-for-synopsys-dwc-arc-processors/embarc_osp). The code are reorganized with the same ARC HAL, device HAL and driver implementations for DesignWare IP peripherals. The operating system layer, common library layer, middleware layer and applications are not included in embARC BSP. The code in embARC BSP is independent with build system. It can be ported to various build system easily. The lightweight makefile and Eclipse [...]
-
-## Get Started with embARC BSP
-* Use [Premium MetaWare Development Toolkit (>=2016.12)](http://www.synopsys.com/dw/ipdir.php?ds=sw_metaware) in embARC BSP
-* Use [Opensource ARC GNU IDE(>=2016.09)](https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases) in embARC BSP
diff --git a/hw/mcu/arc/src/ext/sdk/arc/arc_cache.c b/hw/mcu/arc/src/ext/sdk/arc/arc_cache.c
deleted file mode 100644
index 632a3e329..000000000
--- a/hw/mcu/arc/src/ext/sdk/arc/arc_cache.c
+++ /dev/null
@@ -1,420 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-15
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-
-/**
- * \file
- * \ingroup ARC_HAL_MISC_CACHE
- * \brief implementation of cache related functions
- */
-
-#include "inc/arc/arc_cache.h"
-
-#define DIV_ROUND_UP(x, y)  (((x) + (y) - 1) / (y))
-
-
-struct cache_config {
-	uint8_t ver;			/* version */
-	uint8_t assoc;			/* Cache Associativity */
-	uint16_t line; 			/* cache line/block size */
-	uint32_t capacity;		/* capacity */
-};
-
-
-static struct cache_config icache_config, dcache_config;
-
-/**
- * \brief invalidate multi instruction cache lines
- *
- * \param[in] start_addr start address in instruction cache
- * \param[in] size  the bytes to be invalidated
- * \return 0, succeeded, -1, failed
- */
-int32_t icache_invalidate_mlines(uint32_t start_addr, uint32_t size)
-{
-	if (!icache_available()) return -1;
-
-	if ((size == 0) || (size > icache_config.capacity)) {
-		return -1;
-	}
-
-	uint32_t end_addr;
-	uint32_t line_size;
-	uint32_t status;
-
-	line_size = (uint32_t)(icache_config.line);
-	end_addr = start_addr + size - 1;
-	start_addr &= (uint32_t)(~(line_size - 1));
-
-	status = cpu_lock_save();
-	do {
-		_arc_aux_write(AUX_IC_IVIL, start_addr);
-		Asm("nop_s");
-		Asm("nop_s");
-		Asm("nop_s");
-		start_addr += line_size;
-	} while (start_addr <= end_addr);
-	cpu_unlock_restore(status);
-
-	return 0;
-}
-
-/**
- * \brief lock multi lines in instruction cache
- *
- * \param[in] start_addr start address in instruction cache
- * \param[in] size  the bytes to be locked
- * \return 0, succeeded, -1, failed (cache already locked or other reasons)
- */
-int32_t icache_lock_mlines(uint32_t start_addr, uint32_t size)
-{
-	if (!icache_available()) return -1;
-
-	if ((size == 0) || (size > icache_config.capacity)) {
-		return -1;
-	}
-
-	uint32_t end_addr;
-	uint32_t line_size;
-	uint32_t status;
-	int32_t ercd = 0;
-
-	line_size = (uint32_t)(icache_config.line);
-	end_addr = start_addr + size - 1;
-	start_addr &= (uint32_t)(~(line_size - 1));
-
-	status = cpu_lock_save();
-	do {
-		_arc_aux_write(AUX_IC_LIL, start_addr);
-		if(_arc_aux_read(AUX_IC_CTRL) & IC_CTRL_OP_SUCCEEDED) {
-			start_addr += line_size;
-		} else {
-			ercd = -1;	/* the operation failed */
-			break;
-		}
-	} while (start_addr <= end_addr);
-	cpu_unlock_restore(status);
-
-	return ercd;
-}
-
-/**
- * \brief directly write icache internal ram
- *
- * \param[in] cache_addr, icache internal address(way+index+offset)
- * \param[in] tag	cache tag to write (tag+lock bit+valid bit)
- * \param[in] data	cache data to write
- * \return 0, succeeded, -1, failed
- */
-int32_t icache_direct_write(uint32_t cache_addr, uint32_t tag, uint32_t data)
-{
-	if (!icache_available()) return -1;
-
-	if (_arc_aux_read(AUX_IC_CTRL) & IC_CTRL_INDIRECT_ACCESS) {
-		return -1;
-	}
-	_arc_aux_write(AUX_IC_RAM_ADDR, cache_addr);
-	_arc_aux_write(AUX_IC_TAG, tag );
-	_arc_aux_write(AUX_IC_DATA, data);
-
-	return 0;
-}
-
-/**
- * \brief directly read icache internal ram
- *
- * \param[in] cache_addr, icache internal address(way+index+offset)
- * \param[out] tag	cache tag to read (tag+index+lock bit+valid bit)
- * \param[out] data	cache data to read
- * \return 0, succeeded, -1, failed
- */
-int32_t icache_direct_read(uint32_t cache_addr, uint32_t *tag, uint32_t *data)
-{
-	if (!icache_available()) return -1;
-
-	if (_arc_aux_read(AUX_IC_CTRL) & IC_CTRL_INDIRECT_ACCESS) {
-		return -1;
-	}
-	_arc_aux_write(AUX_IC_RAM_ADDR, cache_addr);
-	*tag = _arc_aux_read(AUX_IC_TAG);
-	*data = _arc_aux_read(AUX_IC_DATA);
-
-	return 0;
-}
-
-/**
- * \brief indirectly read icache internal ram
- *
- * \param[in] mem_addr, memory address
- * \param[out] tag	cache tag to read
- * \param[out] data	cache data to read
- * \return 0, succeeded, -1, failed
- */
-int32_t icache_indirect_read(uint32_t mem_addr, uint32_t *tag, uint32_t *data)
-{
-	if (!icache_available()) return -1;
-
-	if (!(_arc_aux_read(AUX_IC_CTRL) & IC_CTRL_INDIRECT_ACCESS)) {
-		return -1;
-	}
-	_arc_aux_write(AUX_IC_RAM_ADDR, mem_addr);
-	if(_arc_aux_read(AUX_IC_CTRL) & IC_CTRL_OP_SUCCEEDED) {
-		*tag = _arc_aux_read(AUX_IC_TAG);
-		*data = _arc_aux_read(AUX_IC_DATA);
-	} else {
-		return -1;	/* the specified memory is not in icache */
-	}
-	return 0;
- }
-
-/**
- * \brief invalidate multi data cache lines
- *
- * \param[in] start_addr start address in data cache
- * \param[in] size  the bytes to be invalidated
- * \return 0, succeeded, -1, failed
- */
-int32_t dcache_invalidate_mlines(uint32_t start_addr, uint32_t size)
-{
-	if (!dcache_available()) return -1;
-
-	uint32_t end_addr;
-	uint32_t line_size;
-	uint32_t status;
-
-	if ((size == 0) || (size > dcache_config.capacity)) {
-		return -1;
-	}
-
-	line_size = (uint32_t)(dcache_config.line);
-	end_addr = start_addr + size - 1;
-	start_addr &= (uint32_t)(~(line_size - 1));
-
-	status = cpu_lock_save();
-	do {
-		_arc_aux_write(AUX_DC_IVDL, start_addr);
-		Asm("nop_s");
-		Asm("nop_s");
-		Asm("nop_s");
-		/* wait for flush completion */
-		while (_arc_aux_read(AUX_DC_CTRL) & DC_CTRL_FLUSH_STATUS);
-		start_addr += line_size;
-	} while (start_addr <= end_addr);
-	cpu_unlock_restore(status);
-
-	return 0;
-
-}
-
-/**
- * \brief flush multi lines in data cache
- *
- * \param[in] start_addr start address
- * \param[in] size	the bytes to be flushed
- * \return 0, succeeded, -1, failed
- */
-int32_t dcache_flush_mlines(uint32_t start_addr, uint32_t size)
-{
-	if (!dcache_available()) return -1;
-
-	if ((size == 0) || (size > dcache_config.capacity)) {
-		return -1;
-	}
-
-	uint32_t end_addr;
-	uint32_t line_size;
-	uint32_t status;
-
-	line_size = (uint32_t)(dcache_config.line);
-	end_addr = start_addr + size - 1;
-	start_addr &= (uint32_t)(~(line_size - 1));
-
-	status = cpu_lock_save();
-	do {
-		_arc_aux_write(AUX_DC_FLDL, start_addr);
-		Asm("nop_s");
-		Asm("nop_s");
-		Asm("nop_s");
-		/* wait for flush completion */
-		while (_arc_aux_read(AUX_DC_CTRL) & DC_CTRL_FLUSH_STATUS);
-		start_addr += line_size;
-	} while (start_addr <= end_addr);
-	cpu_unlock_restore(status);
-
-	return 0;
-}
-
-/**
- * \brief lock multi lines in data cache
- *
- * \param[in] start_addr start address in data cache
- * \param[in] size  the bytes to be locked
- * \return 0, succeeded, -1, failed
- */
-int32_t dcache_lock_mlines(uint32_t start_addr, uint32_t size)
-{
-	if (!dcache_available()) return -1;
-
-	if ((size == 0) || (size > dcache_config.capacity)) {
-		return -1;
-	}
-
-	uint32_t end_addr;
-	uint32_t line_size;
-	uint32_t status;
-	int32_t ercd = 0;
-
-	line_size = (uint32_t)(dcache_config.line);
-	end_addr = start_addr + size - 1;
-	start_addr &= (uint32_t)(~(line_size - 1));
-
-	status = cpu_lock_save();
-	do {
-		_arc_aux_write(AUX_DC_LDL, start_addr);
-		Asm("nop_s");
-		if(_arc_aux_read(AUX_DC_CTRL) & DC_CTRL_OP_SUCCEEDED) {
-			start_addr += line_size;
-		} else {
-			ercd = -1;	/* the operation failed */
-			break;
-		}
-	} while (start_addr <= end_addr);
-	cpu_unlock_restore(status);
-
-	return ercd;
-}
-
-/**
- * \brief directly write dcache internal ram
- *
- * \param[in] cache_addr, dcache internal address(way+index+offset)
- * \param[in] tag	cache tag to write
- * \param[in] data	cache data to write
- * \return 0, succeeded, -1, failed
- */
-int32_t dcache_direct_write(uint32_t cache_addr, uint32_t tag, uint32_t data)
-{
-	if (!dcache_available()) return -1;
-
-	if (_arc_aux_read(AUX_DC_CTRL) & DC_CTRL_INDIRECT_ACCESS) {
-		return -1;
-	}
-	_arc_aux_write(AUX_DC_RAM_ADDR, cache_addr);
-	_arc_aux_write(AUX_DC_TAG, tag);
-	_arc_aux_write(AUX_DC_DATA, data);
-
-	return 0;
-}
-
-/**
- * \brief directly read dcache internal ram
- *
- * \param[in] cache_addr, dcache internal address(way+index+offset)
- * \param[out] tag	cache tag to read
- * \param[out] data	cache data to read
- * \return 0, succeeded, -1, failed
- */
-int32_t dcache_direct_read(uint32_t cache_addr, uint32_t *tag, uint32_t *data)
-{
-	if (!dcache_available()) return -1;
-
-	if (_arc_aux_read(AUX_DC_CTRL) & DC_CTRL_INDIRECT_ACCESS) {
-		return -1;
-	}
-	_arc_aux_write(AUX_DC_RAM_ADDR, cache_addr);
-	*tag = _arc_aux_read(AUX_DC_TAG);
-	*data = _arc_aux_read(AUX_DC_DATA);
-
-	return 0;
-}
-
-/**
- * \brief indirectly read dcache internal ram
- *
- * \param[in] mem_addr, memory address(tag+index+offset)
- * \param[out] tag	cache tag to read
- * \param[out] data	cache data to read
- * \return 0, succeeded, -1, failed
- */
-int32_t dcache_indirect_read(uint32_t mem_addr, uint32_t *tag, uint32_t *data)
-{
-	if (!dcache_available()) return -1;
-
-	if (!(_arc_aux_read(AUX_DC_CTRL) & DC_CTRL_INDIRECT_ACCESS)) {
-		return -1;
-	}
-	_arc_aux_write(AUX_DC_RAM_ADDR, mem_addr);
-	if(_arc_aux_read(AUX_DC_CTRL) & DC_CTRL_OP_SUCCEEDED) {
-		*tag = _arc_aux_read(AUX_DC_TAG);
-		*data = _arc_aux_read(AUX_DC_DATA);
-	} else {
-		return -1;	/* the specified memory is not in dcache */
-	}
-	return 0;
- }
-
-/**
- * \brief  initialize cache
- * 1. invalidate icache and dcache
- * 2. Only support ARCv2 cache
- */
-void arc_cache_init(void)
-{
-	uint32_t build_cfg;
-
-	build_cfg = _arc_aux_read(AUX_BCR_D_CACHE);
-
-	dcache_config.ver = build_cfg & 0xff;
-
-	if (dcache_config.ver >= 0x04) { /* ARCv2 */
-		dcache_enable(DC_CTRL_DISABLE_FLUSH_LOCKED |
-			DC_CTRL_INDIRECT_ACCESS | DC_CTRL_INVALID_FLUSH);
-		dcache_invalidate();
-		dcache_config.assoc = 1 << ((build_cfg >> 8) & 0xf);
-		dcache_config.capacity = 512 << ((build_cfg >> 12) & 0xf);
-		dcache_config.line = 16 << ((build_cfg >> 16) & 0xf);
-	}
-
-	build_cfg = _arc_aux_read(AUX_BCR_I_CACHE);
-
-	icache_config.ver = build_cfg & 0xff;
-
-	if (icache_config.ver >= 0x04) { /* ARCv2 */
-		icache_config.assoc = 1 << ((build_cfg >> 8) & 0xf);
-		icache_config.capacity = 512 << ((build_cfg >> 12) & 0xf);
-		icache_config.line = 8 << ((build_cfg >> 16) & 0xf);
-
-		icache_enable(IC_CTRL_IC_ENABLE);
-		icache_invalidate();
-	}
-
-}
diff --git a/hw/mcu/arc/src/ext/sdk/arc/arc_exc_asm.S b/hw/mcu/arc/src/ext/sdk/arc/arc_exc_asm.S
deleted file mode 100644
index 76b2cd3e9..000000000
--- a/hw/mcu/arc/src/ext/sdk/arc/arc_exc_asm.S
+++ /dev/null
@@ -1,202 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-15
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-
-/**
- * \file
- * \ingroup ARC_HAL_EXCEPTION_CPU
- * \brief  assembly part of exception and interrupt processing
- */
-
-/**
- * \addtogroup ARC_HAL_EXCEPTION_CPU
- * @{
- */
-
-/* function documentation */
-/**
- * \fn void exc_entry_cpu(void)
- * \brief default entry of CPU exceptions, such as TLB miss and swap.
- *
- * \fn void exc_entry_int(void)
- * \brief normal interrupt exception entry.
- * 	In default, all interrupt exceptions are installed with normal entry.
- * 	If FIRQ is required, exc_entry_firq should be the entry.
- *
- * \fn void exc_entry_firq(void)
- * \brief firq exception entry
- */
-/** }@ */
-
-/** @cond EXCEPTION_ASM */
-
-#define __ASSEMBLY__
-#include "embARC_BSP_config.h"
-#include "inc/arc/arc.h"
-#include "inc/arc/arc_asm_common.h"
-
-	.file "arc_exc_asm.S"
-
-/* entry for cpu exception handling */
-	.text
-	.global exc_entry_cpu
-	.weak exc_entry_cpu
-	.align 4
-exc_entry_cpu:
-
-	EXCEPTION_PROLOGUE
-
-	mov	r3, sp					/* as exception handler's para(exc_frame) */
-
-/* exc_nest_count +1 */
-	ld	r0, [exc_nest_count]
-	add	r0, r0, 1
-	st	r0, [exc_nest_count]
-
-/* find the exception cause */
-	lr	r0, [AUX_ECR]
-	lsr	r0, r0, 16
-	bmsk	r0, r0, 7
-	mov	r1, exc_int_handler_table
-	ld.as	r2, [r1, r0]
-
-	mov	r0, r3
-	jl	[r2]					/* jump to exception handler where interrupts are not allowed! */
-
-/* interrupts are not allowed */
-exc_return:
-
-/* exc_nest_count -1 */
-	ld	r0, [exc_nest_count]
-	sub	r0, r0, 1
-	st	r0, [exc_nest_count]
-
-	EXCEPTION_EPILOGUE
-	rtie
-
-
-/****** entry for normal interrupt exception handling ******/
-	.global exc_entry_int
-	.weak exc_entry_int
-	.align 4
-exc_entry_int:
-	clri						/* disable interrupt */
-
-#if ARC_FEATURE_FIRQ == 1
-#if ARC_FEATURE_RGF_NUM_BANKS > 1
-	lr	r0, [AUX_IRQ_ACT]			/*  check whether it is P0 interrupt */
-	btst	r0, 0
-	bnz	exc_entry_firq
-#else
-	PUSH	r10
-	lr	r10, [AUX_IRQ_ACT]
-	btst	r10, 0
-	POP	r10
-	bnz	exc_entry_firq
-#endif
-#endif
-	INTERRUPT_PROLOGUE			/* save scratch regs, this will be affected  */
-
-
-/* exc_nest_count +1 */
-	ld	r0, [exc_nest_count]
-	add	r0, r0, 1
-	st	r0, [exc_nest_count]
-
-
-	lr	r0, [AUX_IRQ_CAUSE]
-	mov	r1, exc_int_handler_table
-	ld.as	r2, [r1, r0]				/* r2 = _kernel_exc_tbl + irqno *4 */
-
-/* for the case of software triggered interrupt */
-	lr	r3, [AUX_IRQ_HINT]
-	cmp	r3, r0
-	bne.d	irq_hint_handled
-	xor	r3, r3, r3
-	sr	r3, [AUX_IRQ_HINT]
-irq_hint_handled:
-	seti						/* enable higher priority interrupt */
-
-	mov	r0, sp
-	jl	[r2]					/* jump to interrupt handler */
-
-/* no interrupts are allowed from here */
-int_return:
-	clri						/* disable interrupt */
-
-/* exc_nest_count -1 */
-	ld	r0, [exc_nest_count]
-	sub	r0, r0, 1
-	st	r0, [exc_nest_count]
-
-	INTERRUPT_EPILOGUE
-	rtie
-
-/****** entry for fast irq exception handling ******/
-	.global exc_entry_firq
-	.weak exc_entry_firq
-	.align 4
-exc_entry_firq:
-	clri						/* disable interrupt */
-	SAVE_FIQ_EXC_REGS
-
-/* exc_nest_count +1 */
-	ld	r0, [exc_nest_count]
-	add	r0, r0, 1
-	st	r0, [exc_nest_count]
-
-	lr	r0, [AUX_IRQ_CAUSE]
-	mov	r1, exc_int_handler_table
-	ld.as	r2, [r1, r0]				/* r2 = _kernel_exc_tbl + irqno *4 */
-
-/* for the case of software triggered interrupt */
-	lr	r3, [AUX_IRQ_HINT]
-	cmp	r3, r0
-	bne.d	firq_hint_handled
-	xor	r3, r3, r3
-	sr	r3, [AUX_IRQ_HINT]
-firq_hint_handled:
-
-	jl	[r2]					/* jump to interrupt handler */
-
-/* no interrupts are allowed from here */
-firq_return:
-
-/* exc_nest_count -1 */
-	ld	r0, [exc_nest_count]
-	sub	r0, r0, 1
-	st	r0, [exc_nest_count]
-
-	RESTORE_FIQ_EXC_REGS
-	rtie
-
-/** @endcond */
diff --git a/hw/mcu/arc/src/ext/sdk/arc/arc_exception.c b/hw/mcu/arc/src/ext/sdk/arc/arc_exception.c
deleted file mode 100644
index 30dddd6c6..000000000
--- a/hw/mcu/arc/src/ext/sdk/arc/arc_exception.c
+++ /dev/null
@@ -1,514 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-15
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-
-/**
- * \file
- * \ingroup ARC_HAL_EXCEPTION_CPU ARC_HAL_EXCEPTION_INTERRUPT
- * \brief C Implementation of exception and interrupt management
- */
-#include "inc/arc/arc_exception.h"
-#include "inc/arc/arc_cache.h"
-
-//#define	 DBG_LESS
-//#include "embARC_debug.h"
-
-/**
- * \addtogroup ARC_HAL_EXCEPTION_CPU
- * @{
- * \var exc_entry_table
- * \brief exception entry table
- *
- * install exception entry table to ARC_AUX_INT_VECT_BASE in startup.
- * According to ARCv2 ISA, vectors are fetched in instruction space and thus
- * may be present in ICCM, Instruction Cache, or
- * main memory accessed by instruction fetch logic.
- * So it is put into a specific section .vector.
- *
- * Please note that the exc_entry_table maybe cached in ARC. Some functions is
- * defined in .s files.
- *
- */
-
-/**
- * \ingroup ARC_HAL_EXCEPTION_CPU
- * \brief  default cpu exception handler
- * \param p_excinf pointer to the exception frame
- */
-static void exc_handler_default(void *p_excinf)
-{
-	uint32_t excpt_cause_reg = 0;
-	uint32_t excpt_ret_reg = 0;
-	uint32_t exc_no = 0;
-
-	excpt_cause_reg = _arc_aux_read(AUX_ECR);
-	excpt_ret_reg = _arc_aux_read(AUX_ERRET);
-	exc_no = (excpt_cause_reg >> 16) & 0xff;
-
-	//dbg_printf(DBG_LESS_INFO, "default cpu exception handler\r\n");
-	//dbg_printf(DBG_LESS_INFO, "exc_no:%d, last sp:0x%08x, ecr:0x%08x, eret:0x%08x\r\n",
-		//exc_no, (uint32_t)p_excinf, excpt_cause_reg, excpt_ret_reg);
-#if SECURESHIELD_VERSION == 2
-	while (1);
-#else
-	Asm("kflag 1");
-#endif
-}
-
-
-/**
- * \ingroup ARC_HAL_EXCEPTION_INTERRUPT
- * \brief  default interrupt handler
- * \param[in] p_excinf	information for interrupt handler
- */
-static void int_handler_default(void *p_excinf)
-{
-	uint32_t int_cause_reg = 0;
-
-	int_cause_reg = _arc_aux_read(AUX_IRQ_CAUSE);
-	//dbg_printf(DBG_LESS_INFO, "default interrupt handler\r\n");
-	//dbg_printf(DBG_LESS_INFO, "last sp:0x%08x, icause:0x%08x\r\n", (uint32_t)p_excinf, int_cause_reg);
-#if SECURESHIELD_VERSION == 2
-	while (1);
-#else
-	Asm("kflag 1");
-#endif
-}
-
-__attribute__ ((aligned(1024), section(".vector")))
-EXC_ENTRY exc_entry_table[NUM_EXC_ALL] = {
- 	[0] = _arc_reset,
- 	[1 ... NUM_EXC_CPU-1] = exc_entry_cpu,
-	[NUM_EXC_CPU ... NUM_EXC_ALL-1] = exc_entry_int
- };
-/**
- * \var exc_int_handler_table
- * \brief the cpu exception and interrupt exception handler table
- * called in exc_entry_default and exc_entry_int
- */
-EXC_HANDLER exc_int_handler_table[NUM_EXC_ALL] = {
-	 [0 ... NUM_EXC_CPU-1] = exc_handler_default,
-	 [NUM_EXC_CPU ... NUM_EXC_ALL-1] = int_handler_default
-};
-
-/**
- * \var exc_nest_count
- * \brief the counter for exc/int processing, =0 no int/exc
- * >1 in int/exc processing
- * @}
- */
-uint32_t exc_nest_count;
-
-typedef struct aux_irq_ctrl_field {
-	/* note: little endian */
-	uint32_t save_nr_gpr_pairs: 5;	/** Indicates number of general-purpose register pairs saved, from 0 to 8/16 */
-	uint32_t res: 4;		/** Reserved */
-	uint32_t save_blink: 1;		/** Indicates whether to save and restore BLINK */
-	uint32_t save_lp_regs: 1;	/** Indicates whether to save and restore loop registers (LP_COUNT, LP_START, LP_END) */
-	uint32_t save_u_to_u: 1;	/** Indicates if user context is saved to user stack */
-	uint32_t res2: 1;		/** Reserved */
-	uint32_t save_idx_regs: 1;	/** Indicates whether to save and restore code-density registers (EI_BASE, JLI_BASE, LDI_BASE) */
-	uint32_t res3: 18;		/** Reserved */
-} aux_irq_ctrl_field_t;
-
-typedef union {
-	aux_irq_ctrl_field_t bits;
-	uint32_t value;
-} aux_irq_ctrl_t;
-
-/**
- * \ingroup ARC_HAL_EXCEPTION_CPU ARC_HAL_EXCEPTION_INTERRUPT
- * \brief  intialize the exception and interrupt handling
- */
-void exc_int_init(void)
-{
-	uint32_t i;
-	uint32_t status;
-	aux_irq_ctrl_t ictrl;
-
-	ictrl.value = 0;
-
-#ifndef ARC_FEATURE_RF16
-	ictrl.bits.save_nr_gpr_pairs = 6;	/* r0 to r11 (r12 saved manually) */
-#else
-	ictrl.bits.save_nr_gpr_pairs = 3;	/* r0 to r3, r10, r11  */
-#endif
-	ictrl.bits.save_blink = 1;
-	ictrl.bits.save_lp_regs = 1;		/* LP_COUNT, LP_START, LP_END */
-	ictrl.bits.save_u_to_u = 0;		/* user ctxt saved on kernel stack */
-	ictrl.bits.save_idx_regs = 1;		/* JLI, LDI, EI */
-
-	status = arc_lock_save();
-	for (i = NUM_EXC_CPU; i < NUM_EXC_ALL; i++) {
-		/* interrupt level triggered, disabled, priority is the lowest */
-		_arc_aux_write(AUX_IRQ_SELECT, i);
-		_arc_aux_write(AUX_IRQ_ENABLE, 0);
-		_arc_aux_write(AUX_IRQ_TRIGGER, 0);
-#if defined(ARC_FEATURE_SEC_PRESENT) && (SECURESHIELD_VERSION < 2)
-		_arc_aux_write(AUX_IRQ_PRIORITY, (1 << AUX_IRQ_PRIORITY_BIT_S)|(INT_PRI_MAX - INT_PRI_MIN));
-#else
-		_arc_aux_write(AUX_IRQ_PRIORITY, INT_PRI_MAX - INT_PRI_MIN);
-#endif
-	}
-	_arc_aux_write(AUX_IRQ_CTRL, ictrl.value);
-
-	arc_unlock_restore(status);
-
-	/** ipm should be set after cpu unlock restore to avoid reset of the status32 value */
-	arc_int_ipm_set((INT_PRI_MAX - INT_PRI_MIN));
-}
-
-/**
- * \ingroup ARC_HAL_EXCEPTION_CPU
- * \brief  install a CPU exception entry
- * \param[in] excno exception number
- * \param[in] entry the entry of exception to install
- */
-int32_t exc_entry_install(const uint32_t excno, EXC_ENTRY entry)
-{
-	uint32_t status;
-
-	EXC_ENTRY *table = (EXC_ENTRY *)_arc_aux_read(AUX_INT_VECT_BASE);
-
-	if (excno < NUM_EXC_ALL && entry != NULL
-		&& table[excno] != entry) {
-		status = cpu_lock_save();
-		/* directly write to mem, as arc gets exception handler from mem not from cache */
-		/* FIXME, here maybe icache is dirty, need to be invalidated */
-		table[excno] = entry;
-
-		if (_arc_aux_read(AUX_BCR_D_CACHE) > 0x2) {
-		/* dcache is available */
-			dcache_flush_line((uint32_t)&table[excno]);
-		}
-
-		if (_arc_aux_read(AUX_BCR_D_CACHE) > 0x2) {
-		/* icache is available */
-			icache_invalidate_line((uint32_t)&table[excno]);
-		}
-		cpu_unlock_restore(status);
-		return 0;
-	}
-	return -1;
-}
-
-/**
- * \ingroup ARC_HAL_EXCEPTION_CPU
- * \brief  get the installed CPU exception entry
- * \param[in] excno exception number
- * \return the installed CPU exception entry
- */
-EXC_ENTRY exc_entry_get(const uint32_t excno)
-{
-	if (excno < NUM_EXC_ALL) {
-		return exc_entry_table[excno];
-	}
-	return NULL;
-}
-
-/**
- * \ingroup ARC_HAL_EXCEPTION_CPU
- * \brief  install an exception handler
- * \param[in] excno	exception number
- * \param[in] handler the handler of exception to install
- */
-int32_t exc_handler_install(const uint32_t excno, EXC_HANDLER handler)
-{
-	if (excno < NUM_EXC_ALL && handler != NULL) {
-		exc_int_handler_table[excno] = handler;
-		return 0;
-	}
-
-	return -1;
-}
-
-/**
- * \ingroup ARC_HAL_EXCEPTION_CPU
- * \brief  get the installed exception handler
- * \param[in] excno	exception number
- * \return the installed exception handler or NULL
- */
-EXC_HANDLER exc_handler_get(const uint32_t excno)
-{
-	if (excno < NUM_EXC_ALL) {
-		return exc_int_handler_table[excno];
-	}
-
-	return NULL;
-}
-
-
-#ifndef EMBARC_OVERRIDE_ARC_INTERRUPT_MANAGEMENT
-/**
- * \brief disable the specific interrupt
- *
- * \param[in] intno interrupt number
- */
-int32_t int_disable(const uint32_t intno)
-{
-	if (intno >= NUM_EXC_CPU && intno < NUM_EXC_ALL) {
-		arc_int_disable(intno);
-		return 0;
-	}
-
-	return -1;
-}
-
-/**
- * \brief  enable the specific int
- *
- * \param[in] intno interrupt number
- */
-int32_t int_enable(const uint32_t intno)
-{
-	if (intno >= NUM_EXC_CPU && intno < NUM_EXC_ALL) {
-		arc_int_enable(intno);
-		return 0;
-	}
-
-	return -1;
-}
-
-/**
- * \brief  check whether the specific int is enabled
- *
- * \param[in] intno interrupt number
- * \return 0 disabled, 1 enabled, < 0 error
- */
-int32_t int_enabled(const uint32_t intno)
-{
-	if (intno >= NUM_EXC_CPU && intno < NUM_EXC_ALL) {
-		_arc_aux_write(AUX_IRQ_SELECT, intno);
-		return _arc_aux_read(AUX_IRQ_ENABLE);
-	}
-
-	return -1;
-}
-
-/**
- * \brief  get the interrupt priority mask
- *
- * \returns interrupt priority mask, negative num
- */
-int32_t int_ipm_get(void)
-{
-	return ((int32_t)arc_int_ipm_get() + INT_PRI_MIN);
-}
-
-
-/**
- * \brief  set the interrupt priority mask
- *
- * \param[in] intpri interrupt priority
- */
-int32_t int_ipm_set(int32_t intpri)
-{
-	if (intpri >= INT_PRI_MIN && intpri <= INT_PRI_MAX) {
-		intpri = intpri - INT_PRI_MIN;
-		arc_int_ipm_set(intpri);
-		return 0;
-	}
-
-	return  -1;
-}
-
-
-/**
- * \brief  get current interrupt priority mask
- *
- * \param[in] intno interrupt number
- * \return  <0 interrupt priority, 0 error
- */
-int32_t int_pri_get(const uint32_t intno)
-{
-	if (intno >= NUM_EXC_CPU && intno < NUM_EXC_ALL) {
-		return (int32_t)arc_int_pri_get(intno) + INT_PRI_MIN;
-	}
-
-	return 0;
-}
-
-
-/**
- * \brief set interrupt priority
- *
- * \param[in] intno interrupt number
- * \param[in] intpri interrupt priority
- * \return  <0 error, 0 ok
- */
-int32_t int_pri_set(const uint32_t intno, int32_t intpri)
-{
-	uint32_t status;
-
-	if (intno >= NUM_EXC_CPU && intno < NUM_EXC_ALL) {
-		status = cpu_lock_save();
-		intpri = intpri - INT_PRI_MIN;
-		arc_int_pri_set(intno,(uint32_t)intpri);
-		cpu_unlock_restore(status);
-		return 0;
-	}
-	return -1;
-}
-
-/**
- * \brief set interrupt secure or not secure
- * This function is valid in secureshield v2
- * \param[in] intno interrupt number
- * \param[in] secure, 0 for normal, >0 for secure
- * \return <0 error, 0 ok
- */
-int32_t int_secure_set(const uint32_t intno, uint32_t secure)
-{
-	if (intno >= NUM_EXC_CPU && intno < NUM_EXC_ALL) {
-		arc_int_secure_set(intno, secure);
-		return 0;
-	}
-	return -1;
-
-}
-
-
-/**
- * \brief  probe the pending status of interrupt
- *
- * \param[in] intno interrupt number
- *
- * \returns 1 pending, 0 no pending, -1 error
- */
-int32_t int_probe(const uint32_t intno)
-{
-	if (intno >= NUM_EXC_CPU && intno < NUM_EXC_ALL) {
-		return arc_int_probe(intno);
-	}
-	return -1;
-}
-
-
-/**
- * \brief  trigger the interrupt in software
- *
- * \param[in] intno interrupt number
- * \return 0 ok, -1 error
- */
-int32_t int_sw_trigger(const uint32_t intno)
-{
-	if (intno >= NUM_EXC_CPU && intno < NUM_EXC_ALL) {
-		arc_int_sw_trigger(intno);
-		return 0;
-	}
-	return -1;
-}
-
-/**
- * \brief  config the interrupt level triggered or pulse triggered
- *
- * \param[in] intno interrupt number
- * \param[in] level, 0-level trigger, 1-pulse triggered
- * \return 0 ok, -1 error
- */
-int32_t int_level_config(const uint32_t intno, const uint32_t level)
-{
-	if (intno >= NUM_EXC_CPU && intno < NUM_EXC_ALL) {
-		arc_int_level_config(intno, level);
-		return 0;
-	}
-	return -1;
-}
-
-
-/**
- * \brief  lock cpu, disable interrupts
- */
-void cpu_lock(void)
-{
-	arc_lock();
-}
-
-/**
- * \brief  unlock cpu, enable interrupts to happen
- */
-void cpu_unlock(void)
-{
-	arc_unlock();
-}
-
-/**
- * \brief  lock cpu and return status
- *
- * \returns cpu status
- */
-uint32_t cpu_lock_save(void)
-{
-	return arc_lock_save();
-}
-
-/**
- * \brief  unlock cpu with the specific status
- *
- * \param[in] status  cpu status saved by cpu_lock_save
- */
-void cpu_unlock_restore(const uint32_t status)
-{
-	arc_unlock_restore(status);
-}
-
-/**
- * \ingroup ARC_HAL_EXCEPTION_INTERRUPT
- * \brief  install an interrupt handler
- * \param[in] intno	interrupt number
- * \param[in] handler interrupt handler to install
- */
-int32_t int_handler_install(const uint32_t intno, INT_HANDLER handler)
-{
-	/*!< \todo parameter check ? */
-	if (intno >= NUM_EXC_CPU) {
-		return exc_handler_install(intno, handler);
-	}
-
-	return -1;
-}
-
-/**
- * \ingroup ARC_HAL_EXCEPTION_INTERRUPT
- * \brief  get the installed an interrupt handler
- * \param[in] intno interrupt number
- * \return the installed interrupt handler or NULL
- */
-INT_HANDLER int_handler_get(const uint32_t intno)
-{
-	if (intno >= NUM_EXC_CPU) {
-		return exc_handler_get(intno);
-	}
-
-	return NULL;
-}
-#endif /* EMBARC_OVERRIDE_ARC_INTERRUPT_MANAGEMENT */
diff --git a/hw/mcu/arc/src/ext/sdk/arc/arc_timer.c b/hw/mcu/arc/src/ext/sdk/arc/arc_timer.c
deleted file mode 100644
index 3d0c4b4f8..000000000
--- a/hw/mcu/arc/src/ext/sdk/arc/arc_timer.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-15
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-
-/**
- * \file
- * \ingroup	ARC_HAL_MISC_TIMER
- * \brief  implementation of internal timer related functions
- * \todo RTC support should be improved if RTC is enabled
- */
-#include "inc/arc/arc_timer.h"
-#include "inc/arc/arc.h"
-#include "inc/arc/arc_builtin.h"
-
-/**
- * \brief  check whether the specific timer present
- * \param[in] no timer number
- * \retval 1 present
- * \retval 0 not present
- */
-int32_t arc_timer_present(const uint32_t no)
-{
-	uint32_t bcr = _arc_aux_read(AUX_BCR_TIMERS);
-	switch (no) {
-		case TIMER_0:
-			bcr = (bcr >> 8) & 1;
-			break;
-		case TIMER_1:
-			bcr = (bcr >> 9) & 1;
-			break;
-		case TIMER_RTC:
-			bcr = (bcr >> 10) & 1;
-			break;
-		default:
-			bcr = 0;
-			/* illegal argument so return false */
-			break;
-		}
-
-	return (int)bcr;
-}
-
-/**
- * \brief  start the specific timer
- * \param[in] no	timer number
- * \param[in] mode	timer mode
- * \param[in] val	timer limit value (not for RTC)
- * \return 0 success, -1 failure
- */
-int32_t arc_timer_start(const uint32_t no, const uint32_t mode, const uint32_t val)
-{
-	if (arc_timer_present(no) == 0) {
-		return -1;
-	}
-
-	switch (no) {
-		case TIMER_0:
-			_arc_aux_write(AUX_TIMER0_CTRL, 0);
-			_arc_aux_write(AUX_TIMER0_LIMIT, val);
-			_arc_aux_write(AUX_TIMER0_CTRL, mode);
-			_arc_aux_write(AUX_TIMER0_CNT, 0);
-			break;
-		case TIMER_1:
-			_arc_aux_write(AUX_TIMER1_CTRL, 0);
-			_arc_aux_write(AUX_TIMER1_LIMIT, val);
-			_arc_aux_write(AUX_TIMER1_CTRL, mode);
-			_arc_aux_write(AUX_TIMER1_CNT, 0);
-			break;
-		case TIMER_RTC:
-			_arc_aux_write(AUX_RTC_CTRL, mode);
-			break;
-		default:
-			return -1;
-	}
-
-	return 0;
-}
-
-/**
- * \brief  stop and clear the specific timer
- *
- * \param[in] no timer number
- * \return 0 success, -1 failure
- */
-int32_t arc_timer_stop(const uint32_t no)
-{
-	if (arc_timer_present(no) == 0) {
-		return -1;
-	}
-
-	switch (no) {
-		case TIMER_0 :
-			_arc_aux_write(AUX_TIMER0_CTRL, 0);
-			_arc_aux_write(AUX_TIMER0_LIMIT,0);
-			_arc_aux_write(AUX_TIMER0_CNT, 0);
-			break;
-		case TIMER_1:
-			_arc_aux_write(AUX_TIMER1_CTRL, 0);
-			_arc_aux_write(AUX_TIMER1_LIMIT,0);
-			_arc_aux_write(AUX_TIMER1_CNT, 0);
-			break;
-		case TIMER_RTC:
-			_arc_aux_write(AUX_RTC_CTRL, TIMER_RTC_CLEAR);
-			break;
-		default:
-			return -1;
-	}
-
-	return 0;
-}
-
-/**
- * \brief  get timer current tick
- *
- * \param[in] no timer number
- * \param[out] val, timer value
- * \return 0 success, -1 failure
- */
-int32_t arc_timer_current(const uint32_t no, void *val)
-{
-	if (arc_timer_present(no) == 0) {
-		return -1;
-	}
-
-	switch (no) {
-		case TIMER_0 :
-			*((uint32_t *)val) = _arc_aux_read(AUX_TIMER0_CNT);
-			break;
-		case TIMER_1 :
-			*((uint32_t *)val) = _arc_aux_read(AUX_TIMER1_CNT);
-			break;
-		case TIMER_RTC:
-			*((uint64_t *)val) = _arc_aux_read(AUX_RTC_LOW);
-			break;
-		default :
-			return -1;
-	}
-
-	return 0;
-}
-
-/**
- * \brief  clear the interrupt pending bit of timer
- *
- * \param[in] no timer number
- * \return 0 success, -1 failure
- */
-int32_t arc_timer_int_clear(const uint32_t no)
-{
-	uint32_t val;
-
-	if (arc_timer_present(no) == 0) {
-		return -1;
-	}
-
-	switch (no) {
-		case TIMER_0 :
-			val = _arc_aux_read(AUX_TIMER0_CTRL);
-			val &= ~TIMER_CTRL_IP;
-			_arc_aux_write(AUX_TIMER0_CTRL, val);
-			break;
-		case TIMER_1 :
-			val = _arc_aux_read(AUX_TIMER1_CTRL);
-			val &= ~TIMER_CTRL_IP;
-			_arc_aux_write(AUX_TIMER1_CTRL, val);
-			break;
-		default :
-			return -1;
-	}
-
-	return 0;
-}
-
-/**
- * \brief  init internal timer
- */
-void arc_timer_init(void)
-{
-	arc_timer_stop(TIMER_0);
-	arc_timer_stop(TIMER_1);
-	arc_timer_stop(TIMER_RTC);
-}
diff --git a/hw/mcu/arc/src/ext/sdk/arc/startup/arc_cxx_support.c b/hw/mcu/arc/src/ext/sdk/arc/startup/arc_cxx_support.c
deleted file mode 100644
index af842fddc..000000000
--- a/hw/mcu/arc/src/ext/sdk/arc/startup/arc_cxx_support.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (c) 2012-2014 Wind River Systems, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* ------------------------------------------
- * Copyright (c) 2015, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2016-03-02
- * \author Wayne Ren(wei.ren@synopsys.com)
---------------------------------------------- */
-#include "embARC_BSP_config.h"
-#if defined(__GNU__)
-/* embARC's GNU C++ support takes reference from Zephyr (cpp_xxx.c) */
-
-/**
- * @file - Constructor module
- * @brief
- * The ctors section contains a list of function pointers that execute the
- * C++ constructors of static global objects. These must be executed before
- * the application's main() routine.
- *
- * NOTE: Not all compilers put those function pointers into the ctors section;
- * some put them into the init_array section instead.
- */
-
-/* What a constructor function pointer looks like */
-
-typedef void (*CtorFuncPtr)(void);
-
-/* Constructor function pointer list is generated by the linker script. */
-
-extern CtorFuncPtr __CTOR_LIST__[];
-extern CtorFuncPtr __CTOR_END__[];
-
-/**
- *
- * @brief Invoke all C++ style global object constructors
- *
- * This routine is invoked before the execution of the
- * application's main().
- */
-void __do_global_ctors_aux(void)
-{
-	unsigned int nCtors;
-
-	nCtors = (unsigned int)__CTOR_LIST__[0];
-
-	while (nCtors >= 1) {
-		__CTOR_LIST__[nCtors--]();
-	}
-}
-
-typedef void (*DtorFuncPtr)(void);
-
-extern DtorFuncPtr __DTOR_LIST__[];
-extern DtorFuncPtr __DTOR_END__[];
-
-/**
- *
- * @brief Invoke all C++ style global object destructors
- *
- * This routine is invoked after the execution of the
- * application's main().
- */
-void __do_global_dtors_aux(void)
-{
-	unsigned int nDtors;
-	unsigned int i;
-
-	nDtors = (unsigned int)__DTOR_LIST__[0];
-	i = 0;
-
-	while (i <= nDtors) {
-		__DTOR_LIST__[i++]();
-	}
-}
-
-void *__dso_handle = 0;
-
-/**
- * @brief Register destructor for a global object
- *
- * @param destructor the global object destructor function
- * @param objptr global object pointer
- * @param dso Dynamic Shared Object handle for shared libraries
- *
- * Function does nothing at the moment, assuming the global objects
- * do not need to be deleted
- *
- * @return N/A
- */
-int __cxa_atexit(void (*destructor)(void *), void *objptr, void *dso)
-{
-	return 0;
-}
-
-typedef void (*func_ptr)(void);
-
-extern func_ptr __init_array_start[0];
-extern func_ptr __init_array_end[0];
-
-/**
- * @brief Execute initialization routines referenced in .init_array section
- *
- * @return N/A
- */
-void __do_init_array_aux(void)
-{
-	for (func_ptr *func = __init_array_start;
-		func < __init_array_end;
-		func++) {
-		(*func)();
-	}
-}
-
-/**
- * @brief Stub for pure virtual functions
- *
- * This routine is needed for linking C++ code that uses pure virtual
- * functions.
- *
- * @return N/A
- */
-void __cxa_pure_virtual(void)
-{
-	while (1) {
-		;
-	}
-}
-#endif
diff --git a/hw/mcu/arc/src/ext/sdk/arc/startup/arc_startup.S b/hw/mcu/arc/src/ext/sdk/arc/startup/arc_startup.S
deleted file mode 100644
index 00092d3e1..000000000
--- a/hw/mcu/arc/src/ext/sdk/arc/startup/arc_startup.S
+++ /dev/null
@@ -1,266 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-15
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-
-/**
- * \file
- * \ingroup ARC_HAL_STARTUP
- * \brief assembly part of startup process
- */
-
-/**
- * \addtogroup ARC_HAL_STARTUP
- * @{
- */
-/** @cond STARTUP_ASM */
-
-#define __ASSEMBLY__
-#include "embARC_BSP_config.h"
-#include "inc/arc/arc.h"
-
-	.file "arc_startup.S"
-
-.weak	_f_sdata		/* start of small data, defined in link script */
-.weak	init_hardware_hook	/* app hardware init hook */
-.weak	init_software_hook	/* app software init hook */
-
-.extern	board_main
-.extern exc_entry_table
-
-/* initial vector table */
-	.section .init_vector, "a"
-	.long _arc_reset
-	.section .init_bootstrap, "ax"
-	.global _arc_reset
-	.global _start
-	.align 4
-_start:
-_arc_reset:
-_arc_reset_stage1:
-	kflag	STATUS32_RESET_VALUE
-
-/* STAGE 1 */
-
-/* necessary hardware should be done first to speed up initialization
-	1. system clk
-	2. mem controller must be initialized before any access to external
-	mem.
-	3. others
-*/
-_arc_cache_init_start:
-	lr	r0, [AUX_BCR_D_CACHE]
-	cmp	r0, 2
-	/* invalidate dcache */
-	jle	_arc_icache_init
-	mov	r0, 1
-	sr	r0, [AUX_DC_IVDC]
-	sr	r0, [AUX_DC_CTRL]
-_arc_icache_init:
-	lr	r0, [AUX_BCR_I_CACHE]
-	cmp	r0, 2
-	jle	_arc_cache_init_end
-	/* invalidate icache */
-	mov	r0, 1
-	sr	r0, [AUX_IC_IVIC]
-	nop_s
-	nop_s
-	nop_s
-	sr	r0, [AUX_IC_CTRL]
-
-_arc_cache_init_end:
-	mov	r0, init_hardware_hook
-	cmp	r0, 0
-	jlne	[r0]
-
-/* STAGE 2: init necessary registers */
-
-_arc_reset_stage2:
-	mov	r0, 0
-
-/* interrupt related init */
-	sr	r0, [AUX_IRQ_ACT]
-	sr	r0, [AUX_IRQ_CTRL]
-	sr	r0, [AUX_IRQ_HINT]
-
-/* use the new vector table to replace the old one */
-#if defined(ARC_FEATURE_SEC_PRESENT) && (SECURESHIELD_VERSION < 2)
-	sr	exc_entry_table, [AUX_INT_VECT_BASE_S]
-#else
-	sr	exc_entry_table, [AUX_INT_VECT_BASE]
-#endif
-
-/* init stack */
-#if ARC_FEATURE_RGF_BANKED_REGS >= 16 && ARC_FEATURE_RGF_BANKED_REGS > 1 && ARC_FEATURE_FIRQ == 1
-#if _STACKSIZE < 512
-#error "not enough stack size for irq and firq"
-#endif
-
-/* switch to register bank1 */
-	lr      r0, [AUX_STATUS32]
-	bic     r0, r0, 0x70000
-	or      r0, r0, 0x10000
-	kflag   r0
-/* set sp, gp, fp in bank1 */
-	mov     sp, _e_stack
-	mov     gp, _f_sdata
-	mov     fp, 0
-/* come back to bank0 */
-	lr      r0, [AUX_STATUS32]
-	bic     r0, r0, 0x70000
-	kflag   r0
-	mov	sp, _e_stack-256
-#else
-	mov	sp, _e_stack	/* init stack pointer */
-#endif
-	mov	gp, _f_sdata	/* init small-data base register */
-	mov	fp, 0		/* init fp register */
-
-_arc_reset_stage3:
-_s3_copy_text:
-	mov	r0, _f_text
-	mov	r1, _load_addr_text
-	cmp	r0, r1
-
-/* if load addr == run addr, no need to copy */
-	jeq	_s3_copy_rodata
-	mov	r3, _e_text
-_s3_copy_text_loop:
-	ld.ab	r2, [r1, 4]
-	st.ab	r2, [r0, 4]
-	cmp	r0, r3
-	jlt	_s3_copy_text_loop
-_s3_copy_rodata:
-	mov	r0, _f_rodata
-	mov	r1, _load_addr_rodata
-	cmp	r0, r1
-
-/* if load addr == run addr, no need to copy */
-	jeq	_s3_copy_data
-	mov	r3, _e_rodata
-_s3_copy_rodata_loop:
-	ld.ab	r2, [r1, 4]
-	st.ab	r2, [r0, 4]
-	cmp	r0, r3
-	jlt	_s3_copy_rodata_loop
-_s3_copy_data:
-	mov	r0, _f_data
-	mov	r1, _load_addr_data
-	cmp	r0, r1
-	jeq	_s3_clear_bss
-
-/* if load addr == run addr, no need to copy */
-	mov	r3, _e_data
-_s3_copy_data_loop:
-	ld.ab	r2, [r1, 4]
-	st.ab	r2, [r0, 4]
-	cmp	r0, r3
-	jlt	_s3_copy_data_loop
-_s3_clear_bss:
-	mov	r0, _f_bss
-	mov	r1, _e_bss
-	cmp	r0, r1
-	jge	_arc_reset_call_main
-	mov	r2, 0
-_s3_clear_bss_loop:
-	st.ab	r2, [r0, 4]
-	cmp	r0, r1
-	jlt	_s3_clear_bss_loop
-
-/* STAGE 3: go to main */
-
-_arc_reset_call_main:
-
-/* \todo add cpp init here */
-	mov	r0, init_software_hook
-	cmp	r0, 0
-	jlne	[r0]
-/* board level library init */
-#ifdef	LIB_SECURESHIELD
-	jl 	secureshield_start
-#else
-/* early init of interrupt and exception */
-	jl	exc_int_init
-#endif
-/* init cache */
-	jl	arc_cache_init
-#if defined(__MW__)
-	jl	_init
-#elif defined(__GNU__)
-	jl	__do_global_ctors_aux
-	jl	__do_init_array_aux
-#endif
-	jl	board_main	/* board-level main */
-#if defined(__MW__)
-	jl	_fini
-#elif defined(__GNU__)
-	jl	__do_global_dtors_aux
-#endif
-	.global _exit_loop
-	.global _exit_halt
-	.align 4
-_exit_halt:
-_exit_loop:
-	flag	0x1
-	nop
-	nop
-	nop
-	b	_exit_loop
-
-#if defined(__MW__)
-	.global _init, _fini
-	.section ".init",text
-_init:
-	.cfa_bf	_init
-	push	%blink
-	.cfa_push	{%blink}
-
-	.section ".init$999999", text, 1, 2, check_text_align=0
-	pop	%blink
-	.cfa_pop	{%blink}
-	j	[%blink]
-	.cfa_ef
-
-	.section ".fini", text
-_fini:
-	.cfa_bf	_fini
-	push	%blink
-	.cfa_push	{%blink}
-
-	.section ".fini$999999", text, 1, 2, check_text_align=0
-	pop	%blink
-	.cfa_pop	{%blink}
-	j	[%blink]
-	.cfa_ef
-#endif
-/** @endcond */
-
-/** }@*/
diff --git a/hw/mcu/arc/src/ext/sdk/board/board.h b/hw/mcu/arc/src/ext/sdk/board/board.h
deleted file mode 100644
index bfade6dce..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/board.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2017, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2017.03
- * \date 2014-07-03
- * \author Huaqi Fang(Huaqi.Fang@synopsys.com)
---------------------------------------------- */
-/**
- *
- * \file
- * \ingroup	BOARD_COMMON
- * \brief	common board header file
- * \details
- * - This header file will contain board related settings for different boards.
- * - Each board configurations are put in its own header file, like emsk/emsk.h
- * - If you want to change the configuration, you need to go to related header file, e.g.
- *   if you want to change EMSK board settings, you need to go to emsk/emsk.h
- * - In embARC 2015.05, all the settings are in this board.h, but now it moved to related board header file
- */
-
-/**
- * \addtogroup BOARD_COMMON
- * @{
- */
-#ifndef _EMBARC_BOARD_H_
-#define _EMBARC_BOARD_H_
-
-#include "embARC_BSP_config.h"
-/**
- * \todo	add comments and documents to describe the macros
- * \note 	the following macros must use the same name, because
- *	they are used by middleware and other applications
- */
-/** here is a sample of EMSK board resource definitions */
-#ifdef BOARD_EMSK
-#include "board/emsk/emsk.h"
-#endif /* BOARD_EMSK */
-
-/** you can add your board configuration as BOARD_EMSK defined up */
-
-#endif /* _EMBARC_BOARD_H_ */
-
-/** @} end of group BOARD_COMMON */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/common/emsk_init.c b/hw/mcu/arc/src/ext/sdk/board/emsk/common/emsk_init.c
deleted file mode 100644
index 0c12cafeb..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/common/emsk_init.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-31
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-/**
- * \defgroup	BOARD_EMSK_COMMON_INIT	EMSK Common Init Module
- * \ingroup	BOARD_EMSK_COMMON
- * \brief	EMSK Board Common Init Module
- * \details
- * 		EMSK timer/gpio/interrupt init process. Device-driver installation is done while
- *	getting the device object for the first time.
- */
-
-/**
- * \file
- * \ingroup	BOARD_EMSK_COMMON_INIT
- * \brief	common emsk init module
- */
-
-/**
- * \addtogroup	BOARD_EMSK_COMMON_INIT
- * @{
- */
-#include "inc/arc/arc_builtin.h"
-#include "inc/arc/arc.h"
-#include "inc/arc/arc_timer.h"
-
-#include "board/emsk/emsk.h"
-#include "board/emsk/common/emsk_timer.h"
-#include "board/emsk/common/mux.h"
-
-#ifdef ARC_FEATURE_DMP_PERIPHERAL
-#define PERIPHERAL_BASE		ARC_FEATURE_DMP_PERIPHERAL
-#else
-#define PERIPHERAL_BASE		_arc_aux_read(AUX_DMP_PERIPHERAL)
-#endif
-
-/**
- * \brief	emsk-related mux io init
- */
-static void emsk_mux_init(void)
-{
-	MUX_REG *mux_regs;
-
-	mux_regs = (MUX_REG *)(PERIPHERAL_BASE|REL_REGBASE_PINMUX);
-	mux_init(mux_regs);
-
-	/**
-	 * + Please refer to corresponding EMSK User Guide for detailed information
-	 *   -> Appendix: A  Hardware Functional Description
-	 *      -> Pmods Configuration summary
-	 * + Set up pin-multiplexer of all PMOD connections
-	 *   - PM1 J1: Upper row as UART 0, lower row as SPI Slave
-	 *   - PM2 J2: IIC 0 and run/halt signals
-	 *   - PM3 J3: GPIO Port A and Port C
-	 *   - PM4 J4: IIC 1 and Port D
-	 *   - PM5 J5: Upper row as SPI Master, lower row as Port A
-	 *   - PM6 J6: Upper row as SPI Master, lower row as Port A
-	 */
-	set_pmod_mux(mux_regs, PM1_UR_UART_0 | PM1_LR_SPI_S	\
-				| PM2_I2C_HRI			\
-				| PM3_GPIO_AC			\
-				| PM4_I2C_GPIO_D		\
-				| PM5_UR_SPI_M1 | PM5_LR_GPIO_A	\
-				| PM6_UR_SPI_M0 | PM6_LR_GPIO_A );
-
-	/**
-	 * PM1 upper row as UART
-	 * UM4:RXD, UM3:TXD
-	 * UM2:RTS_N, UM1:CTS_N
-	 */
-	set_uart_map(mux_regs, 0x9c);
-}
-
-/**
- * \brief	Board init routine MUST be called in each application
- * \note	It is better to disable interrupts when calling this function
- *	remember to enable interrupt when you want to use them
- */
-void board_init(void)
-{
-	arc_timer_init();
-	emsk_mux_init();
-	emsk_gpio_init();
-	emsk_timer_init();
-}
-
-/** @} end of group BOARD_EMSK_COMMON_INIT */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/common/emsk_timer.c b/hw/mcu/arc/src/ext/sdk/board/emsk/common/emsk_timer.c
deleted file mode 100644
index e61c3b8a1..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/common/emsk_timer.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-31
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-/**
- * \defgroup	BOARD_EMSK_COMMON_TIMER	EMSK Common Timer Module
- * \ingroup	BOARD_EMSK_COMMON
- * \brief	provide basic board timer-related functions
- * \details
- * 		Provide a 1 MS (default) timer interrupt,
- *	provide a 64-bit counter value (no clear) count in the timer interrupt,
- *	provide MS-precision delay, with OS enabled-support delay
- */
-
-/**
- * \file
- * \ingroup	BOARD_EMSK_COMMON_TIMER
- * \brief	provide emsk board timer-related functions
- */
-
-/**
- * \addtogroup	BOARD_EMSK_COMMON_TIMER
- * @{
- */
-#include "inc/arc/arc_builtin.h"
-#include "inc/arc/arc.h"
-#include "inc/arc/arc_timer.h"
-#include "inc/arc/arc_exception.h"
-
-#include "board/emsk/emsk.h"
-
-#define MAX_SYS_COUNTER_VALUE		(0xffffffff)
-
-#ifndef BOARD_SYS_TIMER_HZ
-#define BOARD_SYS_TIMER_HZ		(1000)
-#endif
-
-/** emsk board timer interrupt reset count */
-static uint32_t cyc_hz_count = (BOARD_CPU_CLOCK / BOARD_SYS_TIMER_HZ);
-
-/** emsk board timer counter in timer interrupt */
-volatile uint64_t gl_emsk_sys_hz_cnt = 0;
-/** emsk board 1ms counter */
-volatile uint32_t gl_emsk_ms_cnt = 0;
-
-#define HZ_COUNT_CONV(precision, base)	((precision)/(base))
-
-/**
- * \brief	Update timer counter and other MS period operation
- * 	in cycling interrupt and must be called periodically. When the OS timer
- *	interrupt is in conflict with the bare-metal timer interrupt,
- *	put this function into the OS timer interrupt
- * \param[in]	precision	interrupt-period precision in Hz
- */
-void board_timer_update(uint32_t precision)
-{
-	static uint32_t sys_hz_update = 0;
-	static uint32_t sys_ms_update = 0;
-	uint32_t hz_conv = 0;
-
-	/** count sys hz */
-	hz_conv = HZ_COUNT_CONV(precision, BOARD_SYS_TIMER_HZ);
-	sys_hz_update ++;
-	if (sys_hz_update >= hz_conv) {
-		sys_hz_update = 0;
-		gl_emsk_sys_hz_cnt ++;
-	}
-
-	/** count ms */
-	hz_conv = HZ_COUNT_CONV(precision, BOARD_SYS_TIMER_MS_HZ);
-	sys_ms_update ++;
-	if (sys_ms_update >= hz_conv) {
-		sys_ms_update = 0;
-		gl_emsk_ms_cnt ++;
-	}
-}
-
-/**
- * \brief	emsk bare-metal timer interrupt.
- * 	the Interrupt frequency is based on the defined \ref BOARD_SYS_TIMER_HZ
- */
-static void emsk_timer_isr(void *ptr)
-{
-	arc_timer_int_clear(BOARD_SYS_TIMER_ID);
-
-	board_timer_update(BOARD_SYS_TIMER_HZ);
-}
-
-/**
- * \brief	init bare-metal emsk board timer and interrupt
- * \details
- * 		This function is called in \ref board_init, and
- * 	it initializes the 1-MS timer interrupt for bare-metal mode
- */
-void emsk_timer_init(void)
-{
-	if (arc_timer_present(BOARD_SYS_TIMER_ID)) {
-		int_disable(BOARD_SYS_TIMER_INTNO); /* disable first then enable */
-		int_handler_install(BOARD_SYS_TIMER_INTNO, emsk_timer_isr);
-		arc_timer_start(BOARD_SYS_TIMER_ID, TIMER_CTRL_IE|TIMER_CTRL_NH, cyc_hz_count);  /* start 1ms timer interrupt */
-
-		int_enable(BOARD_SYS_TIMER_INTNO);
-	}
-}
-
-/**
- * \brief	get current cpu hardware ticks
- * \retval	hardware ticks count in 64 bit format
- */
-uint64_t board_get_hwticks(void)
-{
-	uint32_t sub_ticks;
-	uint64_t total_ticks;
-	arc_timer_current(TIMER_0, &sub_ticks);
-
-	total_ticks = (uint64_t)OSP_GET_CUR_MS() * (BOARD_CPU_CLOCK/BOARD_SYS_TIMER_HZ);
-	total_ticks += (uint64_t)sub_ticks;
-
-	return total_ticks;
-}
-
-/**
- * \brief	get current passed us since timer init
- * \retval	us count in 64 bit format
- */
-uint64_t board_get_cur_us(void)
-{
-	uint32_t sub_us;
-	uint64_t total_us;
-	arc_timer_current(TIMER_0, &sub_us);
-
-	sub_us = ((uint64_t)sub_us * 1000000) / BOARD_CPU_CLOCK;
-	total_us = ((uint64_t)OSP_GET_CUR_MS()) * 1000 + (uint64_t)sub_us;
-
-	return total_us;
-}
-
-/**
- * \brief	provide MS delay function
- * \details
- * 		this function needs a 1-MS timer interrupt to work.
- * 	For bare-metal, it is implemented in this file.
- * 	For OS, you must call \ref board_timer_update in
- * 	the OS 1-MS timer interrupt when the bare-metal timer interrupt
- * 	is not ready
- * \param[in]	ms		MS to delay
- * \param[in]	os_compat	Enable or disable
- *	When this delay is enabled, use the OS delay function, if one is provided.
- *	See \ref OSP_DELAY_OS_COMPAT_ENABLE and
- *	\ref OSP_DELAY_OS_COMPAT_DISABLE
- */
-void board_delay_ms(uint32_t ms, uint8_t os_compat)
-{
-	uint64_t start_us, us_delayed;
-
-	us_delayed = ((uint64_t)ms * 1000);
-	start_us = board_get_cur_us();
-	while ((board_get_cur_us() - start_us) < us_delayed);
-}
-
-/** @} end of group BOARD_EMSK_COMMON_TIMER */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/common/emsk_timer.h b/hw/mcu/arc/src/ext/sdk/board/emsk/common/emsk_timer.h
deleted file mode 100644
index 5e86a3c6a..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/common/emsk_timer.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-31
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-/**
- * \file
- * \ingroup	BOARD_EMSK_COMMON_TIMER
- * \brief	emsk timer functions header
- */
-
-/**
- * \addtogroup BOARD_EMSK_COMMON_TIMER
- * @{
- */
-#ifndef _EMSK_TIMER_
-#define _EMSK_TIMER_
-
-#include "inc/embARC_toolchain.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern volatile uint64_t gl_emsk_sys_hz_cnt;
-extern volatile uint32_t gl_emsk_ms_cnt;
-
-extern void emsk_timer_init(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _EMSK_TIMER_ */
-
-/** @} end of group BOARD_EMSK_COMMON_TIMER */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/common/mux.c b/hw/mcu/arc/src/ext/sdk/board/emsk/common/mux.c
deleted file mode 100644
index 4cec2754e..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/common/mux.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-07
- * \author Huaqi Fang(Huaqi.Fang@synopsys.com)
---------------------------------------------- */
-/**
- * \defgroup	BOARD_EMSK_DRV_MUX	EMSK Mux Driver
- * \ingroup	BOARD_EMSK_DRIVER
- * \brief	EMSK Mux Controller Driver
- * \details
- *		Mux controller is the hardware external PMOD port pin connection
- *	controller, it can distribute the external port pins into different
- *	functions like general input/output, spi, iic, uart and so on.
- */
-
-/**
- * \file
- * \ingroup	BOARD_EMSK_DRV_MUX
- * \brief	emsk mux controller driver
- */
-
-/**
- * \addtogroup	BOARD_EMSK_DRV_MUX
- * @{
- */
-#include "board/emsk/common/mux_hal.h"
-#include "board/emsk/common/mux.h"
-
-static MUX_REG *mux_ctrl_regs = (MUX_REG *)0;
-
-/** initialize i2c controller and set slave device address */
-void mux_init(MUX_REG *mux_regs)
-{
-	// Initialize Mux controller registers by default values
-	mux_regs[PMOD_MUX_CTRL] = PMOD_MUX_CTRL_DEFAULT;
-	mux_regs[SPI_MAP_CTRL] =  SPI_MAP_CTRL_DEFAULT;
-	mux_regs[UART_MAP_CTRL] = UART_MAP_CTRL_DEFAULT;
-	mux_ctrl_regs = mux_regs;
-}
-
-/** Get mux ctrl register pointer, only valid after mux_init */
-MUX_REG *get_mux_regs(void)
-{
-	return mux_ctrl_regs;
-}
-
-/** set PMOD muxer scheme */
-void set_pmod_mux(MUX_REG *mux_regs, uint32_t val)
-{
-	mux_regs[PMOD_MUX_CTRL] = val;
-}
-
-/** get PMOD muxer scheme */
-uint32_t get_pmod_mux(MUX_REG *mux_regs)
-{
-	return (uint32_t) mux_regs[PMOD_MUX_CTRL];
-}
-
-/** set PMOD muxer scheme */
-void change_pmod_mux(MUX_REG *mux_regs, uint32_t val, uint32_t change_bits)
-{
-	mux_regs[PMOD_MUX_CTRL] = ((mux_regs[PMOD_MUX_CTRL] & ~change_bits) | val);
-}
-
-/** set SPI connection scheme */
-void set_spi_map(MUX_REG *mux_regs, uint32_t val)
-{
-	mux_regs[SPI_MAP_CTRL] = val;
-}
-
-/** get SPI connection scheme */
-uint32_t get_spi_map(MUX_REG *mux_regs)
-{
-	return (uint32_t) mux_regs[SPI_MAP_CTRL];
-}
-
-/** set UART connection scheme */
-void set_uart_map(MUX_REG *mux_regs, uint32_t val)
-{
-	mux_regs[UART_MAP_CTRL] = val;
-}
-
-/** get UART connection scheme */
-uint32_t get_uart_map(MUX_REG *mux_regs)
-{
-	return (uint32_t) mux_regs[UART_MAP_CTRL];
-}
-/** @} end of group BOARD_EMSK_DRV_MUX */
-
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/common/mux.h b/hw/mcu/arc/src/ext/sdk/board/emsk/common/mux.h
deleted file mode 100644
index 3e3101e92..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/common/mux.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-07
- * \author Huaqi Fang(Huaqi.Fang@synopsys.com)
---------------------------------------------- */
-/**
- * \file
- * \ingroup	BOARD_EMSK_DRV_MUX
- * \brief	header file of emsk mux controller driver
- */
-
-/**
- * \addtogroup	BOARD_EMSK_DRV_MUX
- * @{
- */
-#ifndef _MUX_H_
-#define _MUX_H_
-
-#include "inc/embARC_toolchain.h"
-
-#define BIT0			(0)
-#define BIT1			(1)
-#define BIT2			(2)
-#define BIT3			(3)
-#define PM1_OFFSET		(0)
-#define PM2_OFFSET		(4)
-#define PM3_OFFSET		(8)
-#define PM4_OFFSET		(12)
-#define PM5_OFFSET		(16)
-#define PM6_OFFSET		(20)
-#define PM7_OFFSET		(24)
-
-#define PM1_MASK		(0xf << PM1_OFFSET)
-#define PM2_MASK		(0xf << PM2_OFFSET)
-#define PM3_MASK		(0xf << PM3_OFFSET)
-#define PM4_MASK		(0xf << PM4_OFFSET)
-#define PM5_MASK		(0xf << PM5_OFFSET)
-#define PM6_MASK		(0xf << PM6_OFFSET)
-#define PM7_MASK		(0xf << PM7_OFFSET)
-
-
-#define SPI_MAP_NORMAL		(0)
-#define SPI_MAP_LOOPBACK	(1)
-
-#define UART_MAP_TYPE4		(0xE4)
-#define UART_MAP_TYPE3		(0x6C)
-
-/**
- * \name	Default pin muxer settings
- * @{
- */
-#define PMOD_MUX_CTRL_DEFAULT	(0)			/*!< all pins are configured as GPIO inputs */
-#define SPI_MAP_CTRL_DEFAULT	(SPI_MAP_NORMAL)	/*!< normal SPI mode */
-#define UART_MAP_CTRL_DEFAULT	(UART_MAP_TYPE4)	/*!< TYPE4 PMOD compatible */
-/** @} end of name */
-
-/**
- * \name	PMOD 1 Multiplexor
- * @{
- */
-#define PM1_UR_GPIO_C		((0 << BIT0) << PM1_OFFSET)	/*!< Pmod1[4:1] are connected to DW GPIO Port C[11:8] */
-#define PM1_UR_UART_0		((1 << BIT0) << PM1_OFFSET)	/*!< Pmod1[4:1] are connected to DW UART0 signals */
-
-#define PM1_LR_GPIO_A		((0 << BIT2) << PM1_OFFSET)	/*!< Pmod1[10:7] are connected to DW GPIO Port A[11:8] */
-#define PM1_LR_SPI_S		((1 << BIT2) << PM1_OFFSET)	/*!< Pmod1[10:7] are connected to DW SPI Slave signals */
-/** @} end of name */
-
-
-/**
- * \name	PMOD 2 Multiplexor
- * @{
- */
-#define PM2_GPIO_AC		((0 << BIT0) << PM2_OFFSET)	/*!< Pmod2[4:1]	 are connected to DW GPIO Port C[15:12],
-									Pmod2[10:7] are connected to DW GPIO Port A[15:12]  */
-
-#define PM2_I2C_HRI		((1 << BIT0) << PM2_OFFSET)	/*!< connect I2C to Pmod2[4:1] and halt/run interface to Pmod2[10:7] */
-/** @} end of name */
-
-
-/**
- * \name	PMOD 3 Multiplexor
- * @{
- */
-#define PM3_GPIO_AC		((0 << BIT0) << PM3_OFFSET)	/*!< Pmod3[4:1]  are connected to DW GPIO Port C[19:16],
-									Pmod3[10:7] are connected to DW GPIO Port A[19:16]  */
-
-#define PM3_I2C_GPIO_D		((1 << BIT0) << PM3_OFFSET)	/*!< Pmod3[4:3]  are connected to DW I2C signals,
-									Pmod3[2:1]  are connected to DW GPIO Port D[1:0],
-									Pmod3[10:7] are connected to DW GPIO Port D[3:2] */
-/** @} end of name */
-
-
-/**
- * \name	PMOD 4 Multiplexor
- * @{
- */
-#define PM4_GPIO_AC		((0 << BIT0) << PM4_OFFSET)	/*!< Pmod4[4:1]  are connected to DW GPIO Port C[23:20],
-									Pmod4[10:7] are connected to DW GPIO Port A[23:20] */
-
-#define PM4_I2C_GPIO_D		((1 << BIT0) << PM4_OFFSET)	/*!< Pmod4[4:3]  are connected to DW I2C signals,
-									Pmod4[2:1]  are connected to DW GPIO Port D[5:4],
-									Pmod4[10:7] are connected to DW GPIO Port D[7:6] */
-/** @} end of name */
-
-/**
- * \name	PMOD 5 Multiplexor
- * @{
- */
-#define PM5_UR_GPIO_C		((0 << BIT0) << PM5_OFFSET)	/*!< Pmod5[4:1] are connected to DW GPIO Port C[27:24] */
-#define PM5_UR_SPI_M1		((1 << BIT0) << PM5_OFFSET)	/*!< Pmod5[4:1] are connected to DW SPI Master signals using CS1_N */
-
-#define PM5_LR_GPIO_A		((0 << BIT2) << PM5_OFFSET)	/*!< Pmod5[10:7] are connected to DW GPIO Port A[27:24] */
-#define PM5_LR_SPI_M2		((1 << BIT2) << PM5_OFFSET)	/*!< Pmod5[10:7] are connected to DW SPI Master signals using CS2_N */
-/** @} end of name */
-
-
-/**
- * \name	PMOD 6 Multiplexor
- * @{
- */
-#define PM6_UR_GPIO_C		((0 << BIT0) << PM6_OFFSET)	/*!< Pmod6[4:1] are connected to DW GPIO Port C[31:28] */
-#define PM6_UR_SPI_M0		((1 << BIT0) << PM6_OFFSET)	/*!< Pmod6[4:1] are connected to DW SPI Master signals using CS0_N */
-
-#define PM6_LR_GPIO_A		((0 << BIT2) << PM6_OFFSET)	/*!< Pmod6[10:7] are connected to DW GPIO Port A[31:28] */
-
-#define PM6_LR_CSS_STAT 	((1 << BIT2) << PM6_OFFSET)	/*!< Pmod6[8:7] are connected to the DW SPI Master chip select signals CS1_N and CS2_N,
-									Pmod6[6:5] are connected to the ARC EM halt and sleep status signals */
-/** @} end of name */
-
-/**
- * \name	PMOD 7 Multiplexor
- * @{
- */
-#define PM7_GPIO_D		((0 << BIT0) << PM7_OFFSET)	/*!< Pmod7[4:1] are connected to DW GPIO Port D[11:8] */
-#define PM7_STAT		((1 << BIT0) << PM7_OFFSET)	/*!< Pmod7[4:1] are connected to the ARC EM sleep status signals */
-/** @} end of name */
-typedef volatile uint32_t MUX_REG;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern void mux_init(MUX_REG *mux_regs);
-extern MUX_REG *get_mux_regs(void);
-extern void set_pmod_mux(MUX_REG *mux_regs, uint32_t val);
-extern uint32_t get_pmod_mux(MUX_REG *mux_regs);
-extern void change_pmod_mux(MUX_REG *mux_regs, uint32_t val, uint32_t change_bits);
-extern void set_spi_map(MUX_REG *mux_regs, uint32_t val);
-extern uint32_t get_spi_map(MUX_REG *mux_regs);
-extern void set_uart_map(MUX_REG *mux_regs, uint32_t val);
-extern uint32_t get_uart_map(MUX_REG *mux_regs);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _MUX_H_ */
-
-/** @} end of group BOARD_EMSK_DRV_MUX */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/common/mux_hal.h b/hw/mcu/arc/src/ext/sdk/board/emsk/common/mux_hal.h
deleted file mode 100644
index bee2068bf..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/common/mux_hal.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-07
- * \author Huaqi Fang(Huaqi.Fang@synopsys.com)
---------------------------------------------- */
-
-/**
- * \file
- * \ingroup	BOARD_EMSK_DRV_MUX
- * \brief	emsk mux control register index header
- */
-
-/**
- * \addtogroup	BOARD_EMSK_DRV_MUX
- * @{
- */
-#ifndef _MUX_HAL_H_
-#define _MUX_HAL_H_
-
-/**
- * \name	Mux Control Register Index
- * @{
- */
-#define PMOD_MUX_CTRL	0	/*!< 32-bits, offset 0x0,
-					This register controls mapping of the peripheral device signals on Pmod connectors */
-
-#define I2C_MAP_CTRL	1	/*!< 32-bits, offset 0x4 */
-
-#define SPI_MAP_CTRL	2	/*!< 32-bits, offset 0x8,
-					SPI_MAP_CTRL[0] selects the mode of operation of the SPI Slave:
-					- Normal operation, SPI_MAP_CTRL[0]=0: SPI Slave is connected to Pmod1 at connector J1.
-					- Loop-back mode, SPI_MAP_CTRL[0]=1: SPI Slave is connected to the SPI Master inside the FPGA using CS4.
-							 */
-
-#define UART_MAP_CTRL	3	/*!< 32-bits, offset 0x8,
-					This register controls the mapping of the UART signals on the Pmod1 connector. */
-/** @} end of name */
-
-
-#endif	/* _MUX_HAL_H_ */
-
-/** @} end of group BOARD_EMSK_DRV_MUX */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/emsk.h b/hw/mcu/arc/src/ext/sdk/board/emsk/emsk.h
deleted file mode 100644
index 570408da7..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/emsk.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-06-18
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-/**
- *
- * \file
- * \ingroup	BOARD_EMSK_COMMON_INIT
- * \brief	emsk resource definitions
- */
-
-/**
- * \addtogroup BOARD_EMSK_COMMON_INIT
- * @{
- */
-#ifndef _EMSK_H_
-#define _EMSK_H_
-
-#include "inc/arc/arc_em.h"
-
-#include "board/emsk/uart/dw_uart_obj.h"
-#include "board/emsk/gpio/dw_gpio_obj.h"
-#include "board/emsk/gpio/emsk_gpio.h"
-#include "board/emsk/iic/dw_iic_obj.h"
-#include "board/emsk/spi/dw_spi_obj.h"
-
-#include "board/emsk/common/emsk_timer.h"
-
-#include "board/emsk/emsk_hardware.h"
-
-#define EMSK_GPIO_PORT_A		DW_GPIO_PORT_A
-#define EMSK_GPIO_PORT_B		DW_GPIO_PORT_B
-#define EMSK_GPIO_PORT_C		DW_GPIO_PORT_C
-#define EMSK_GPIO_PORT_D		DW_GPIO_PORT_D
-
-/* common macros must be defined by all boards */
-
-#define BOARD_CONSOLE_UART_ID		DW_UART_1_ID
-#define BOARD_CONSOLE_UART_BAUD		UART_BAUDRATE_115200
-#define BOARD_ADC_IIC_ID		DW_IIC_0_ID
-#define BOARD_TEMP_SENSOR_IIC_ID	DW_IIC_0_ID
-
-#define BOARD_TEMP_IIC_SLVADDR		TEMP_I2C_SLAVE_ADDRESS
-
-#ifndef BOARD_SPI_FREQ
-#define BOARD_SPI_FREQ			(1000000)
-#endif
-
-#ifndef BOARD_SPI_CLKMODE
-#define BOARD_SPI_CLKMODE		(SPI_CLK_MODE_0)
-#endif
-
-#define BOARD_SYS_TIMER_ID		TIMER_0
-#define BOARD_SYS_TIMER_INTNO		INTNO_TIMER0
-#define BOARD_SYS_TIMER_HZ		(1000)
-
-/** board timer count frequency (HZ) */
-#define BOARD_SYS_TIMER_MS_HZ		(1000)
-/** board timer count frequency convention based on the global timer counter */
-#define BOARD_SYS_TIMER_MS_CONV		(BOARD_SYS_TIMER_MS_HZ/BOARD_SYS_TIMER_HZ)
-
-
-#define BOARD_CPU_CLOCK			CLK_CPU
-#define BOARD_DEV_CLOCK			CLK_BUS_APB
-
-#define BOARD_LED_MASK			(0x1ff)
-#define BOARD_LED_CNT			(9)
-#define BOARD_BTN_MASK			(0x7)
-#define BOARD_BTN_CNT			(3)
-#define BOARD_SWT_MASK			(0xf)
-#define BOARD_SWT_CNT			(4)
-
-#define BOARD_ONBOARD_NTSHELL_ID	(EMSK_NTSHELL_0_ID)
-
-#define OSP_DELAY_OS_COMPAT_ENABLE	(1)
-#define OSP_DELAY_OS_COMPAT_DISABLE	(0)
-
-
-#define OSP_GET_CUR_SYSHZ()		(gl_emsk_sys_hz_cnt)
-#define OSP_GET_CUR_MS()		(gl_emsk_ms_cnt)
-#define OSP_GET_CUR_US()		board_get_cur_us()
-#define OSP_GET_CUR_HWTICKS()		board_get_hwticks()
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern void board_init(void);
-extern void board_timer_update(uint32_t precision);
-extern void board_delay_ms(uint32_t ms, uint8_t os_compat);
-extern uint64_t board_get_hwticks(void);
-extern uint64_t board_get_cur_us(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif	/* _EMSK_H_ */
-
-/** @} end of group BOARD_EMSK_COMMON_INIT */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/emsk_hardware.h b/hw/mcu/arc/src/ext/sdk/board/emsk/emsk_hardware.h
deleted file mode 100644
index 9aecc6cd4..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/emsk_hardware.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2015-11-16
- * \author Qiang Gu(Qiang.Gu@synopsys.com)
---------------------------------------------- */
-/**
- *
- * \file
- * \ingroup	BOARD_EMSK_COMMON_INIT
- * \brief	emsk hardware resource definitions
- */
-
-/**
- * \addtogroup BOARD_EMSK_COMMON_INIT
- * @{
- */
-#ifndef _EMSK_HARDWARE_H_
-#define _EMSK_HARDWARE_H_
-
-#include "inc/arc/arc_feature_config.h"
-
-/** CPU Clock Frequency definition */
-#if defined(BOARD_CPU_FREQ)
-	/*!< Get cpu clock frequency definition from build system */
-	#define CLK_CPU			(BOARD_CPU_FREQ)
-#elif defined(ARC_FEATURE_CPU_CLOCK_FREQ)
-	/*!< Get cpu clock frequency definition from tcf file */
-	#define CLK_CPU			(ARC_FEATURE_CPU_CLOCK_FREQ)
-#else
-	/*!< Default cpu clock frequency */
-	#define CLK_CPU			(20000000)
-#endif
-
-/** Peripheral Bus Reference Clock definition */
-#ifdef BOARD_DEV_FREQ
-	/*!< Get peripheral bus reference clock defintion from build system */
-	#define CLK_BUS_APB		(BOARD_DEV_FREQ)
-#else
-	/*!< Default peripheral bus reference clock defintion */
-	#define CLK_BUS_APB		(50000000U)
-#endif
-
-/* Device Register Base Address */
-#define REL_REGBASE_PINMUX		(0x00000000U)		/*!< PINMUX */
-#define REL_REGBASE_SPI_MST_CS_CTRL	(0x00000014U)		/*!< SPI Master Select Ctrl */
-#define REL_REGBASE_GPIO0		(0x00002000U)		/*!< GPIO 0 Onboard */
-#define REL_REGBASE_TIMERS		(0x00003000U)		/*!< DW TIMER */
-#define REL_REGBASE_I2C0		(0x00004000U)		/*!< I2C 0 */
-#define REL_REGBASE_I2C1		(0x00005000U)		/*!< I2C 1 */
-#define REL_REGBASE_SPI0		(0x00006000U)		/*!< SPI Master  */
-#define REL_REGBASE_SPI1		(0x00007000U)		/*!< SPI Slave   */
-#define REL_REGBASE_UART0		(0x00008000U)		/*!< UART0 is connected to PMOD */
-#define REL_REGBASE_UART1		(0x00009000U)		/*!< UART1 is USB-UART�� use UART1 as default */
-#define REL_REGBASE_UART2		(0x0000A000U)		/*!< UART2 */
-#define REL_REGBASE_WDT			(0x0000B000U)		/*!< WDT  */
-// #define REL_REGBASE_I2S_MASTER_IN	(0x0000C000U)		/*!< I2S Master In  */
-// #define REL_REGBASE_I2S_MASTER_OUT	(0x0000D000U)		/*!< I2S Master Out  */
-// #define REL_REGBASE_GMAC		(0x0000E000U)		/*!< GMAC  */
-
-/* Interrupt Connection */
-#define INTNO_TIMER0			16			/*!< ARC Timer0 */
-#define INTNO_TIMER1			17			/*!< ARC Timer1 */
-#define INTNO_SECURE_TIMER0		20			/*!< Core Secure Timer 0 */
-#define INTNO_DMA_START			22			/*!< Core DMA Controller */
-#define INTNO_DMA_COMPLETE		22			/*!< Core DMA Controller Complete */
-#define INTNO_DMA_ERROR			23			/*!< Core DMA Controller Error */
-#define INTNO_GPIO			24			/*!< GPIO controller */
-#define INTNO_I2C0			25			/*!< I2C_0 controller */
-#define INTNO_I2C1			26			/*!< I2C_1 controller */
-#define INTNO_SPI_MASTER		27			/*!< SPI Master controller */
-#define INTNO_SPI_SLAVE			28			/*!< SPI Slave controller */
-#define INTNO_UART0			29			/*!< UART0 */
-#define INTNO_UART1			30			/*!< UART1 */
-#define INTNO_UART2			31			/*!< UART2 */
-#define INTNO_DW_WDT			32			/*!< WDT */
-#define INTNO_DW_TMR0			33			/*!< DW Timer 0 */
-#define INTNO_DW_TMR1			34			/*!< DW Timer 1 */
-// #define INTNO_I2S_Master_In		33			/*!< I2S Master In */
-// #define INTNO_I2S_Master_Out		34			/*!< I2S Master Out */
-// #define INTNO_GMAC			35			/*!< GMAC */
-
-/* SPI Mater Signals Usage */
-#define	EMSK_SPI_LINE_0			0			/*!< CS0 -- Pmod 6 pin1 */
-#define	EMSK_SPI_LINE_1			1			/*!< CS1 -- Pmod 5 pin1 or Pmod 6 pin 7 */
-#define	EMSK_SPI_LINE_2			2			/*!< CS2 -- Pmod 6 pin8 */
-#define	EMSK_SPI_LINE_SDCARD		3			/*!< CS3 -- On-board SD card  */
-#define	EMSK_SPI_LINE_SPISLAVE		4			/*!< CS4 -- Internal SPI slave */
-#define	EMSK_SPI_LINE_SFLASH		5			/*!< CS5 -- On-board SPI Flash memory */
-
-#endif	/* _EMSK_HARDWARE_H_ */
-
-/** @} end of group BOARD_EMSK_COMMON_INIT */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/gpio/dw_gpio_obj.c b/hw/mcu/arc/src/ext/sdk/board/emsk/gpio/dw_gpio_obj.c
deleted file mode 100644
index 6e47948df..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/gpio/dw_gpio_obj.c
+++ /dev/null
@@ -1,379 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-24
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-/**
- * \defgroup	BOARD_EMSK_DRV_DW_GPIO_OBJ	EMSK DW GPIO Object
- * \ingroup	BOARD_EMSK_DRIVER
- * \brief	EMSK Designware GPIO Objects
- * \details
- *		Implement the EMSK board GPIO object using the DesignWare GPIO device driver.
- *	Only need to implement some DesignWare GPIO structures and combine with EMSK GPIO
- *	hardware resources, like in C++ class instantiation.
- *  For example, in C++, define a class called gpio
- *	class gpio {
- *
- *	};
- *	then instantiate the gpio class:
- *	gpio emsk_gpio_a;
- */
-
-/**
- * \file
- * \ingroup	BOARD_EMSK_DRV_DW_GPIO_OBJ
- * \brief	DesignWare GPIO object instantiation on EMSK
- */
-
-/**
- * \addtogroup	BOARD_EMSK_DRV_DW_GPIO_OBJ
- * @{
- */
-#include "inc/arc/arc.h"
-#include "inc/arc/arc_builtin.h"
-
-#include "board/emsk/gpio/dw_gpio_obj.h"
-
-#include "board/emsk/emsk.h"
-/*
- * Uncomment this to enable default
- * gpio bit handler output message
- * by uart
- */
-
-#ifdef ARC_FEATURE_DMP_PERIPHERAL
-#define PERIPHERAL_BASE		ARC_FEATURE_DMP_PERIPHERAL
-#else
-#define PERIPHERAL_BASE		_arc_aux_read(AUX_DMP_PERIPHERAL)
-#endif
-
-#if (USE_DW_GPIO_PORT_A)
-static DEV_GPIO		port_a;
-static DW_GPIO_PORT	dw_gpio_port_a;
-static DEV_GPIO_HANDLER dw_gpio_bit_handler_a[EMSK_GPIO_A_INT_MAX_COUNT];
-static DW_GPIO_BIT_ISR dw_gpio_bit_isr_a = {
-	EMSK_GPIO_A_INT_MAX_COUNT, dw_gpio_bit_handler_a
-};
-
-static int32_t porta_open(uint32_t dir)
-{
-	return dw_gpio_open(&port_a, dir);
-}
-
-static int32_t porta_close(void)
-{
-	return dw_gpio_close(&port_a);
-}
-
-static int32_t porta_control(uint32_t ctrl_cmd, void *param)
-{
-	return dw_gpio_control(&port_a, ctrl_cmd, param);
-}
-
-static int32_t porta_write(uint32_t val, uint32_t mask)
-{
-	return dw_gpio_write(&port_a, val, mask);
-}
-
-static int32_t porta_read(uint32_t *val, uint32_t mask)
-{
-	return dw_gpio_read(&port_a, val, mask);
-}
-
-static void porta_isr(void *ptr)
-{
-	dw_gpio_isr_handler(&port_a, ptr);
-}
-
-static void porta_install(void)
-{
-	uint32_t i;
-	DEV_GPIO_PTR port_ptr = &port_a;
-	DEV_GPIO_INFO_PTR info_ptr = &(port_a.gpio_info);
-	DW_GPIO_PORT_PTR dw_port_ptr = &(dw_gpio_port_a);
-
-	info_ptr->gpio_ctrl = (void *)dw_port_ptr;
-	info_ptr->opn_cnt = 0;
-	info_ptr->method = 0;
-	info_ptr->direction = 0;
-	info_ptr->extra = 0;
-
-	dw_port_ptr->no = DW_GPIO_PORT_A;
-	dw_port_ptr->regs = (DW_GPIO_REG_PTR)(PERIPHERAL_BASE|REL_REGBASE_GPIO0);
-	dw_port_ptr->valid_bit_mask = EMSK_GPIO_A_VALID_MASK;
-	dw_port_ptr->intno = INTNO_GPIO;
-	dw_port_ptr->int_handler = porta_isr;
-
-	for (i=0; i<dw_gpio_bit_isr_a.int_bit_max_cnt; i++) {
-		dw_gpio_bit_isr_a.int_bit_handler_ptr[i] = NULL;
-	}
-	dw_port_ptr->gpio_bit_isr = &dw_gpio_bit_isr_a;
-
-	port_ptr->gpio_open = porta_open;
-	port_ptr->gpio_close = porta_close;
-	port_ptr->gpio_control = porta_control;
-	port_ptr->gpio_write = porta_write;
-	port_ptr->gpio_read = porta_read;
-}
-#endif
-
-#if (USE_DW_GPIO_PORT_B)
-static DEV_GPIO		port_b;
-static DW_GPIO_PORT	dw_gpio_port_b;
-
-static int32_t portb_open(uint32_t dir)
-{
-	return dw_gpio_open(&port_b, dir);
-}
-
-static int32_t portb_close(void)
-{
-	return dw_gpio_close(&port_b);
-}
-
-static int32_t portb_control(uint32_t ctrl_cmd, void *param)
-{
-	return dw_gpio_control(&port_b, ctrl_cmd, param);
-}
-
-static int32_t portb_write(uint32_t val, uint32_t mask)
-{
-	return dw_gpio_write(&port_b, val, mask);
-}
-
-static int32_t portb_read(uint32_t *val, uint32_t mask)
-{
-	return dw_gpio_read(&port_b, val, mask);
-}
-
-static void portb_isr(void *ptr)
-{
-	dw_gpio_isr_handler(&port_b, ptr);
-}
-
-static void portb_install(void)
-{
-	DEV_GPIO_PTR port_ptr = &port_b;
-	DEV_GPIO_INFO_PTR info_ptr = &(port_b.gpio_info);
-	DW_GPIO_PORT_PTR dw_port_ptr = &(dw_gpio_port_b);
-
-	info_ptr->gpio_ctrl = (void *)dw_port_ptr;
-	info_ptr->opn_cnt = 0;
-	info_ptr->method = 0;
-	info_ptr->direction = 0;
-	info_ptr->extra = 0;
-
-	dw_port_ptr->no = DW_GPIO_PORT_B;
-	dw_port_ptr->regs = (DW_GPIO_REG_PTR)(PERIPHERAL_BASE|REL_REGBASE_GPIO0);
-	dw_port_ptr->valid_bit_mask = EMSK_GPIO_B_VALID_MASK;
-
-	dw_port_ptr->intno = INTNO_GPIO;
-	dw_port_ptr->int_handler = portb_isr;
-	dw_port_ptr->gpio_bit_isr = NULL;
-
-	port_ptr->gpio_open = portb_open;
-	port_ptr->gpio_close = portb_close;
-	port_ptr->gpio_control = portb_control;
-	port_ptr->gpio_write = portb_write;
-	port_ptr->gpio_read = portb_read;
-}
-#endif
-
-
-#if (USE_DW_GPIO_PORT_C)
-static DEV_GPIO		port_c;
-static DW_GPIO_PORT	dw_gpio_port_c;
-
-static int32_t portc_open(uint32_t dir)
-{
-	return dw_gpio_open(&port_c, dir);
-}
-
-static int32_t portc_close(void)
-{
-	return dw_gpio_close(&port_c);
-}
-
-static int32_t portc_control(uint32_t ctrl_cmd, void *param)
-{
-	return dw_gpio_control(&port_c, ctrl_cmd, param);
-}
-
-static int32_t portc_write(uint32_t val, uint32_t mask)
-{
-	return dw_gpio_write(&port_c, val, mask);
-}
-
-static int32_t portc_read(uint32_t *val, uint32_t mask)
-{
-	return dw_gpio_read(&port_c, val, mask);
-}
-
-static void portc_isr(void *ptr)
-{
-	dw_gpio_isr_handler(&port_c, ptr);
-}
-
-static void portc_install(void)
-{
-	DEV_GPIO_PTR port_ptr = &port_c;
-	DEV_GPIO_INFO_PTR info_ptr = &(port_c.gpio_info);
-	DW_GPIO_PORT_PTR dw_port_ptr = &(dw_gpio_port_c);
-
-	info_ptr->gpio_ctrl = (void *)dw_port_ptr;
-	info_ptr->opn_cnt = 0;
-	info_ptr->method = 0;
-	info_ptr->direction = 0;
-	info_ptr->extra = 0;
-
-	dw_port_ptr->no = DW_GPIO_PORT_C;
-	dw_port_ptr->regs = (DW_GPIO_REG_PTR)(PERIPHERAL_BASE|REL_REGBASE_GPIO0);
-	dw_port_ptr->valid_bit_mask = EMSK_GPIO_C_VALID_MASK;
-
-	dw_port_ptr->intno = INTNO_GPIO;
-	dw_port_ptr->int_handler = portc_isr;
-	dw_port_ptr->gpio_bit_isr = NULL;
-
-	port_ptr->gpio_open = portc_open;
-	port_ptr->gpio_close = portc_close;
-	port_ptr->gpio_control = portc_control;
-	port_ptr->gpio_write = portc_write;
-	port_ptr->gpio_read = portc_read;
-}
-#endif
-
-#if (USE_DW_GPIO_PORT_D)
-static DEV_GPIO		port_d;
-static DW_GPIO_PORT	dw_gpio_port_d;
-
-static int32_t portd_open(uint32_t dir)
-{
-	return dw_gpio_open(&port_d, dir);
-}
-
-static int32_t portd_close(void)
-{
-	return dw_gpio_close(&port_d);
-}
-
-static int32_t portd_control(uint32_t ctrl_cmd, void *param)
-{
-	return dw_gpio_control(&port_d, ctrl_cmd, param);
-}
-
-static int32_t portd_write(uint32_t val, uint32_t mask)
-{
-	return dw_gpio_write(&port_d, val, mask);
-}
-
-static int32_t portd_read(uint32_t *val, uint32_t mask)
-{
-	return dw_gpio_read(&port_d, val, mask);
-}
-
-static void portd_isr(void *ptr)
-{
-	dw_gpio_isr_handler(&port_d, ptr);
-}
-
-static void portd_install(void)
-{
-	DEV_GPIO_PTR port_ptr = &port_d;
-	DEV_GPIO_INFO_PTR info_ptr = &(port_d.gpio_info);
-	DW_GPIO_PORT_PTR dw_port_ptr = &(dw_gpio_port_d);
-
-	info_ptr->gpio_ctrl = (void *)dw_port_ptr;
-	info_ptr->opn_cnt = 0;
-	info_ptr->method = 0;
-	info_ptr->direction = 0;
-	info_ptr->extra = 0;
-
-	dw_port_ptr->no = DW_GPIO_PORT_D;
-	dw_port_ptr->regs = (DW_GPIO_REG_PTR)(PERIPHERAL_BASE|REL_REGBASE_GPIO0);
-	dw_port_ptr->valid_bit_mask = EMSK_GPIO_D_VALID_MASK;
-
-	dw_port_ptr->intno = INTNO_GPIO;
-	dw_port_ptr->int_handler = portd_isr;
-	dw_port_ptr->gpio_bit_isr = NULL;
-
-	port_ptr->gpio_open = portd_open;
-	port_ptr->gpio_close = portd_close;
-	port_ptr->gpio_control = portd_control;
-	port_ptr->gpio_write = portd_write;
-	port_ptr->gpio_read = portd_read;
-}
-#endif
-
-DEV_GPIO_PTR gpio_get_dev(int32_t gpio_id)
-{
-	static uint32_t install_flag = 0;
-
-	/* intall device objects */
-	if (install_flag == 0) {
-		install_flag = 1;
-		dw_gpio_all_install();
-	}
-
-	switch (gpio_id) {
-#if (USE_DW_GPIO_PORT_A)
-		case DW_GPIO_PORT_A: return &port_a;
-#endif
-#if (USE_DW_GPIO_PORT_B)
-		case DW_GPIO_PORT_B: return &port_b;
-#endif
-#if (USE_DW_GPIO_PORT_C)
-		case DW_GPIO_PORT_C: return &port_c;
-#endif
-#if (USE_DW_GPIO_PORT_D)
-		case DW_GPIO_PORT_D: return &port_d;
-#endif
-		default:
-			break;
-	}
-	return NULL;
-}
-
-void dw_gpio_all_install(void)
-{
-#if (USE_DW_GPIO_PORT_A)
-	porta_install();
-#endif
-#if (USE_DW_GPIO_PORT_B)
-	portb_install();
-#endif
-#if (USE_DW_GPIO_PORT_C)
-	portc_install();
-#endif
-#if (USE_DW_GPIO_PORT_D)
-	portd_install();
-#endif
-}
-
-/** @} end of group BOARD_EMSK_DRV_DW_GPIO_OBJ */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/gpio/dw_gpio_obj.h b/hw/mcu/arc/src/ext/sdk/board/emsk/gpio/dw_gpio_obj.h
deleted file mode 100644
index 67ddac572..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/gpio/dw_gpio_obj.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-24
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-/**
- * \file
- * \ingroup	BOARD_EMSK_DRV_DW_GPIO_OBJ
- * \brief	header file of designware gpio object instantiation on emsk
- */
-
-/**
- * \addtogroup	BOARD_EMSK_DRV_DW_GPIO_OBJ
- * @{
- */
-#ifndef _DW_GPIO_OBJ_H_
-#define _DW_GPIO_OBJ_H_
-
-#include "device/designware/gpio/dw_gpio.h"
-
-/**
- * \name	Designware GPIO Port Bank Control Macros
- * @{
- */
-#define USE_DW_GPIO_PORT_A		1
-#define USE_DW_GPIO_PORT_B		1
-#define USE_DW_GPIO_PORT_C		1
-#define USE_DW_GPIO_PORT_D		1
-/** @} end of name */
-
-/**
- * \name	Designware GPIO Port Interrupt Available Number Macros
- * @{
- */
-#define EMSK_GPIO_A_INT_MAX_COUNT	32
-#define EMSK_GPIO_B_INT_MAX_COUNT	0
-#define EMSK_GPIO_C_INT_MAX_COUNT	0
-#define EMSK_GPIO_D_INT_MAX_COUNT	0
-/** @} end of name */
-
-/**
- * \name	Designware GPIO Port Available Bits Macros
- * @{
- */
-#define EMSK_GPIO_A_VALID_MASK		DW_GPIO_MASK_ALL
-#define EMSK_GPIO_B_VALID_MASK		DW_GPIO_MASK_ALL
-#define EMSK_GPIO_C_VALID_MASK		DW_GPIO_MASK_ALL
-#define EMSK_GPIO_D_VALID_MASK		DW_GPIO_MASK_ALL
-/** @} end of name */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern void dw_gpio_all_install(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _DW_GPIO_OBJ_H_*/
-
-/** @} end of group BOARD_EMSK_DRV_DW_GPIO_OBJ */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/gpio/emsk_gpio.c b/hw/mcu/arc/src/ext/sdk/board/emsk/gpio/emsk_gpio.c
deleted file mode 100644
index fae676c49..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/gpio/emsk_gpio.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-31
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-/**
- * \defgroup	BOARD_EMSK_DRV_GPIO	EMSK GPIO Driver
- * \ingroup	BOARD_EMSK_DRIVER
- * \brief	EMSK Onboard GPIO Peripherals Driver
- * \details
- *		Implementation of EMSK on-board button, led, dip switch driver,
- *	this is for better use, you don't have to get a gpio object before operating
- *	led,button,switch, because some basic functions for usage are provided.
- */
-
-/**
- * \file
- * \ingroup	BOARD_EMSK_DRV_GPIO
- * \brief	all on emsk board gpio device init and operate functions
- * \details	this gpio devices are button, led, dip switch
- */
-
-/**
- * \addtogroup	BOARD_EMSK_DRV_GPIO
- * @{
- */
-#include "inc/arc/arc.h"
-#include "inc/arc/arc_builtin.h"
-#include "inc/embARC_toolchain.h"
-#include "inc/embARC_error.h"
-
-#include "board/emsk/gpio/emsk_gpio.h"
-#include "board/emsk/emsk.h"
-
-static DEV_GPIO *led_port;
-static DEV_GPIO *button_port;
-static DEV_GPIO *switch_port;
-
-#define EMSK_GPIO_CHECK_EXP_NORTN(EXPR)		CHECK_EXP_NOERCD(EXPR, error_exit)
-
-/** emsk on board gpio init */
-void emsk_gpio_init(void)
-{
-	emsk_led_init();
-	emsk_button_init();
-	emsk_switch_init();
-}
-
-/** emsk on-board led init, led default off */
-void emsk_led_init(void)
-{
-	led_port = gpio_get_dev(EMSK_LED_PORT);
-
-	EMSK_GPIO_CHECK_EXP_NORTN(led_port != NULL);
-
-	if (led_port->gpio_open(EMSK_LED_DIR) == E_OPNED) {
-		led_port->gpio_control(GPIO_CMD_SET_BIT_DIR_OUTPUT, (void *)(EMSK_LED_MASK));
-		led_port->gpio_control(GPIO_CMD_DIS_BIT_INT, (void *)(EMSK_LED_MASK));
-	}
-
-	led_write(0, BOARD_LED_MASK);
-
-error_exit:
-	return;
-}
-
-/** emsk on-board button init */
-void emsk_button_init(void)
-{
-	button_port = gpio_get_dev(EMSK_BUTTON_PORT);
-
-	EMSK_GPIO_CHECK_EXP_NORTN(button_port != NULL);
-
-	if (button_port->gpio_open(EMSK_BUTTON_DIR) == E_OPNED) {
-		button_port->gpio_control(GPIO_CMD_SET_BIT_DIR_INPUT, (void *)(EMSK_BUTTON_MASK));
-		button_port->gpio_control(GPIO_CMD_DIS_BIT_INT, (void *)(EMSK_BUTTON_MASK));
-	}
-
-error_exit:
-	return;
-}
-
-/** emsk on-board switch init */
-void emsk_switch_init(void)
-{
-	switch_port = gpio_get_dev(EMSK_SWITCH_PORT);
-
-	EMSK_GPIO_CHECK_EXP_NORTN(switch_port != NULL);
-
-	if (switch_port->gpio_open(EMSK_SWITCH_DIR) == E_OPNED) {
-		switch_port->gpio_control(GPIO_CMD_SET_BIT_DIR_INPUT, (void *)(EMSK_SWITCH_MASK));
-		switch_port->gpio_control(GPIO_CMD_DIS_BIT_INT, (void *)(EMSK_SWITCH_MASK));
-	}
-
-error_exit:
-	return;
-}
-
-/**
- * workaround for get led value
- * because gpio read return is not right
- */
-static uint32_t g_led_val;
-/** write 1 to light on led bit, else light off led */
-void led_write(uint32_t led_val, uint32_t mask)
-{
-	EMSK_GPIO_CHECK_EXP_NORTN(led_port != NULL);
-
-	led_val = (~led_val) & mask;
-	led_val = led_val << EMSK_LED_OFFSET;
-	mask = (mask << EMSK_LED_OFFSET) & EMSK_LED_MASK;
-	led_port->gpio_write(led_val, mask);
-
-	g_led_val = led_val;
-
-error_exit:
-	return;
-}
-
-/** read led value, on for 1, off for 0 */
-/** \todo need to find why when led set to output then can't get the right value of led */
-uint32_t led_read(uint32_t mask)
-{
-	uint32_t value;
-
-	EMSK_GPIO_CHECK_EXP_NORTN(led_port != NULL);
-
-	mask = (mask << EMSK_LED_OFFSET) & EMSK_LED_MASK;
-	led_port->gpio_read(&value, mask);
-	value = (~value) & EMSK_LED_MASK;
-
-	return (value >> EMSK_LED_OFFSET);
-
-error_exit:
-	return 0;
-}
-
-/** Pull down switch return 1, else 0 */
-uint32_t switch_read(uint32_t mask)
-{
-	uint32_t value;
-
-	EMSK_GPIO_CHECK_EXP_NORTN(switch_port != NULL);
-
-	mask = (mask << EMSK_SWITCH_OFFSET) & EMSK_SWITCH_MASK;
-	switch_port->gpio_read(&value, mask);
-	value = (~value) & mask;
-
-	return (value >> EMSK_SWITCH_OFFSET);
-
-error_exit:
-	return 0;
-}
-
-/** Press down bit set to 1 else 0 */
-uint32_t button_read(uint32_t mask)
-{
-	uint32_t value;
-
-	EMSK_GPIO_CHECK_EXP_NORTN(button_port != NULL);
-
-	mask = (mask << EMSK_BUTTON_OFFSET) & EMSK_BUTTON_MASK;
-	button_port->gpio_read(&value, mask);
-	value = (~value) & mask;
-
-	return (value >> EMSK_BUTTON_OFFSET);
-
-error_exit:
-	return 0;
-}
-
-/** @} end of group BOARD_EMSK_DRV_GPIO */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/gpio/emsk_gpio.h b/hw/mcu/arc/src/ext/sdk/board/emsk/gpio/emsk_gpio.h
deleted file mode 100644
index 7d2ee714d..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/gpio/emsk_gpio.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-31
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-/**
- * \file
- * \ingroup	BOARD_EMSK_DRV_GPIO
- * \brief	emsk board gpio related functions header
- */
-/**
- * \addtogroup	BOARD_EMSK_DRV_GPIO
- * @{
- */
-#ifndef _EMSK_GPIO_H_
-#define _EMSK_GPIO_H_
-
-#include "device/designware/gpio/dw_gpio.h"
-
-/**
- * \name	EMSK LED Port Configuration
- * @{
- */
-#define EMSK_LED_OFFSET		(0)
-#define EMSK_LED_MASK		((0x1ff) << EMSK_LED_OFFSET)
-#define EMSK_LED_PORT		(DW_GPIO_PORT_B)
-#define EMSK_LED_DIR		((0x1ff) << EMSK_LED_OFFSET)
-/** @} end of name */
-
-/**
- * \name	EMSK Switch Port Configuration
- * @{
- */
-#define EMSK_SWITCH_OFFSET	(0)
-#define EMSK_SWITCH_MASK	((0xf) << EMSK_SWITCH_OFFSET)
-#define EMSK_SWITCH_PORT	(DW_GPIO_PORT_C)
-#define EMSK_SWITCH_DIR		((0x0) << EMSK_SWITCH_OFFSET)
-/** @} end of name */
-
-/**
- * \name	EMSK Button Port Configuration
- * @{
- */
-#define EMSK_BUTTON_OFFSET	(0)
-#define EMSK_BUTTON_MASK	((0x7) << EMSK_BUTTON_OFFSET)
-#define EMSK_BUTTON_PORT	(DW_GPIO_PORT_A)
-#define EMSK_BUTTON_DIR		((0x0) << EMSK_BUTTON_OFFSET)
-/** @} end of name */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern void emsk_led_init(void);
-extern void emsk_button_init(void);
-extern void emsk_switch_init(void);
-extern void emsk_gpio_init(void);
-extern void led_write(uint32_t led_val, uint32_t mask);
-extern uint32_t led_read(uint32_t mask);
-extern uint32_t switch_read(uint32_t mask);
-extern uint32_t button_read(uint32_t mask);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _EMSK_GPIO_H_ */
-
-/** @} end of group BOARD_EMSK_DRV_GPIO */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/iic/dw_iic_obj.c b/hw/mcu/arc/src/ext/sdk/board/emsk/iic/dw_iic_obj.c
deleted file mode 100644
index f1c3a2a61..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/iic/dw_iic_obj.c
+++ /dev/null
@@ -1,302 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2017, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2017.03
- * \date 2014-07-03
- * \author Huaqi Fang(Huaqi.Fang@synopsys.com)
---------------------------------------------- */
-
-/**
- * \defgroup	BOARD_EMSK_DRV_DW_IIC_OBJ	EMSK DW IIC Object
- * \ingroup	BOARD_EMSK_DRIVER
- * \brief	EMSK Designware IIC Objects
- * \details
- *		Realize the EMSK board iic object using designware iic device driver,
- *	only need to realize some designware iic structures combine with EMSK iic
- *	hardware resource. just like cpp class instantiation.
- */
-
-/**
- * \file
- * \ingroup	BOARD_EMSK_DRV_DW_IIC_OBJ
- * \brief	designware iic object instantiation on emsk
- */
-
-/**
- * \addtogroup	BOARD_EMSK_DRV_DW_IIC_OBJ
- * @{
- */
-#include "inc/arc/arc.h"
-#include "inc/arc/arc_builtin.h"
-#include "inc/embARC_toolchain.h"
-#include "inc/embARC_error.h"
-
-#include "inc/arc/arc_exception.h"
-
-#include "device/designware/iic/dw_iic.h"
-#include "board/emsk/iic/dw_iic_obj.h"
-
-#include "board/emsk/emsk.h"
-
-#ifdef ARC_FEATURE_DMP_PERIPHERAL
-#define PERIPHERAL_BASE		ARC_FEATURE_DMP_PERIPHERAL
-#else
-#define PERIPHERAL_BASE		_arc_aux_read(AUX_DMP_PERIPHERAL)
-#endif
-
-/**
- * \name	EMSK DesignWare IIC 0 Object Instantiation
- * @{
- */
-#if (USE_DW_IIC_0)
-static void dw_iic_0_isr(void *ptr);
-#define DW_IIC_0_RELBASE	(REL_REGBASE_I2C0)	/*!< designware iic 0 relative baseaddr */
-#define DW_IIC_0_INTNO		(INTNO_I2C0)		/*!< designware iic 0 interrupt number  */
-#define DW_IIC_0_SLVADDR	(0x55)			/*!< iic 0 slave address working in slave mode */
-#define DW_IIC_0_TX_FIFO_LEN	(32)
-#define DW_IIC_0_RX_FIFO_LEN	(32)
-#define DW_IIC_0_MASTER_CODE	(0)
-#define DW_IIC_0_TARADDR	(0x55)
-
-DEV_IIC			dw_iic_0;			/*!< designware iic object */
-DW_IIC_CTRL		dw_iic_0_ctrl;			/*!< designware iic 0 ctrl */
-
-/** designware iic 0 open */
-static int32_t dw_iic_0_open (uint32_t mode, uint32_t param)
-{
-	return dw_iic_open(&dw_iic_0, mode, param);
-}
-/** designware iic 0 close */
-static int32_t dw_iic_0_close (void)
-{
-	return dw_iic_close(&dw_iic_0);
-}
-/** designware iic 0 control */
-static int32_t dw_iic_0_control (uint32_t ctrl_cmd, void *param)
-{
-	return dw_iic_control(&dw_iic_0, ctrl_cmd, param);
-}
-/** designware iic 0 write */
-static int32_t dw_iic_0_write (const void *data, uint32_t len)
-{
-	return dw_iic_write(&dw_iic_0, data, len);
-}
-/** designware iic 0 close */
-static int32_t dw_iic_0_read (void *data, uint32_t len)
-{
-	return dw_iic_read(&dw_iic_0, data, len);
-}
-/** designware iic 0 interrupt routine */
-static void dw_iic_0_isr(void *ptr)
-{
-	dw_iic_isr(&dw_iic_0, ptr);
-}
-/** install designware iic 0 to system */
-static void dw_iic_0_install(void)
-{
-	uint32_t iic_abs_base = 0;
-	DEV_IIC *dw_iic_ptr = &dw_iic_0;
-	DEV_IIC_INFO *dw_iic_info_ptr = &(dw_iic_0.iic_info);
-	DW_IIC_CTRL *dw_iic_ctrl_ptr = &dw_iic_0_ctrl;
-	DW_IIC_REG *dw_iic_reg_ptr;
-
-	/* Info init */
-	dw_iic_info_ptr->iic_ctrl = (void *)dw_iic_ctrl_ptr;
-	dw_iic_info_ptr->opn_cnt = 0;
-	dw_iic_info_ptr->addr_mode = IIC_7BIT_ADDRESS;
-	dw_iic_info_ptr->tar_addr = DW_IIC_0_TARADDR;
-	/*
-	 * get absolute designware base address
-	 */
-	iic_abs_base = (uint32_t)PERIPHERAL_BASE + DW_IIC_0_RELBASE;
-	dw_iic_reg_ptr = (DW_IIC_REG *)iic_abs_base;
-
-	/* iic ctrl init */
-	dw_iic_ctrl_ptr->dw_iic_regs = dw_iic_reg_ptr;
-	/* Variables which should be set during object implementation */
-	dw_iic_ctrl_ptr->support_modes = DW_IIC_BOTH_SUPPORTED;
-	dw_iic_ctrl_ptr->tx_fifo_len = DW_IIC_0_TX_FIFO_LEN;
-	dw_iic_ctrl_ptr->rx_fifo_len = DW_IIC_0_RX_FIFO_LEN;
-	dw_iic_ctrl_ptr->iic_master_code = DW_IIC_0_MASTER_CODE;
-	dw_iic_ctrl_ptr->retry_cnt = DW_IIC_MAX_RETRY_COUNT;
-	dw_iic_ctrl_ptr->intno = DW_IIC_0_INTNO;
-	dw_iic_ctrl_ptr->dw_iic_int_handler = dw_iic_0_isr;
-	dw_iic_ctrl_ptr->iic_spklen = dw_iic_spklen_const;
-	dw_iic_ctrl_ptr->iic_scl_cnt = dw_iic_sclcnt_const;
-	/* Variables which always change during iic operation */
-	dw_iic_ctrl_ptr->int_status = 0;
-	dw_iic_ctrl_ptr->iic_tx_over = 0;
-	dw_iic_ctrl_ptr->iic_rx_over = 0;
-
-	/** iic dev init */
-	dw_iic_ptr->iic_open = dw_iic_0_open;
-	dw_iic_ptr->iic_close = dw_iic_0_close;
-	dw_iic_ptr->iic_control = dw_iic_0_control;
-	dw_iic_ptr->iic_write = dw_iic_0_write;
-	dw_iic_ptr->iic_read = dw_iic_0_read;
-}
-#endif /* USE_DW_IIC_0 */
-/** @} end of name */
-
-/**
- * \name	EMSK DesignWare IIC 1 Object Instantiation
- * @{
- */
-#if (USE_DW_IIC_1)
-static void dw_iic_1_isr(void *ptr);
-#define DW_IIC_1_RELBASE	(REL_REGBASE_I2C1)	/*!< designware iic 1 relative baseaddr */
-#define DW_IIC_1_INTNO		(INTNO_I2C1)		/*!< designware iic 1 interrupt number  */
-#define DW_IIC_1_SLVADDR	(0x56)			/*!< iic 1 slave address working in slave mode */
-#define DW_IIC_1_TX_FIFO_LEN	(32)
-#define DW_IIC_1_RX_FIFO_LEN	(32)
-#define DW_IIC_1_MASTER_CODE	(1)
-#define DW_IIC_1_TARADDR	(0x56)
-
-DEV_IIC		dw_iic_1;				/*!< designware iic 1 object */
-DW_IIC_CTRL 	dw_iic_1_ctrl;				/*!< designware iic 1 ctrl */
-
-/** designware iic 1 open */
-static int32_t dw_iic_1_open (uint32_t mode, uint32_t param)
-{
-	return dw_iic_open(&dw_iic_1, mode, param);
-}
-/** designware iic 1 close */
-static int32_t dw_iic_1_close (void)
-{
-	return dw_iic_close(&dw_iic_1);
-}
-/** designware iic 1 control */
-static int32_t dw_iic_1_control (uint32_t ctrl_cmd, void *param)
-{
-	return dw_iic_control(&dw_iic_1, ctrl_cmd, param);
-}
-/** designware iic 1 write */
-static int32_t dw_iic_1_write (const void *data, uint32_t len)
-{
-	return dw_iic_write(&dw_iic_1, data, len);
-}
-/** designware iic 1 close */
-static int32_t dw_iic_1_read (void *data, uint32_t len)
-{
-	return dw_iic_read(&dw_iic_1, data, len);
-}
-/** designware iic 1 interrupt routine */
-static void dw_iic_1_isr(void *ptr)
-{
-	dw_iic_isr(&dw_iic_1, ptr);
-}
-/** install designware iic 1 to system */
-static void dw_iic_1_install(void)
-{
-	uint32_t iic_abs_base = 0;
-	DEV_IIC *dw_iic_ptr = &dw_iic_1;
-	DEV_IIC_INFO *dw_iic_info_ptr = &(dw_iic_1.iic_info);
-	DW_IIC_CTRL *dw_iic_ctrl_ptr = &dw_iic_1_ctrl;
-	DW_IIC_REG *dw_iic_reg_ptr;
-
-	/* Info init */
-	dw_iic_info_ptr->iic_ctrl = (void *)dw_iic_ctrl_ptr;
-	dw_iic_info_ptr->opn_cnt = 0;
-	dw_iic_info_ptr->addr_mode = IIC_7BIT_ADDRESS;
-	dw_iic_info_ptr->tar_addr = DW_IIC_1_TARADDR;
-	/*
-	 * get absolute designware base address
-	 */
-	iic_abs_base = (uint32_t)PERIPHERAL_BASE + DW_IIC_1_RELBASE;
-	dw_iic_reg_ptr = (DW_IIC_REG *)iic_abs_base;
-
-	/* iic ctrl init */
-	dw_iic_ctrl_ptr->dw_iic_regs = dw_iic_reg_ptr;
-	/* Variables which should be set during object implementation */
-	dw_iic_ctrl_ptr->support_modes = DW_IIC_BOTH_SUPPORTED;
-	dw_iic_ctrl_ptr->tx_fifo_len = DW_IIC_1_TX_FIFO_LEN;
-	dw_iic_ctrl_ptr->rx_fifo_len = DW_IIC_1_RX_FIFO_LEN;
-	dw_iic_ctrl_ptr->iic_master_code = DW_IIC_1_MASTER_CODE;
-	dw_iic_ctrl_ptr->retry_cnt = DW_IIC_MAX_RETRY_COUNT;
-	dw_iic_ctrl_ptr->intno = DW_IIC_1_INTNO;
-	dw_iic_ctrl_ptr->dw_iic_int_handler = dw_iic_1_isr;
-	dw_iic_ctrl_ptr->iic_spklen = dw_iic_spklen_const;
-	dw_iic_ctrl_ptr->iic_scl_cnt = dw_iic_sclcnt_const;
-	/* Variables which always change during iic operation */
-	dw_iic_ctrl_ptr->int_status = 0;
-	dw_iic_ctrl_ptr->iic_tx_over = 0;
-	dw_iic_ctrl_ptr->iic_rx_over = 0;
-
-	/** iic dev init */
-	dw_iic_ptr->iic_open = dw_iic_1_open;
-	dw_iic_ptr->iic_close = dw_iic_1_close;
-	dw_iic_ptr->iic_control = dw_iic_1_control;
-	dw_iic_ptr->iic_write = dw_iic_1_write;
-	dw_iic_ptr->iic_read = dw_iic_1_read;
-}
-#endif /* USE_DW_IIC_1 */
-/** @} end of name */
-
-/** get one designware device structure */
-DEV_IIC_PTR iic_get_dev(int32_t iic_id)
-{
-	static uint32_t install_flag = 0;
-
-	/* intall device objects */
-	if (install_flag == 0) {
-		install_flag = 1;
-		dw_iic_all_install();
-	}
-
-	switch (iic_id) {
-#if (USE_DW_IIC_0)
-		case DW_IIC_0_ID:
-			return &dw_iic_0;
-			break;
-#endif
-#if (USE_DW_IIC_1)
-		case DW_IIC_1_ID:
-			return &dw_iic_1;
-			break;
-#endif
-		default:
-			break;
-	}
-	return NULL;
-}
-
-/**
- * \brief	install all iic objects
- * \note	\b MUST be called during system init
- */
-void dw_iic_all_install(void)
-{
-#if (USE_DW_IIC_0)
-	dw_iic_0_install();
-#endif
-#if (USE_DW_IIC_1)
-	dw_iic_1_install();
-#endif
-}
-
-/** @} end of group BOARD_EMSK_DRV_DW_IIC_OBJ */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/iic/dw_iic_obj.h b/hw/mcu/arc/src/ext/sdk/board/emsk/iic/dw_iic_obj.h
deleted file mode 100644
index 7671889fe..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/iic/dw_iic_obj.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2017, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2017.03
- * \date 2014-07-03
- * \author Huaqi Fang(Huaqi.Fang@synopsys.com)
---------------------------------------------- */
-/**
- * \file
- * \ingroup	BOARD_EMSK_DRV_DW_IIC_OBJ
- * \brief	header file of designware iic object instantiation on emsk
- */
-
-/**
- * \addtogroup	BOARD_EMSK_DRV_DW_IIC_OBJ
- * @{
- */
-#ifndef _DW_IIC_OBJ_H_
-#define _DW_IIC_OBJ_H_
-
-#include "device/device_hal/inc/dev_iic.h"
-
-/**
- * \name	DesignWare IIC Object Number
- * @{
- */
-#define DW_IIC_NUM		(1)	/*!< DesignWare IIC valid number */
-/** @} end of name */
-
-/**
- * \name	Designware IIC Object ID Macros
- * @{
- */
-#define DW_IIC_0_ID		0	/*!< iic 0 id macro */
-#define DW_IIC_1_ID		1	/*!< iic 1 id macro */
-/** @} end of name */
-
-/**
- * \name	Designware IIC Object Control Macros
- * @{
- */
-#define USE_DW_IIC_0	1	/*!< enable use designware iic 0 */
-#define USE_DW_IIC_1	1	/*!< enable use designware iic 1 */
-/** @} end of name */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern void dw_iic_all_install(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _DW_IIC_OBJ_H_ */
-
-/** @} end of group BOARD_EMSK_IIC_OBJ */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/spi/dw_spi_obj.c b/hw/mcu/arc/src/ext/sdk/board/emsk/spi/dw_spi_obj.c
deleted file mode 100644
index 9e23da905..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/spi/dw_spi_obj.c
+++ /dev/null
@@ -1,322 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2017, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2017.03
- * \date 2014-07-03
- * \author Huaqi Fang(Huaqi.Fang@synopsys.com)
---------------------------------------------- */
-
-/**
- * \defgroup	BOARD_EMSK_DRV_DW_SPI_OBJ	EMSK DW SPI Object
- * \ingroup	BOARD_EMSK_DRIVER
- * \brief	EMSK Designware SPI Objects
- * \details
- *		realize the EMSK board spi object using designware spi device driver,
- *	only need to realize some designware spi structures combine with EMSK spi
- *	hardware resource. just like cpp class instantiation.
- */
-
-/**
- * \file
- * \ingroup	BOARD_EMSK_DRV_DW_SPI_OBJ
- * \brief	designware spi object instantiation on emsk
- */
-
-/**
- * \addtogroup	BOARD_EMSK_DRV_DW_SPI_OBJ
- * @{
- */
-#include "inc/arc/arc.h"
-#include "inc/arc/arc_builtin.h"
-#include "inc/embARC_toolchain.h"
-#include "inc/embARC_error.h"
-#include "inc/arc/arc_exception.h"
-
-#include "device/designware/spi/dw_spi.h"
-#include "board/emsk/spi/dw_spi_obj.h"
-
-#include "board/emsk/emsk.h"
-
-#ifdef ARC_FEATURE_DMP_PERIPHERAL
-#define PERIPHERAL_BASE		ARC_FEATURE_DMP_PERIPHERAL
-#else
-#define PERIPHERAL_BASE		_arc_aux_read(AUX_DMP_PERIPHERAL)
-#endif
-
-/**
- * \name	EMSK DesignWare SPI 0 Object Instantiation
- * @{
- */
-#if (USE_DW_SPI_0)
-static void dw_spi_0_isr(void *ptr);
-#define DW_SPI_0_RELBASE	(REL_REGBASE_SPI0)	/*!< designware spi 0 relative baseaddr */
-#define DW_SPI_0_INTNO		(INTNO_SPI_MASTER)	/*!< designware spi 0 interrupt number  */
-
-#define DW_SPI_0_TX_FIFO_LEN	(32)
-#define DW_SPI_0_RX_FIFO_LEN	(32)
-
-#define DW_SPI_0_SUPPORTED_MODE	DW_SPI_MASTER_SUPPORTED
-
-DEV_SPI			dw_spi_0;			/*!< designware spi object */
-DW_SPI_CTRL		dw_spi_0_ctrl;			/*!< designware spi 0 ctrl */
-#if HW_VERSION >= 22
-static uint32_t spi_mst_cs_ctrl_creg = 0;
-#endif
-
-/** designware spi 0 open */
-static int32_t dw_spi_0_open (uint32_t mode, uint32_t param)
-{
-	return dw_spi_open(&dw_spi_0, mode, param);
-}
-/** designware spi 0 close */
-static int32_t dw_spi_0_close (void)
-{
-	return dw_spi_close(&dw_spi_0);
-}
-/** designware spi 0 control */
-static int32_t dw_spi_0_control (uint32_t ctrl_cmd, void *param)
-{
-#if HW_VERSION >= 22
-	int32_t ercd;
-	ercd = dw_spi_control(&dw_spi_0, ctrl_cmd, param);
-	if (ctrl_cmd == SPI_CMD_MST_SEL_DEV) {
-		_arc_write_uncached_32((void *)spi_mst_cs_ctrl_creg, 1 << ((uint32_t)param));
-	} else if (ctrl_cmd == SPI_CMD_MST_DSEL_DEV) {
-		_arc_write_uncached_32((void *)spi_mst_cs_ctrl_creg, 0);
-	}
-	return ercd;
-#else
-	return dw_spi_control(&dw_spi_0, ctrl_cmd, param);
-#endif
-}
-/** designware spi 0 write */
-static int32_t dw_spi_0_write (const void *data, uint32_t len)
-{
-	return dw_spi_write(&dw_spi_0, data, len);
-}
-/** designware spi 0 close */
-static int32_t dw_spi_0_read (void *data, uint32_t len)
-{
-	return dw_spi_read(&dw_spi_0, data, len);
-}
-/** designware spi 0 interrupt routine */
-static void dw_spi_0_isr(void *ptr)
-{
-	dw_spi_isr(&dw_spi_0, ptr);
-}
-/** install designware spi 0 to system */
-static void dw_spi_0_install(void)
-{
-	uint32_t spi_abs_base = 0;
-	DEV_SPI *dw_spi_ptr = &dw_spi_0;
-	DEV_SPI_INFO *dw_spi_info_ptr = &(dw_spi_0.spi_info);
-	DW_SPI_CTRL *dw_spi_ctrl_ptr = &dw_spi_0_ctrl;
-	DW_SPI_REG *dw_spi_reg_ptr;
-
-	/**
-	 * get absolute designware base address
-	 */
-	spi_abs_base = (uint32_t)PERIPHERAL_BASE + DW_SPI_0_RELBASE;
-
-#if HW_VERSION >= 22
-	spi_mst_cs_ctrl_creg = spi_abs_base + REL_REGBASE_SPI_MST_CS_CTRL;
-#endif
-
-	dw_spi_reg_ptr = (DW_SPI_REG *)spi_abs_base;
-
-	/** spi info init */
-	dw_spi_info_ptr->spi_ctrl = (void *)dw_spi_ctrl_ptr;
-	dw_spi_info_ptr->status = DEV_DISABLED;
-	dw_spi_info_ptr->freq = 1000;
-	dw_spi_info_ptr->opn_cnt = 0;
-	dw_spi_info_ptr->mode = DEV_MASTER_MODE;
-	dw_spi_info_ptr->clk_mode = SPI_CLK_MODE_DEFAULT;
-	dw_spi_info_ptr->slave = SPI_SLAVE_NOT_SELECTED;
-	dw_spi_info_ptr->dfs = SPI_DFS_DEFAULT;
-	dw_spi_info_ptr->dummy = 0xff;
-
-	/* spi ctrl init */
-	/* Variables which should be set during object implementation */
-	dw_spi_ctrl_ptr->dw_spi_regs = dw_spi_reg_ptr;
-	dw_spi_ctrl_ptr->intno = DW_SPI_0_INTNO;
-	dw_spi_ctrl_ptr->support_modes = DW_SPI_0_SUPPORTED_MODE;
-	dw_spi_ctrl_ptr->tx_fifo_len = DW_SPI_0_TX_FIFO_LEN;
-	dw_spi_ctrl_ptr->rx_fifo_len = DW_SPI_0_TX_FIFO_LEN;
-	dw_spi_ctrl_ptr->dw_apb_bus_freq = CLK_BUS_APB;
-	dw_spi_ctrl_ptr->dw_spi_int_handler = dw_spi_0_isr;
-	/* Variables which always change during spi operation */
-	dw_spi_ctrl_ptr->int_status = 0;
-
-	/** spi dev init */
-	dw_spi_ptr->spi_open = dw_spi_0_open;
-	dw_spi_ptr->spi_close = dw_spi_0_close;
-	dw_spi_ptr->spi_control = dw_spi_0_control;
-	dw_spi_ptr->spi_write = dw_spi_0_write;
-	dw_spi_ptr->spi_read = dw_spi_0_read;
-}
-#endif /* USE_DW_SPI_0 */
-/** @} end of name */
-
-/**
- * \name	EMSK DesignWare SPI 1 Object Instantiation
- * @{
- */
-#if (USE_DW_SPI_1)
-static void dw_spi_1_isr(void *ptr);
-#define DW_SPI_1_RELBASE	(REL_REGBASE_SPI1)	/*!< designware spi 1 relative baseaddr */
-#define DW_SPI_1_INTNO		(INTNO_SPI_SLAVE)	/*!< designware spi 1 interrupt number  */
-
-#define DW_SPI_1_TX_FIFO_LEN	(32)
-#define DW_SPI_1_RX_FIFO_LEN	(32)
-
-#define DW_SPI_1_SUPPORTED_MODE	DW_SPI_SLAVE_SUPPORTED
-
-DEV_SPI			dw_spi_1;			/*!< designware spi 1 object */
-DW_SPI_CTRL		dw_spi_1_ctrl;			/*!< designware spi 1 ctrl */
-
-/** designware spi 1 open */
-static int32_t dw_spi_1_open (uint32_t mode, uint32_t param)
-{
-	return dw_spi_open(&dw_spi_1, mode, param);
-}
-/** designware spi 1 close */
-static int32_t dw_spi_1_close (void)
-{
-	return dw_spi_close(&dw_spi_1);
-}
-/** designware spi 1 control */
-static int32_t dw_spi_1_control (uint32_t ctrl_cmd, void *param)
-{
-	return dw_spi_control(&dw_spi_1, ctrl_cmd, param);
-}
-/** designware spi 1 write */
-static int32_t dw_spi_1_write (const void *data, uint32_t len)
-{
-	return dw_spi_write(&dw_spi_1, data, len);
-}
-/** designware spi 1 close */
-static int32_t dw_spi_1_read (void *data, uint32_t len)
-{
-	return dw_spi_read(&dw_spi_1, data, len);
-}
-/** designware spi 1 interrupt routine */
-static void dw_spi_1_isr(void *ptr)
-{
-	dw_spi_isr(&dw_spi_1, ptr);
-}
-/** install designware spi 1 to system */
-static void dw_spi_1_install(void)
-{
-	uint32_t spi_abs_base = 0;
-	DEV_SPI *dw_spi_ptr = &dw_spi_1;
-	DEV_SPI_INFO *dw_spi_info_ptr = &(dw_spi_1.spi_info);
-	DW_SPI_CTRL *dw_spi_ctrl_ptr = &dw_spi_1_ctrl;
-	DW_SPI_REG *dw_spi_reg_ptr;
-
-	/**
-	 * get absolute designware base address
-	 */
-	spi_abs_base = (uint32_t)PERIPHERAL_BASE + DW_SPI_1_RELBASE;
-	dw_spi_reg_ptr = (DW_SPI_REG *)spi_abs_base;
-
-	/** spi info init */
-	dw_spi_info_ptr->spi_ctrl = (void *)dw_spi_ctrl_ptr;
-	dw_spi_info_ptr->status = DEV_DISABLED;
-	dw_spi_info_ptr->freq = 1000;
-	dw_spi_info_ptr->opn_cnt = 0;
-	dw_spi_info_ptr->mode = DEV_SLAVE_MODE;
-	dw_spi_info_ptr->clk_mode = SPI_CLK_MODE_DEFAULT;
-	dw_spi_info_ptr->slave = SPI_SLAVE_NOT_SELECTED;
-	dw_spi_info_ptr->dfs = SPI_DFS_DEFAULT;
-	dw_spi_info_ptr->dummy = 0xff;
-
-	/* spi ctrl init */
-	/* Variables which should be set during object implementation */
-	dw_spi_ctrl_ptr->dw_spi_regs = dw_spi_reg_ptr;
-	dw_spi_ctrl_ptr->intno = DW_SPI_1_INTNO;
-	dw_spi_ctrl_ptr->support_modes = DW_SPI_1_SUPPORTED_MODE;
-	dw_spi_ctrl_ptr->tx_fifo_len = DW_SPI_1_TX_FIFO_LEN;
-	dw_spi_ctrl_ptr->rx_fifo_len = DW_SPI_1_TX_FIFO_LEN;
-	dw_spi_ctrl_ptr->dw_apb_bus_freq = CLK_BUS_APB;
-	dw_spi_ctrl_ptr->dw_spi_int_handler = dw_spi_1_isr;
-	/* Variables which always change during spi operation */
-	dw_spi_ctrl_ptr->int_status = 0;
-
-	/** spi dev init */
-	dw_spi_ptr->spi_open = dw_spi_1_open;
-	dw_spi_ptr->spi_close = dw_spi_1_close;
-	dw_spi_ptr->spi_control = dw_spi_1_control;
-	dw_spi_ptr->spi_write = dw_spi_1_write;
-	dw_spi_ptr->spi_read = dw_spi_1_read;
-}
-#endif /* USE_DW_SPI_1 */
-/** @} end of name */
-
-/** get one designware device structure */
-DEV_SPI_PTR spi_get_dev(int32_t spi_id)
-{
-	static uint32_t install_flag = 0;
-
-	/* install device objects */
-	if (install_flag == 0) {
-		install_flag = 1;
-		dw_spi_all_install();
-	}
-
-	switch (spi_id) {
-#if (USE_DW_SPI_0)
-		case DW_SPI_0_ID:
-			return &dw_spi_0;
-			break;
-#endif
-#if (USE_DW_SPI_1)
-		case DW_SPI_1_ID:
-			return &dw_spi_1;
-			break;
-#endif
-		default:
-			break;
-	}
-	return NULL;
-}
-
-/**
- * \brief	install all spi objects
- * \note	\b MUST be called during system init
- */
-void dw_spi_all_install(void)
-{
-#if (USE_DW_SPI_0)
-	dw_spi_0_install();
-#endif
-#if (USE_DW_SPI_1)
-	dw_spi_1_install();
-#endif
-}
-
-/** @} end of group BOARD_EMSK_DRV_DW_SPI_OBJ */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/spi/dw_spi_obj.h b/hw/mcu/arc/src/ext/sdk/board/emsk/spi/dw_spi_obj.h
deleted file mode 100644
index 4408d2b19..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/spi/dw_spi_obj.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2017, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2017.03
- * \date 2014-07-03
- * \author Huaqi Fang(Huaqi.Fang@synopsys.com)
---------------------------------------------- */
-/**
- * \file
- * \ingroup	BOARD_EMSK_DRV_DW_SPI_OBJ
- * \brief	header file of designware spi object instantiation on emsk
- */
-
-/**
- * \addtogroup	BOARD_EMSK_DRV_DW_SPI_OBJ
- * @{
- */
-#ifndef _DW_SPI_OBJ_H_
-#define _DW_SPI_OBJ_H_
-
-#include "device/device_hal/inc/dev_spi.h"
-
-/**
- * \name	DesignWare SPI Object Number
- * @{
- */
-#define DW_SPI_NUM		(2)	/*!< DesignWare SPI valid number */
-/** @} end of name */
-
-/**
- * \name	Designware SPI Object ID Macros
- * @{
- */
-#define DW_SPI_0_ID		0	/*!< SPI 0 id macro (master node) */
-#define DW_SPI_1_ID		1	/*!< SPI 1 id macro (slave node) */
-/** @} end of name */
-
-/**
- * \name	Designware SPI Object Control Macros
- * @{
- */
-#define USE_DW_SPI_0		1	/*!< enable use designware SPI 0 */
-#define USE_DW_SPI_1		1	/*!< enable use designware SPI 1 */
-/** @} end of name */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern void dw_spi_all_install(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _DW_SPI_OBJ_H_ */
-/** @} end of group BOARD_EMSK_DRV_DW_SPI_OBJ */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/uart/dw_uart_obj.c b/hw/mcu/arc/src/ext/sdk/board/emsk/uart/dw_uart_obj.c
deleted file mode 100644
index f83e70487..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/uart/dw_uart_obj.c
+++ /dev/null
@@ -1,266 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-03
- * \author Huaqi Fang(Huaqi.Fang@synopsys.com)
---------------------------------------------- */
-
-/**
- * \defgroup	BOARD_EMSK_DRV_DW_UART_OBJ	EMSK DW UART Object
- * \ingroup	BOARD_EMSK_DRIVER
- * \brief	EMSK Designware UART Objects
- * \details
- *		Realize the EMSK board uart object using Designware uart device driver,
- *	only need to realize some Designware uart structures combine with EMSK uart
- *	hardware resource. just like cpp class instantiation.
- */
-
-/**
- * \file
- * \ingroup	BOARD_EMSK_DRV_DW_UART_OBJ
- * \brief	designware uart object instantiation on emsk
- */
-
-/**
- * \addtogroup	BOARD_EMSK_DRV_DW_UART_OBJ
- * @{
- */
-#include "inc/arc/arc.h"
-#include "inc/arc/arc_builtin.h"
-#include "inc/embARC_toolchain.h"
-#include "inc/embARC_error.h"
-
-#include "inc/arc/arc_exception.h"
-#include "device/designware/uart/dw_uart.h"
-#include "board/emsk/uart/dw_uart_obj.h"
-
-#include "board/emsk/emsk.h"
-
-#ifdef ARC_FEATURE_DMP_PERIPHERAL
-#define PERIPHERAL_BASE		ARC_FEATURE_DMP_PERIPHERAL
-#else
-#define PERIPHERAL_BASE		_arc_aux_read(AUX_DMP_PERIPHERAL)
-#endif
-
-#define DW_UART_FIFO_LEN	32
-
-/**
- * \name	EMSK DesignWare UART 0 Object Instantiation
- * @{
- */
-#if (USE_DW_UART_0)
-static void dw_uart_0_isr(void *ptr);
-#define DW_UART_0_RELBASE	(REL_REGBASE_UART0)	/*!< designware uart 0 relative baseaddr */
-#define DW_UART_0_INTNO		(INTNO_UART0)		/*!< designware uart 0 interrupt number  */
-
-DEV_UART		dw_uart_0;			/*!< designware uart object */
-DW_UART_CTRL	dw_uart_0_ctrl = {			/*!< designware uart 0 ctrl */
-	0, CLK_BUS_APB, DW_UART_0_INTNO, (INT_HANDLER)dw_uart_0_isr,
-	DW_UART_FIFO_LEN, DW_UART_FIFO_LEN, 0
-};
-
-/** designware uart 0 open */
-static int32_t dw_uart_0_open (uint32_t baud)
-{
-	return dw_uart_open(&dw_uart_0, baud);
-}
-/** designware uart 0 close */
-static int32_t dw_uart_0_close (void)
-{
-	return dw_uart_close(&dw_uart_0);
-}
-/** designware uart 0 control */
-static int32_t dw_uart_0_control (uint32_t ctrl_cmd, void *param)
-{
-	return dw_uart_control(&dw_uart_0, ctrl_cmd, param);
-}
-/** designware uart 0 write */
-static int32_t dw_uart_0_write (const void *data, uint32_t len)
-{
-	return dw_uart_write(&dw_uart_0, data, len);
-}
-/** designware uart 0 close */
-static int32_t dw_uart_0_read (void *data, uint32_t len)
-{
-	return dw_uart_read(&dw_uart_0, data, len);
-}
-/** designware uart 0 interrupt rountine */
-static void dw_uart_0_isr(void *ptr)
-{
-	dw_uart_isr(&dw_uart_0, ptr);
-}
-/** install designware uart 0 to system */
-static void dw_uart_0_install(void)
-{
-	uint32_t uart_abs_base = 0;
-	DEV_UART *dw_uart_ptr = &dw_uart_0;
-	DEV_UART_INFO *dw_uart_info_ptr = &(dw_uart_0.uart_info);
-	DW_UART_CTRL *dw_uart_ctrl_ptr = &dw_uart_0_ctrl;
-
-	/**
-	 * get absolute designware base address
-	 */
-	uart_abs_base = (uint32_t)PERIPHERAL_BASE + DW_UART_0_RELBASE;
-	dw_uart_ctrl_ptr->dw_uart_regbase = uart_abs_base;
-
-	/** uart info init */
-	dw_uart_info_ptr->uart_ctrl = (void *)dw_uart_ctrl_ptr;
-	dw_uart_info_ptr->opn_cnt = 0;
-	dw_uart_info_ptr->status = 0;
-	dw_uart_info_ptr->baudrate = UART_BAUDRATE_115200;  /* default 115200bps */
-
-	/** uart dev init */
-	dw_uart_ptr->uart_open = dw_uart_0_open;
-	dw_uart_ptr->uart_close = dw_uart_0_close;
-	dw_uart_ptr->uart_control = dw_uart_0_control;
-	dw_uart_ptr->uart_write = dw_uart_0_write;
-	dw_uart_ptr->uart_read = dw_uart_0_read;
-
-}
-#endif /* USE_DW_UART_0 */
-/** @} end of name */
-
-/**
- * \name	EMSK DesignWare UART 1 Object Instantiation
- * @{
- */
-#if (USE_DW_UART_1)
-static void dw_uart_1_isr(void *ptr);
-#define DW_UART_1_RELBASE	(REL_REGBASE_UART1)	/*!< designware uart 1 relative baseaddr */
-#define DW_UART_1_INTNO		(INTNO_UART1)		/*!< designware uart 1 interrupt number  */
-
-DEV_UART		dw_uart_1;			/*!< designware uart 1 object */
-DW_UART_CTRL	dw_uart_1_ctrl = {			/*!< designware uart 1 ctrl */
-	0, CLK_BUS_APB, DW_UART_1_INTNO, (INT_HANDLER)dw_uart_1_isr,
-	DW_UART_FIFO_LEN, DW_UART_FIFO_LEN, 0
-};
-
-/** designware uart 1 open */
-static int32_t dw_uart_1_open (uint32_t baud)
-{
-	return dw_uart_open(&dw_uart_1, baud);
-}
-/** designware uart 1 close */
-static int32_t dw_uart_1_close (void)
-{
-	return dw_uart_close(&dw_uart_1);
-}
-/** designware uart 1 control */
-static int32_t dw_uart_1_control (uint32_t ctrl_cmd, void *param)
-{
-	return dw_uart_control(&dw_uart_1, ctrl_cmd, param);
-}
-/** designware uart 1 write */
-static int32_t dw_uart_1_write (const void *data, uint32_t len)
-{
-	return dw_uart_write(&dw_uart_1, data, len);
-}
-/** designware uart 1 close */
-static int32_t dw_uart_1_read (void *data, uint32_t len)
-{
-	return dw_uart_read(&dw_uart_1, data, len);
-}
-/** designware uart 1 interrupt routine */
-static void dw_uart_1_isr(void *ptr)
-{
-	dw_uart_isr(&dw_uart_1, ptr);
-}
-/** install designware uart 1 to system */
-static void dw_uart_1_install(void)
-{
-	uint32_t uart_abs_base = 0;
-	DEV_UART *dw_uart_ptr = &dw_uart_1;
-	DEV_UART_INFO *dw_uart_info_ptr = &(dw_uart_1.uart_info);
-	DW_UART_CTRL *dw_uart_ctrl_ptr = &dw_uart_1_ctrl;
-
-	/**
-	 * get absolute designware base address
-	 */
-	uart_abs_base = (uint32_t)PERIPHERAL_BASE + DW_UART_1_RELBASE;
-	dw_uart_ctrl_ptr->dw_uart_regbase = uart_abs_base;
-
-	/** uart info init */
-	dw_uart_info_ptr->uart_ctrl = (void *)dw_uart_ctrl_ptr;
-	dw_uart_info_ptr->opn_cnt = 0;
-	dw_uart_info_ptr->status = 0;
-	dw_uart_info_ptr->baudrate = UART_BAUDRATE_115200;  /* default 115200bps */
-
-	/** uart dev init */
-	dw_uart_ptr->uart_open = dw_uart_1_open;
-	dw_uart_ptr->uart_close = dw_uart_1_close;
-	dw_uart_ptr->uart_control = dw_uart_1_control;
-	dw_uart_ptr->uart_write = dw_uart_1_write;
-	dw_uart_ptr->uart_read = dw_uart_1_read;
-}
-#endif /* USE_DW_UART_1 */
-/** @} end of name */
-
-/** get one designware device structure */
-DEV_UART_PTR uart_get_dev(int32_t uart_id)
-{
-	static uint32_t install_flag = 0;
-
-	/* intall device objects */
-	if (install_flag == 0) {
-		install_flag = 1;
-		dw_uart_all_install();
-	}
-
-	switch (uart_id) {
-#if (USE_DW_UART_0)
-		case DW_UART_0_ID:
-			return &dw_uart_0;
-			break;
-#endif
-#if (USE_DW_UART_1)
-		case DW_UART_1_ID:
-			return &dw_uart_1;
-			break;
-#endif
-		default:
-			break;
-	}
-	return NULL;
-}
-
-/**
- * \brief	install all uart objects
- * \note	\b MUST be called during system init
- */
-void dw_uart_all_install(void)
-{
-#if (USE_DW_UART_0)
-	dw_uart_0_install();
-#endif
-#if (USE_DW_UART_1)
-	dw_uart_1_install();
-#endif
-}
-
-/** @} end of group BOARD_EMSK_DRV_DW_UART_OBJ */
diff --git a/hw/mcu/arc/src/ext/sdk/board/emsk/uart/dw_uart_obj.h b/hw/mcu/arc/src/ext/sdk/board/emsk/uart/dw_uart_obj.h
deleted file mode 100644
index 6fe2d13d2..000000000
--- a/hw/mcu/arc/src/ext/sdk/board/emsk/uart/dw_uart_obj.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-03
- * \author Huaqi Fang(Huaqi.Fang@synopsys.com)
---------------------------------------------- */
-/**
- * \file
- * \ingroup	BOARD_EMSK_DRV_DW_UART_OBJ
- * \brief	header file of designware uart object instantiation on emsk
- */
-
-/**
- * \addtogroup	BOARD_EMSK_DRV_DW_UART_OBJ
- * @{
- */
-#ifndef _DW_UART_OBJ_H_
-#define _DW_UART_OBJ_H_
-
-#include "device/device_hal/inc/dev_uart.h"
-
-/**
- * \name	DesignWare UART Object Number
- * @{
- */
-#define DW_UART_NUM	(2)	/*!< DesignWare UART valid number */
-/** @} end of name */
-
-/**
- * \name	Designware UART Object ID Macros
- * @{
- */
-#define DW_UART_0_ID	0	/*!< uart 0 id macro */
-#define DW_UART_1_ID	1	/*!< uart 1 id macro */
-/** @} end of name */
-
-/**
- * \name	Designware UART Object Control Macros
- * @{
- */
-#define USE_DW_UART_0	1     	/*!< enable use designware uart 0 */
-#define USE_DW_UART_1	1     	/*!< enable use designware uart 1 */
-/** @} end of name */
-
-/**
- * \name	Designware UART Ringbuffer Size Control Macros
- * @{
- */
-#define MAX_SNDBUF_SIZE	256	/*!< max size of uart send buffer */
-#define MAX_RCVBUF_SIZE	10	/*!< max size of uart recv buffer */
-/** @} end of name */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern void dw_uart_all_install(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _DW_UART_OBJ_H_ */
diff --git a/hw/mcu/arc/src/ext/sdk/common/console_io.c b/hw/mcu/arc/src/ext/sdk/common/console_io.c
deleted file mode 100644
index 064b10ffe..000000000
--- a/hw/mcu/arc/src/ext/sdk/common/console_io.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-06-23
- * \author Huaqi Fang(Huaqi.Fang@synopsys.com)
---------------------------------------------- */
-
-/**
- * \file
- * \brief  common io implementation
- */
-#include <stdio.h>
-#include "inc/embARC_toolchain.h"
-#include "inc/arc/arc_builtin.h"
-#include "device/device_hal/inc/dev_uart.h"
-#include "common/console_io.h"
-#include "common/xprintf.h"
-#include "board/board.h"
-
-#define CONSOLE_UART_ID		BOARD_CONSOLE_UART_ID	/*!< console uart id */
-
-/*!< to indicate xprintf setup state(0 for not setup) */
-static int xprintf_setup_flag = 0;
-static DEV_UART *console_uart;		/*!< console uart device pointer */
-
-/** put one char */
-int console_putchar(unsigned char chr)
-{
-	if (console_uart == NULL) {
-		return -1;
-	}
-	console_uart->uart_write((const void *)(&chr), 1);
-	return 0;
-}
-
-/** put string */
-int console_putstr(const char *str, unsigned int len)
-{
-	if (console_uart == NULL) {
-		return -1;
-	}
-	return (int)console_uart->uart_write((const void *)(str), len);
-}
-
-/** get one char*/
-int console_getchar(void)
-{
-	unsigned char data;
-	if (console_uart == NULL) {
-		return -1;
-	}
-	while (!console_uart->uart_read((void *)(&data), 1));
-
-	return (int)data;
-}
-
-/** get string */
-int console_getstr(char *str, unsigned int len)
-{
-	if (console_uart == NULL) {
-		return -1;
-	}
-	return (int)console_uart->uart_read((void *)(str), len);
-}
-
-#ifndef ENABLE_BANNER
-#define ENABLE_BANNER		1
-#endif
-
-#ifndef EMBARC_BANNER_TYPE
-#define EMBARC_BANNER_TYPE	1
-#endif
-
-static const char *embarc_banner =
-#if EMBARC_BANNER_TYPE == 1
-"-----------------------------------------------------------	\r\n\
- ____                                _ ____			\r\n\
-|  _ \\ _____      _____ _ __ ___  __| | __ ) _   _		\r\n\
-| |_) / _ \\ \\ /\\ / / _ \\ '__/ _ \\/ _` |  _ \\| | | |	\r\n\
-|  __/ (_) \\ V  V /  __/ | |  __/ (_| | |_) | |_| |		\r\n\
-|_|   \\___/ \\_/\\_/ \\___|_|  \\___|\\__,_|____/ \\__, |	\r\n\
-                                             |___/		\r\n\
-                     _       _    ____   ____			\r\n\
-       ___ _ __ ___ | |__   / \\  |  _ \\ / ___|		\r\n\
-      / _ \\ '_ ` _ \\| '_ \\ / _ \\ | |_) | |			\r\n\
-     |  __/ | | | | | |_) / ___ \\|  _ <| |___			\r\n\
-      \\___|_| |_| |_|_.__/_/   \\_\\_| \\_\\\\____|		\r\n\
-------------------------------------------------------------	\r\n\
-";
-#else
-"-----------------------------------------------------------------------------------------------\r\n\
-      _/_/_/                                                                _/ _/_/_/		\r\n\
-     _/    _/   _/_/   _/      _/      _/   _/_/   _/  _/_/   _/_/     _/_/_/ _/    _/ _/    _/	\r\n\
-    _/_/_/   _/    _/ _/      _/      _/ _/_/_/_/ _/_/     _/_/_/_/ _/    _/ _/_/_/   _/    _/	\r\n\
-   _/       _/    _/   _/  _/  _/  _/   _/       _/       _/       _/    _/ _/    _/ _/    _/	\r\n\
-  _/         _/_/       _/      _/       _/_/_/ _/         _/_/_/   _/_/_/ _/_/_/     _/_/_/	\r\n\
-                                                                                         _/	\r\n\
-                                                                                    _/_/	\r\n\
-                                         _/            _/_/      _/_/_/     _/_/_/		\r\n\
-              _/_/     _/_/_/  _/_/     _/_/_/      _/    _/   _/    _/   _/			\r\n\
-           _/_/_/_/   _/    _/    _/   _/    _/    _/_/_/_/   _/_/_/     _/			\r\n\
-          _/         _/    _/    _/   _/    _/    _/    _/   _/    _/   _/			\r\n\
-           _/_/_/   _/    _/    _/   _/_/_/      _/    _/   _/    _/     _/_/_/			\r\n\
-------------------------------------------------------------------------------------------------\r\n\
-";
-#endif
-
-static void embarc_print_banner(void)
-{
-	xprintf("%s\r\n", embarc_banner);
-}
-
-/** xprintf need functions api setup */
-void xprintf_setup(void)
-{
-	if (xprintf_setup_flag) {
-		return;
-	}
-	console_uart = uart_get_dev(CONSOLE_UART_ID);
-	console_uart->uart_open(BOARD_CONSOLE_UART_BAUD);
-
-	xdev_in(console_getchar);
-	xdev_out(console_putchar);
-
-#if ENABLE_BANNER == 1
-	embarc_print_banner();
-#endif
-
-	xprintf("embARC Build Time: %s, %s\r\n", __DATE__, __TIME__);
-#if defined(__GNU__)
-	xprintf("Compiler Version: ARC GNU, %s\r\n", __VERSION__);
-#else
-	xprintf("Compiler Version: Metaware, %s\r\n", __VERSION__);
-#endif
-
-	xprintf_setup_flag = 1;
-}
-
diff --git a/hw/mcu/arc/src/ext/sdk/common/console_io.h b/hw/mcu/arc/src/ext/sdk/common/console_io.h
deleted file mode 100644
index 9fbae75d9..000000000
--- a/hw/mcu/arc/src/ext/sdk/common/console_io.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-06-23
- * \author Huaqi Fang(Huaqi.Fang@synopsys.com)
---------------------------------------------- */
-
-/**
- * \file
- * \brief  common io implementation
- */
-#ifndef _CONSOLE_IO_H_
-#define _CONSOLE_IO_H_
-
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern int console_putchar(unsigned char chr);
-extern int console_putstr(const char *str, unsigned int len);
-extern int console_getchar(void);
-extern int console_getstr(char *str, unsigned int len);
-extern void xprintf_setup(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CONSOLE_IO_H_ */
diff --git a/hw/mcu/arc/src/ext/sdk/common/xprintf.c b/hw/mcu/arc/src/ext/sdk/common/xprintf.c
deleted file mode 100644
index 103ecc8d3..000000000
--- a/hw/mcu/arc/src/ext/sdk/common/xprintf.c
+++ /dev/null
@@ -1,391 +0,0 @@
-/*------------------------------------------------------------------------/
-/  Universal string handler for user console interface
-/-------------------------------------------------------------------------/
-/
-/  Copyright (C) 2011, ChaN, all right reserved.
-/
-/ * This software is a free software and there is NO WARRANTY.
-/ * No restriction on use. You can use, modify and redistribute it for
-/   personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY.
-/ * Redistributions of source code must retain the above copyright notice.
-/
-/-------------------------------------------------------------------------*/
-
-#include "xprintf.h"
-
-#if _USE_XFUNC_OUT
-#include <stdarg.h>
-void (*xfunc_out)(unsigned char);	/* Pointer to the output stream */
-static char *outptr;
-
-/*----------------------------------------------*/
-/* Put a character                              */
-/*----------------------------------------------*/
-
-void xputc (char c)
-{
-	if (_CR_CRLF && c == '\n') xputc('\r');		/* CR -> CRLF */
-
-	if (outptr) {
-		*outptr++ = (unsigned char)c;
-		return;
-	}
-
-	if (xfunc_out) xfunc_out((unsigned char)c);
-}
-
-
-
-/*----------------------------------------------*/
-/* Put a null-terminated string                 */
-/*----------------------------------------------*/
-
-void xputs (					/* Put a string to the default device */
-	const char* str				/* Pointer to the string */
-)
-{
-	while (*str)
-		xputc(*str++);
-}
-
-
-void xfputs (					/* Put a string to the specified device */
-	void(*func)(unsigned char),	/* Pointer to the output function */
-	const char*	str				/* Pointer to the string */
-)
-{
-	void (*pf)(unsigned char);
-
-
-	pf = xfunc_out;		/* Save current output device */
-	xfunc_out = func;	/* Switch output to specified device */
-	while (*str)		/* Put the string */
-		xputc(*str++);
-	xfunc_out = pf;		/* Restore output device */
-}
-
-
-
-/*----------------------------------------------*/
-/* Formatted string output                      */
-/*----------------------------------------------*/
-/*  xprintf("%d", 1234);			"1234"
-    xprintf("%6d,%3d%%", -200, 5);	"  -200,  5%"
-    xprintf("%-6u", 100);			"100   "
-    xprintf("%ld", 12345678L);		"12345678"
-    xprintf("%04x", 0xA3);			"00a3"
-    xprintf("%08LX", 0x123ABC);		"00123ABC"
-    xprintf("%016b", 0x550F);		"0101010100001111"
-    xprintf("%s", "String");		"String"
-    xprintf("%-4s", "abc");			"abc "
-    xprintf("%4s", "abc");			" abc"
-    xprintf("%c", 'a');				"a"
-    xprintf("%f", 10.0);            <xprintf lacks floating point support>
-*/
-
-void xvprintf (
-	const char*	fmt,	/* Pointer to the format string */
-	va_list arp			/* Pointer to arguments */
-)
-{
-	unsigned int r, i, j, w, f;
-	unsigned long v;
-	char s[16], c, d, *p;
-
-
-	for (;;) {
-		c = *fmt++;					/* Get a char */
-		if (!c) break;				/* End of format? */
-		if (c != '%') {				/* Pass through it if not a % sequense */
-			xputc(c); continue;
-		}
-		f = 0;
-		c = *fmt++;					/* Get first char of the sequense */
-		if (c == '0') {				/* Flag: '0' padded */
-			f = 1; c = *fmt++;
-		} else {
-			if (c == '-') {			/* Flag: left justified */
-				f = 2; c = *fmt++;
-			}
-		}
-		for (w = 0; c >= '0' && c <= '9'; c = *fmt++)	/* Minimum width */
-			w = w * 10 + c - '0';
-		if (c == 'l' || c == 'L') {	/* Prefix: Size is long int */
-			f |= 4; c = *fmt++;
-		}
-		if (!c) break;				/* End of format? */
-		d = c;
-		if (d >= 'a') d -= 0x20;
-		switch (d) {				/* Type is... */
-		case 'S' :					/* String */
-			p = va_arg(arp, char*);
-			for (j = 0; p[j]; j++) ;
-			while (!(f & 2) && j++ < w) xputc(' ');
-			xputs(p);
-			while (j++ < w) xputc(' ');
-			continue;
-		case 'C' :					/* Character */
-			xputc((char)va_arg(arp, int)); continue;
-		case 'B' :					/* Binary */
-			r = 2; break;
-		case 'O' :					/* Octal */
-			r = 8; break;
-		case 'D' :					/* Signed decimal */
-		case 'U' :					/* Unsigned decimal */
-			r = 10; break;
-		case 'X' :					/* Hexdecimal */
-			r = 16; break;
-		default:					/* Unknown type (passthrough) */
-			xputc(c); continue;
-		}
-
-		/* Get an argument and put it in numeral */
-		v = (f & 4) ? va_arg(arp, long) : ((d == 'D') ? (long)va_arg(arp, int) : (long)va_arg(arp, unsigned int));
-		if (d == 'D' && (v & 0x80000000)) {
-			v = 0 - v;
-			f |= 8;
-		}
-		i = 0;
-		do {
-			d = (char)(v % r); v /= r;
-			if (d > 9) d += (c == 'x') ? 0x27 : 0x07;
-			s[i++] = d + '0';
-		} while (v && i < sizeof(s));
-		if ((f & 8) && (i < sizeof(s))) s[i++] = '-';
-		j = i; d = (f & 1) ? '0' : ' ';
-		while (!(f & 2) && j++ < w) xputc(d);
-		do xputc(s[--i]); while(i);
-		while (j++ < w) xputc(' ');
-	}
-}
-
-
-void xprintf (			/* Put a formatted string to the default device */
-	const char*	fmt,	/* Pointer to the format string */
-	...					/* Optional arguments */
-)
-{
-	va_list arp;
-
-
-	va_start(arp, fmt);
-	xvprintf(fmt, arp);
-	va_end(arp);
-}
-
-
-void xsprintf (			/* Put a formatted string to the memory */
-	char* buff,			/* Pointer to the output buffer */
-	const char*	fmt,	/* Pointer to the format string */
-	...					/* Optional arguments */
-)
-{
-	va_list arp;
-
-
-	outptr = buff;		/* Switch destination for memory */
-
-	va_start(arp, fmt);
-	xvprintf(fmt, arp);
-	va_end(arp);
-
-	*outptr = 0;		/* Terminate output string with a \0 */
-	outptr = 0;			/* Switch destination for device */
-}
-
-
-void xfprintf (					/* Put a formatted string to the specified device */
-	void(*func)(unsigned char),	/* Pointer to the output function */
-	const char*	fmt,			/* Pointer to the format string */
-	...							/* Optional arguments */
-)
-{
-	va_list arp;
-	void (*pf)(unsigned char);
-
-
-	pf = xfunc_out;		/* Save current output device */
-	xfunc_out = func;	/* Switch output to specified device */
-
-	va_start(arp, fmt);
-	xvprintf(fmt, arp);
-	va_end(arp);
-
-	xfunc_out = pf;		/* Restore output device */
-}
-
-
-
-/*----------------------------------------------*/
-/* Dump a line of binary dump                   */
-/*----------------------------------------------*/
-
-void put_dump (
-	const void* buff,		/* Pointer to the array to be dumped */
-	unsigned long addr,		/* Heading address value */
-	int len,				/* Number of items to be dumped */
-	int width				/* Size of the items (DF_CHAR, DF_SHORT, DF_LONG) */
-)
-{
-	int i;
-	const unsigned char *bp;
-	const unsigned short *sp;
-	const unsigned long *lp;
-
-
-	xprintf("%08lX ", addr);		/* address */
-
-	switch (width) {
-	case DW_CHAR:
-		bp = buff;
-		for (i = 0; i < len; i++)		/* Hexdecimal dump */
-			xprintf(" %02X", bp[i]);
-		xputc(' ');
-		for (i = 0; i < len; i++)		/* ASCII dump */
-			xputc((bp[i] >= ' ' && bp[i] <= '~') ? bp[i] : '.');
-		break;
-	case DW_SHORT:
-		sp = buff;
-		do								/* Hexdecimal dump */
-			xprintf(" %04X", *sp++);
-		while (--len);
-		break;
-	case DW_LONG:
-		lp = buff;
-		do								/* Hexdecimal dump */
-			xprintf(" %08LX", *lp++);
-		while (--len);
-		break;
-	}
-
-	xputc('\n');
-}
-
-#endif /* _USE_XFUNC_OUT */
-
-
-
-#if _USE_XFUNC_IN
-unsigned char (*xfunc_in)(void);	/* Pointer to the input stream */
-
-/*----------------------------------------------*/
-/* Get a line from the input                    */
-/*----------------------------------------------*/
-
-int xgets (		/* 0:End of stream, 1:A line arrived */
-	char* buff,	/* Pointer to the buffer */
-	int len		/* Buffer length */
-)
-{
-	int c, i;
-
-
-	if (!xfunc_in) return 0;		/* No input function specified */
-
-	i = 0;
-	for (;;) {
-		c = xfunc_in();				/* Get a char from the incoming stream */
-		if (!c) return 0;			/* End of stream? */
-		if (c == '\r') break;		/* End of line? */
-		if (c == '\b' && i) {		/* Back space? */
-			i--;
-			if (_LINE_ECHO) xputc(c);
-			continue;
-		}
-		if (c >= ' ' && i < len - 1) {	/* Visible chars */
-			buff[i++] = c;
-			if (_LINE_ECHO) xputc(c);
-		}
-	}
-	buff[i] = 0;	/* Terminate with a \0 */
-	if (_LINE_ECHO) xputc('\n');
-	return 1;
-}
-
-
-int xfgets (	/* 0:End of stream, 1:A line arrived */
-	unsigned char (*func)(void),	/* Pointer to the input stream function */
-	char* buff,	/* Pointer to the buffer */
-	int len		/* Buffer length */
-)
-{
-	unsigned char (*pf)(void);
-	int n;
-
-
-	pf = xfunc_in;			/* Save current input device */
-	xfunc_in = func;		/* Switch input to specified device */
-	n = xgets(buff, len);	/* Get a line */
-	xfunc_in = pf;			/* Restore input device */
-
-	return n;
-}
-
-
-/*----------------------------------------------*/
-/* Get a value of the string                    */
-/*----------------------------------------------*/
-/*	"123 -5   0x3ff 0b1111 0377  w "
-	    ^                           1st call returns 123 and next ptr
-	       ^                        2nd call returns -5 and next ptr
-                   ^                3rd call returns 1023 and next ptr
-                          ^         4th call returns 15 and next ptr
-                               ^    5th call returns 255 and next ptr
-                                  ^ 6th call fails and returns 0
-*/
-
-int xatoi (			/* 0:Failed, 1:Successful */
-	char **str,		/* Pointer to pointer to the string */
-	long *res		/* Pointer to the valiable to store the value */
-)
-{
-	unsigned long val;
-	unsigned char c, r, s = 0;
-
-
-	*res = 0;
-
-	while ((c = **str) == ' ') (*str)++;	/* Skip leading spaces */
-
-	if (c == '-') {		/* negative? */
-		s = 1;
-		c = *(++(*str));
-	}
-
-	if (c == '0') {
-		c = *(++(*str));
-		switch (c) {
-		case 'x':		/* hexdecimal */
-			r = 16; c = *(++(*str));
-			break;
-		case 'b':		/* binary */
-			r = 2; c = *(++(*str));
-			break;
-		default:
-			if (c <= ' ') return 1;	/* single zero */
-			if (c < '0' || c > '9') return 0;	/* invalid char */
-			r = 8;		/* octal */
-		}
-	} else {
-		if (c < '0' || c > '9') return 0;	/* EOL or invalid char */
-		r = 10;			/* decimal */
-	}
-
-	val = 0;
-	while (c > ' ') {
-		if (c >= 'a') c -= 0x20;
-		c -= '0';
-		if (c >= 17) {
-			c -= 7;
-		}
-		if (c >= r) return 0;		/* invalid char for current radix */
-		val = val * r + c;
-		c = *(++(*str));
-	}
-	if (s) val = 0 - val;			/* apply sign if needed */
-
-	*res = val;
-	return 1;
-}
-
-#endif /* _USE_XFUNC_IN */
diff --git a/hw/mcu/arc/src/ext/sdk/common/xprintf.h b/hw/mcu/arc/src/ext/sdk/common/xprintf.h
deleted file mode 100644
index 0485e8462..000000000
--- a/hw/mcu/arc/src/ext/sdk/common/xprintf.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*------------------------------------------------------------------------*/
-/* Universal string handler for user console interface  (C)ChaN, 2011     */
-/*------------------------------------------------------------------------*/
-
-#ifndef _STRFUNC
-#define _STRFUNC
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define _USE_XFUNC_OUT	1	/* 1: Use output functions */
-#define	_CR_CRLF		1	/* 1: Convert \n ==> \r\n in the output char */
-
-#define _USE_XFUNC_IN	1	/* 1: Use input function */
-#define	_LINE_ECHO		1	/* 1: Echo back input chars in xgets function */
-
-#if _USE_XFUNC_OUT
-#define xdev_out(func) xfunc_out = (void(*)(unsigned char))(func)
-extern void (*xfunc_out)(unsigned char);
-extern void xputc (char c);
-extern void xputs (const char* str);
-extern void xfputs (void (*func)(unsigned char), const char* str);
-extern void xvprintf (const char* fmt, va_list arp);
-extern void xprintf (const char* fmt, ...);
-extern void xsprintf (char* buff, const char* fmt, ...);
-extern void xfprintf (void (*func)(unsigned char), const char*	fmt, ...);
-extern void put_dump (const void* buff, unsigned long addr, int len, int width);
-#define DW_CHAR		sizeof(char)
-#define DW_SHORT	sizeof(short)
-#define DW_LONG		sizeof(long)
-#endif
-
-#if _USE_XFUNC_IN
-#define xdev_in(func) xfunc_in = (unsigned char(*)(void))(func)
-extern unsigned char (*xfunc_in)(void);
-extern int xgets (char* buff, int len);
-extern int xfgets (unsigned char (*func)(void), char* buff, int len);
-extern int xatoi (char** str, long* res);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/hw/mcu/arc/src/ext/sdk/device/designware/gpio/dw_gpio.c b/hw/mcu/arc/src/ext/sdk/device/designware/gpio/dw_gpio.c
deleted file mode 100644
index ce79414fc..000000000
--- a/hw/mcu/arc/src/ext/sdk/device/designware/gpio/dw_gpio.c
+++ /dev/null
@@ -1,481 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-22
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-
-/**
- * \defgroup	DEVICE_DW_GPIO	Designware GPIO Driver
- * \ingroup	DEVICE_DW
- * \brief	Designware GPIO Driver Implementation
- */
-
-/**
- * \file
- * \brief	designware gpio driver
- * \ingroup	DEVICE_DW_GPIO
- * \brief	Designware GPIO driver
- */
-#include "inc/embARC_toolchain.h"
-#include "inc/embARC_error.h"
-#include "inc/arc/arc_exception.h"
-
-#include "device/designware/gpio/dw_gpio.h"
-
-/** check expressions used in DesignWare GPIO driver implementation */
-#define DW_GPIO_CHECK_EXP(EXPR, ERROR_CODE)		CHECK_EXP(EXPR, ercd, ERROR_CODE, error_exit)
-
-#ifndef DISABLE_DEVICE_OBJECT_VALID_CHECK
-/** valid check of uart info object */
-#define VALID_CHK_GPIO_INFO_OBJECT(gpioinfo_obj_ptr)		{				\
-			DW_GPIO_CHECK_EXP((gpioinfo_obj_ptr)!=NULL, E_OBJ);			\
-			DW_GPIO_CHECK_EXP(((gpioinfo_obj_ptr)->gpio_ctrl)!=NULL, E_OBJ);	\
- 		}
-#endif
-
-/**
- * \defgroup	DEVICE_DW_GPIO_STATIC	DesignWare GPIO Driver Static Functions
- * \ingroup	DEVICE_DW_GPIO
- * \brief	Static or inline functions, variables for DesignWare GPIO handle gpio operations,
- * 	only used in this file
- * @{
- */
-Inline uint32_t dw_gpio_read_ext(DW_GPIO_PORT_PTR port)
-{
-	return  port->regs->EXT_PORTS[port->no];
-}
-
-Inline uint32_t dw_gpio_read_dir(DW_GPIO_PORT_PTR port)
-{
-	return port->regs->SWPORTS[port->no].DDR;
-}
-
-Inline uint32_t dw_gpio_read_dr(DW_GPIO_PORT_PTR port)
-{
-	return port->regs->SWPORTS[port->no].DR;
-}
-
-Inline uint32_t dw_gpio_read_mthd(DW_GPIO_PORT_PTR port)
-{
-	return port->regs->INTEN;
-}
-
-Inline void dw_gpio_int_enable(DW_GPIO_PORT_PTR port, uint32_t bit_mask)
-{
-	port->regs->INTEN |= bit_mask;
-}
-
-Inline void dw_gpio_int_disable(DW_GPIO_PORT_PTR port, uint32_t bit_mask)
-{
-	port->regs->INTEN &= (~bit_mask);
-}
-
-Inline void dw_gpio_int_mask(DW_GPIO_PORT_PTR port, uint32_t bit_mask)
-{
-	port->regs->INTMASK |= bit_mask;
-}
-
-Inline void dw_gpio_int_unmask(DW_GPIO_PORT_PTR port, uint32_t bit_mask)
-{
-	port->regs->INTMASK &= (~bit_mask);
-}
-
-Inline uint32_t dw_gpio_int_read_level(DW_GPIO_PORT_PTR port)
-{
-	return port->regs->INTTYPE_LEVEL;
-}
-
-Inline uint32_t dw_gpio_int_read_polarity(DW_GPIO_PORT_PTR port)
-{
-	return port->regs->INT_POLARITY;
-}
-
-Inline uint32_t dw_gpio_int_read_debounce(DW_GPIO_PORT_PTR port)
-{
-	return port->regs->DEBOUNCE;
-}
-
-Inline uint32_t dw_gpio_int_read_status(DW_GPIO_PORT_PTR port)
-{
-	return port->regs->INTSTATUS;
-}
-
-Inline void dw_gpio_int_clear(DW_GPIO_PORT_PTR port, uint32_t bit_mask)
-{
-	port->regs->PORTA_EOI = bit_mask;
-}
-
-static void dw_gpio_int_write_level(DW_GPIO_PORT_PTR port, uint32_t bit_mask, uint32_t bit_level)
-{
-	uint32_t reg_val;
-
-	reg_val = port->regs->INTTYPE_LEVEL;
-	reg_val &= (~bit_mask);
-	bit_level &= bit_mask;
-	reg_val |= bit_level;
-
-	port->regs->INTTYPE_LEVEL = reg_val;
-}
-
-static void dw_gpio_int_write_polarity(DW_GPIO_PORT_PTR port, uint32_t bit_mask, uint32_t bit_polarity)
-{
-	uint32_t reg_val;
-
-	reg_val = port->regs->INT_POLARITY;
-
-	reg_val &= (~bit_mask);
-	bit_polarity &= bit_mask;
-	reg_val |= bit_polarity;
-
-	port->regs->INT_POLARITY = reg_val;
-}
-
-static void dw_gpio_int_write_debounce(DW_GPIO_PORT_PTR port, uint32_t bit_mask, uint32_t bit_debounce)
-{
-	uint32_t reg_val;
-
-	reg_val = port->regs->DEBOUNCE;
-
-	reg_val &= (~bit_mask);
-	bit_debounce &= bit_mask;
-	reg_val |= bit_debounce;
-
-	port->regs->DEBOUNCE = reg_val;
-}
-
-static void dw_gpio_set_int_cfg(DW_GPIO_PORT_PTR port, DEV_GPIO_INT_CFG *int_cfg)
-{
-	dw_gpio_int_write_level(port, int_cfg->int_bit_mask, int_cfg->int_bit_type);
-	dw_gpio_int_write_polarity(port, int_cfg->int_bit_mask, int_cfg->int_bit_polarity);
-	dw_gpio_int_write_debounce(port, int_cfg->int_bit_mask, int_cfg->int_bit_debounce);
-}
-
-static void dw_gpio_get_int_cfg(DW_GPIO_PORT_PTR port, DEV_GPIO_INT_CFG *int_cfg)
-{
-	int_cfg->int_bit_type = dw_gpio_int_read_level(port) & int_cfg->int_bit_mask;
-	int_cfg->int_bit_polarity = dw_gpio_int_read_polarity(port) & int_cfg->int_bit_mask;
-	int_cfg->int_bit_debounce = dw_gpio_int_read_debounce(port) & int_cfg->int_bit_mask;
-}
-
-static void dw_gpio_write_dr(DW_GPIO_PORT_PTR port, uint32_t bit_mask, uint32_t val)
-{
-	uint32_t temp_reg;
-
-	temp_reg = port->regs->SWPORTS[port->no].DR;
-	temp_reg &= ~bit_mask;
-	val &= bit_mask;
-	temp_reg |= val;
-
-	port->regs->SWPORTS[port->no].DR = temp_reg;
-}
-
-static void dw_gpio_write_dir(DW_GPIO_PORT_PTR port, uint32_t bit_mask, uint32_t val)
-{
-	uint32_t temp_reg;
-
-	temp_reg = port->regs->SWPORTS[port->no].DDR;
-	temp_reg &= ~bit_mask;
-	val &= bit_mask;
-	temp_reg |= val;
-
-	port->regs->SWPORTS[port->no].DDR = temp_reg;
-}
-
-static uint32_t dw_gpio_read_val(DW_GPIO_PORT_PTR port)
-{
-	uint32_t val;
-
-	val = dw_gpio_read_ext(port) & (~dw_gpio_read_dir(port));
-	val |= dw_gpio_read_dr(port) & dw_gpio_read_dir(port);
-
-	return val;
-}
-
-/** @} end of group DEVICE_DW_GPIO_STATIC */
-
-/* interface for DEV_GPIO */
-/** Open designware gpio device with specified io direction configuration */
-int32_t dw_gpio_open(DEV_GPIO *gpio_obj, uint32_t dir)
-{
-	int32_t ercd = E_OK;
-	DEV_GPIO_INFO_PTR port_info_ptr = &(gpio_obj->gpio_info);
-
-	/* START ERROR CHECK */
-	VALID_CHK_GPIO_INFO_OBJECT(port_info_ptr);
-	/* END OF ERROR CHECK */
-
-	DW_GPIO_PORT_PTR port = (DW_GPIO_PORT_PTR)(port_info_ptr->gpio_ctrl);
-	DW_GPIO_CHECK_EXP(port->no <= DW_GPIO_PORT_D, E_OBJ);
-
-	port_info_ptr->opn_cnt ++;
-	if (port_info_ptr->opn_cnt > 1) { /* opened before */
-		if (dir == port_info_ptr->direction) { /* direction is the same */
-			return E_OK;
-		} else { /* open with different direction */
-			return E_OPNED;
-		}
-	}
-
-	dw_gpio_write_dir(port, port->valid_bit_mask, dir);
-
-	if (port->no == DW_GPIO_PORT_A) {
-		dw_gpio_int_clear(port, DW_GPIO_MASK_ALL);
-		dw_gpio_int_disable(port, DW_GPIO_MASK_ALL);
-		dw_gpio_int_unmask(port, DW_GPIO_MASK_ALL);
-		/* install gpio interrupt handler */
-		int_handler_install(port->intno, port->int_handler);
-		int_disable(port->intno);
-		/** Set int type, int polarity and debounce configuration to default settings of device gpio */
-		dw_gpio_set_int_cfg(port, (DEV_GPIO_INT_CFG *)(&gpio_int_cfg_default));
-		port_info_ptr->method = dw_gpio_read_mthd(port);
-	} else {
-		port_info_ptr->method = DEV_GPIO_BITS_MTHD_DEFAULT;
-	}
-
-	dw_gpio_write_dr(port, port->valid_bit_mask, 0);
-
-	port_info_ptr->direction = dir;
-	port_info_ptr->extra = NULL;
-
-error_exit:
-	return ercd;
-}
-
-/** Close designware gpio device */
-int32_t dw_gpio_close(DEV_GPIO *gpio_obj)
-{
-	int32_t ercd = E_OK;
-	DEV_GPIO_INFO_PTR port_info_ptr = &(gpio_obj->gpio_info);
-
-	/* START ERROR CHECK */
-	VALID_CHK_GPIO_INFO_OBJECT(port_info_ptr);
-	/* END OF ERROR CHECK */
-
-	DW_GPIO_PORT_PTR port = (DW_GPIO_PORT_PTR)(port_info_ptr->gpio_ctrl);
-	DW_GPIO_CHECK_EXP(port->no <= DW_GPIO_PORT_D, E_OBJ);
-
-	DW_GPIO_CHECK_EXP(port_info_ptr->opn_cnt > 0, E_OK);
-
-	port_info_ptr->opn_cnt --;
-	if (port_info_ptr->opn_cnt == 0) {
-		dw_gpio_write_dr(port, port->valid_bit_mask, 0);
-		dw_gpio_write_dir(port, port->valid_bit_mask, 0);
-		if (port->no == DW_GPIO_PORT_A) {
-			dw_gpio_int_clear(port, DW_GPIO_MASK_ALL);
-			dw_gpio_int_disable(port, DW_GPIO_MASK_ALL);
-			int_disable(port->intno);
-		}
-
-		port_info_ptr->direction = 0;
-		port_info_ptr->method = 0;
-		port_info_ptr->extra = NULL;
-	} else {
-		ercd = E_OPNED;
-	}
-
-error_exit:
-	return ercd;
-}
-
-/** Read designware gpio device value */
-int32_t dw_gpio_read(DEV_GPIO *gpio_obj, uint32_t *val, uint32_t mask)
-{
-	int32_t ercd = E_OK;
-	DEV_GPIO_INFO_PTR port_info_ptr = &(gpio_obj->gpio_info);
-
-	/* START ERROR CHECK */
-	VALID_CHK_GPIO_INFO_OBJECT(port_info_ptr);
-	/* END OF ERROR CHECK */
-
-	DW_GPIO_PORT_PTR port = (DW_GPIO_PORT_PTR)(port_info_ptr->gpio_ctrl);
-	DW_GPIO_CHECK_EXP(port->no <= DW_GPIO_PORT_D, E_OBJ);
-	DW_GPIO_CHECK_EXP(port_info_ptr->opn_cnt > 0, E_CLSED);
-
-	DW_GPIO_CHECK_EXP(val!=NULL, E_PAR);
-
-	//*val = dw_gpio_read_ext(port) & mask;
-	*val = dw_gpio_read_val(port) & mask;
-
-error_exit:
-	return ercd;
-}
-
-/** Write designware gpio device value */
-int32_t dw_gpio_write(DEV_GPIO *gpio_obj, uint32_t val, uint32_t mask)
-{
-	int32_t ercd = E_OK;
-	DEV_GPIO_INFO_PTR port_info_ptr = &(gpio_obj->gpio_info);
-
-	/* START ERROR CHECK */
-	VALID_CHK_GPIO_INFO_OBJECT(port_info_ptr);
-	/* END OF ERROR CHECK */
-
-	DW_GPIO_PORT_PTR port = (DW_GPIO_PORT_PTR)(port_info_ptr->gpio_ctrl);
-	DW_GPIO_CHECK_EXP(port->no <= DW_GPIO_PORT_D, E_OBJ);
-	DW_GPIO_CHECK_EXP(port_info_ptr->opn_cnt > 0, E_CLSED);
-
-	dw_gpio_write_dr(port, mask, val);
-
-error_exit:
-	return ercd;
-}
-
-/** Control designware gpio device */
-int32_t dw_gpio_control(DEV_GPIO *gpio_obj, uint32_t ctrl_cmd, void *param)
-{
-	int32_t ercd = E_OK;
-	DEV_GPIO_INFO_PTR port_info_ptr = &(gpio_obj->gpio_info);
-
-	/* START ERROR CHECK */
-	VALID_CHK_GPIO_INFO_OBJECT(port_info_ptr);
-	/* END OF ERROR CHECK */
-
-	DW_GPIO_PORT_PTR port = (DW_GPIO_PORT_PTR)(port_info_ptr->gpio_ctrl);
-	DW_GPIO_CHECK_EXP(port->no <= DW_GPIO_PORT_D, E_OBJ);
-	DW_GPIO_CHECK_EXP(port_info_ptr->opn_cnt > 0, E_CLSED);
-
-	uint32_t val32;	/** to receive unsigned int value */
-
-	if (ctrl_cmd == GPIO_CMD_SET_BIT_DIR_INPUT) {
-		val32 = (uint32_t)param;
-		dw_gpio_write_dir(port, val32, DW_GPIO_INPUT_ALL);
-		port_info_ptr->direction = dw_gpio_read_dir(port);
-	} else if (ctrl_cmd == GPIO_CMD_SET_BIT_DIR_OUTPUT) {
-		val32 = (uint32_t)param;
-		dw_gpio_write_dir(port, val32, DW_GPIO_OUTPUT_ALL);
-		port_info_ptr->direction = dw_gpio_read_dir(port);
-	} else if (ctrl_cmd == GPIO_CMD_GET_BIT_DIR) {
-		DW_GPIO_CHECK_EXP((param!=NULL) && CHECK_ALIGN_4BYTES(param), E_PAR);
-		port_info_ptr->direction = dw_gpio_read_dir(port);
-		*((int32_t *)param) = port_info_ptr->direction;
-	} else {
-		DW_GPIO_CHECK_EXP(port->no == DW_GPIO_PORT_A, E_NOSPT);
-		/* output pin cannot be used as interrupt */
-		DEV_GPIO_INT_CFG *gpio_int_cfg;
-		DEV_GPIO_BIT_ISR *port_bit_isr;
-
-		switch (ctrl_cmd) {
-			case GPIO_CMD_SET_BIT_INT_CFG:
-				DW_GPIO_CHECK_EXP((param!=NULL) && CHECK_ALIGN_4BYTES(param), E_PAR);
-				gpio_int_cfg = (DEV_GPIO_INT_CFG *)param;
-				dw_gpio_set_int_cfg(port, gpio_int_cfg);
-				break;
-			case GPIO_CMD_GET_BIT_INT_CFG:
-				DW_GPIO_CHECK_EXP((param!=NULL) && CHECK_ALIGN_4BYTES(param), E_PAR);
-				gpio_int_cfg = (DEV_GPIO_INT_CFG *)param;
-				/** read configuration, each bit stands for different configuration */
-				dw_gpio_get_int_cfg(port, gpio_int_cfg);
-				break;
-			case GPIO_CMD_SET_BIT_ISR:
-				DW_GPIO_CHECK_EXP((param!=NULL) && CHECK_ALIGN_4BYTES(param), E_PAR);
-				port_bit_isr = (DEV_GPIO_BIT_ISR *)param;
-				if (port_bit_isr->int_bit_ofs < port->gpio_bit_isr->int_bit_max_cnt) {
-					port->gpio_bit_isr->int_bit_handler_ptr[port_bit_isr->int_bit_ofs] = port_bit_isr->int_bit_handler;
-				} else {
-					ercd = E_PAR;
-				}
-				break;
-			case GPIO_CMD_GET_BIT_ISR:
-				DW_GPIO_CHECK_EXP((param!=NULL) && CHECK_ALIGN_4BYTES(param), E_PAR);
-				port_bit_isr = (DEV_GPIO_BIT_ISR *)param;
-				if (port_bit_isr->int_bit_ofs < port->gpio_bit_isr->int_bit_max_cnt) {
-					port_bit_isr->int_bit_handler = port->gpio_bit_isr->int_bit_handler_ptr[port_bit_isr->int_bit_ofs];
-				} else {
-					ercd = E_PAR;
-				}
-				break;
-			case GPIO_CMD_ENA_BIT_INT:
-				val32 = (uint32_t)param;
-				dw_gpio_int_enable(port, val32);
-				port_info_ptr->method = dw_gpio_read_mthd(port);
-				if (port_info_ptr->method) {
-					int_enable(port->intno);
-				}
-				break;
-			case GPIO_CMD_DIS_BIT_INT:
-				val32 = (uint32_t)param;
-				dw_gpio_int_disable(port, val32);
-				port_info_ptr->method = dw_gpio_read_mthd(port);
-				if (port_info_ptr->method == 0) {
-					int_disable(port->intno);
-				}
-				break;
-			case GPIO_CMD_GET_BIT_MTHD:
-				DW_GPIO_CHECK_EXP((param!=NULL) && CHECK_ALIGN_4BYTES(param), E_PAR);
-				port_info_ptr->method = dw_gpio_read_mthd(port);
-				*((int32_t *)param) = port_info_ptr->method;
-				break;
-			default:
-				ercd = E_NOSPT;
-				break;
-		}
-	}
-error_exit:
-	return ercd;
-}
-
-/** designware gpio interrupt process */
-int32_t dw_gpio_isr_handler(DEV_GPIO *gpio_obj, void *ptr)
-{
-	int32_t ercd = E_OK;
-	DEV_GPIO_INFO_PTR port_info_ptr = &(gpio_obj->gpio_info);
-
-	/* START ERROR CHECK */
-	VALID_CHK_GPIO_INFO_OBJECT(port_info_ptr);
-	/* END OF ERROR CHECK */
-
-	DW_GPIO_PORT_PTR port = (DW_GPIO_PORT_PTR)(port_info_ptr->gpio_ctrl);
-	DW_GPIO_CHECK_EXP(port->no == DW_GPIO_PORT_A, E_NOSPT);
-
-	uint32_t i, gpio_bit_isr_state;
-	uint32_t max_int_bit_count = 0;
-
-	/** read interrupt status */
-	gpio_bit_isr_state = dw_gpio_int_read_status(port);
-
-	if (port->gpio_bit_isr) {
-		max_int_bit_count = (port->gpio_bit_isr->int_bit_max_cnt);
-	} else {
-		dw_gpio_int_clear(port, gpio_bit_isr_state);
-	}
-
-	for (i=0; i<max_int_bit_count; i++) {
-		if (gpio_bit_isr_state & (1<<i)) {
-			/* this bit interrupt enabled */
-			if (port->gpio_bit_isr->int_bit_handler_ptr[i]) {
-				port->gpio_bit_isr->int_bit_handler_ptr[i](gpio_obj);
-			}
-			dw_gpio_int_clear(port, (1<<i)); /** clear this bit interrupt */
-		}
-	}
-
-error_exit:
-	return ercd;
-}
diff --git a/hw/mcu/arc/src/ext/sdk/device/designware/gpio/dw_gpio.h b/hw/mcu/arc/src/ext/sdk/device/designware/gpio/dw_gpio.h
deleted file mode 100644
index c087975f8..000000000
--- a/hw/mcu/arc/src/ext/sdk/device/designware/gpio/dw_gpio.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2016, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2016.05
- * \date 2014-07-22
- * \author Wayne Ren(Wei.Ren@synopsys.com)
---------------------------------------------- */
-
-/**
- * \file
- * \brief	designware gpio driver
- * \ingroup	DEVICE_DW_GPIO
- * \brief	Designware GPIO driver header file
- */
-
-#ifndef _DW_GPIO_H_
-#define _DW_GPIO_H_
-
-#include "device/device_hal/inc/dev_gpio.h"
-
-#include "inc/arc/arc_exception.h"
-
-#define DW_GPIO_PORT_A	(0x00)
-#define DW_GPIO_PORT_B	(0x01)
-#define DW_GPIO_PORT_C	(0x02)
-#define DW_GPIO_PORT_D	(0x03)
-
-#define DW_GPIO_INT_ACT_LOW			GPIO_INT_ACTIVE_LOW
-#define DW_GPIO_INT_ACT_HIGH			GPIO_INT_ACTIVE_HIGH
-
-#define DW_GPIO_INT_LEVEL_TRIG			GPIO_INT_LEVEL_TRIG
-#define DW_GPIO_INT_EDGE_TRIG			GPIO_INT_EDGE_TRIG
-
-#define DW_GPIO_INT_NO_DEBOUNCE			GPIO_INT_NO_DEBOUNCE
-#define DW_GPIO_INT_DEBOUNCE			GPIO_INT_DEBOUNCE
-
-#define DW_GPIO_ALL_ZERO			(0x0)
-#define DW_GPIO_ALL_ONE				(0xffffffff)
-#define DW_GPIO_MASK_ALL			(0xffffffff)
-#define DW_GPIO_INPUT_ALL			(0x0)
-#define DW_GPIO_OUTPUT_ALL			(0xffffffff)
-
-/**
- * \name	DesignWare GPIO Register Structure
- * \brief	contains definitions of DesignWare GPIO register structure.
- * @{
- */
-typedef struct port_ctrl {
-	uint32_t DR;
-	uint32_t DDR;
-	uint32_t CTRL;
-} PORT_CTRL;
-
-/* DW GPIO PORTS Registers */
-typedef volatile struct dw_gpio_reg {
-	PORT_CTRL SWPORTS[4];
-	uint32_t INTEN;		/*!< (0x30) */
-	uint32_t INTMASK;	/*!< (0x34) */
-	uint32_t INTTYPE_LEVEL;	/*!< (0x38) */
-	uint32_t INT_POLARITY;	/*!< (0x3c) */
-	uint32_t INTSTATUS;	/*!< (0x40) */
-	uint32_t RAW_INTSTATUS;	/*!< (0x44) */
-	uint32_t DEBOUNCE;	/*!< (0x48) */
-	uint32_t PORTA_EOI;	/*!< (0x4c) */
-	uint32_t EXT_PORTS[4];	/*!< (0x50) -A
-				     (0x54) -B
-				     (0x58) -C
-				     (0x5c) -D */
-	uint32_t LS_SYNC;	/*!< (0x60) */
-	uint32_t ID_CODE;	/*!< (0x64) */
-	uint32_t RESERVED_3;	/*!< (0x68) */
-	uint32_t VER_ID_CODE;	/*!< (0x6c) */
-	uint32_t CONFIG_REG2;	/*!< (0x70) */
-	uint32_t CONFIG_REG1;	/*!< (0x74) */
-} DW_GPIO_REG, *DW_GPIO_REG_PTR;
-/** @} */
-
-/** interrupt handler for each port bit */
-typedef struct dw_gpio_bit_isr {
-	uint32_t int_bit_max_cnt;		/*!< max bit count for each port */
-	DEV_GPIO_HANDLER *int_bit_handler_ptr;	/*!< interrupt handler pointer */
-} DW_GPIO_BIT_ISR, * DW_GPIO_BIT_ISR_PTR;
-
-/**
- * \brief	DesignWare GPIO control structure definition
- * \details	implement of dev_gpio_info::gpio_ctrl
- */
-typedef struct dw_gpio_port {
-	uint32_t no;				/*!< gpio port number */
-	DW_GPIO_REG_PTR	regs;			/*!< gpio port register */
-	uint32_t intno;				/*!< gpio interrupt vector number */
-	uint32_t valid_bit_mask;		/*!< valid bit mask of gpio port */
-	INT_HANDLER int_handler;		/*!< gpio interrupt handler */
-	DW_GPIO_BIT_ISR_PTR gpio_bit_isr;	/*!< gpio bit handler struct */
-} DW_GPIO_PORT, *DW_GPIO_PORT_PTR;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * \name	DesignWare GPIO Function Declaration
- * \brief	contains declarations of designware gpio functions.
- * \details	This are only used in gpio object implementation source file
- * @{
- */
-extern int32_t dw_gpio_open(DEV_GPIO *gpio_obj, uint32_t dir);
-extern int32_t dw_gpio_close(DEV_GPIO *gpio_obj);
-extern int32_t dw_gpio_read(DEV_GPIO *gpio_obj, uint32_t *val, uint32_t mask);
-extern int32_t dw_gpio_write(DEV_GPIO *gpio_obj, uint32_t val, uint32_t mask);
-extern int32_t dw_gpio_control(DEV_GPIO *gpio_obj, uint32_t ctrl_cmd, void *param);
-extern int32_t dw_gpio_isr_handler(DEV_GPIO *gpio_obj, void *ptr);
-
-#ifdef __cplusplus
-}
-#endif
-
-/** @} */
-
-#endif /* _DW_GPIO_H_ */
diff --git a/hw/mcu/arc/src/ext/sdk/device/designware/iic/dw_iic.c b/hw/mcu/arc/src/ext/sdk/device/designware/iic/dw_iic.c
deleted file mode 100644
index abef37ace..000000000
--- a/hw/mcu/arc/src/ext/sdk/device/designware/iic/dw_iic.c
+++ /dev/null
@@ -1,1584 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2017, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2017.03
- * \date 2014-06-30
- * \author Huaqi Fang(Huaqi.Fang@synopsys.com)
---------------------------------------------- */
-
-/**
- * \defgroup	DEVICE_DW_IIC	Designware IIC Driver
- * \ingroup	DEVICE_DW
- * \brief	Designware IIC Driver Implementation
- */
-
-/**
- * \file
- * \brief	Designware iic driver
- * \ingroup	DEVICE_DW_IIC
- */
-#include <string.h>
-
-#include "inc/embARC_toolchain.h"
-#include "inc/embARC_error.h"
-
-#include "inc/arc/arc_exception.h"
-
-#include "device/designware/iic/dw_iic_hal.h"
-#include "device/designware/iic/dw_iic.h"
-
-/** check expressions used in DesignWare IIC driver implementation */
-#define DW_IIC_CHECK_EXP(EXPR, ERROR_CODE)		CHECK_EXP(EXPR, ercd, ERROR_CODE, error_exit)
-
-#ifndef DISABLE_DEVICE_OBJECT_VALID_CHECK
-/** valid check of iic info object */
-#define VALID_CHK_IIC_INFO_OBJECT(iicinfo_obj_ptr)		{			\
-			DW_IIC_CHECK_EXP((iicinfo_obj_ptr)!=NULL, E_OBJ);		\
-			DW_IIC_CHECK_EXP(((iicinfo_obj_ptr)->iic_ctrl)!=NULL, E_OBJ);	\
- 		}
-#endif
-
-/**
- * \name	DesignWare IIC Interrupt Callback Routine Select Marcos
- * \brief	DesignWare IIC interrupt callback routines select macros definitions
- * @{
- */
-#define DW_IIC_RDY_SND					(1U)	/*!< ready to send callback */
-#define DW_IIC_RDY_RCV					(2U)	/*!< ready to receive callback */
-/** @} */
-
-/**
- * \defgroup	DEVICE_DW_IIC_STATIC	DesignWare IIC Driver Static Functions
- * \ingroup	DEVICE_DW_IIC
- * \brief	Static or inline functions, variables for DesignWare IIC handle iic operations,
- * 	only used in this file.
- * @{
- */
-/** Disable designware iic device */
-Inline void dw_iic_disable(DW_IIC_REG *iic_reg_ptr)
-{
-	iic_reg_ptr->IC_ENABLE = DW_IIC_DISABLE;
-}
-/** Enable designware iic device */
-Inline void dw_iic_enable(DW_IIC_REG *iic_reg_ptr)
-{
-	iic_reg_ptr->IC_ENABLE = DW_IIC_ENABLE;
-}
-
-/** Clear all designware iic interrupt */
-Inline void dw_iic_clear_interrupt_all(DW_IIC_REG *iic_reg_ptr)
-{
-	(void)iic_reg_ptr->IC_CLR_INTR;
-}
-
-/** test whether iic is ready to write, 1 ready, 0 not ready */
-Inline int32_t dw_iic_putready(DW_IIC_REG *iic_reg_ptr)
-{
-	return ((iic_reg_ptr->IC_STATUS & IC_STATUS_TFNF) != 0);
-}
-/** test whether iic is ready to receive, 1 ready, 0 not ready */
-Inline int32_t dw_iic_getready(DW_IIC_REG *iic_reg_ptr)
-{
-	return ((iic_reg_ptr->IC_STATUS & IC_STATUS_RFNE) != 0);
-}
-/** Write data into IIC TX FIFO with STOP/RESTART Condition, and R/W bit */
-Inline void dw_iic_putdata(DW_IIC_REG *iic_reg_ptr, uint32_t data)
-{
-	iic_reg_ptr->IC_DATA_CMD = data;
-}
-
-/** Read Data from IIC RX FIFO */
-Inline uint32_t dw_iic_getdata(DW_IIC_REG *iic_reg_ptr)
-{
-	return (iic_reg_ptr->IC_DATA_CMD) & 0xff;
-}
-
-/** Enable designware iic bit interrupt with mask */
-Inline void dw_iic_unmask_interrupt(DW_IIC_REG *iic_reg_ptr, uint32_t mask)
-{
-	iic_reg_ptr->IC_INTR_MASK |= mask;
-}
-
-/** Disable designware iic bit interrupt with mask */
-Inline void dw_iic_mask_interrupt(DW_IIC_REG *iic_reg_ptr, uint32_t mask)
-{
-	iic_reg_ptr->IC_INTR_MASK &= ~mask;
-}
-
-/** Get TX FIFO Length */
-Inline uint32_t dw_iic_get_txfifo_len(DW_IIC_REG *iic_reg_ptr)
-{
-	uint32_t txfifolen;
-
-	txfifolen = ((iic_reg_ptr->IC_COMP_PARAM_1 >> 16) & 0xff) + 1;
-
-	return txfifolen;
-}
-
-/** Get RX FIFO Length */
-Inline uint32_t dw_iic_get_rxfifo_len(DW_IIC_REG *iic_reg_ptr)
-{
-	uint32_t rxfifolen;
-
-	rxfifolen = ((iic_reg_ptr->IC_COMP_PARAM_1 >> 8) & 0xff) + 1;
-
-	return rxfifolen;
-}
-
-/** Set designware iic transfer in 7bit of 10bit addressing mode as a master */
-Inline void dw_iic_set_mstaddr_mode(DW_IIC_REG *iic_reg_ptr, uint32_t mode)
-{
-#if DW_IIC_DYNAMIC_TAR_UPDATE_SUPPORT
-	if (mode == IIC_7BIT_ADDRESS) {
-		iic_reg_ptr->IC_TAR &= ~IC_10BITADDR_MASTER;
-	} else {
-		iic_reg_ptr->IC_TAR |= IC_10BITADDR_MASTER;
-	}
-#else
-	dw_iic_disable(iic_reg_ptr);
-	if (mode == IIC_7BIT_ADDRESS) {
-		iic_reg_ptr->IC_CON &= ~MST_10_BIT_ADDR_MODE;
-	} else {
-		iic_reg_ptr->IC_CON |= MST_10_BIT_ADDR_MODE;
-	}
-	dw_iic_enable(iic_reg_ptr);
-#endif
-}
-
-/** Set designware iic transfer in 7bit of 10bit addressing mode as a slave */
-Inline void dw_iic_set_slvaddr_mode(DW_IIC_REG *iic_reg_ptr, uint32_t mode)
-{
-	dw_iic_disable(iic_reg_ptr);
-	if (mode == IIC_7BIT_ADDRESS) {
-		iic_reg_ptr->IC_CON &= ~SLV_10_BIT_ADDR_MODE;
-	} else {
-		iic_reg_ptr->IC_CON |= SLV_10_BIT_ADDR_MODE;
-	}
-	dw_iic_enable(iic_reg_ptr);
-}
-
-/** Set designware iic transfer target address for addressing any iic slave device as a master */
-Inline void dw_iic_set_taraddr(DW_IIC_REG *iic_reg_ptr, uint32_t address)
-{
-#if DW_IIC_DYNAMIC_TAR_UPDATE_SUPPORT
-	iic_reg_ptr->IC_TAR &= ~(IC_TAR_10BIT_ADDR_MASK);
-	iic_reg_ptr->IC_TAR |= (IC_TAR_10BIT_ADDR_MASK & address);
-#else
-	dw_iic_disable(iic_reg_ptr);
-	iic_reg_ptr->IC_TAR &= ~(IC_TAR_10BIT_ADDR_MASK);
-	iic_reg_ptr->IC_TAR |= (IC_TAR_10BIT_ADDR_MASK & address);
-	dw_iic_enable(iic_reg_ptr);
-#endif
-}
-
-/** Set designware iic slave address as a slave */
-Inline void dw_iic_set_slvaddr(DW_IIC_REG *iic_reg_ptr, uint32_t address)
-{
-	dw_iic_disable(iic_reg_ptr);
-	iic_reg_ptr->IC_SAR &= ~(IC_SAR_10BIT_ADDR_MASK);
-	iic_reg_ptr->IC_SAR |= (IC_SAR_10BIT_ADDR_MASK & address);
-	dw_iic_enable(iic_reg_ptr);
-}
-
-/** Select speed mode, and return proper speed mode configuration */
-Inline uint32_t dw_iic_select_speedmode(uint32_t speedmode)
-{
-	uint32_t speedcfg;
-
-	if (speedmode == IIC_SPEED_STANDARD) {
-		speedcfg = IC_CON_SPEED_STANDARD;
-	} else if (speedmode == IIC_SPEED_FAST) {
-		speedcfg = IC_CON_SPEED_FAST;
-	} else if (speedmode == IIC_SPEED_FASTPLUS) {
-		speedcfg = IC_CON_SPEED_FAST;
-	} else if (speedmode == IIC_SPEED_HIGH) {
-		speedcfg = IC_CON_SPEED_HIGH;
-	} else {
-		speedcfg = IC_CON_SPEED_HIGH;
-	}
-	return speedcfg;
-}
-/** Set designware iic speed mode */
-Inline void dw_iic_set_speedmode(DW_IIC_REG *iic_reg_ptr, uint32_t speedmode)
-{
-	uint32_t ic_con_val;
-
-	dw_iic_disable(iic_reg_ptr);
-	ic_con_val = iic_reg_ptr->IC_CON & (~IC_CON_SPEED_MASK);
-	ic_con_val |= dw_iic_select_speedmode(speedmode);
-	iic_reg_ptr->IC_CON = ic_con_val;
-	dw_iic_enable(iic_reg_ptr);
-}
-
-/** Set designware working mode as master or slave */
-Inline void dw_iic_set_working_mode(DW_IIC_REG *iic_reg_ptr, uint32_t mode)
-{
-	uint32_t ic_con_val;
-	dw_iic_disable(iic_reg_ptr);
-	ic_con_val = iic_reg_ptr->IC_CON & (~IC_CON_MST_SLV_MODE_MASK);
-	if (mode == DEV_MASTER_MODE) {
-		ic_con_val |= IC_CON_ENA_MASTER_MODE;
-	} else {
-		ic_con_val |= IC_CON_ENA_SLAVE_MODE;
-	}
-	dw_iic_enable(iic_reg_ptr);
-}
-
-/** Set IC_CLK frequency by configuration the *CNT registers for different speed modes */
-Inline void dw_iic_set_scl_cnt(DW_IIC_REG *iic_reg_ptr, DW_IIC_SCL_CNT *scl_cnt)
-{
-	dw_iic_disable(iic_reg_ptr);
-	iic_reg_ptr->IC_SS_SCL_HCNT = scl_cnt->ss_scl_hcnt;
-	iic_reg_ptr->IC_SS_SCL_LCNT = scl_cnt->ss_scl_lcnt;
-	iic_reg_ptr->IC_FS_SCL_HCNT = scl_cnt->fs_scl_hcnt;
-	iic_reg_ptr->IC_FS_SCL_LCNT = scl_cnt->fs_scl_lcnt;
-	iic_reg_ptr->IC_HS_SCL_HCNT = scl_cnt->hs_scl_hcnt;
-	iic_reg_ptr->IC_HS_SCL_LCNT = scl_cnt->hs_scl_lcnt;
-	dw_iic_enable(iic_reg_ptr);
-}
-
-/** Set spike suppression configuration */
-Inline void dw_iic_set_spike_len(DW_IIC_REG *iic_reg_ptr, DW_IIC_SPKLEN *spklen)
-{
-	dw_iic_disable(iic_reg_ptr);
-	iic_reg_ptr->IC_FS_SPKLEN = spklen->fs_spklen;
-	iic_reg_ptr->IC_HS_SPKLEN = spklen->hs_spklen;
-	dw_iic_enable(iic_reg_ptr);
-}
-
-Inline void dw_iic_flush_tx(DW_IIC_REG *iic_reg_ptr)
-{
-	(void)iic_reg_ptr->IC_CLR_INTR;
-}
-
-Inline void dw_iic_flush_rx(DW_IIC_REG *iic_reg_ptr)
-{
-}
-
-static uint32_t dw_iic_get_slv_state(DW_IIC_REG *iic_reg_ptr)
-{
-	uint32_t status;
-	uint32_t slv_state = IIC_SLAVE_STATE_FREE;
-
-	status = iic_reg_ptr->IC_RAW_INTR_STAT;
-	if (status & IC_INTR_STAT_GEN_CALL) {
-	/* General Call address is received and it is acknowledged */
-		slv_state |= IIC_SLAVE_STATE_GC_REQ;
-	}
-	if (status & IC_INTR_STAT_RX_FULL) {
-	/* master is attempting to write data to this slave */
-		slv_state |= IIC_SLAVE_STATE_WR_REQ;
-	}
-	if (status & IC_INTR_STAT_RD_REQ) {
-	/* master is attempting to read data from this slave */
-		slv_state |= IIC_SLAVE_STATE_RD_REQ;
-	}
-	if (status & IC_INTR_STAT_RX_DONE) {
-	/* master does not acknowledge a transmitted byte, and transmission is done */
-		slv_state |= IIC_SLAVE_STATE_RD_DONE;
-		status = iic_reg_ptr->IC_CLR_RX_DONE;
-	}
-	if (status & IC_INTR_STAT_START_DET) {
-	/* a START or RESTART condition has occurred */
-		slv_state |= IIC_SLAVE_STATE_START;
-		status = iic_reg_ptr->IC_CLR_START_DET; /* Clear it when read */
-	}
-	if (status & IC_INTR_STAT_STOP_DET) {
-	/* a STOP condition has occurred */
-		slv_state |= IIC_SLAVE_STATE_STOP;
-		status = iic_reg_ptr->IC_CLR_STOP_DET;  /* Clear it when read */
-	}
-	if (status & (IC_INTR_STAT_TX_ABRT|IC_INTR_STAT_TX_OVER\
-		|IC_INTR_STAT_RX_OVER|IC_INTR_STAT_RX_UNDER)) {
-	/* error case */
-		slv_state |= IIC_SLAVE_STATE_ERROR;
-		status = iic_reg_ptr->IC_CLR_TX_ABRT;  /* Clear it when read */
-		status = iic_reg_ptr->IC_CLR_TX_OVER;
-		status = iic_reg_ptr->IC_CLR_RX_OVER;
-		status = iic_reg_ptr->IC_CLR_RX_UNDER;
-	}
-
-	return slv_state;
-}
-
-/** Init Designware IIC Device into Master mode */
-static void dw_iic_master_init(DW_IIC_CTRL *iic_ctrl_ptr, uint32_t speed_mode, uint32_t addr_mode, uint32_t tar_addr)
-{
-	uint32_t ic_con_val = 0;
-	DW_IIC_REG *iic_reg_ptr = iic_ctrl_ptr->dw_iic_regs;
-
-	dw_iic_disable(iic_reg_ptr);
-
-	/* disable all iic interrupt */
-	iic_reg_ptr->IC_INTR_MASK = IC_INT_DISABLE_ALL;
-
-	/* Set to 7bit addressing and update target address */
-	iic_reg_ptr->IC_TAR = (tar_addr & IC_TAR_10BIT_ADDR_MASK) | IC_TAR_SPECIAL | IC_TAR_GC_OR_START;
-	/* master mode, restart enabled */
-	ic_con_val = dw_iic_select_speedmode(speed_mode) | IC_CON_ENA_MASTER_MODE | IC_CON_RESTART_EN;
-
-#if DW_IIC_DYNAMIC_TAR_UPDATE_SUPPORT
-	if (addr_mode == IIC_10BIT_ADDRESS) {
-		iic_reg_ptr->IC_TAR |= MST_10_BIT_ADDR_MODE;
-	}
-#else
-	if (addr_mode == IIC_10BIT_ADDRESS) {
-		ic_con_val |= MST_10_BIT_ADDR_MODE;
-	}
-#endif
-	/* Set final IC_CON value */
-	iic_reg_ptr->IC_CON = ic_con_val;
-	/* FIFO threshold settings */
-	iic_reg_ptr->IC_TX_TL = IIC_TX_THRESHOLD;
-	iic_reg_ptr->IC_RX_TL = IIC_RX_THRESHOLD;
-	/* Master code settings */
-	iic_reg_ptr->IC_HS_MADDR = iic_ctrl_ptr->iic_master_code;
-	dw_iic_enable(iic_reg_ptr);
-
-	/* Clock Settings */
-	dw_iic_set_scl_cnt(iic_reg_ptr, &(iic_ctrl_ptr->iic_scl_cnt));
-	dw_iic_set_spike_len(iic_reg_ptr, &(iic_ctrl_ptr->iic_spklen));
-}
-
-/** Init Designware IIC Device into Slave mode */
-static void dw_iic_slave_init(DW_IIC_CTRL *iic_ctrl_ptr, uint32_t addr_mode, uint32_t slv_addr)
-{
-	uint32_t ic_con_val = 0;
-	DW_IIC_REG *iic_reg_ptr = iic_ctrl_ptr->dw_iic_regs;
-
-	dw_iic_disable(iic_reg_ptr);
-
-	/* disable all iic interrupt */
-	iic_reg_ptr->IC_INTR_MASK = IC_INT_DISABLE_ALL;
-
-	/* Set slave device address as a slave */
-	iic_reg_ptr->IC_SAR = slv_addr & IC_SAR_10BIT_ADDR_MASK;
-	/* slave mode, 7 bit slave address */
-	ic_con_val = IC_CON_ENA_SLAVE_MODE;
-	/* If addr mode select to be 10 bit address mode */
-	if (addr_mode == IIC_10BIT_ADDRESS) {
-		ic_con_val |= SLV_10_BIT_ADDR_MODE;
-	}
-
-	/* Set final IC_CON value */
-	iic_reg_ptr->IC_CON = ic_con_val;
-	/* FIFO threshold settings */
-	iic_reg_ptr->IC_TX_TL = IIC_TX_THRESHOLD;
-	iic_reg_ptr->IC_RX_TL = IIC_RX_THRESHOLD;
-
-	dw_iic_enable(iic_reg_ptr);
-}
-
-/** Check error for IIC master device */
-static int32_t dw_iic_mst_chkerr(DW_IIC_CTRL *iic_ctrl_ptr)
-{
-	uint32_t status;
-	int32_t ercd = IIC_ERR_NONE;
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG *)(iic_ctrl_ptr->dw_iic_regs);
-
-	status = iic_reg_ptr->IC_RAW_INTR_STAT;
-	if (status & IC_INTR_STAT_TX_ABRT) {
-		status = iic_reg_ptr->IC_TX_ABRT_SOURCE;
-		if (status & IIC_MST_ABRT_LOST_BUS) {
-			ercd = IIC_ERR_LOST_BUS;
-		} else if (status & IIC_MST_ABRT_ADDR_NOACK) {
-			ercd = IIC_ERR_ADDR_NOACK;
-		} else if (status & IIC_MST_ABRT_DATA_NOACK) {
-			ercd = IIC_ERR_DATA_NOACK;
-		} else {
-			ercd = IIC_ERR_UNDEF;
-		}
-		status = iic_reg_ptr->IC_CLR_TX_ABRT;
-	} else {
-		if (status & IC_INTR_STAT_TX_OVER) {
-			iic_ctrl_ptr->iic_tx_over ++;
-			status = iic_reg_ptr->IC_CLR_TX_OVER;
-		}
-		if (status & (IC_INTR_STAT_RX_OVER|IC_INTR_STAT_RX_UNDER)) {
-			iic_ctrl_ptr->iic_rx_over ++;
-			status = iic_reg_ptr->IC_CLR_RX_OVER;
-			status = iic_reg_ptr->IC_CLR_RX_UNDER;
-		}
-	}
-	return ercd;
-}
-
-/** Check error for IIC slave device */
-static int32_t dw_iic_slv_chkerr(DW_IIC_CTRL *iic_ctrl_ptr)
-{
-	uint32_t status;
-	int32_t ercd = IIC_ERR_NONE;
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG *)(iic_ctrl_ptr->dw_iic_regs);
-
-	status = iic_reg_ptr->IC_RAW_INTR_STAT;
-	if (status & IC_INTR_STAT_TX_ABRT) {
-		status = iic_reg_ptr->IC_TX_ABRT_SOURCE;
-		if (status & IIC_SLV_ABRT_LOST_BUS) {
-			ercd = IIC_ERR_LOST_BUS;
-		} else if (status & IC_TX_ABRT_SLVFLUSH_TXFIFO) {
-			/* Flush tx fifo */
-			status = iic_reg_ptr->IC_TX_ABRT_SOURCE;
-		} else {
-			ercd = IIC_ERR_UNDEF;
-		}
-		status = iic_reg_ptr->IC_CLR_TX_ABRT;
-	} else {
-		if (status & IC_INTR_STAT_TX_OVER) {
-			iic_ctrl_ptr->iic_tx_over ++;
-			status = iic_reg_ptr->IC_CLR_TX_OVER;
-		}
-		if (status & (IC_INTR_STAT_RX_OVER|IC_INTR_STAT_RX_UNDER)) {
-			iic_ctrl_ptr->iic_rx_over ++;
-			status = iic_reg_ptr->IC_CLR_RX_OVER;
-			status = iic_reg_ptr->IC_CLR_RX_UNDER;
-		}
-	}
-	return ercd;
-}
-
-/** enable designware iic */
-static void dw_iic_enable_device(DEV_IIC_INFO *iic_info_ptr)
-{
-	DW_IIC_CTRL *iic_ctrl_ptr = (DW_IIC_CTRL *)(iic_info_ptr->iic_ctrl);
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG *)(iic_ctrl_ptr->dw_iic_regs);
-
-	if ((iic_info_ptr->status & DEV_ENABLED) == 0) {
-		dw_iic_enable(iic_reg_ptr);
-		iic_info_ptr->status |= DEV_ENABLED;
-	}
-}
-
-/** disable designware iic */
-static void dw_iic_disable_device(DEV_IIC_INFO *iic_info_ptr)
-{
-	DW_IIC_CTRL *iic_ctrl_ptr = (DW_IIC_CTRL *)(iic_info_ptr->iic_ctrl);
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG *)(iic_ctrl_ptr->dw_iic_regs);
-	uint32_t i;
-
-	for (i=0; i<DW_IIC_DISABLE_MAX_T_POLL_CNT; i++) {
-		dw_iic_disable(iic_reg_ptr);
-		if ((iic_reg_ptr->IC_ENABLE_STATUS & IC_ENABLE_STATUS_IC_EN) == 0) {
-			break;
-		}
-	}
-	iic_info_ptr->status &= ~DEV_ENABLED;
-}
-
-static void dw_iic_reset_device(DEV_IIC_INFO *iic_info_ptr)
-{
-	DW_IIC_CTRL *iic_ctrl_ptr = (DW_IIC_CTRL *)(iic_info_ptr->iic_ctrl);
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG *)(iic_ctrl_ptr->dw_iic_regs);
-
-	dw_iic_disable_device(iic_info_ptr);
-	dw_iic_clear_interrupt_all(iic_reg_ptr);
-	iic_info_ptr->next_cond = IIC_MODE_STOP;
-	iic_info_ptr->cur_state = IIC_FREE;
-	iic_info_ptr->err_state = IIC_ERR_NONE;
-	iic_ctrl_ptr->iic_tx_over = 0;
-	iic_ctrl_ptr->iic_rx_over = 0;
-	dw_iic_enable_device(iic_info_ptr);
-}
-
-/** Disable iic master interrupt for transmit or receive */
-static void dw_iic_mst_dis_cbr(DW_IIC_CTRL *iic_ctrl_ptr, uint32_t cbrtn)
-{
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG *)(iic_ctrl_ptr->dw_iic_regs);
-
-	switch (cbrtn) {
-		case DW_IIC_RDY_SND:
-			dw_iic_mask_interrupt(iic_reg_ptr, IC_INT_MST_TX_ENABLE);
-			iic_ctrl_ptr->int_status &= ~DW_IIC_TXINT_ENABLE;
-			break;
-		case DW_IIC_RDY_RCV:
-			dw_iic_mask_interrupt(iic_reg_ptr, IC_INT_MST_RX_ENABLE);
-			iic_ctrl_ptr->int_status &= ~DW_IIC_RXINT_ENABLE;
-			break;
-		default:
-			break;
-	}
-}
-
-/** Disable iic slave interrupt for transmit or receive */
-static void dw_iic_slv_dis_cbr(DW_IIC_CTRL *iic_ctrl_ptr, uint32_t cbrtn)
-{
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG *)(iic_ctrl_ptr->dw_iic_regs);
-
-	switch (cbrtn) {
-		case DW_IIC_RDY_SND:
-			dw_iic_mask_interrupt(iic_reg_ptr, IC_INT_SLV_TX_ENABLE);
-			iic_ctrl_ptr->int_status &= ~DW_IIC_TXINT_ENABLE;
-			break;
-		case DW_IIC_RDY_RCV:
-			dw_iic_mask_interrupt(iic_reg_ptr, IC_INT_SLV_RX_ENABLE);
-			iic_ctrl_ptr->int_status &= ~DW_IIC_RXINT_ENABLE;
-			break;
-		default:
-			break;
-	}
-}
-
-/** Enable iic master interrupt for transmit or receive */
-static void dw_iic_mst_ena_cbr(DW_IIC_CTRL *iic_ctrl_ptr, uint32_t cbrtn)
-{
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG *)(iic_ctrl_ptr->dw_iic_regs);
-
-	switch (cbrtn) {
-		case DW_IIC_RDY_SND:
-			iic_ctrl_ptr->int_status |= DW_IIC_TXINT_ENABLE;
-			dw_iic_unmask_interrupt(iic_reg_ptr, IC_INT_MST_TX_ENABLE);
-			break;
-		case DW_IIC_RDY_RCV:
-			iic_ctrl_ptr->int_status |= DW_IIC_RXINT_ENABLE;
-			dw_iic_unmask_interrupt(iic_reg_ptr, IC_INT_MST_RX_ENABLE);
-			break;
-		default:
-			break;
-	}
-}
-
-/** Enable iic slave interrupt for transmit or receive */
-static void dw_iic_slv_ena_cbr(DW_IIC_CTRL *iic_ctrl_ptr, uint32_t cbrtn)
-{
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG *)(iic_ctrl_ptr->dw_iic_regs);
-
-	switch (cbrtn) {
-		case DW_IIC_RDY_SND:
-			iic_ctrl_ptr->int_status |= DW_IIC_TXINT_ENABLE;
-			dw_iic_unmask_interrupt(iic_reg_ptr, IC_INT_SLV_TX_ENABLE);
-			break;
-		case DW_IIC_RDY_RCV:
-			iic_ctrl_ptr->int_status |= DW_IIC_RXINT_ENABLE;
-			dw_iic_unmask_interrupt(iic_reg_ptr, IC_INT_SLV_RX_ENABLE);
-			break;
-		default:
-			break;
-	}
-}
-
-/**
- * \brief	disable designware iic send or receive interrupt
- * \param[in]	DEV_IIC_INFO 	*iic_info_ptr
- * \param[in]	cbrtn		control code of callback routine of send or receive
- */
-static void dw_iic_dis_cbr(DEV_IIC_INFO *iic_info_ptr, uint32_t cbrtn)
-{
-	DW_IIC_CTRL *iic_ctrl_ptr = (DW_IIC_CTRL *)(iic_info_ptr->iic_ctrl);
-
-	if (iic_info_ptr->mode == DEV_MASTER_MODE) {
-		dw_iic_mst_dis_cbr(iic_ctrl_ptr, cbrtn);
-	} else {
-		dw_iic_slv_dis_cbr(iic_ctrl_ptr, cbrtn);
-	}
-
-	if (iic_ctrl_ptr->int_status & DW_IIC_GINT_ENABLE) {
-		if ((iic_ctrl_ptr->int_status & (DW_IIC_RXINT_ENABLE|DW_IIC_TXINT_ENABLE)) == 0) {
-			int_disable(iic_ctrl_ptr->intno);
-			iic_ctrl_ptr->int_status &= ~DW_IIC_GINT_ENABLE;
-		}
-	}
-}
-
-/**
- * \brief	enable DesignWare IIC send or receive interrupt
- * \param[in]	DEV_IIC_INFO 	*iic_info_ptr
- * \param[in]	cbrtn		control code of callback routine of send or receive
- */
-static void dw_iic_ena_cbr(DEV_IIC_INFO *iic_info_ptr, uint32_t cbrtn)
-{
-	DW_IIC_CTRL *iic_ctrl_ptr = (DW_IIC_CTRL *)(iic_info_ptr->iic_ctrl);
-
-	if (iic_info_ptr->mode == DEV_MASTER_MODE) {
-		dw_iic_mst_ena_cbr(iic_ctrl_ptr, cbrtn);
-	} else {
-		dw_iic_slv_ena_cbr(iic_ctrl_ptr, cbrtn);
-	}
-
-	if ((iic_ctrl_ptr->int_status & DW_IIC_GINT_ENABLE) == 0) {
-		if (iic_ctrl_ptr->int_status & (DW_IIC_RXINT_ENABLE|DW_IIC_TXINT_ENABLE)) {
-			iic_ctrl_ptr->int_status |= DW_IIC_GINT_ENABLE;
-			int_enable(iic_ctrl_ptr->intno);
-		}
-	}
-}
-
-/**
- * \brief	enable designware iic interrupt
- * \param	iic_info_ptr	iic information structure pointer
- */
-static void dw_iic_enable_interrupt(DEV_IIC_INFO *iic_info_ptr)
-{
-	DW_IIC_CTRL *iic_ctrl_ptr = (DW_IIC_CTRL *)(iic_info_ptr->iic_ctrl);
-
-	int_handler_install(iic_ctrl_ptr->intno, iic_ctrl_ptr->dw_iic_int_handler);
-	iic_ctrl_ptr->int_status |= DW_IIC_GINT_ENABLE;
-	int_enable(iic_ctrl_ptr->intno);	/** enable iic interrupt */
-}
-/**
- * \brief	disable designware iic interrupt
- * \param	iic_info_ptr	iic information structure pointer
- */
-static void dw_iic_disable_interrupt(DEV_IIC_INFO *iic_info_ptr)
-{
-	DW_IIC_CTRL *iic_ctrl_ptr = (DW_IIC_CTRL *)(iic_info_ptr->iic_ctrl);
-
-	/** disable iic send&receive interrupt after disable iic interrupt */
-	dw_iic_dis_cbr(iic_info_ptr, DW_IIC_RDY_SND);
-	dw_iic_dis_cbr(iic_info_ptr, DW_IIC_RDY_RCV);
-	/* disable iic interrupt */
-	int_disable(iic_ctrl_ptr->intno);
-	iic_ctrl_ptr->int_status &= ~(DW_IIC_GINT_ENABLE|DW_IIC_TXINT_ENABLE|DW_IIC_RXINT_ENABLE);
-}
-
-/** abort current interrupt transmit transfer */
-static void dw_iic_abort_tx(DEV_IIC *iic_obj)
-{
-	DEV_IIC_INFO *iic_info_ptr = &(iic_obj->iic_info);
-	DW_IIC_CTRL *iic_ctrl_ptr = (DW_IIC_CTRL *)(iic_info_ptr->iic_ctrl);
-
-	if (iic_ctrl_ptr->int_status & DW_IIC_TXINT_ENABLE) {
-		dw_iic_dis_cbr(iic_info_ptr, DW_IIC_RDY_SND);
-		iic_info_ptr->status |= DEV_IN_TX_ABRT;
-		if (iic_info_ptr->iic_cbs.tx_cb != NULL) {
-			iic_info_ptr->iic_cbs.tx_cb(iic_obj);
-		}
-		iic_info_ptr->status &= ~(DEV_IN_TX_ABRT);
-	}
-}
-
-/** abort current interrupt receive transfer */
-static void dw_iic_abort_rx(DEV_IIC *iic_obj)
-{
-	DEV_IIC_INFO *iic_info_ptr = &(iic_obj->iic_info);
-	DW_IIC_CTRL *iic_ctrl_ptr = (DW_IIC_CTRL *)(iic_info_ptr->iic_ctrl);
-
-	if (iic_ctrl_ptr->int_status & DW_IIC_RXINT_ENABLE) {
-		dw_iic_dis_cbr(iic_info_ptr, DW_IIC_RDY_RCV);
-		iic_info_ptr->status |= DEV_IN_RX_ABRT;
-		if (iic_info_ptr->iic_cbs.rx_cb != NULL) {
-			iic_info_ptr->iic_cbs.rx_cb(iic_obj);
-		}
-		iic_info_ptr->status &= ~(DEV_IN_RX_ABRT);
-	}
-}
-
-/** Get available transmit fifo count */
-static int32_t dw_iic_get_txavail(DW_IIC_CTRL *iic_ctrl_ptr)
-{
-	int32_t tx_avail = 0;
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG *)(iic_ctrl_ptr->dw_iic_regs);
-
-	if (iic_ctrl_ptr->tx_fifo_len <= 1) {
-		if (dw_iic_putready(iic_reg_ptr) == 1) {
-			tx_avail = 1;
-		} else {
-			tx_avail = 0;
-		}
-	} else {
-		tx_avail = iic_ctrl_ptr->tx_fifo_len - iic_reg_ptr->IC_TXFLR;
-	}
-	return tx_avail;
-}
-
-/** Get available receive fifo count */
-static int32_t dw_iic_get_rxavail(DW_IIC_CTRL *iic_ctrl_ptr)
-{
-	int32_t rx_avail = 0;
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG *)(iic_ctrl_ptr->dw_iic_regs);
-
-	if (iic_ctrl_ptr->rx_fifo_len <= 1) {
-		if (dw_iic_getready(iic_reg_ptr) == 1) {
-			rx_avail = 1;
-		} else {
-			rx_avail = 0;
-		}
-	} else {
-		rx_avail = iic_reg_ptr->IC_RXFLR;
-	}
-	return rx_avail;
-}
-
-/**
- * IIC Master device transmit 1 data,
- * next_cond can be \ref IC_DATA_CMD_STOP,
- * \ref IC_DATA_CMD_RESTART and ref IC_DATA_CMD_NONE
- */
-static int32_t dw_iic_mst_write_data(DW_IIC_CTRL *iic_ctrl_ptr, uint32_t data, uint32_t next_cond)
-{
-	uint32_t i = 0;
-	int32_t ercd = IIC_ERR_NONE;
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG *)(iic_ctrl_ptr->dw_iic_regs);
-
-	while (dw_iic_putready(iic_reg_ptr) == 0) {
-		if (i++ > iic_ctrl_ptr->retry_cnt) return IIC_ERR_TIMEOUT;
-		ercd = dw_iic_mst_chkerr(iic_ctrl_ptr);
-		if (ercd != IIC_ERR_NONE) return ercd;
-	}
-	dw_iic_putdata(iic_reg_ptr, data|IC_DATA_CMD_WRITE_REQ|next_cond);
-
-	return ercd;
-}
-
-/** IIC Slave device transmit 1 data */
-static int32_t dw_iic_slv_write_data(DW_IIC_CTRL *iic_ctrl_ptr, uint32_t data)
-{
-	uint32_t i = 0;
-	int32_t ercd = IIC_ERR_NONE;
-	uint32_t slv_state, temp;
-	uint32_t ready2send = 0;
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG *)(iic_ctrl_ptr->dw_iic_regs);
-
-	for (i = 0; i < iic_ctrl_ptr->retry_cnt; i++) {
-		ercd = dw_iic_slv_chkerr(iic_ctrl_ptr);
-		if (ercd != IIC_ERR_NONE) return ercd;
-		slv_state = iic_reg_ptr->IC_RAW_INTR_STAT;
-		if (slv_state & IC_INTR_STAT_RD_REQ) {
-			if (dw_iic_putready(iic_reg_ptr)) {
-				temp = iic_reg_ptr->IC_CLR_RD_REQ;
-				ready2send = 1;
-				break;
-			}
-		} else if (slv_state & IC_INTR_STAT_RX_DONE) { /* Put RX Done before STOP */
-			temp = iic_reg_ptr->IC_CLR_RX_DONE;
-			return IIC_ERR_MSTSTOP;
-		} else if (slv_state & IC_INTR_STAT_STOP_DET) {
-			temp = iic_reg_ptr->IC_CLR_STOP_DET;
-			return IIC_ERR_MSTSTOP;
-		}
-	}
-	if (ready2send) {
-		dw_iic_putdata(iic_reg_ptr, data|IC_DATA_CMD_WRITE_REQ);
-	} else {
-		ercd = IIC_ERR_TIMEOUT;
-	}
-
-	return ercd;
-}
-
-/**
- * IIC Master device receive 1 data,
- * next_cond can be \ref IC_DATA_CMD_STOP,
- * \ref IC_DATA_CMD_RESTART and ref IC_DATA_CMD_NONE
- */
-static int32_t dw_iic_mst_read_data(DW_IIC_CTRL *iic_ctrl_ptr, uint32_t *data, uint32_t next_cond)
-{
-	uint32_t i = 0;
-	int32_t ercd = IIC_ERR_NONE;
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG *)(iic_ctrl_ptr->dw_iic_regs);
-
-	/* Issue a read request */
-	while (dw_iic_putready(iic_reg_ptr) == 0) {
-		if (i++ > iic_ctrl_ptr->retry_cnt) return IIC_ERR_TIMEOUT;
-		ercd = dw_iic_mst_chkerr(iic_ctrl_ptr);
-		if (ercd != IIC_ERR_NONE) return ercd;
-	}
-	dw_iic_putdata(iic_reg_ptr, next_cond|IC_DATA_CMD_READ_REQ);
-	/* Wait to read data */
-	i = 0;
-	while (dw_iic_getready(iic_reg_ptr) == 0) {
-		if (i++ > iic_ctrl_ptr->retry_cnt) return IIC_ERR_TIMEOUT;
-		ercd = dw_iic_mst_chkerr(iic_ctrl_ptr);
-		if (ercd != IIC_ERR_NONE) return ercd;
-	}
-	*data = dw_iic_getdata(iic_reg_ptr);
-	return ercd;
-}
-
-/** IIC Slave device receive 1 data */
-static int32_t dw_iic_slv_read_data(DW_IIC_CTRL *iic_ctrl_ptr, uint32_t *data)
-{
-	uint32_t i = 0;
-	int32_t ercd = IIC_ERR_NONE;
-	uint32_t slv_state, temp;
-	uint32_t ready2read = 0;
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG *)(iic_ctrl_ptr->dw_iic_regs);
-
-	for (i = 0; i < iic_ctrl_ptr->retry_cnt; i++) {
-		ercd = dw_iic_slv_chkerr(iic_ctrl_ptr);
-		if (ercd != IIC_ERR_NONE) return ercd;
-		slv_state = iic_reg_ptr->IC_RAW_INTR_STAT;
-		if (slv_state & IC_INTR_STAT_START_DET) {
-			temp = iic_reg_ptr->IC_CLR_START_DET;
-		}
-		if (slv_state & IC_INTR_STAT_RX_FULL) {
-			if (dw_iic_getready(iic_reg_ptr)) {
-				ready2read = 1;
-				break;
-			}
-		} else if (slv_state & IC_INTR_STAT_STOP_DET) {
-			temp = iic_reg_ptr->IC_CLR_STOP_DET;
-			return IIC_ERR_MSTSTOP;
-		}
-	}
-	if (ready2read) {
-		*data = dw_iic_getdata(iic_reg_ptr);
-	} else {
-		ercd = IIC_ERR_TIMEOUT;
-	}
-
-	return ercd;
-}
-
-/** IIC Master transmit called in interrupt */
-static void dw_iic_mst_int_write(DEV_IIC *iic_obj)
-{
-	DEV_IIC_INFO *iic_info_ptr = &(iic_obj->iic_info);
-	DW_IIC_CTRL *iic_ctrl_ptr = (DW_IIC_CTRL_PTR)(iic_info_ptr->iic_ctrl);
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG_PTR)(iic_ctrl_ptr->dw_iic_regs);
-	uint32_t iic_int_status; /** iic interrupt status */
-	uint32_t last_cond, xmit_data, xmit_end = 0;
-	DEV_BUFFER *buf_ptr;
-	uint8_t *p_charbuf;
-
-	if (iic_info_ptr->next_cond == IIC_MODE_STOP) {
-		last_cond = IC_DATA_CMD_STOP;
-	} else {
-		last_cond = IC_DATA_CMD_RESTART;
-	}
-	iic_int_status = (iic_reg_ptr->IC_INTR_STAT);
-	buf_ptr = &(iic_info_ptr->tx_buf);
-	p_charbuf = (uint8_t *)buf_ptr->buf;
-	if (p_charbuf) {
-		if (iic_int_status & IC_INTR_STAT_TX_EMPTY) {
-			xmit_end = 0;
-			while (dw_iic_putready(iic_reg_ptr)) {
-				xmit_data = (uint32_t)(p_charbuf[buf_ptr->ofs])|IC_DATA_CMD_WRITE_REQ;
-				if (buf_ptr->ofs == (buf_ptr->len-1)) {
-					xmit_end = 1;
-					xmit_data |= last_cond;
-				} else {
-					xmit_data |= IC_DATA_CMD_NONE;
-				}
-				buf_ptr->ofs ++;
-				dw_iic_putdata(iic_reg_ptr, xmit_data);
-				if (xmit_end) {
-					dw_iic_dis_cbr(iic_info_ptr, DW_IIC_RDY_SND);
-					iic_info_ptr->cur_state = IIC_FREE;
-					if (iic_info_ptr->iic_cbs.tx_cb) {
-						iic_info_ptr->iic_cbs.tx_cb(iic_obj);
-					}
-					/* clear the send buffer pointer */
-					memset(buf_ptr, 0, sizeof(DEV_BUFFER));
-					break;
-				}
-			}
-		}
-		if (iic_int_status & IC_INTR_STAT_TX_OVER) {
-			iic_ctrl_ptr->iic_tx_over ++;
-		}
-		if (iic_int_status & IC_INTR_STAT_TX_ABRT) {
-			iic_info_ptr->err_state = dw_iic_mst_chkerr(iic_ctrl_ptr);
-			if (iic_info_ptr->err_state != IIC_ERR_NONE) {
-				dw_iic_dis_cbr(iic_info_ptr, DW_IIC_RDY_SND);
-				iic_info_ptr->cur_state = IIC_FREE;
-				if (iic_info_ptr->iic_cbs.err_cb) {
-					iic_info_ptr->iic_cbs.err_cb(iic_obj);
-				}
-				/* clear the send buffer pointer */
-				memset(buf_ptr, 0, sizeof(DEV_BUFFER));
-			}
-		}
-	} else {
-		dw_iic_dis_cbr(iic_info_ptr, DW_IIC_RDY_SND);
-		iic_info_ptr->cur_state = IIC_FREE;
-	}
-	/* Clear Interrupt */
-	iic_int_status = iic_reg_ptr->IC_CLR_INTR;
-}
-
-/** IIC Master receive called in interrupt */
-static void dw_iic_mst_int_read(DEV_IIC *iic_obj)
-{
-	DEV_IIC_INFO *iic_info_ptr = &(iic_obj->iic_info);
-	DW_IIC_CTRL *iic_ctrl_ptr = (DW_IIC_CTRL_PTR)(iic_info_ptr->iic_ctrl);
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG_PTR)(iic_ctrl_ptr->dw_iic_regs);
-	uint32_t iic_int_status; /** iic interrupt status */
-	uint32_t last_cond, xmit_data;
-	DEV_BUFFER *buf_ptr;
-	DW_IIC_BUFFER *dw_iic_rxbuf_ptr;
-	uint8_t *p_charbuf;
-
-	if (iic_info_ptr->next_cond == IIC_MODE_STOP) {
-		last_cond = IC_DATA_CMD_STOP;
-	} else {
-		last_cond = IC_DATA_CMD_RESTART;
-	}
-	iic_int_status = (iic_reg_ptr->IC_INTR_STAT);
-	buf_ptr = &(iic_info_ptr->rx_buf);
-	p_charbuf = (uint8_t *)buf_ptr->buf;
-	if (p_charbuf) {
-		dw_iic_rxbuf_ptr = &(iic_ctrl_ptr->dw_iic_rxbuf);
-		if (iic_int_status & IC_INTR_STAT_TX_EMPTY) {
-			while (dw_iic_putready(iic_reg_ptr)) {
-				if (dw_iic_rxbuf_ptr->ofs >= dw_iic_rxbuf_ptr->len) {
-					dw_iic_mask_interrupt(iic_reg_ptr, IC_INTR_STAT_TX_EMPTY);
-					break;
-				}
-				xmit_data = IC_DATA_CMD_READ_REQ;
-				if (dw_iic_rxbuf_ptr->ofs == (dw_iic_rxbuf_ptr->len-1)) {
-					xmit_data |= last_cond;
-				} else {
-					xmit_data |= IC_DATA_CMD_NONE;
-				}
-				dw_iic_rxbuf_ptr->ofs ++;
-				dw_iic_putdata(iic_reg_ptr, xmit_data);
-			}
-		}
-		if (iic_int_status & IC_INTR_STAT_RX_FULL) {
-			while (dw_iic_getready(iic_reg_ptr)) {
-				p_charbuf[buf_ptr->ofs] = dw_iic_getdata(iic_reg_ptr);
-				buf_ptr->ofs ++;
-				if (buf_ptr->ofs >= buf_ptr->len) {
-					dw_iic_dis_cbr(iic_info_ptr, DW_IIC_RDY_RCV);
-					iic_info_ptr->cur_state = IIC_FREE;
-					if (iic_info_ptr->iic_cbs.rx_cb) {
-						iic_info_ptr->iic_cbs.rx_cb(iic_obj);
-					}
-					/* clear the send buffer pointer */
-					memset(buf_ptr, 0, sizeof(DEV_BUFFER));
-					dw_iic_rxbuf_ptr->ofs = 0;
-					dw_iic_rxbuf_ptr->len = 0;
-					break;
-				}
-			}
-		}
-		if (iic_int_status & (IC_INTR_STAT_RX_OVER|IC_INTR_STAT_RX_UNDER)) {
-			iic_ctrl_ptr->iic_rx_over ++;
-		}
-		if (iic_int_status & IC_INTR_STAT_TX_ABRT) {
-			iic_info_ptr->err_state = dw_iic_mst_chkerr(iic_ctrl_ptr);
-			if (iic_info_ptr->err_state != IIC_ERR_NONE) {
-				dw_iic_dis_cbr(iic_info_ptr, DW_IIC_RDY_RCV);
-				iic_info_ptr->cur_state = IIC_FREE;
-				if (iic_info_ptr->iic_cbs.err_cb) {
-					iic_info_ptr->iic_cbs.err_cb(iic_obj);
-				}
-				/* clear the send buffer pointer */
-				memset(buf_ptr, 0, sizeof(DEV_BUFFER));
-				dw_iic_rxbuf_ptr->ofs = 0;
-				dw_iic_rxbuf_ptr->len = 0;
-			}
-		}
-	} else {
-		dw_iic_dis_cbr(iic_info_ptr, DW_IIC_RDY_RCV);
-		iic_info_ptr->cur_state = IIC_FREE;
-	}
-	/* Clear Interrupt */
-	iic_int_status = iic_reg_ptr->IC_CLR_INTR;
-}
-
-/** IIC Slave transmit called in interrupt */
-static void dw_iic_slv_int_process(DEV_IIC *iic_obj)
-{
-	DEV_IIC_INFO *iic_info_ptr = &(iic_obj->iic_info);
-	DW_IIC_CTRL *iic_ctrl_ptr = (DW_IIC_CTRL_PTR)(iic_info_ptr->iic_ctrl);
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG_PTR)(iic_ctrl_ptr->dw_iic_regs);
-	uint32_t iic_int_status; /** iic interrupt status */
-
-	iic_int_status = (iic_reg_ptr->IC_INTR_STAT);
-	if (iic_int_status & IC_INTR_STAT_RD_REQ) { /* Read request from master */
-		if (iic_info_ptr->iic_cbs.tx_cb) {
-			iic_info_ptr->iic_cbs.tx_cb(iic_obj);
-		} else { /* When tx callback function is not set disable this tx int for slave */
-			dw_iic_dis_cbr(iic_info_ptr, DW_IIC_RDY_SND);
-		}
-	}
-	if (iic_int_status & IC_INTR_STAT_RX_FULL) { /* Write request from master */
-		if (iic_info_ptr->iic_cbs.rx_cb) {
-			iic_info_ptr->iic_cbs.rx_cb(iic_obj);
-		} else { /* When rx callback function is not set disable this rx int for slave */
-			dw_iic_dis_cbr(iic_info_ptr, DW_IIC_RDY_RCV);
-		}
-	}
-	if (iic_int_status & IC_INTR_STAT_TX_OVER) {
-		iic_ctrl_ptr->iic_tx_over ++;
-	}
-	if (iic_int_status & (IC_INTR_STAT_RX_OVER|IC_INTR_STAT_RX_UNDER)) {
-		iic_ctrl_ptr->iic_rx_over ++;
-	}
-	if (iic_int_status & IC_INTR_STAT_TX_ABRT) {
-		iic_info_ptr->err_state = dw_iic_slv_chkerr(iic_ctrl_ptr);
-		if (iic_info_ptr->err_state != IIC_ERR_NONE) {
-			if (iic_info_ptr->iic_cbs.err_cb) {
-				iic_info_ptr->iic_cbs.err_cb(iic_obj);
-			}
-		}
-	}
-	/* Clear Interrupt */
-	iic_int_status = iic_reg_ptr->IC_CLR_INTR;
-}
-
-/** @} end of group DEVICE_DW_IIC_STATIC */
-
-/**
- * \defgroup	DEVICE_DW_IIC_IMPLEMENT	DesignWare IIC Driver Function API Implement
- * \ingroup	DEVICE_DW_IIC
- * \brief	implement device hal iic api with DesignWare IIC
- * @{
- */
-
-/**
- * \brief	open a designware iic device
- * \param[in]	iic_obj	iic device object pointer
- * \param[in]	mode	iic working mode (master or slave)
- * \param[in]	param	When mode is \ref DEV_MASTER_MODE, param stands for \ref dev_iic_info::speed_mode "speed mode",
- *			when mode is \ref DEV_SLAVE_MODE, param stands for \ref dev_iic_info::slv_addr "slave device 7bit address"
- * \retval	E_OK	Open successfully without any issues
- * \retval	E_OPNED	If device was opened before with different parameters,
- *			then just increase the \ref dev_iic_info::opn_cnt "opn_cnt" and return \ref E_OPNED
- * \retval	E_OBJ	Device object is not valid
- * \retval	E_SYS	Device is opened for different mode before, if you want to open it with different mode, you need to fully close it first.
- * \retval	E_PAR	Parameter is not valid
- * \retval	E_NOSPT	Open settings are not supported
- */
-int32_t dw_iic_open (DEV_IIC *iic_obj, uint32_t mode, uint32_t param)
-{
-	int32_t ercd = E_OK;
-	uint32_t support_modes;
-	uint32_t param2check;
-	DEV_IIC_INFO *iic_info_ptr = &(iic_obj->iic_info);
-
-	/* START ERROR CHECK */
-	VALID_CHK_IIC_INFO_OBJECT(iic_info_ptr);
-	DW_IIC_CHECK_EXP((mode==DEV_MASTER_MODE)||(mode==DEV_SLAVE_MODE), E_PAR);
-	if (mode == DEV_MASTER_MODE) {
-		DW_IIC_CHECK_EXP((param>=IIC_SPEED_STANDARD) && (param<=IIC_SPEED_ULTRA), E_PAR);
-	}
-	/* END OF ERROR CHECK */
-
-	DW_IIC_CTRL *iic_ctrl_ptr = (DW_IIC_CTRL *)(iic_info_ptr->iic_ctrl);
-
-	/* Check supported modes, master or slave */
-	support_modes = iic_ctrl_ptr->support_modes;
-	DW_IIC_CHECK_EXP( (((support_modes)&DW_IIC_MASTER_SUPPORTED)&&(mode == DEV_MASTER_MODE)) || \
-				(((support_modes)&DW_IIC_SLAVE_SUPPORTED)&&(mode == DEV_SLAVE_MODE)), E_NOSPT);
-
-	/** Check opened before use case */
-	if (iic_info_ptr->opn_cnt > 0) {
-		if (mode != iic_info_ptr->mode) {
-			/* current working mode is different from passing mode */
-			return E_SYS;
-		}
-		if (mode == DEV_MASTER_MODE) { /* param is speed_mode when as master */
-			param2check = iic_info_ptr->speed_mode;
-		} else { /* param is slv_addr when as slave */
-			param2check = iic_info_ptr->slv_addr;
-		}
-		iic_info_ptr->opn_cnt ++;
-		if (param != param2check) { /* open with different speed mode */
-			return E_OPNED;
-		} else {
-			return E_OK;
-		}
-	}
-	/* auto increase open count */
-	iic_info_ptr->opn_cnt ++;
-
-	iic_info_ptr->mode = mode;
-	if (iic_info_ptr->addr_mode == IIC_7BIT_ADDRESS) {
-		iic_info_ptr->tar_addr &= IIC_7BIT_ADDRESS_MASK;
-		iic_info_ptr->slv_addr &= IIC_7BIT_ADDRESS_MASK;
-	} else {
-		iic_info_ptr->addr_mode = IIC_10BIT_ADDRESS;
-		iic_info_ptr->tar_addr &= IIC_10BIT_ADDRESS_MASK;
-		iic_info_ptr->slv_addr &= IIC_10BIT_ADDRESS_MASK;
-	}
-
-/* Do FIFO Length get before init */
-#if DW_IIC_CALC_FIFO_LEN_ENABLE
-	iic_ctrl_ptr->tx_fifo_len = dw_iic_get_txfifo_len(iic_ctrl_ptr->dw_iic_regs);
-	iic_ctrl_ptr->rx_fifo_len = dw_iic_get_rxfifo_len(iic_ctrl_ptr->dw_iic_regs);
-#endif
-
-	/* Disable device before init it */
-	dw_iic_disable_device(iic_info_ptr);
-
-	if (mode == DEV_MASTER_MODE) {
-		iic_info_ptr->speed_mode = param;
-		dw_iic_master_init(iic_ctrl_ptr, param, iic_info_ptr->addr_mode, iic_info_ptr->tar_addr);
-	} else {
-		iic_info_ptr->slv_addr = param;
-		dw_iic_slave_init(iic_ctrl_ptr, iic_info_ptr->addr_mode, param);
-	}
-	iic_info_ptr->status = DEV_ENABLED;
-	iic_info_ptr->cur_state = IIC_FREE;
-	iic_info_ptr->err_state = IIC_ERR_NONE;
-	iic_info_ptr->next_cond = IIC_MODE_STOP;
-	iic_info_ptr->extra = NULL;
-
-	iic_ctrl_ptr->iic_tx_over = 0;
-	iic_ctrl_ptr->iic_rx_over = 0;
-	iic_ctrl_ptr->int_status = 0;
-	memset(&(iic_ctrl_ptr->dw_iic_rxbuf), 0, sizeof(DW_IIC_BUFFER));
-	iic_ctrl_ptr->dw_iic_rxbuf.buf = &(iic_info_ptr->rx_buf);
-	/** install iic interrupt into system */
-	dw_iic_disable_interrupt(iic_info_ptr);
-	int_handler_install(iic_ctrl_ptr->intno, iic_ctrl_ptr->dw_iic_int_handler);
-	memset(&(iic_info_ptr->tx_buf), 0, sizeof(DEV_BUFFER));
-	memset(&(iic_info_ptr->rx_buf), 0, sizeof(DEV_BUFFER));
-	memset(&(iic_info_ptr->iic_cbs), 0, sizeof(DEV_IIC_CBS));
-
-error_exit:
-	return ercd;
-}
-
-/**
- * \brief	Close a DesignWare IIC device
- * \param[in]	iic_obj	iic device object pointer
- * \retval	E_OK	Close successfully without any issues(including secenary that device is already closed)
- * \retval	E_OPNED	Device is still opened, the device \ref dev_iic_info::opn_cnt "opn_cnt" decreased by 1
- * \retval	E_OBJ	Device object is not valid
- */
-int32_t dw_iic_close (DEV_IIC *iic_obj)
-{
-	int32_t ercd = E_OK;
-	DEV_IIC_INFO *iic_info_ptr = &(iic_obj->iic_info);
-
-	/* START ERROR CHECK */
-	VALID_CHK_IIC_INFO_OBJECT(iic_info_ptr);
-	DW_IIC_CHECK_EXP(iic_info_ptr->opn_cnt > 0, E_OK);
-	/* END OF ERROR CHECK */
-
-	iic_info_ptr->opn_cnt --;
-	if (iic_info_ptr->opn_cnt == 0) {
-		dw_iic_disable_interrupt(iic_info_ptr);
-		dw_iic_abort_tx(iic_obj);
-		dw_iic_abort_rx(iic_obj);
-		memset(&(iic_info_ptr->tx_buf), 0, sizeof(DEV_BUFFER));
-		memset(&(iic_info_ptr->rx_buf), 0, sizeof(DEV_BUFFER));
-		memset(&(iic_info_ptr->iic_cbs), 0, sizeof(DEV_IIC_CBS));
-		dw_iic_disable_device(iic_info_ptr);
-		iic_info_ptr->status = DEV_DISABLED;
-		iic_info_ptr->next_cond = IIC_MODE_STOP;
-		iic_info_ptr->extra = NULL;
-	} else {
-		ercd = E_OPNED;
-	}
-
-error_exit:
-	return ercd;
-}
-
-/**
- * \brief	Control iic by ctrl command
- * \param[in]	iic_obj	iic device object pointer
- * \param[in]		ctrl_cmd	\ref DEVICE_HAL_IIC_CTRLCMD "control command", to change or get some thing related to iic
- * \param[in,out]	param		parameters that maybe argument of the command,
- * 					or return values of the command, must not be NULL
- * \retval	E_OK	Control device successfully
- * \retval	E_CLSED	Device is not opened
- * \retval	E_OBJ	Device object is not valid or not exists
- * \retval	E_PAR	Parameter is not valid for current control command
- * \retval	E_SYS	Control device failed, due to hardware issues, such as device is disabled
- * \retval	E_CTX	Control device failed, due to different reasons like in transfer state
- * \retval	E_NOSPT	Control command is not supported or not valid
- */
-int32_t dw_iic_control (DEV_IIC *iic_obj, uint32_t ctrl_cmd, void *param)
-{
-	int32_t ercd = E_OK;
-	DEV_IIC_INFO *iic_info_ptr = &(iic_obj->iic_info);
-
-	/* START ERROR CHECK */
-	VALID_CHK_IIC_INFO_OBJECT(iic_info_ptr);
-	DW_IIC_CHECK_EXP(iic_info_ptr->opn_cnt > 0, E_CLSED);
-	/* END OF ERROR CHECK */
-
-	uint32_t val32; /** to receive unsigned int value */
-	DEV_BUFFER *devbuf;
-
-	DW_IIC_CTRL *iic_ctrl_ptr = (DW_IIC_CTRL *)(iic_info_ptr->iic_ctrl);
-	DW_IIC_REG *iic_reg_ptr = (DW_IIC_REG *)(iic_ctrl_ptr->dw_iic_regs);
-
-	/* check whether current device is disabled */
-	if ((iic_info_ptr->status & DEV_ENABLED) == 0) {
-		/** When device is disabled,
-		 * only IIC_CMD_ENA_DEV, IIC_CMD_DIS_DEV, IIC_CMD_GET_STATUS, IIC_CMD_RESET
-		 * are available, other commands will return E_SYS
-		 */
-		if ((ctrl_cmd != IIC_CMD_ENA_DEV) && \
-			(ctrl_cmd != IIC_CMD_DIS_DEV) && \
-			(ctrl_cmd != IIC_CMD_GET_STATUS) && \
-			(ctrl_cmd != IIC_CMD_RESET) ) {
-			return E_SYS;
-		}
-	}
-
-	switch (ctrl_cmd) {
-		/* Commmon commands for both master and slave mode */
-		case IIC_CMD_GET_STATUS:
-			DW_IIC_CHECK_EXP((param!=NULL) && CHECK_ALIGN_4BYTES(param), E_PAR);
-			*((int32_t *)param) = iic_info_ptr->status;
-			break;
-		case IIC_CMD_ENA_DEV:
-			dw_iic_enable_device(iic_info_ptr);
-			break;
-		case IIC_CMD_DIS_DEV:
-			dw_iic_disable_device(iic_info_ptr);
-			break;
-		case IIC_CMD_RESET:
-			dw_iic_reset_device(iic_info_ptr);
-			break;
-		case IIC_CMD_FLUSH_TX:
-			dw_iic_flush_tx(iic_reg_ptr);
-			break;
-		case IIC_CMD_FLUSH_RX:
-			dw_iic_flush_rx(iic_reg_ptr);
-			break;
-		case IIC_CMD_SET_ADDR_MODE:
-			val32 = (uint32_t)param;
-			DW_IIC_CHECK_EXP((val32==IIC_7BIT_ADDRESS) || (val32==IIC_10BIT_ADDRESS), E_PAR);
-			if (iic_info_ptr->mode == DEV_MASTER_MODE) {
-				dw_iic_set_mstaddr_mode(iic_reg_ptr, val32);
-			} else {
-				dw_iic_set_slvaddr_mode(iic_reg_ptr, val32);
-			}
-			iic_info_ptr->addr_mode = val32;
-			break;
-		case IIC_CMD_GET_RXAVAIL:
-			DW_IIC_CHECK_EXP((param!=NULL) && CHECK_ALIGN_4BYTES(param), E_PAR);
-			*((int32_t *)param) = dw_iic_get_rxavail(iic_ctrl_ptr);
-			break;
-		case IIC_CMD_GET_TXAVAIL:
-			DW_IIC_CHECK_EXP((param!=NULL) && CHECK_ALIGN_4BYTES(param), E_PAR);
-			*((int32_t *)param) = dw_iic_get_txavail(iic_ctrl_ptr);
-			break;
-		case IIC_CMD_SET_TXCB:
-			DW_IIC_CHECK_EXP(CHECK_ALIGN_4BYTES(param), E_PAR);
-			iic_info_ptr->iic_cbs.tx_cb = param;
-			break;
-		case IIC_CMD_SET_RXCB:
-			DW_IIC_CHECK_EXP(CHECK_ALIGN_4BYTES(param), E_PAR);
-			iic_info_ptr->iic_cbs.rx_cb = param;
-			break;
-		case IIC_CMD_SET_ERRCB:
-			DW_IIC_CHECK_EXP(CHECK_ALIGN_4BYTES(param), E_PAR);
-			iic_info_ptr->iic_cbs.err_cb = param;
-			break;
-		case IIC_CMD_ABORT_TX:
-			dw_iic_abort_tx(iic_obj);
-			if ((iic_info_ptr->mode == DEV_MASTER_MODE) \
-				&& (iic_info_ptr->cur_state == IIC_IN_TX)) {
-				iic_info_ptr->cur_state = IIC_FREE;
-			}
-			break;
-		case IIC_CMD_ABORT_RX:
-			dw_iic_abort_rx(iic_obj);
-			if ((iic_info_ptr->mode == DEV_MASTER_MODE) \
-				&& (iic_info_ptr->cur_state == IIC_IN_RX)) {
-				iic_info_ptr->cur_state = IIC_FREE;
-			}
-			break;
-		case IIC_CMD_SET_TXINT:
-			if (iic_info_ptr->mode == DEV_MASTER_MODE) {
-				DW_IIC_CHECK_EXP(iic_info_ptr->cur_state != IIC_IN_RX, E_CTX);
-			}
-			val32 = (uint32_t)param;
-			if (val32 == 0) {
-				dw_iic_dis_cbr(iic_info_ptr, DW_IIC_RDY_SND);
-				iic_info_ptr->cur_state = IIC_FREE;
-			} else {
-				iic_info_ptr->cur_state = IIC_IN_TX;
-				dw_iic_ena_cbr(iic_info_ptr, DW_IIC_RDY_SND);
-			}
-			break;
-		case IIC_CMD_SET_RXINT:
-			if (iic_info_ptr->mode == DEV_MASTER_MODE) {
-				DW_IIC_CHECK_EXP(iic_info_ptr->cur_state != IIC_IN_TX, E_CTX);
-			}
-			val32 = (uint32_t)param;
-			if (val32 == 0) {
-				iic_info_ptr->cur_state = IIC_FREE;
-				dw_iic_dis_cbr(iic_info_ptr, DW_IIC_RDY_RCV);
-			} else {
-				iic_info_ptr->cur_state = IIC_IN_RX;
-				dw_iic_ena_cbr(iic_info_ptr, DW_IIC_RDY_RCV);
-			}
-			break;
-		case IIC_CMD_SET_TXINT_BUF:
-			if (iic_info_ptr->mode == DEV_MASTER_MODE) {
-				DW_IIC_CHECK_EXP(iic_info_ptr->cur_state != IIC_IN_TX, E_CTX);
-			}
-			DW_IIC_CHECK_EXP(CHECK_ALIGN_4BYTES(param), E_PAR);
-			if (param != NULL) {
-				devbuf = (DEV_BUFFER *)param;
-				iic_info_ptr->tx_buf = *devbuf;
-				iic_info_ptr->tx_buf.ofs = 0;
-			} else {
-				iic_info_ptr->tx_buf.buf = NULL;
-				iic_info_ptr->tx_buf.len = 0;
-				iic_info_ptr->tx_buf.ofs = 0;
-			}
-			break;
-		case IIC_CMD_SET_RXINT_BUF:
-			if (iic_info_ptr->mode == DEV_MASTER_MODE) {
-				DW_IIC_CHECK_EXP(iic_info_ptr->cur_state != IIC_IN_RX, E_CTX);
-			}
-			DW_IIC_CHECK_EXP(CHECK_ALIGN_4BYTES(param), E_PAR);
-			if (param != NULL) {
-				devbuf = (DEV_BUFFER *)param;
-				iic_info_ptr->rx_buf = *devbuf;
-				iic_info_ptr->rx_buf.ofs = 0;
-				iic_ctrl_ptr->dw_iic_rxbuf.ofs = 0;
-				iic_ctrl_ptr->dw_iic_rxbuf.len = devbuf->len;
-			} else {
-				iic_info_ptr->rx_buf.buf = NULL;
-				iic_info_ptr->rx_buf.len = 0;
-				iic_info_ptr->rx_buf.ofs = 0;
-				iic_ctrl_ptr->dw_iic_rxbuf.ofs = 0;
-				iic_ctrl_ptr->dw_iic_rxbuf.len = 0;
-			}
-			break;
-
-		/* Master mode only commands */
-		case IIC_CMD_MST_SET_SPEED_MODE:
-			DW_IIC_CHECK_EXP(iic_info_ptr->mode == DEV_MASTER_MODE, E_NOSPT);
-			val32 = (uint32_t)param;
-			DW_IIC_CHECK_EXP((val32>=IIC_SPEED_STANDARD) && (val32<=IIC_SPEED_ULTRA), E_PAR);
-			dw_iic_set_speedmode(iic_reg_ptr, val32);
-			iic_info_ptr->speed_mode = val32;
-			break;
-		case IIC_CMD_MST_SET_TAR_ADDR:
-			DW_IIC_CHECK_EXP(iic_info_ptr->mode == DEV_MASTER_MODE, E_NOSPT);
-			if (iic_info_ptr->addr_mode == IIC_7BIT_ADDRESS) {
-				val32 = ((uint32_t)param) & IIC_7BIT_ADDRESS_MASK;
-			} else {
-				val32 = ((uint32_t)param) & IIC_10BIT_ADDRESS_MASK;
-			}
-			if (val32 != iic_info_ptr->tar_addr) {
-				dw_iic_set_taraddr(iic_reg_ptr, val32);
-				iic_info_ptr->tar_addr = val32;
-			}
-			break;
-		case IIC_CMD_MST_SET_NEXT_COND:
-			DW_IIC_CHECK_EXP(iic_info_ptr->mode == DEV_MASTER_MODE, E_NOSPT);
-			val32 = (uint32_t)param;
-			DW_IIC_CHECK_EXP((val32==IIC_MODE_STOP) || (val32==IIC_MODE_RESTART), E_PAR);
-			iic_info_ptr->next_cond = (uint32_t)param;
-			break;
-
-		/* Slave mode only commands */
-		case IIC_CMD_SLV_SET_SLV_ADDR:
-			DW_IIC_CHECK_EXP(iic_info_ptr->mode == DEV_SLAVE_MODE, E_NOSPT);
-			if (iic_info_ptr->addr_mode == IIC_7BIT_ADDRESS) {
-				val32 = ((uint32_t)param) & IIC_7BIT_ADDRESS_MASK;
-			} else {
-				val32 = ((uint32_t)param) & IIC_10BIT_ADDRESS_MASK;
-			}
-			dw_iic_set_slvaddr(iic_reg_ptr, val32);
-			iic_info_ptr->slv_addr = val32;
-			break;
-		case IIC_CMD_SLV_GET_SLV_STATE:
-			DW_IIC_CHECK_EXP(iic_info_ptr->mode == DEV_SLAVE_MODE, E_NOSPT);
-			DW_IIC_CHECK_EXP((param!=NULL) && CHECK_ALIGN_4BYTES(param), E_PAR);
-			*((uint32_t *)param) = dw_iic_get_slv_state(iic_reg_ptr);
-			break;
-
-		default:
-			ercd = E_NOSPT;
-			break;
-	}
-
-error_exit:
-	return ercd;
-}
-
-/**
- * \brief	poll transmit data through DesignWare IIC as master or slave
- * \param[in]	iic_obj	iic device object pointer
- * \param[in]	data	data that need to send (data must be uint8_t type)
- * \param[in]	len	data length need to send
- * \retval	>0	Byte count that was successfully sent for poll method,
- * 			it might can't send that much due to \ref \ref dev_iic_info::err_state "different error state".
- * \retval	E_OBJ	Device object is not valid or not exists
- * \retval	E_PAR	Parameter is not valid
- * \retval	E_CTX	Device is still in transfer state
- * \retval	E_SYS	Can't write data to hardware due to hardware issues, such as device is disabled
- */
-int32_t dw_iic_write (DEV_IIC *iic_obj, const void *data, uint32_t len)
-{
-	int32_t ercd = E_OK;
-	DEV_IIC_INFO *iic_info_ptr = &(iic_obj->iic_info);
-
-	/* START ERROR CHECK */
-	VALID_CHK_IIC_INFO_OBJECT(iic_info_ptr);
-	DW_IIC_CHECK_EXP(iic_info_ptr->opn_cnt > 0, E_CLSED);
-	DW_IIC_CHECK_EXP(iic_info_ptr->status & DEV_ENABLED, E_SYS);
-	DW_IIC_CHECK_EXP(data!=NULL, E_PAR);
-	DW_IIC_CHECK_EXP(len>0, E_PAR);
-	/* END OF ERROR CHECK */
-
-	int32_t i = 0;
-	uint32_t last_cond = 0; /* Last data for transmit, STOP or RESTART */
-	int32_t error_state = IIC_ERR_NONE;
-	const uint8_t *p_charbuf = (const uint8_t *)data;
-
-	DW_IIC_CTRL *iic_ctrl_ptr = (DW_IIC_CTRL_PTR)(iic_info_ptr->iic_ctrl);
-
-	if (iic_info_ptr->mode == DEV_MASTER_MODE) { /* Master mode transmit data */
-		if (iic_info_ptr->next_cond == IIC_MODE_STOP) {
-			last_cond = IC_DATA_CMD_STOP;
-		} else {
-			last_cond = IC_DATA_CMD_RESTART;
-		}
-
-		/* Try to transmit 0 -> (len-1) data */
-		len = len - 1; /* Last data write differently */
-		while (i < len) {
-			error_state = dw_iic_mst_write_data(iic_ctrl_ptr, (uint32_t)(p_charbuf[i]), IC_DATA_CMD_NONE);
-			if (error_state != IIC_ERR_NONE) {
-				break;
-			}
-			i ++;
-		}
-		/* Try to transmit the last data with STOP or RESTART condition */
-		if (error_state == IIC_ERR_NONE) {
-			error_state = dw_iic_mst_write_data(iic_ctrl_ptr, (uint32_t)(p_charbuf[len]), last_cond);
-			if (error_state == IIC_ERR_NONE) {
-				i = i + 1; /* Add last data into send count */
-			}
-		}
-	} else { /* Slave mode transmit data */
-		while (i < len) {
-			error_state = dw_iic_slv_write_data(iic_ctrl_ptr, (uint32_t)(p_charbuf[i]));
-			if (error_state != IIC_ERR_NONE) {
-				break;
-			}
-			i ++;
-		}
-	}
-	iic_info_ptr->err_state = error_state;
-	ercd = i;
-
-error_exit:
-	return ercd;
-}
-
-/**
- * \brief	read data through DesignWare IIC
- * \param[in]	iic_obj	iic device object pointer
- * \param[out]	data	data that need to read (data must be uint8_t type)
- * \param[in]	len	data count need to read
- * \retval	>0	Byte count that was successfully received for poll method,
- * 			it might can't send that much due to \ref \ref dev_iic_info::err_state "different error state".
- * \retval	E_OBJ	Device object is not valid or not exists
- * \retval	E_CTX	Device is still in transfer state
- * \retval	E_PAR	Parameter is not valid
- * \retval	E_SYS	Can't receive data from hardware due to hardware issues, such as device is disabled
- */
-int32_t dw_iic_read (DEV_IIC *iic_obj, void *data, uint32_t len)
-{
-	int32_t ercd = E_OK;
-	DEV_IIC_INFO *iic_info_ptr = &(iic_obj->iic_info);
-
-	/* START ERROR CHECK */
-	VALID_CHK_IIC_INFO_OBJECT(iic_info_ptr);
-	DW_IIC_CHECK_EXP(iic_info_ptr->opn_cnt > 0, E_CLSED);
-	DW_IIC_CHECK_EXP(iic_info_ptr->status & DEV_ENABLED, E_SYS);
-	DW_IIC_CHECK_EXP(data!=NULL, E_PAR);
-	DW_IIC_CHECK_EXP(len>0, E_PAR);
-	/* END OF ERROR CHECK */
-
-	int32_t i = 0;
-	uint32_t last_cond = 0; /* Last data for receive, STOP or RESTART */
-	uint32_t val32 = 0;
-	int32_t error_state = IIC_ERR_NONE;
-	uint8_t *p_charbuf = (uint8_t *)data;
-
-	DW_IIC_CTRL *iic_ctrl_ptr = (DW_IIC_CTRL_PTR)(iic_info_ptr->iic_ctrl);
-
-	if (iic_info_ptr->mode == DEV_MASTER_MODE) { /* Master mode receive data */
-		if (iic_info_ptr->next_cond == IIC_MODE_STOP) {
-			last_cond = IC_DATA_CMD_STOP;
-		} else {
-			last_cond = IC_DATA_CMD_RESTART;
-		}
-
-		/* Try to receive 0 -> (len-1) data */
-		len = len - 1; /* Last data write differently */
-		while (i < len) {
-			error_state = dw_iic_mst_read_data(iic_ctrl_ptr, &val32, IC_DATA_CMD_NONE);
-			if (error_state != IIC_ERR_NONE) {
-				break;
-			} else {
-				p_charbuf[i] = (uint8_t)val32;
-			}
-			i ++;
-		}
-		/* Try to receive the last data with STOP or RESTART condition */
-		if (error_state == IIC_ERR_NONE) {
-			error_state = dw_iic_mst_read_data(iic_ctrl_ptr, &val32, last_cond);
-			if (error_state == IIC_ERR_NONE) {
-				p_charbuf[len] = (uint8_t)val32;
-				i = i + 1; /* Add last data into send count */
-			}
-		}
-	} else { /* Slave mode receive data */
-		while (i < len) {
-			error_state = dw_iic_slv_read_data(iic_ctrl_ptr, &val32);
-			if (error_state != IIC_ERR_NONE) {
-				break;
-			} else {
-				p_charbuf[i] = (uint8_t)val32;
-			}
-			i ++;
-		}
-	}
-	iic_info_ptr->err_state = error_state;
-	ercd = i;
-
-error_exit:
-	return ercd;
-}
-
-/**
- * \brief	DesignWare IIC interrupt processing routine
- * \param[in]	iic_info_ptr	DEV_IIC *iic_obj
- * \param[in]	ptr		extra information
- */
-void dw_iic_isr(DEV_IIC *iic_obj, void *ptr)
-{
-	int32_t ercd = E_OK;
-	DEV_IIC_INFO *iic_info_ptr = &(iic_obj->iic_info);
-
-	/* START ERROR CHECK */
-	VALID_CHK_IIC_INFO_OBJECT(iic_info_ptr);
-	/* END OF ERROR CHECK */
-
-	if (iic_info_ptr->mode == DEV_MASTER_MODE) {
-		if (iic_info_ptr->cur_state == IIC_IN_TX) {
-			dw_iic_mst_int_write(iic_obj);
-		} else {
-			dw_iic_mst_int_read(iic_obj);
-		}
-	} else {
-		dw_iic_slv_int_process(iic_obj);
-	}
-
-error_exit:
-	return;
-}
-/** @} end of group DEVICE_DW_IIC_IMPLEMENT */
diff --git a/hw/mcu/arc/src/ext/sdk/device/designware/iic/dw_iic.h b/hw/mcu/arc/src/ext/sdk/device/designware/iic/dw_iic.h
deleted file mode 100644
index 55c551a67..000000000
--- a/hw/mcu/arc/src/ext/sdk/device/designware/iic/dw_iic.h
+++ /dev/null
@@ -1,242 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2017, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2017.03
- * \date 2014-06-30
- * \author Huaqi Fang(Huaqi.Fang@synopsys.com)
---------------------------------------------- */
-
-/**
- * \file
- * \brief	designware iic driver header file
- * \ingroup	DEVICE_DW_IIC
- */
-
-#ifndef _DW_IIC_H_
-#define _DW_IIC_H_
-
-#include "device/device_hal/inc/dev_iic.h"
-
-#include "inc/arc/arc_exception.h"
-
-
-/**
- * If this header file is included,
- * will indicate that this designware iic device
- * is used
- */
-#define DEVICE_USE_DESIGNWARE_IIC
-
-/**
- * \defgroup	DEVICE_DW_IIC_INFO	DesignWare IIC Related Information
- * \ingroup	DEVICE_DW_IIC
- * \brief	Defines some macros of DesignWare IIC need.
- * \details	macros like, iic number
- * @{
- */
-#define DW_IIC_MASTER_SUPPORTED		(0x1)	/*!< Support Designware IIC Master Mode */
-#define DW_IIC_SLAVE_SUPPORTED		(0x2)	/*!< Support Designware IIC Slave Mode */
-/*!< Support Designware IIC Both Master and Slave Mode */
-#define DW_IIC_BOTH_SUPPORTED		(DW_IIC_MASTER_SUPPORTED|DW_IIC_SLAVE_SUPPORTED)
-/** @} */
-
-/**
- * \defgroup	DEVICE_DW_IIC_REGSTRUCT		DesignWare IIC Register Structure
- * \ingroup	DEVICE_DW_IIC
- * \brief	contains definitions of DesignWare IIC register structure.
- * \details	detailed description of DesignWare IIC register information
- * @{
- */
-/**
- * \brief	DesignWare IIC register structure
- * \details	Detailed struct description of DesignWare IIC
- *	block register information, implementation of dev_iic_info::iic_regs
- */
-typedef volatile struct dw_iic_reg {
-	uint32_t IC_CON;		/*!< (0x00) : IIC control */
-	uint32_t IC_TAR;		/*!< (0x04) : IIC target address */
-	uint32_t IC_SAR;		/*!< (0x08) : IIC slave address */
-	uint32_t IC_HS_MADDR;		/*!< (0x0c) : IIC HS Master Mode Code address */
-	uint32_t IC_DATA_CMD;		/*!< (0x10) : IIC Rx/Tx Data Buffer and Command */
-	uint32_t IC_SS_SCL_HCNT;	/*!< (0x14) : Standard Speed IIC clock SCL High Count */
-	uint32_t IC_SS_SCL_LCNT;	/*!< (0x18) : Standard Speed IIC clock SCL Low Count */
-	uint32_t IC_FS_SCL_HCNT;	/*!< (0x1c) : Fast Speed IIC clock SCL Low Count */
-	uint32_t IC_FS_SCL_LCNT;	/*!< (0x20) : Fast Speed IIC clock SCL Low Count */
-	uint32_t IC_HS_SCL_HCNT;	/*!< (0x24) : High Speed IIC clock SCL Low Count */
-	uint32_t IC_HS_SCL_LCNT;	/*!< (0x28) : High Speed IIC clock SCL Low Count */
-	uint32_t IC_INTR_STAT;		/*!< (0x2c) : IIC Interrupt Status */
-	uint32_t IC_INTR_MASK;		/*!< (0x30) : IIC Interrupt Mask */
-	uint32_t IC_RAW_INTR_STAT;	/*!< (0x34) : IIC Raw Interrupt Status */
-	uint32_t IC_RX_TL;		/*!< (0x38) : IIC Receive FIFO Threshold */
-	uint32_t IC_TX_TL;		/*!< (0x3c) : IIC Transmit FIFO Threshold */
-	uint32_t IC_CLR_INTR;		/*!< (0x40) : Clear combined and Individual Interrupts */
-	uint32_t IC_CLR_RX_UNDER;	/*!< (0x44) : Clear RX_UNDER Interrupt */
-	uint32_t IC_CLR_RX_OVER;	/*!< (0x48) : Clear RX_OVER Interrupt */
-	uint32_t IC_CLR_TX_OVER;	/*!< (0x4c) : Clear TX_OVER Interrupt */
-	uint32_t IC_CLR_RD_REQ;		/*!< (0x50) : Clear RQ_REQ Interrupt */
-	uint32_t IC_CLR_TX_ABRT;	/*!< (0x54) : Clear TX_ABRT Interrupt */
-	uint32_t IC_CLR_RX_DONE;	/*!< (0x58) : Clear RX_DONE Interrupt */
-	uint32_t IC_CLR_ACTIVITY;	/*!< (0x5c) : Clear ACTIVITY Interrupt */
-	uint32_t IC_CLR_STOP_DET;	/*!< (0x60) : Clear STOP_DET Interrupt */
-	uint32_t IC_CLR_START_DET;	/*!< (0x64) : Clear START_DET Interrupt */
-	uint32_t IC_CLR_GEN_CALL;	/*!< (0x68) : Clear GEN_CALL Interrupt */
-	uint32_t IC_ENABLE;		/*!< (0x6c) : IIC Enable */
-	uint32_t IC_STATUS;		/*!< (0x70) : IIC Status */
-	uint32_t IC_TXFLR;		/*!< (0x74) : Transmit FIFO Level Register */
-	uint32_t IC_RXFLR;		/*!< (0x78) : Receive FIFO Level Register */
-	uint32_t IC_SDA_HOLD;		/*!< (0x7c) : SDA Hold Time Length Reg */
-	uint32_t IC_TX_ABRT_SOURCE;	/*!< (0x80) : IIC Transmit Abort Status Reg */
-	uint32_t IC_SLV_DATA_NACK_ONLY;	/*!< (0x84) : Generate SLV_DATA_NACK Register */
-	uint32_t IC_DMA_CR;		/*!< (0x88) : DMA Control Register */
-	uint32_t IC_DMA_TDLR;		/*!< (0x8c) : DMA Transmit Data Level */
-	uint32_t IC_DMA_RDLR;		/*!< (0x90) : DMA Receive Data Level */
-	uint32_t IC_SDA_SETUP;		/*!< (0x94) : SDA Setup Register */
-	uint32_t IC_ACK_GENERAL_CALL;	/*!< (0x98) : ACK General Call Register */
-	uint32_t IC_ENABLE_STATUS;	/*!< (0x9c) : Enable Status Register */
-	uint32_t IC_FS_SPKLEN;		/*!< (0xa0) : ISS and FS spike suppression limit */
-	uint32_t IC_HS_SPKLEN;		/*!< (0xa4) : HS spike suppression limit */
-	uint32_t RESERVED[19];		/*!< (0xa8) : Reserved */
-	uint32_t IC_COMP_PARAM_1;	/*!< (0xf4) : Component Parameter Register */
-	uint32_t IC_COMP_VERSION;	/*!< (0xf8) : Component Version ID Reg */
-	uint32_t IC_COMP_TYPE;		/*!< (0xfc) : Component Type Reg */
-} DW_IIC_REG, *DW_IIC_REG_PTR;
-/** @} */
-
-/** Spike Suppression Limit Configurations */
-typedef struct dw_iic_spklen {
-	uint32_t fs_spklen;	/*!< value for IC_FS_SPKLEN, Tsp for fast mode is 50ns */
-	uint32_t hs_spklen;	/*!< value for IC_HS_SPKLEN, Tsp for high-speed mode is 10ns */
-} DW_IIC_SPKLEN, *DW_IIC_SPKLEN_PTR;
-
-/** IIC Clock SCL High and Low Count Configurations for Different Speed */
-typedef struct dw_iic_scl_cnt {
-	uint32_t ss_scl_hcnt;	/*!< value for IC_SS_SCL_HCNT */
-	uint32_t ss_scl_lcnt;	/*!< value for IC_SS_SCL_LCNT */
-	uint32_t fs_scl_hcnt;	/*!< value for IC_FS_SCL_HCNT */
-	uint32_t fs_scl_lcnt;	/*!< value for IC_FS_SCL_LCNT */
-	uint32_t hs_scl_hcnt;	/*!< value for IC_HS_SCL_HCNT */
-	uint32_t hs_scl_lcnt;	/*!< value for IC_HS_SCL_LCNT */
-} DW_IIC_SCL_CNT, *DW_IIC_SCL_CNT_PTR;
-
-#define DW_IIC_GINT_DISABLED		(0)		/*!< designware interrupt disabled for control iic irq/fiq */
-#define DW_IIC_GINT_ENABLE		(1<<0)		/*!< designware interrupt enabled for control iic irq/fiq */
-#define DW_IIC_TXINT_ENABLE		(1<<1)		/*!< designware interrupt enabled for control transmit process */
-#define DW_IIC_RXINT_ENABLE		(1<<2)		/*!< designware interrupt enabled for control transmit process */
-
-typedef struct dw_iic_buffer {
-	DEV_BUFFER *buf;
-	uint32_t ofs;
-	uint32_t len;
-} DW_IIC_BUFFER, *DW_IIC_BUFFER_PTR;
-
-/**
- * \brief	DesignWare IIC control structure definition
- * \details	implement of dev_iic_info::iic_ctrl
- */
-typedef struct dw_iic_ctrl {
-	DW_IIC_REG *dw_iic_regs;	/*!< iic device registers */
-	/* Variables which should be set during object implementation */
-	uint32_t support_modes;		/*!< supported iic modes */
-	uint32_t tx_fifo_len;		/*!< transmit fifo length */
-	uint32_t rx_fifo_len;		/*!< receive fifo length */
-	uint32_t iic_master_code;	/*!< value for IC_HS_MADDR */
-	uint32_t retry_cnt;		/*!< retry count for TX or RX */
-	uint32_t intno;			/*!< iic interrupt vector number */
-	INT_HANDLER dw_iic_int_handler;	/*!< iic interrupt handler */
-	DW_IIC_SPKLEN iic_spklen;	/*!< iic spike suppression length settings */
-	DW_IIC_SCL_CNT iic_scl_cnt;	/*!< iic scl count settings */
-	/* Variables which always change during iic operation */
-	uint32_t int_status;		/*!< iic interrupt status */
-	uint32_t iic_tx_over;		/*!< iic tx overflow count */
-	uint32_t iic_rx_over;		/*!< iic rx overflow count */
-	DW_IIC_BUFFER dw_iic_rxbuf;	/*!< iic read buffer for receive data */
-} DW_IIC_CTRL, *DW_IIC_CTRL_PTR;
-
-/*!< One possible value for \ref dw_iic_ctrl::retry_cnt */
-#define DW_IIC_MAX_RETRY_COUNT		(100000)
-
-#if DW_IIC_USE_IC_CLK_MHZ == 100 /*!< 100MHz */
-/*!< One possible value for \ref dw_iic_ctrl::iic_spklen */
-static const DW_IIC_SPKLEN dw_iic_spklen_const = {5, 1};
-
-/*!< One possible value for \ref dw_iic_ctrl::iic_spklen */
-#if DW_IIC_USE_HS_BUS_LOADING_100PF
-static const DW_IIC_SCL_CNT dw_iic_sclcnt_const = {0x0190, 0x01d6, 0x003c, 0x0082, 0x6, 0x10};
-#else
-static const DW_IIC_SCL_CNT dw_iic_sclcnt_const = {0x0190, 0x01d6, 0x003c, 0x0082, 0xc, 0x20};
-#endif
-
-#elif DW_IIC_USE_IC_CLK_MHZ == 50 /* 50MHz */
-/*!< One possible value for \ref dw_iic_ctrl::iic_spklen */
-static const DW_IIC_SPKLEN dw_iic_spklen_const = {5, 1};
-
-/*!< One possible value for \ref dw_iic_ctrl::iic_spklen */
-#if DW_IIC_USE_HS_BUS_LOADING_100PF
-static const DW_IIC_SCL_CNT dw_iic_sclcnt_const = {0x00c8, 0x00eb, 0x001e, 0x0041, 0x6, 0x8};
-#else
-static const DW_IIC_SCL_CNT dw_iic_sclcnt_const = {0x00c8, 0x00eb, 0x001e, 0x0041, 0x6, 0x10};
-#endif
-
-#else /* Default 100MHz */
-/*!< One possible value for \ref dw_iic_ctrl::iic_spklen */
-static const DW_IIC_SPKLEN dw_iic_spklen_const = {5, 1};
-
-/*!< One possible value for \ref dw_iic_ctrl::iic_spklen */
-#if DW_IIC_USE_HS_BUS_LOADING_100PF
-static const DW_IIC_SCL_CNT dw_iic_sclcnt_const = {0x0190, 0x01d6, 0x003c, 0x0082, 0x6, 0x10};
-#else
-static const DW_IIC_SCL_CNT dw_iic_sclcnt_const = {0x0190, 0x01d6, 0x003c, 0x0082, 0xc, 0x20};
-#endif
-
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * \defgroup	DEVICE_DW_IIC_FUNCDLR	DesignWare IIC Function Declaration
- * \ingroup	DEVICE_DW_IIC
- * \brief	Contains declarations of designware iic functions.
- * \details	This are only used in iic object implementation source file
- * @{
- */
-extern int32_t dw_iic_open (DEV_IIC *iic_obj, uint32_t mode, uint32_t param);
-extern int32_t dw_iic_close (DEV_IIC *iic_obj);
-extern int32_t dw_iic_control (DEV_IIC *iic_obj, uint32_t ctrl_cmd, void *param);
-extern int32_t dw_iic_write (DEV_IIC *iic_obj, const void *data, uint32_t len);
-extern int32_t dw_iic_read (DEV_IIC *iic_obj, void *data, uint32_t len);
-extern void dw_iic_isr(DEV_IIC *iic_obj, void *ptr);
-
-#ifdef __cplusplus
-}
-#endif
-
-/** @} */
-
-#endif /* _DW_IIC_H_ */
diff --git a/hw/mcu/arc/src/ext/sdk/device/designware/iic/dw_iic_hal.h b/hw/mcu/arc/src/ext/sdk/device/designware/iic/dw_iic_hal.h
deleted file mode 100644
index f7ec0d27a..000000000
--- a/hw/mcu/arc/src/ext/sdk/device/designware/iic/dw_iic_hal.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/* ------------------------------------------
- * Copyright (c) 2017, Synopsys, Inc. All rights reserved.
-
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
-
- * 1) Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
-
- * 2) Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or
- * other materials provided with the distribution.
-
- * 3) Neither the name of the Synopsys, Inc., nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * \version 2017.03
- * \date 2014-06-30
- * \author Huaqi Fang(Huaqi.Fang@synopsys.com)
---------------------------------------------- */
-
-/**
- * \file
- * \ingroup	DEVICE_DW_IIC
- * \brief	DesignWare IIC driver hardware description related header file
- * \details	detailed hardware related definitions of DesignWare IIC driver
- */
-
-#ifndef _DEVICE_DW_IIC_HAL_H_
-#define _DEVICE_DW_IIC_HAL_H_
-
-#include "device/designware/iic/dw_iic_hal_cfg.h"
-
-/** Enable Designware IIC */
-#define DW_IIC_ENABLE			(1)
-/** Disable Designware IIC */
-#define DW_IIC_DISABLE			(0)
-
-/** Stop Condition issue after this byte */
-#define IC_DATA_CMD_STOP		(1 << 9)
-/** Restart Condition issue after this byte */
-#define IC_DATA_CMD_RESTART		(1 << 10)
-/** No Restart or stop condition after this byte */
-#define IC_DATA_CMD_NONE		(0)
-
-/** Perform a write request */
-#define IC_DATA_CMD_WRITE_REQ		(0)
-/** Perform a read request */
-#define IC_DATA_CMD_READ_REQ		(1 << 8)
-
-/** Fields of IC_CON register */
-/* DW_APB I2C IP Config Dependencies. */
-#if DW_IIC_ALLOW_RESTART
-#define IC_CON_RESTART_EN		(1 << 5)
-#else
-#define IC_CON_RESTART_EN		(0x00)
-#endif
-
-/* Master Addressing Mode Config */
-#if DW_IIC_MST_10_BIT_ADDR_SUPPORT
-#define MST_10_BIT_ADDR_MODE		(1 << 4)
-#define IC_10BITADDR_MASTER		(1 << 12)
-#else
-#define MST_10_BIT_ADDR_MODE		(0x00)
-#define IC_10BITADDR_MASTER		(0x00)
-#endif
-
-/* Slave Addressing Mode Config */
... 9441 lines suppressed ...


(mynewt-core) 02/02: ci: Remove references to arc architecture

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kasjer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 618e8ebab24db2feb60104a772db36c7ef523593
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Tue Jul 7 10:34:40 2026 +0200

    ci: Remove references to arc architecture
    
    Arc was only used to exclude bsp embarc_emsk,
    now those references are removed.
    
    Signed-off-by: Jerzy Kasenberg <je...@codecoup.pl>
---
 .github/test_build_blinky.sh     | 2 +-
 .github/test_build_bootloader.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/test_build_blinky.sh b/.github/test_build_blinky.sh
index 9e8937d54..fdd52a50f 100755
--- a/.github/test_build_blinky.sh
+++ b/.github/test_build_blinky.sh
@@ -20,7 +20,7 @@
 EXIT_CODE=0
 
 BSPS=$(basename -a `find repos/apache-mynewt-core/hw/bsp/* -maxdepth 0 -type d`)
-IGNORED_BSPS="dialog_cmac embarc_emsk hifive1 native-armv7\
+IGNORED_BSPS="dialog_cmac hifive1 native-armv7\
               olimex-pic32-emz64 olimex-pic32-hmz144 pic32mx470_6lp_clicker\
               pic32mz2048_wi-fire"
 
diff --git a/.github/test_build_bootloader.sh b/.github/test_build_bootloader.sh
index af35da1ad..3cd1adf75 100755
--- a/.github/test_build_bootloader.sh
+++ b/.github/test_build_bootloader.sh
@@ -20,7 +20,7 @@
 EXIT_CODE=0
 
 BSPS=$(basename -a `find repos/apache-mynewt-core/hw/bsp/* -maxdepth 0 -type d`)
-IGNORED_BSPS="dialog_cmac embarc_emsk hifive1 native native-armv7\
+IGNORED_BSPS="dialog_cmac hifive1 native native-armv7\
               nucleo-f030r8 nucleo-f072rb\
               nucleo-f303k8\
               olimex-p103 olimex-pic32-emz64 olimex-pic32-hmz144\