raburton / rboot

An open source bootloader for the ESP8266
https://richard.burtons.org/tag/rboot/?order=ASC
MIT License
301 stars 72 forks source link

Allow RBOOT_EXTRA_INCDIR to include a wrapper rboot.h #14

Closed projectgus closed 8 years ago

projectgus commented 8 years ago

This is the change I mentioned in SuperHouse/esp-open-rtos#136 . It lets us put a wrapper rboot.h in the top-level directory, and just set the additional flags we want.

(The reason I chose this way instead of using Makefile flags is that this way we can reference the same wrapper rboot.h when compiling our user support code from a different Makefile, instead of having to find a way to add the same Makefile variables into two different Makefile hierarchies.)

Commit message follows:

The wrapper rboot.h can optionally use gcc include_next to pick up the default rboot.h.

This allows modifying the rboot.h file without changing anything in the rboot directory (useful for esp-open-rtos where we like using git submodules for upstream code.)

raburton commented 8 years ago

committed as a6329e4776c0d71051623b256ac1c8eec46a3f4c, just had to fix case where the include env var wasn't being used, so rboot.h can still be found (added . to include path)

projectgus commented 8 years ago

Oops, thanks! I could have sworn I tested that case but I guess not.

raburton commented 8 years ago

No problem, thanks for the contribution. I'll have a look at the gpio one asap, had to look at a bug last night which meant I didn't get chance to look at both of yours as intended.

projectgus commented 8 years ago

No problem at all :)