-
Notifications
You must be signed in to change notification settings - Fork 524
/
build_cp_esp_fw
executable file
·77 lines (64 loc) · 1.97 KB
/
build_cp_esp_fw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash -i
set -e
get_idf
FWPATH="../../ESP32/vesc_express/"
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
mv $FWPATH/main/conf_general.h $FWPATH/main/conf_general_tmp.h
# Express
BOARD="$DIR/res/firmwares_esp/ESP32-C3/VESC Express"
cd $FWPATH
cp "$BOARD/conf_general.h" main/
idf.py build
cp build/vesc_express.bin "$BOARD"
cp build/partition_table/partition-table.bin "$BOARD"
cp build/bootloader/bootloader.bin "$BOARD"
# Devkit
BOARD="$DIR/res/firmwares_esp/ESP32-C3/DevKitM-1"
cd $FWPATH
cp "$BOARD/conf_general.h" main/
idf.py build
cp build/vesc_express.bin "$BOARD"
cp build/partition_table/partition-table.bin "$BOARD"
cp build/bootloader/bootloader.bin "$BOARD"
# STR365
BOARD="$DIR/res/firmwares_esp/ESP32-C3/STR365"
cd $FWPATH
cp "$BOARD/conf_general.h" main/
idf.py build
cp build/vesc_express.bin "$BOARD"
cp build/partition_table/partition-table.bin "$BOARD"
cp build/bootloader/bootloader.bin "$BOARD"
# VBMS32
BOARD="$DIR/res/firmwares_esp/ESP32-C3/VBMS32"
cd $FWPATH
cp "$BOARD/conf_general.h" main/
idf.py build
cp build/vesc_express.bin "$BOARD"
cp build/partition_table/partition-table.bin "$BOARD"
cp build/bootloader/bootloader.bin "$BOARD"
# VDisp
BOARD="$DIR/res/firmwares_esp/ESP32-C3/VDisp"
cd $FWPATH
cp "$BOARD/conf_general.h" main/
idf.py build
cp build/vesc_express.bin "$BOARD"
cp build/partition_table/partition-table.bin "$BOARD"
cp build/bootloader/bootloader.bin "$BOARD"
# VDisp Dual
BOARD="$DIR/res/firmwares_esp/ESP32-C3/VDisp Dual"
cd $FWPATH
cp "$BOARD/conf_general.h" main/
idf.py build
cp build/vesc_express.bin "$BOARD"
cp build/partition_table/partition-table.bin "$BOARD"
cp build/bootloader/bootloader.bin "$BOARD"
# BMS RB
BOARD="$DIR/res/firmwares_esp/ESP32-C3/BMS RB"
cd $FWPATH
cp "$BOARD/conf_general.h" main/
idf.py build
cp build/vesc_express.bin "$BOARD"
cp build/partition_table/partition-table.bin "$BOARD"
cp build/bootloader/bootloader.bin "$BOARD"
mv $FWPATH/main/conf_general_tmp.h $FWPATH/main/conf_general.h
rm -r $FWPATH/build