rt-thread-official/bsp/synopsys/boards
Meco Man 0f461e870c [errno code][-RT_ERROR] fix that use RT_ERROR without - 2023-03-20 00:06:16 -04:00
..
applications [bsp][applications][sconscript] 整理统一sconscript格式 (#6481) 2022-10-03 10:43:08 -04:00
drivers [errno code][-RT_ERROR] fix that use RT_ERROR without - 2023-03-20 00:06:16 -04:00
.config modify RT_ALIGN_SIZE as 8 by default 2023-01-12 22:47:23 -05:00
Kconfig [bsp][synopsys] add basic new embarc bsp support 2020-01-16 16:02:00 +08:00
README.md ARC: README: Fix GNU toolchain RTT_CC alias 2022-10-17 14:36:54 +04:00
SConscript [bsp][synopsys] add basic new embarc bsp support 2020-01-16 16:02:00 +08:00
SConstruct format Kconfig and sconscript 2023-01-08 22:52:13 -05:00
linker_template_gnu.ld [bsp][synopsys] add basic new embarc bsp support 2020-01-16 16:02:00 +08:00
linker_template_mw.ld [bsp][synopsys] add basic new embarc bsp support 2020-01-16 16:02:00 +08:00
rtconfig.h modify RT_ALIGN_SIZE as 8 by default 2023-01-12 22:47:23 -05:00
rtconfig.py ARC: rtconfig.py: Use RTT_EXEC_PATH for the toolchain location substitution 2022-10-17 14:37:18 +04:00

README.md

Synopsys ARC Boards support with embARC_BSP

embARC_BSP

The embARC Board support Package (BSP) is a software distributions aimed at facilitating the development and evaluation of embedded systems based on ARCv2 processors, which is designed to provide a minimal board support package for ARC users by defining consistent and simple software interfaces to the processors and onboard devices.

The embARC BSP is a new generation embARC software development package. It is designed to be the inter-layer between hardware and operating system. BSP could hide the difference of hardware/boards, provide a unified interface to upper-layer. In the scenarios that no OS is required, embARC BSP can also standalone and work in baremetal.

embARC_BSP features:

  • Support MetaWare & GNU toolchains
  • Support all development boards and tcf
  • Support various build systems and compiling environments, such as ARC MetaWare & GNU IDE, makefile
  • Designware and Subsystem drivers, including UART and GPIO, I2C, SPI, etc.
  • No middleware, no OS
  • Easy to port to different platform / OS
  • One example (UART, GPIO, timer)
  • Code coverage reach 100% in test.
  • MISRA-C compliance
  • C & C++ support, assembly support

Supported Boards

Software Requirement

embarc_bsp

There are two ways to get embarc_bsp:

use RT-Thread ENV tool:

embARC_BSP has been configured as package module, you can just run the command pkgs --update in <RTT_ROOT>/bsp/synopsys/boards folder using ENV tool.

without RT-Thread ENV tool:

We can get it from github: embarc_bsp

The default path for embarc_bsp is <RTT_ROOT>/bsp/synopsys/boards/packages/embARC_bsp-upstream, when you use other path, please set the environment variable EMBARC_BSP_ROOT.

Toolchain

Now both GNU and MetaWare Toolchain are supported, set the System environment variable RTT_CC select the toolchain.

GNU:

set RTT_CC=gcc

MetaWare:

set RTT_CC=mw

GNU

The ARC GNU Toolchain offers all of the benefits of open source tools, including complete source code and a large install base. The ARC GNU IDE Installer consists of Eclipse IDE with ARC GNU plugin for Eclipse, ARC GNU prebuilt toolchain and OpenOCD for ARC

Here, the ARC GNU toolchain is installed to c:\arc_gnu. If not, please change the path configuration in rtconfig.py.

When you use GNU Toolchain, you need to install Zadig to replace the default FTDI driver with WinUSB driver. See How to Use OpenOCD on Windows for more information.

MetaWare

The DesignWare ARC MetaWare Development Toolkit builds on a long legacy of industry-leading compiler and debugger products for embedded applications. It is a complete solution that contains all the components needed to support the development, debugging, and tuning of embedded applications for the DesignWare® ARC® processors.

Here, the ARC MetaWare toolchain is installed to C:\ARC\MetaWare. If not, please change the path configuration in rtconfig.py.

Build & Debug

Build embarc_lib

please run the following cmds to build embarc_lib

cd <rt-thread-root>/bsp/synopsys/boards
scons --embarc_build

Build

please run the following cmds to build

cd <rt-thread-root>/bsp/synopsys/boards
scons

Debug

After compile, please use the following cmds to debug

scons --gdb #use gdb debugger
scons --mdb #use mdb debugger

How to choose different boards

There are some parameters we can use in scons, for example:

scons --BOARD=emsk --BD_VER=23 --CUR_CORE=arcem9d --TOOLCHAIN=mw --OLEVEL=O2
  • BOARD: choose the board, we can set: emsk, iotdk, emsdp, hsdk, axs.
  • BD_VER: choose the board version, some boards have different versions, for example, we can set: 10, 22, 23 for emsk board.
  • CUR_CORE: choose the arc cores, some boards have different cores, for example, we can set: arcem7d, arcem9d, arcem11d for emsk board.
  • TOOLCHAIN: choose the toolchain to build embarc_lib, we can set: mw, gnu.
  • OLEVEL: choose the build optimize level, we can set: O0, O2, Os.

For more information, you can run the command scons -h.

Maintainer