Crates.io | stellaris-launchpad |
lib.rs | stellaris-launchpad |
version | 0.11.2 |
source | src |
created_at | 2017-01-26 22:24:00.895287 |
updated_at | 2018-07-26 21:43:11.862559 |
description | A bare-metal crate supporting the Texas Instruments Stellaris LM4F120 Launchpad (and most likely the Tiva-C TM4C120 Launchpad too) |
homepage | https://www.thejpster.org.uk |
repository | https://github.com/thejpster/stellaris-launchpad |
max_upload_size | |
id | 8235 |
size | 46,909 |
A bare metal example program written in Rust (https://rust-lang.org) for the Stellaris Launchpad (LM4F120 dev board). May also work on the very closely related Tiva-C TM4C123 Launchpad.
The idea is that useful functionality will be moved out into separate crates. I'm also in the process of replacing the lm4f120 crate with tm4c123x-hal; the TM4C123 line replaced the LM4F120 whilst being almost perfectly compatible. The new crate also does things in a different way, particularly around peripherals being singletons (which makes your code safer). At some point I'll switch this crate to use tm4c123x-hal.
git clone https://github.com/thejpster/launchpad-rs.git
cd ./launchpad-rs
rustup install nightly
rustup component add rust-src
rustup target add thumbv7em-none-eabihf
or simply
git clone https://github.com/thejpster/launchpad-rs.git
cd ./launchpad-rs
make prerequisites
cargo build --example launchpad_blink
arm-none-eabi-objcopy -O binary target/thumbv7em-none-eabihf/debug/examples/launchpad_blink target/thumbv7em-none-eabihf/debug/examples/launchpad_blink.bin
sudo lm4flash target/thumbv7em-none-eabihf/debug/examples/launchpad_blink.bin
~/launchpad-rs $ sudo openocd -f /usr/share/openocd/scripts/board/ek-lm4f120xl.cfg
~/launchpad-rs $ arm-none-eabi-gdb ./target/thumbv7em-none-eabihf/debug/examples/launchpad_blink
(gdb) target remote localhost:3333
(gdb) load
Loading section .text, size 0x1e98 lma 0x0
Loading section .ARM.exidx, size 0x8 lma 0x1e98
Loading section .data, size 0xc lma 0x1ea0
Start address 0x0, load size 7852
Transfer rate: 7 KB/sec, 2617 bytes/write.
(gdb) monitor reset halt
(gdb) break main
(gdb) continue