Adding a New BoardΒΆ
This section describes the process to add a new board named myboard
in embARC OSP.
1. Create a sub-folder under board
folder and named myboard
. Create two
new files myboard.mk
and myboard.h
in this folder.
Create necessary sub-folders and files under
myboard
. The BSP formyboard
is made up of these sub-folders and files. There are 3 folders required,common
,config
anddrivers
.common
: contains the common routines formyboard
. Theboard_init
function andboard_timer_xxx
functions should also be implemented in this folder.configs
: contains board configuration information, includingtarget_memory.h
file containing memory information*.tcf
file containing information about the arc configuration, compiler options, etc.myboard_hardware.h
file containing necessary hardware definitions, e.g., peripheral address, interrupt number assignments, etc.*.mk
files, to be included inmyboard.mk
with required build system information.any other required files
drivers
: contains on-board driver implementations formyboard
board
Modify
myboard.mk
. Add necessary information invirtual.mk
, such as source folders, include folders, object output folders and make rules. The build system will automatically compile all the source files (.c, .s) in the added folders and finally create a library namedlibmyboard.a
.Modify the
myboard.h
and add it intoboard.h
.myboard.h
is the only place where board specific information should be exposed, e.g., function declaration, hardware definitions, macros.
Note
For details, please refer to other existing board support folders such as <embARC>/board/emsk
for reference.