Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some features added (get_symbol, file, download) #32

Merged
merged 7 commits into from
Apr 16, 2019

Conversation

drizzi-novalabs
Copy link
Contributor

For my purposes (a HW testing system) I need to load an ELF file and download it to the target (via OpenOCD + GDB), so I have added the required code to Avatar2.

So I have added:

  • Target.get_symbol to get the address of a symbol
  • Target.file/GDBProtocol.file to load the ELF file (-file-exec-and-symbols GDB command)
  • Target.download/GDBProtocol.download to download the FW to the device (-target-download GDB command)

@mariusmue
Copy link
Member

Hi there! Thanks for the contribution, looks very good to me!

Would you mind to do some "aesthetic" changes before we mainline in?
More specifically:

  • Rename the method file to set_file and the watchmen from File to TargetSetFile
  • Sanitize inside the methods in target.py whether the protocol supports the set_file and download feature, as only the GDBProtocol supports it as of now and provide an error message otherwise. (A simple hasattr() would be enough)
  • Change the docstring for download (it has the one from exec) in target.py

Thank you again,
Marius

@mariusmue mariusmue merged commit ef449e9 into avatartwo:master Apr 16, 2019
@mariusmue
Copy link
Member

Perfect, added to mainline, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants