Openocd programming

Sysprogs forums Forums VisualGDB Openocd programming

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #21851
    oto313
    Participant

    Hello,

    Where can I find the sequence of commands for programming stm32 using OpenOCD. I need to know this because I programmed MCU using VisualGD, dumped the image from it and compare it with original image I generated from ELF file using objcopy utility from C:\SysGCC\arm-eabi\bin. The dumped image and generated are not same. It differs in exactly four bytes  at offset 0x18C .

    here is output from fc utility

    fc /b bootloader.bin bootloader_dumped.bin
    Comparing files bootloader.bin and BOOTLOADER_DUMPED.BIN
    0000018C: 00 FF
    0000018D: 00 FF
    0000018E: 00 FF
    0000018F: 00 FF

    Or do you know why it differs?

    Thanks for answer.

     

    #21854
    support
    Keymaster

    Hi,

    This might be caused by your bootloader (or some other part of the program) modifying the FLASH memory after it is programmed.

    Either way, VisualGDB uses the regular “load” command (that in turn issues vFlashWrite packets to OpenOCD). If you would like to debug the FLASH programming logic used by VisualGDB, please consider creating a debug build of OpenOCD (our OpenOCD fork includes a convenient CMake-based project wrapper, see this tutorial).

    Alteratively, please try runing the “load” command manually and verifying the memory contents just after it is programmed, but before the program got a chance to run.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.