rt-thread-official/bsp/synopsys/boards
Tangyuxin d724eed9fc
分离内存分配接口与内存分配算法 (#5175)
* [kernel][mem] Multiple instances of small memory allocation algorithm

* [kernel][mem] Change small memory management algorithm memory header flag

* [kernel][mem] Fix assertion problem

* [kernel][slab] Multiple instances of slab memory management algorithm

* [kernel][memheap] Remove rt_malloc/rt_free/rt_realloc and other related memory interfaces

* [kernel][mem] Clean up memory space of small memory management objects

* [kernel][kservice] Add memory application interface and thread protection interface

* [kernel][kservice] Fix function return value problem

* [kernel][memheap] Optimize memheaptrace print

* [kernel][memheap] Support best mode

* [kernel][memory] Remove semaphore lock

* [kernel][memheap] Add locked flag

* [kernel][memory] Support malloc memory in interrupt

* [kernel][memheap] Add 'memheapcheck' cmd

* [kernel][mem] Fix failure to request full memory

* [kernel][memheap] Fix compilation warning

* [kernel][mem] Fix mem realloc ASSERT

* [examples][testcases] Add small mem testcase

* [examples][mem_tc] Modify test memory size

* [examples][testcases] Add slab memory management algorithm test case

* [examples][testcases] fix small memory management algorithm test case

* [kernel][memory] Adjusting memory allocation algorithm object definition and interface

* [kernel][memory] Fix compilation warning

* [examples][utest] Fix mem test case

* [examples][utest] fix slab test case

* [utest][testcases] Shorten test time

* [kernel][memory] Formatting code

* [examples][utest] Adjust test run time

* [examples][utest] Formatting code

* [bsp] update all rtconfig.h
2021-12-16 16:23:58 +08:00
..
applications [bsp][synopsys] add basic new embarc bsp support 2020-01-16 16:02:00 +08:00
drivers [bsp][synopsys] add basic new embarc bsp support 2020-01-16 16:02:00 +08:00
.config 分离内存分配接口与内存分配算法 (#5175) 2021-12-16 16:23:58 +08:00
Kconfig [bsp][synopsys] add basic new embarc bsp support 2020-01-16 16:02:00 +08:00
README.md [bsp][synopsys] add basic new embarc bsp support 2020-01-16 16:02:00 +08:00
SConscript [bsp][synopsys] add basic new embarc bsp support 2020-01-16 16:02:00 +08:00
SConstruct [bsp][synopsys] add basic new embarc bsp support 2020-01-16 16:02:00 +08: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 分离内存分配接口与内存分配算法 (#5175) 2021-12-16 16:23:58 +08:00
rtconfig.py [bsp][synopsys] add basic new embarc bsp support 2020-01-16 16:02:00 +08: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=gnu

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