small tweeks
This commit is contained in:
parent
4b71534530
commit
572756c6aa
10
bashrc
10
bashrc
@ -58,3 +58,13 @@ function rust_disassemble() {
|
|||||||
cargo objdump --bin $1 -- --disassemble --no-show-raw-insn --print-imm-hex
|
cargo objdump --bin $1 -- --disassemble --no-show-raw-insn --print-imm-hex
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function rust_print_size() {
|
||||||
|
elif [ -z "$1" ]; then
|
||||||
|
cargo nm --release -- --print-size --size-sort
|
||||||
|
cargo size --release
|
||||||
|
else
|
||||||
|
cargo nm -- --print-size --size-sort lists symbol sorted by size
|
||||||
|
cargo size
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
5
cargo.sh
5
cargo.sh
@ -1,5 +1,10 @@
|
|||||||
|
echo "cargo version"
|
||||||
|
cargo --version
|
||||||
|
|
||||||
cargo install cargo-binutils
|
cargo install cargo-binutils
|
||||||
cargo install cargo-generate
|
cargo install cargo-generate
|
||||||
|
cargo install espflash --locked
|
||||||
|
cargo install esp-generate --locked
|
||||||
cargo install flip-link
|
cargo install flip-link
|
||||||
cargo install qemu-run
|
cargo install qemu-run
|
||||||
cargo install svd2rust
|
cargo install svd2rust
|
||||||
|
|||||||
8
probe.sh
8
probe.sh
@ -7,5 +7,13 @@ function check_if_installed() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function install_udev_rules() {
|
||||||
|
if [[ $EUID -eq 0 ]]; then
|
||||||
|
sudo probe-rs complete install-udev-rules
|
||||||
|
else
|
||||||
|
echo "could not install udev-rules, needs to be root."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
check_if_installed
|
check_if_installed
|
||||||
|
install_udev_rules
|
||||||
|
|||||||
18
rustup.sh
18
rustup.sh
@ -17,8 +17,18 @@ rustup update
|
|||||||
echo "installing llvm-tools.."
|
echo "installing llvm-tools.."
|
||||||
rustup component add llvm-tools
|
rustup component add llvm-tools
|
||||||
rustup component add rustfmt
|
rustup component add rustfmt
|
||||||
#rustup target add thumbv6m-none-eabi # Cortex-M0 and Cortex-M0+
|
rustup default stable
|
||||||
#rustup target add thumbv7m-none-eabi # Cortex-M3
|
rustup update stable
|
||||||
#rustup target add thumbv7em-none-eabi # Cortex-M4 and Cortex-M7 (no FPU)
|
echo "adding some popular toolchains.."
|
||||||
#rustup target add thumbv7em-none-eabihf # Cortex-M4F and Cortex-M7F (with FPU)
|
rustup target add thumbv6m-none-eabi # Cortex-M0 and Cortex-M0+
|
||||||
|
rustup target add thumbv7m-none-eabi # Cortex-M3
|
||||||
|
rustup target add thumbv7em-none-eabi # Cortex-M4 and Cortex-M7 (no FPU)
|
||||||
|
rustup target add thumbv7em-none-eabihf # Cortex-M4F and Cortex-M7F (with FPU)
|
||||||
|
rustup target add thumbv8m.main-none-eabi # Cortex-M33 and M55 (no FPU)
|
||||||
|
rustup target add thumbv8m.main-none-eabihf # Cortex-M33 and M55 (with FPU)
|
||||||
|
rustup target add riscv32imac-unknown-none-elf # RISC-V 32-bit
|
||||||
|
echo "rustup rustc and cargo is ready to go!"
|
||||||
|
echo "rustc version"
|
||||||
|
rustc --version
|
||||||
|
rustup show
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user