forked from ctron/rust-esp-container
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-project
executable file
·30 lines (21 loc) · 895 Bytes
/
build-project
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
#!/usr/bin/env bash
set -e
die() { echo "$*" 1>&2 ; exit 1 ; }
test -f Cargo.toml || die "unable to find 'Cargo.toml'. You will need to map the container path /home/project to the path of your Rust project. You can do this using: docker run -ti -v $PWD:/home/project:z rust-esp"
for i in esp-idf .cargo main; do
test -d "$i" || die "'$i' is missing. Use 'create-project' to set up the build."
done
for i in Makefile .cargo/config main/esp_app_main.c; do
test -f "$i" || die "'$i' is missing. Use 'create-project' to set up the build."
done
test -f sdkconfig || die "'sdkconfig' is missing. You can create one running 'make menuconfig'"
make -j app
if test -d esp32-sys; then
if ! test -f esp32-sys/src/bindings.rs; then
echo "esp32-sys crate is present, but bindings.rs is missing, running bindgen-project"
bindgen-project
fi
fi
xbuild-project
image-project
echo Build complete