Page 1 of 1

Modifying board.c

Posted: Fri Aug 16, 2019 2:18 pm
by steved
I have a board where board.c needs to differ from the auto-generated template using board.chcfg.
The differences include using a #define to disable GPIO setup, for example. Also adding a couple of board-specific routines.

Is there a way to achieve this within the existing structure? (I realise I can just clone the board.c and board.h files into my project, but that makes things harder to maintain, since the same board is used on several projects).

Re: Modifying board.c

Posted: Fri Aug 16, 2019 2:35 pm
by Giovanni
You could create a template file for your modified boards then launch FMPP manually in order to generate, freemarker is not hard to learn. There is a launch script in the boards directory that rebuilds everything, you could take the launch code from in there.

Giovanni