Skip to content

dist: added a unified OpenOCD script#2408

Merged
haukepetersen merged 13 commits intoRIOT-OS:masterfrom
haukepetersen:opt_unified_openocd
Feb 10, 2015
Merged

dist: added a unified OpenOCD script#2408
haukepetersen merged 13 commits intoRIOT-OS:masterfrom
haukepetersen:opt_unified_openocd

Conversation

@haukepetersen
Copy link
Copy Markdown
Contributor

Finally found some time to look into a unified script for using OpenOCD (as talked about in #2375).

I think this makes porting again a little easier :-)

tested for:

@haukepetersen haukepetersen added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation labels Feb 8, 2015
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the enforcing of -tui.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @authmillenon , I have never gotten TUI mode to work properly..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is it enforced? I actually put this in on your behalf - so default behavior is without tui, just when you define TUI=1 or similar the -tui option is enabled...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but the hello hello should not be here...

@haukepetersen haukepetersen added the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Feb 8, 2015
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should let us specify a board-specific gdb.cfg, since there may be other parameters that should be passed to GDB, depending on the debugger and CPU.

This trivial initialization command can just as easily be specified on the command line without having to pass via temporary files:

$(DBG) -ex "tar ext :$(GDB_PORT)" $(ELFFILE)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yap, @authmillenon just pointed the -ex option out, I wasn't aware of it...

Concerning the gdb.conf file, I am against it for keeping the board ports slim. So far none of our boards has any additional gdb options it uses. As stated above: if you want to do something out of the ordinary, just use make debug-server and connect to it with your custom-configured frontend.

@thomaseichinger
Copy link
Copy Markdown
Member

Tested samr21-xpro and nucleo-l1 as good. For iot-lab_M3 and fox please consider haukepetersen#5

@haukepetersen
Copy link
Copy Markdown
Contributor Author

@thomaseichinger: your PR is merged into this one.

@haukepetersen
Copy link
Copy Markdown
Contributor Author

simplified the debug action by omitting the creation of an external file (using the -ex option for gdb instead).

@thomaseichinger
Copy link
Copy Markdown
Member

ACK when squashed and merge at will.

@haukepetersen
Copy link
Copy Markdown
Contributor Author

rebased, waiting for Travis

@haukepetersen haukepetersen removed the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Feb 10, 2015
@haukepetersen
Copy link
Copy Markdown
Contributor Author

and go.

haukepetersen added a commit that referenced this pull request Feb 10, 2015
@haukepetersen haukepetersen merged commit e307826 into RIOT-OS:master Feb 10, 2015
@haukepetersen haukepetersen deleted the opt_unified_openocd branch February 10, 2015 16:30
@OlegHahm
Copy link
Copy Markdown
Member

Somehow this seems to break flashing on the SAMR21. It's hanging after "Verified OK" (at least at my and @LudwigOrtmann's computer). Reverting haukepetersen@de3200a makes flashing work again.

@OlegHahm
Copy link
Copy Markdown
Member

Adding the -c "shutdown" at th end of do_flash makes it work again (though the exit value seems to indicate an error).

@OlegHahm
Copy link
Copy Markdown
Member

adding an exit after the verify works as well.

@thomaseichinger
Copy link
Copy Markdown
Member

Whats the exit value? Could you paste the output with adding -d3 to the openocd command?

@jnohlgard
Copy link
Copy Markdown
Member

Actually, I think do_flash should have -c 'shutdown' at the end to tell openocd to exit after resetting the device.

@OlegHahm
Copy link
Copy Markdown
Member

Let's move the discussion to #2470.

@OlegHahm OlegHahm modified the milestone: Release 2015.06 Apr 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants