Go Down

Topic: Any way to combine the values of multiple custom board menus? (Read 147 times) previous topic - next topic


I'm working on a boards.txt file and am trying to keep the number of Board menu entries to a minimum. I have multiple bootloader files, for example:
  • ariadne_atmega328_16mhz_blink.hex
  • ariadne_atmega328_16mhz_noblink.hex
  • ariadne_atmega328_8mhz_blink.hex
  • ariadne_atmega328_8mhz_noblink.hex

In the Board menu I just want one ATmega328P entry, then two custom board menus:
  • Clock: 16Mhz/8Mhz
  • Bootloader Blink: Enable/Disable

So far I can't see any way to use the values of both the menus to determine which bootloader file is chosen by boards.txt. The alternative is to have two Boards menu entries, ATmega328P 16Mhz and ATmega328P 8Mhz which doesn't seem like a big deal but there are multiple MCUs supported as well as another custom menu(I simplified the example a bit to keep it short) so there could end up being a lot of Boards added. So I'm wondering if anyone has any ideas on how to do this. Thanks, Per


I did come up with a couple solutions for reducing the number of entries added to the Board menu:

I found a trick for using the 16MHz bootloader files with a 8MHz clock in the optiboot boards.txt. You can use an upload.speed value of half what the bootloader file was compiled for to achieve this.

Combine multiple values into one custom menu for example:
Board Configuration Menu:
  • Blink, Shield
  • Blink, No Shield
  • No Blink, Shield
  • No Blink, No Shield

Put less commonly used entries into a more-board.txt file and the user can copy any entry they need into the boards menu.

I still wish there were more advanced ways of handling the values of multiple custom board menus.

Go Up