Problems with debugging after "load" command #95

Closed
kjellhar opened this Issue Jun 16, 2012 · 4 comments

Projects

None yet

4 participants

@kjellhar

Hi, I've been using st-util with the STM32F4Discovery, and I have encountered a weird problem that I guess would mostly go by unnoticed. I am using the latest Yagarto toolchain on a Mac with OSX Lion.

I have compiled a simple blink led program using Chibios, which works fine, but when I do the following, the debugging will not work.

  1. Start the st-util
  2. start arm-none-eabi-gdbtui
  3. gdb> tar rem :4242
  4. gdb> file ch.elf
  5. gdb> load
  6. gdb> cont

At this point, the program will be running, but it is in a deadlock in the idle task. My guess is that something has happened during the "load" that changes some of the interrupts or something. The reason for thinking this is that if I reset the card, the led will blink as it should, and if I skip sep #5 (assuming I already loaded the program), it will debug correctly.

If one of the developer wants to look into this, I will be more than happy to provide the ELF file I'm using, as well as any additional information.

@zyp
zyp commented Jun 18, 2012

After doing load, you should do run to start the program from the beginning. load will clobber both registers and memory, so you are trying to continue from an undefined state.

@kjellhar

Problem is that the Eclipse debugger does not issue a run command, unless there is some setting I don't know about.

@elvisfox
elvisfox commented Mar 15, 2015 edited

You could also use monitor jtag_reset command just before 'start' or 'run' to perform hardware reset your target MCU.

@xor-gate xor-gate added the os-mac-osx label May 3, 2016
@xor-gate
Collaborator

Feel free to open a new issue when the problem still remains with v1.2.0 or master. Thanks all for your contributions.

@xor-gate xor-gate closed this May 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment