[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding new BSP's
Corey Schuhen wrote:
one of the most important things to do is *not to duplicate
I am in the process of trying to create a BSP for a MCF548x/MCF547x module
sold by phytec (1). I started by duplicating the libbsp and libcpu MCF5206*
'inherit' functionality. In the past, e.g., in the PowerPC area a little
slightly different copies of very similar files have spread. It is a
real pain to
maintain these and to merge bugfixes into all variants...
Please consider the following methods:
A) try to make your BSP run-time compatible, if possible (i.e., if your
board is very similar
to an existing one), i.e., enhance the existing BSP to support your
board as well and let
it make run-time decisions.
B) if your board is significantly different but similar enough to re-use
(inherit) big parts of
a) Try to use files existing files by pointing VPATH to the 'parent'
BSP's relevant source area(s)
b) Sometimes you'll find that an existing file cannot be used but some
details need to be
changed. DO NOT COPY THE EXISTING FILE in this case. Instead,
try to separate usable/more generic parts and highly board-specific
pieces into separate
files (and submit those modifications as PRs).
Then 'inherit' (VPATH) the generic parts and 'override' the specific
pieces by providing
your own implementation.
Sometimes, the necessary specification can be achieved by defining
in BSP-specific headers (such as bsp.h).
directories, .cfg along with changes to various Makefile.* files. So far I
have interrupt-driven serial and the clock timer working. Both the Hello and
Ticker sample applications seem to work.
What is the procedure for supplying my mods back to the project? Should I be
creating a patch or requesting CVS access? Which branch(s) am I best to work
with? Currently I am working off the 4.6.4 release from tarballs.