im-tomu / toboot

Bootloader for the EFM32HG Tomu Board
https://tomu.im/
GNU General Public License v3.0
72 stars 28 forks source link

Board configurability #42

Closed lealanko-rt closed 5 years ago

lealanko-rt commented 5 years ago

This PR abstracts away hardware and product details from the bootloader and makes it usable with other boards besides the original Tomu.

The configurable parts include the pins for the leds and the bootloader force button, as well as USB ids and support for WCID and WebUSB.

At build time, the target board is specified with the Make variable BOARD. This is used to set the preprocessor variable TOBOOT_BOARD, which is then used in board.h to select appropriate values for the target board. The value of TOBOOT_BOARD is used as the board model in the boot token.

This PR only adds a configuration framework, but not yet any new boards, so the only supported value for the BOARD variable is currently TOMU, corresponding to the original board model 0x23.