Question

I have a small embedded system, and I like to use Eclipse to write/upload/debug programs.

There is only one problem, Eclipse can not upload programs via gdb to gdbserver.

There is support for:

  • DataStore
  • SSH
  • FTP
  • Telnet

But they all require extra software on my embedded system.

With gdb you can upload programs to gdbserver of the embedded system.

Does you know if there is some Eclipse support for that? Maybe a plugin?

(I searched 2 days before asking, so it would be great if you can help me out here.)

Was it helpful?

Solution

if you know the address space where you wish copy the program you can do it from GDB:

from https://sourceware.org/gdb/onlinedocs/gdb/Dump_002fRestore-Files.html :

restore filename [binary] bias start end

Restore the contents of file filename into memory. The restore command can automatically recognize any known bfd file format, except for raw binary. To restore a raw binary file you must specify the optional keyword binary after the filename. If bias is non-zero, its value will be added to the addresses contained in the file. Binary files always start at address zero, so they will be restored at address bias. Other bfd files have a built-in location; they will be restored at offset bias from that location.

If start and/or end are non-zero, then only data between file offset start and file offset end will be restored. These offsets are relative to the addresses in the file, before the bias argument is applied.

i imagine it will be possible to connect this functionality to an Eclipse button.

OTHER TIPS

Install C/C++ cross compiling support and C/C++ GDB Hardware debugging plug-in. These are in default update sites (just do help->install new software and look under "mobile and device development").

This should let you build and deploy code to your embedded system. You will need to specify the toolchain prefix (project configuration) and the name of your gdb (GDB hardware debugging).

In debugger tab of launch configuration choose "generic tcp/ip device" and enter address and port of running gdbserver.

This tutorial could be useful: http://janaxelson.com/eclipse5.htm

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top