1

(Using STM32F767 microcontroller) I have a remote debugging environment setup on a RPI using OpenOCD. I can connect to it just fine using GDB.

However since I am writing a bootloader I need to flash the firmware to a specific offset in flash memory. E.g bootloader starts at 0x800000 and firmware should start at 0x8010000 for example so the offset would be (0x10000).

This works fine locally using: mon flash write_bank 0 main.bin 0x10000 But since I don't have the main.bin in the RPI, is there a way I could use OpenOCD or GDB to specify my local file instead and that would be sent over the remote connection?

Note that I would not like to setup a FTP and thus am looking for an alternate solution.

Best regards

King
  • 11
  • 1
  • 5
  • 1
    Your question is not clear. if you simply link your firmware to be located at adress 0x8010000, your debugger will load it at this adress, there is nothing specific to be done. – Guillaume Petitjean Sep 24 '19 at 07:29
  • openocd and gdb use local files, as in your example. Unclear what you are asking. – old_timer Sep 24 '19 at 12:02
  • 1
    Actually I think he is asking the same I am currently searching for, flashing via the server openocd opens on ports 4444 (telnet) or 6666 (tcl) or in his case gdb (3333) (only if target defined). Using one of the connections to upload the program code file to the target. – Cyborg-X1 Nov 11 '19 at 22:18
  • You ever figure this out? Using google and this is the only thing remotely having to do with what I'm looking for. Not sure what's unclear about it :p – Edward Strange Oct 13 '21 at 00:07

2 Answers2

0

gdb should supports sending files to remote via the 'remote put '. But, when I try this in gdb, I get the response "Remote I/O error: Function not implemented". Seems like OpenOCD does not support this

-1

Use "file" to select the file and then "load" will send the file across to the device.

Ryan
  • 353
  • 1
  • 7