Skip to content

Commit

Permalink
Work on display / graphics, compiling but seg fault runtime error
Browse files Browse the repository at this point in the history
  • Loading branch information
AlixANNERAUD committed Dec 17, 2023
1 parent 0b5cd41 commit 0af9992
Show file tree
Hide file tree
Showing 14 changed files with 2,765 additions and 99 deletions.
4 changes: 2 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ linker = "ldproxy"
runner = "espflash flash --monitor" # Select this runner for espflash v2.x.x
rustflags = [ "--cfg", "espidf_time64"] # Extending time_t for ESP IDF 5: https://github.com/esp-rs/rust/issues/110

[unstable]
build-std = ["std", "panic_abort"]
#[unstable]
#build-std = ["std", "panic_abort"]

[env]
# Note: this variable is not used by the pio builder (`cargo build --features pio`)
Expand Down
2 changes: 1 addition & 1 deletion Build/src/Main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mod Log;

fn main() {
let Target = Target_type::Get_current();

Print_line!("Start Xila build");

Print_line!("Target architecture: {:?}", Target);
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ embedded-sdmmc = "0.6.0"
embedded-hal = "0.2.7"
fatfs = { version = "0.3.6" }
byteorder = "1.5.0"
sdl2 = "0.36.0"

[build-dependencies]
embuild = { version = "0.31.4", features = ["espidf"] }

[target.'cfg(target_arch = "x86_64")'.dependencies]
byteorder = "1.5.0"
sdl2 = { version = "0.36.0", features = [] }
lvgl = { version="0.6.2", features = [] }
60 changes: 35 additions & 25 deletions Export.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ clear && echo "Setting up environment variables for Rust cross-compilation"

# Variables

Linux_environment_variables="DEP_LV_CONFIG_PATH=\"$PWD\""
Linux_target="--target x86_64-unknown-linux-gnu"
Windows_target="--target x86_64-pc-windows-gnu"

ESP32_environment_variables="MCU=esp32"
ESP32_environment_variables="MCU=esp32 DEP_LV_CONFIG_PATH='pwd'"
ESP32_target="--target xtensa-esp32-espidf --features ESP32"
ESP32_S3_environment_variables="MCU=esp32s3"
ESP32_S3_environment_variables="MCU=esp32s3 DEP_LV_CONFIG_PATH='pwd'"
ESP32_S3_target="--target xtensa-esp32s3-espidf --features ESP32_S3"

Cargo="clear && cargo"
Cargo="cargo"

# Remove all aliases
{
Expand All @@ -25,33 +26,42 @@ unalias run_linux
unalias run_windows
unalias run_esp32
unalias run_esp32_s3
unalias test_linux
unalias test_windows
unalias test_esp32
unalias test_esp32_s3
unalias check_linux
unalias check_windows
unalias check_esp32
unalias check_esp32_s3
unalias clean
} &> /dev/null

# Aliases
Clear="clear &&"
Cargo_build="$Cargo build"
alias build_linux="$Cargo_build $Linux_target"
alias build_windows="$Cargo_build $Windows_target"
alias build_esp32="$ESP32_environment_variables $Cargo_build $ESP32_target"
alias build_esp32_s3="$ESP32_S3_environment_variables $Cargo_build $ESP32_S3_target"

Cargo_run="$Cargo run"
alias run_linux="$Cargo_run $Linux_target"
alias run_windows="$Cargo_run $Windows_target"
alias run_esp32="$ESP32_environment_variables $Cargo_run $ESP32_target"
alias run_esp32_s3="$ESP32_S3_environment_variables $Cargo_run $ESP32_S3_target"

Cargo_test="$Cargo test"
alias test_linux="$Cargo_test $Linux_target"
alias test_windows="$Cargo_test $Windows_target"
alias test_esp32="$ESP32_environment_variables $Cargo_test $ESP32_target"
alias test_esp32_s3="$ESP32_S3_environment_variables $Cargo_test $ESP32_S3_target"

Cargo_check="$Cargo check"
alias check_linux="$Cargo_check $Linux_target"
alias check_windows="$Cargo_check $Windows_target"
alias check_esp32="$ESP32_environment_variables $Cargo_check $ESP32_target"
alias check_esp32_s3="$ESP32_S3_environment_variables $Cargo_check $ESP32_S3_target"
alias build_linux="$Clear $Linux_environment_variables $Cargo_build $Linux_target"
alias build_windows="$Clear $Cargo_build $Windows_target"
alias build_esp32="$Clear $ESP32_environment_variables $Cargo_build $ESP32_target"
alias build_esp32_s3="$Clear $ESP32_S3_environment_variables $Cargo_build $ESP32_S3_target"

Cargo_run="$Clear $Cargo run"
alias run_linux="$Clear $Linux_environment_variables $Cargo_run $Linux_target"
alias run_windows="$Clear $Cargo_run $Windows_target"
alias run_esp32="$Clear $ESP32_environment_variables $Cargo_run $ESP32_target"
alias run_esp32_s3="$Clear $ESP32_S3_environment_variables $Cargo_run $ESP32_S3_target"

Cargo_test="$Clear $Cargo test"
alias test_linux="$Clear $Linux_environment_variables $Cargo_test $Linux_target"
alias test_windows="$Clear $Cargo_test $Windows_target"
alias test_esp32="$Clear $ESP32_environment_variables $Cargo_test $ESP32_target"
alias test_esp32_s3="$Clear $ESP32_S3_environment_variables $Cargo_test $ESP32_S3_target"

Cargo_check="$Clear $Cargo check"
alias check_linux="$Clear $Linux_environment_variables $Cargo_check $Linux_target"
alias check_windows="$Clear $Cargo_check $Windows_target"
alias check_esp32="$Clear $ESP32_environment_variables $Cargo_check $ESP32_target"
alias check_esp32_s3="$Clear $ESP32_S3_environment_variables $Cargo_check $ESP32_S3_target"

alias clean="$Cargo clean"

Expand Down
Loading

0 comments on commit 0af9992

Please sign in to comment.