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 formyboardis made up of these sub-folders and files. There are 3 folders required,common,configanddrivers.common: contains the common routines formyboard. Theboard_initfunction andboard_timer_xxxfunctions should also be implemented in this folder.configs: contains board configuration information, includingtarget_memory.hfile containing memory information*.tcffile containing information about the arc configuration, compiler options, etc.myboard_hardware.hfile containing necessary hardware definitions, e.g., peripheral address, interrupt number assignments, etc.*.mkfiles, to be included inmyboard.mkwith required build system information.any other required files
drivers: contains on-board driver implementations formyboardboard
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.hand add it intoboard.h.myboard.his 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.