raburton / rboot

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

Make rboot.h self contained #31

Closed jacmet closed 7 years ago

jacmet commented 7 years ago

rboot.h uses the nonstandard uint8 / uint32 types without defining them, causing breakage if rboot.h (or other headers including it like rboot-api.h) are included without locally defining these types.

The espressif SDK includes a nonstandard c_types.h header containing definitions for uint8/uint32/TRUE/FALSE, so include that in rboot.h and drop all the local definitions.

Signed-off-by: Peter Korsgaard peter@korsgaard.com

raburton commented 7 years ago

Again, I'm sure there was a reason for not doing this before, because this would be the most obvious thing to do. Really can't remember what it was though! Might have been to do with compatibility with different (earlier) versions of the SDK, which wouldn't really matter now. Mind you, does this change compile with the RTOS SDK as well as the standard?

jacmet commented 7 years ago

I've never used the RTOS SDK, but looking at https://github.com/espressif/ESP8266_RTOS_SDK/blob/master/include/espressif/c_types.h the content looks very similar and has the needed typedefs, so I would say yes.

Do you want me to rebase this commit so it applies now that you applied the rboot-integration change?

jacmet commented 7 years ago

I've rebased the commit now.

raburton commented 7 years ago

thanks