diff --git a/.cargo/config b/.cargo/config.toml similarity index 60% rename from .cargo/config rename to .cargo/config.toml index fa95820..64c93b1 100644 --- a/.cargo/config +++ b/.cargo/config.toml @@ -7,11 +7,3 @@ rustflags = [ [build] target = "riscv32imac-unknown-none-elf" - -[profile.release] -opt-level = "z" # Optimize for size. -codegen-units = 1 -lto = true - -[profile.dev] -opt-level = "z" # Optimize for size. diff --git a/Cargo.toml b/Cargo.toml index 97f80d9..6500fd0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,3 +44,10 @@ required-features = ["lcd"] name = "sdcard_test" required-features = ["sdcard"] +[profile.release] +opt-level = "z" # Optimize for size. +codegen-units = 1 +lto = true + +[profile.dev] +opt-level = "z" # Optimize for size. diff --git a/README.md b/README.md index c875575..8ed3278 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ sudo apt-get install gcc-riscv64-unknown-elf ### Building -If you have a GD32VF103C**B** chip on your board, edit `.cargo/config` and replace +If you have a GD32VF103C**B** chip on your board, edit `.cargo/config.toml` and replace `memory-c8.x` with `memory-cb.x`. To build all the provided examples run @@ -181,7 +181,7 @@ To flash the firmware, execute `load` in GDB: ``` To improve your workflow, you can put the aforementioned GDB commands in -a `debug.gdb` file and add these lines to `.cargo/config`: +a `debug.gdb` file and add these lines to `.cargo/config.toml`: ``` [target.riscv32imac-unknown-none-elf]