Yes, I actually discontinued the dev-workshop
branch now that I cherry-picked what was needed into master
.
thetechnobear I'll do an update via the IDE if thats what you recommend, or I can run the update_board script too?
They are equivalent: the IDE update calls make update
, which in turn calls update_board
.
thetechnobear my bela mini has just arrived, can this also run off the same image/branch?
Yeee! you need a v0.3.4 image to run Bela Mini. The same image will run on Bela and Salt*
.
Board detection is now done at run time. Bela is default, BelaMini is detected from reading the PB's eeprom, Salt can only be detected from the ~/.bela/belaconfig
file as mentioned above **
, see here ***
.
The only difference when running Salt code is that all the analog and digital I/O are inverted (see here, search for BelaHw_Salt
). Additionally, the scripts/make_salt.sh
program creates the ~/.bela/belaconfig
file and rolls the files in resources/salt
onto the file system. These include:
/lib/systemd/system/bela_button.service
, a modified version of the script, which changes the "Bela Button" to be Switch1 on Salt.
/opt/Bela/local/bela_button.sh
which replaces the default behaviour of long presses on the Bela button to be "kill current program" instead of "turn off the board". This is useful when running multiple projects in a loop_*
at startup: so killing the currently running one will step on to the next one.
So after you make_salt.sh
, if you want to revert the image to "normal" (Bela or BelaMini), you will have to revert the /lib/systemd/system/bela_button.service
to use GPIO 115, remove /opt/Bela/local/bela_button.sh
and edit/remove ~/.bela/belaconfig
****
.
Ha! I guess all this stuff should go in the Salt page on the wiki.
*
you may have to hold the USER button on the BBG to be able to boot it with the v0.3.4 image. However, we found out an issue today: when pressing that button the board may not boot at all if it receives a stray signal on the SPI input pin. This normally means a ~90% boot success on the BBB, but the BBG seems to be much worse at that. This may have to do with one of the chips on the SPI line on the cape misbehaving at power up. Bottom line: if it does not boot from the SD card when hold pressing the USER button (or equivalently shorting P8_43 to GND), then remove the Bela cape and try again (see here.
**
we actually connected together two GPIO pins (P8_13 and P8_14) on the module, for the purpose of board detection. However, in hindsight we felt it was not nice to be toggling pins on every user's board every time we would start a program, forever and ever, which is why we went for the ~/.bela/belaconfig
solution in the end.
***
this works, but the case where ~/.bela/belaconfig
says BOARD=Salt
but you are on BelaMini is not handled yet: https://github.com/BelaPlatform/Bela/issues/468
****
actually, now that you make me think of it, the pin in use could be inferred from the ~/.bela/belaconfig
! Both scripts could just check BOARD=
! HA!