You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.1 KiB
52 lines
1.1 KiB
#!/bin/bash
|
|
|
|
function heck_toolchain_esp32() {
|
|
# esp-idf toolchain
|
|
export ESP_IDF=~/src/esp-idf/
|
|
if [[ -e $ESP_IDF ]]; then {
|
|
source $ESP_IDF/export.sh
|
|
}; fi
|
|
}
|
|
|
|
function heck_toolchain_avr() {
|
|
# AVR
|
|
alias repl='screen /dev/cu.usbmodemC7FD1A0181A71'
|
|
alias 32u4-console='screen /dev/cu.usbmodem11301'
|
|
}
|
|
|
|
function heck_toolchain_arduino() {
|
|
# Arduino
|
|
export PATH=$PATH:~/src/arduino-cli
|
|
}
|
|
|
|
function heck_toolchain_arm() {
|
|
PATH=/opt/gcc-arm-none-eabi-10.3-2021.10/bin:$PATH
|
|
#PATH=/opt/gcc-arm-none-eabi-10.3-2021.10/arm-none-eabi/bin:$PATH
|
|
}
|
|
|
|
function heck_toolchain_fv1() {
|
|
# ch431
|
|
export PATH="$HOME/src/ch341eeprom/:$PATH"
|
|
|
|
# fvcompile, fvhex2bin, fvflash
|
|
function heck_fvcompile {
|
|
python -m asfv1 -b -c -s $1 $1.bin
|
|
}
|
|
|
|
function heck_fvhex2bin {
|
|
srec_cat $1 -Intel -o $1.bin -binary
|
|
}
|
|
|
|
#function fvflash {
|
|
# sudo ch341eeprom -v -s 24c32 -w $1
|
|
#}
|
|
|
|
function heck_fverase {
|
|
sudo fvflash --erase
|
|
}
|
|
}
|
|
|
|
alias heck_toolchain_info='make -f ~/HeckBashSetup/scripts/ToolchainInfo'
|
|
|
|
#OCD_DIR=/opt/local/bin/openocd/
|
|
heck_toolchain_arm
|