Application-Specific Configurations

Hi,

I want to override some pin assignments that are set in the default configuration of my board. I tried to follow Application-Specific Configurations, although my board is different from the one being documented in this section. However, the procedure looks pretty general, but is it ?

I did :

  • create $(APPDIR)/board.h and $(APPDIR)/periph_conf.h
  • let Makefile start with INCLUDES += -I$(APPDIR)
  • add #include_next "board.h" and #include_next "periph_conf.h at the end of the above mentioned files, respectively

Now, I get a bunch of undefined errors.

Should I create an external board instead ?

Well, I was close. That was a beginner’s mistake :face_with_open_eyes_and_hand_over_mouth:. Anyway, here what was missing.

In $(APPDIR)/board.h and in $(APPDIR)/periph_conf.h, do not leave the include guard as is, but change it to be unique. In other words, replace BOARD_H with BOARD_MYAPP_H and PERIPH_CONF_H with PERIPH_CONF_MYAPP_H.

2 Likes