On 03/27/2018 05:09 PM, Paul Fertser wrote:
> That said,
>
>> Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
> means you're able to control the target just fine, and you can proceed
> with flashing or debugging. I recommend to use "program" helper for
> standalone flashing (it's described in the User Manual) or "load"
> command from gdb.
Hi

I've setup a project dir for openocd with this config and it works like the 
command line version:

source [find interface/stlink.cfg]

# GDB can also flash my flash!
gdb_memory_map enable
gdb_flash_program enable

source [find target/stm32f4x.cfg]


So, now I want to flash micropython onto the STM32F401.  So far I've done that 
with a DFU mode file that
micropython compiles for me, and otherwise it makes two files.  Is doing 2 
files easy?

Here's how the DFU flashing goes:

lsusb
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 002: ID 17ef:1003 Lenovo Integrated Smart Card Reader
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 0483:df11 STMicroelectronics STM Device in DFU Mode
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0483:2016 STMicroelectronics Fingerprint Reader
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
john@ecolab3 [build-G30TH]cd ..
john@ecolab3 [stm32]make BOARD=G30TH deploy
Use make V=1 or set BUILD_VERBOSE in your environment to increase build 
verbosity.
GEN build-G30TH/genhdr/qstrdefs.collected.h
QSTR not updated
Writing build-G30TH/firmware.dfu to the board
File: build-G30TH/firmware.dfu
    DfuSe v1, image size: 298053, targets: 1
    Target 0, alt setting: 0, name: "ST...", size: 297768, elements: 2
      0, address: 0x08000000, size: 14868
      1, address: 0x08020000, size: 282884
    usb: 0483:df11, device: 0x0000, dfu: 0x011a, UFD, 16, 0x949f545e
Writing memory...
0x08000000   14868 [=========================] 100%
0x08020000  282884 [=========================] 100%
Exiting DFU...
john@ecolab3 [stm32]


The files I get are:
firmware0.bin
firmware1.bin

program uses erase then write, so probably wants just one file, so maybe I need 
to use:

flash write_bank 0 firmware0.bin 0x08000000     (flash write_bank num filename 
offset)
flash write_bank 1 firmware1.bin  0x08020000    (flash write_bank num filename 
offset)
flash verify_bank 1 firmware1.bin  0x08020000      (flash verify_bank num 
filename offset)
flash verify_bank 0 firmware0.bin  0x08000000      (flash verify_bank num 
filename offset)


Thanks,
--
John Griessen -- building lab gear for biologists
Ecosensory  Austin TX  blog.kitmatic.com

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to