rust-embedded / discovery

Discover the world of microcontrollers through Rust!
https://docs.rust-embedded.org/discovery/
Apache License 2.0
1.49k stars 515 forks source link

05-led-roulette flashing fails #473

Closed a-gradina closed 2 years ago

a-gradina commented 2 years ago

I'm following the discovery book for the F3 and encountered an issue I couldn't get around.

agradina@pop-os:/tmp$ openocd -f interface/stlink-v2-1.cfg -f target/stm32f3x.cfg
Open On-Chip Debugger 0.11.0
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
WARNING: interface/stlink-v2-1.cfg is deprecated, please switch to interface/stlink.cfg
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1000 kHz
Info : STLINK V2J37M26 (API v2) VID:PID 0483:374B
Info : Target voltage: 2.903616
Info : stm32f3x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for stm32f3x.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Info : device id = 0x10036422
Info : flash size = 256kbytes
agradina@pop-os:~/discovery/microbit/src/05-led-roulette$ cargo run --features v2 --target thumbv7em-none-eabihf
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
     Running `gdb-multiarch -q /home/agradina/discovery/microbit/target/thumbv7em-none-eabihf/debug/led-roulette`
Reading symbols from /home/agradina/discovery/microbit/target/thumbv7em-none-eabihf/debug/led-roulette...
(gdb) load
You can't do that when your target is `exec'
(gdb) target extended-remote :3333
Remote debugging using :3333
0x080039bc in ?? ()
(gdb) load
Loading section .vector_table, size 0x100 lma 0x0
Loading section .text, size 0x324 lma 0x100
Load failed
a-gradina commented 2 years ago

I was in the wrong directory. Very sorry