Search code examples
rustembeddedstm32f4discovery

Unable to connect to the GDB server through arm-none-eabi-gdb command


I am following this tutorial. I have compiled the code successfully, but when I try to run using command arm-none-eabi-gdb -q thumbv7em-none-eabihf/debug/led-roulette on terminal, it says that:

C:\Program Files (x86)\GNU Tools ARM Embedded\8 2018-q4-major\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.
thumbv7em-none-eabihf/debug/led-roulette: No such file or directory

Although, I have physically checked the path and the file does exist there.

I am a beginner to stm32f3Discovery and trying to setup the device using the documentation

Steps taken so far:

  1. Already added the target using: rustup target add thumbv7em-none-eabihf

  2. Compiled the program using command: cargo build --target thumbv7em-none-eabihf

  3. Getting correct output of the following command: cargo readobj --target thumbv7em-none-eabihf --bin led-roulette -- -file-headers

  4. As I am on Windows, I've tried the following command to launch openOCD: openocd -s C:\OpenOCD\scripts -f interface/stlink-v2-1.cfg -f target/stm32f3x.cfg

  5. Run this command to connect to gdb server, but failed: arm-none-eabi-gdb -q target/thumbv7em-none-eabihf/debug/led-roulette

The above command should work and connect GDB server, but it doesn't.


Solution

  • Thanks hellow.. Your 'Triple check' statement works for me. Yes, it was the path issue which i had to change while debugging. It is rocking..