Sounds like a bug in the flash driver if it works with separate flash
write
operations but not with one contiguous.
Certainly if programming a bin file fails while programming an elf file
with contiguous sections covering the same range does work. Success/fail
should not depend on the source format of the data! There is no promise
that the ELF flashing path will not merge back-to-back sections into
larger
flash writes, in fact it would make sense to do so.
On Sat, Jun 27, 2020 at 4:00 PM Tom via OpenOCD-devel
openocd-devel@lists.sourceforge.net <mailto:
openocd-devel@lists.sourceforge.net> wrote:
I will put together Github tutorial on this and include the "Bash
Script"
for creating a nice "OpenOCD Programmer" over the next week.
Please do not. The hackish way works for you but offseting
slpitted parts
of bin file is error prone and pontentially dangerous for others.
Better
learn more about gnu linker scripts and also read OpenOCD doc. I
strongly
reccomend elf file for flashing.
------------------------------------------------------------------------
* [tickets:#270]
<https://sourceforge.net/p/openocd/tickets/270/>
https://sourceforge.net/p/openocd/tickets/270/ Kinetis
MK22FX512: Error writing FCF Block 0X400 - 0x40f*
/Status:/ new
/Milestone:/ 0.9.0
/Created:/ Sun Jun 14, 2020 06:14 AM UTC by Noel Diviney
/Last Updated:/ Sat Jun 27, 2020 11:55 AM UTC
/Owner:/ nobody
Hi nall,
Error at address 0x400 when programming flash on Kinetis MK22F512xxx12
However, when I press the reset buuton after programming the Led
Blinks
normally.
Does the FCF block have to be skipped somehow?
Is the "Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED" a
problem
given that the program runs.
The terminal output is as follows :-
noel@DESKTOP-0AFLL5T MSYS
/w/adgp-1611/portable/sketchbook/BlinkTestBlue/build
$ openocd -f interface/ftdi/olimex-arm-usb-ocd.cfg
-f target/kx.cfg
-c "program BlinkTestBlue.ino.elf verify reset"
Open On-Chip Debugger 0.10.0 (2020-05-30)
<https://github.com/sysprogs/openocd>https://github.com/sysprogs/openocd
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "jtag". To
override use 'transport select <transport>'.
Info : add flash_bank kinetis kx.pflash
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : clock speed 1000 kHz
Info : JTAG tap: kx.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM
Ltd.), part: 0xba00, ver: 0x4)
Info : kx.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : kx.cpu: external reset detected
Info : MDM: Chip is unsecured. Continuing.
Info : starting gdb server for kx.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : JTAG tap: kx.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM
Ltd.), part: 0xba00, ver: 0x4)
Info : MDM: Chip is unsecured. Continuing.
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000188 msp: 0x20010000
Info : Kinetis MK22FX512xxx12 detected: 2 flash blocks
Info : 1 PFlash banks: 512k total
Info : 1 FlexNVM banks: 128k total, 128k available as data flash,
4096bytes FlexRAM
Info : Disabling Kinetis watchdog (initial WDOG_STCTRLH = 0x01d3)
Info : WDOG_STCTRLH = 0x01d2
/Programming Started /
Error: Flash write error at 0x00000400
/Programming Finished /
/Verify Started /
Error: timed out while waiting for target halted
Error: error executing cortex_m crc algorithm
Error: JTAG-DP STICKY ERROR
Error: Failed to read memory at 0x00000404
embedded:startup.tcl:500: Error: * Verify Failed *
in procedure 'program'
in procedure 'program_error' called at file
"embedded:startup.tcl", line
561
at file "embedded:startup.tcl", line 500</transport>
noel@DESKTOP-0AFLL5T MSYS
/w/adgp-1611/portable/sketchbook/BlinkTestBlue/build
$ openocd -f interface/ftdi/olimex-arm-usb-ocd.cfg
-f interface/ftdi/swd-resistor-hack.cfg
-c "transport select swd"
-f target/kx.cfg
-c "program BlinkTestBlue.ino.elf verify reset"
Open On-Chip Debugger 0.10.0 (2020-05-30)
<https://github.com/sysprogs/openocd>https://github.com/sysprogs/openocd
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : FTDI SWD mode enabled
Warn : Transport "swd" was already selected
swd
Info : add flash_bank kinetis kx.pflash
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Info : kx.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : kx.cpu: external reset detected
Info : MDM: Chip is unsecured. Continuing.
Info : starting gdb server for kx.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : MDM: Chip is unsecured. Continuing.
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000188 msp: 0x20010000
Info : Kinetis MK22FX512xxx12 detected: 2 flash blocks
Info : 1 PFlash banks: 512k total
Info : 1 FlexNVM banks: 128k total, 128k available as data flash,
4096bytes FlexRAM
Info : Disabling Kinetis watchdog (initial WDOG_STCTRLH = 0x01d3)
Info : WDOG_STCTRLH = 0x01d2
/Programming Started /
Error: Flash write error at 0x00000400
/Programming Finished /
/Verify Started /
Error: timed out while waiting for target halted
Error: error executing cortex_m crc algorithm
Info : SWD DPIDR 0x2ba01477
Error: Failed to read memory at 0x00000404
embedded:startup.tcl:500: Error: * Verify Failed *
in procedure 'program'
in procedure 'program_error' called at file
"embedded:startup.tcl", line
561
at file "embedded:startup.tcl", line 500
noel@DESKTOP-0AFLL5T MSYS
/w/adgp-1611/portable/sketchbook/BlinkTestBlue/build
$
I am having difficulty understanding how to manage the FCF flash
block.
Any help would be much appreciated.
Many Thanks Noel Diviney
Sent from sourceforge.net because
openocd-devel@lists.sourceforge.net is
subscribed to https://sourceforge.net/p/openocd/tickets/
To unsubscribe from further messages, a project admin can change
settings
at https://sourceforge.net/p/openocd/admin/tickets/options. Or, if
this
is a mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel
------------------------------------------------------------------------
*[tickets:#270] <https://sourceforge.net/p/openocd/tickets/270/>
Kinetis MK22FX512: Error writing FCF Block 0X400 - 0x40f*
*Status:* new
*Milestone:* 0.9.0
*Created:* Sun Jun 14, 2020 06:14 AM UTC by Noel Diviney
*Last Updated:* Sat Jun 27, 2020 01:58 PM UTC
*Owner:* nobody
Hi nall,
Error at address 0x400 when programming flash on Kinetis MK22F512xxx12
However, when I press the reset buuton after programming the Led
Blinks normally.
Does the FCF block have to be skipped somehow?
Is the "Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED" a
problem
given that the program runs.
The terminal output is as follows :-
noel@DESKTOP-0AFLL5T MSYS
/w/adgp-1611/portable/sketchbook/BlinkTestBlue/build
$ openocd -f interface/ftdi/olimex-arm-usb-ocd.cfg
-f target/kx.cfg
-c "program BlinkTestBlue.ino.elf verify reset"
Open On-Chip Debugger 0.10.0 (2020-05-30)
[https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "jtag". To
override use 'transport select <transport>'.
Info : add flash_bank kinetis kx.pflash
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : clock speed 1000 kHz
Info : JTAG tap: kx.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM
Ltd.), part: 0xba00, ver: 0x4)
Info : kx.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : kx.cpu: external reset detected
Info : MDM: Chip is unsecured. Continuing.
Info : starting gdb server for kx.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : JTAG tap: kx.cpu tap/device found: 0x4ba00477 (mfg: 0x23b (ARM
Ltd.), part: 0xba00, ver: 0x4)
Info : MDM: Chip is unsecured. Continuing.
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000188 msp: 0x20010000
Info : Kinetis MK22FX512xxx12 detected: 2 flash blocks
Info : 1 PFlash banks: 512k total
Info : 1 FlexNVM banks: 128k total, 128k available as data flash,
4096bytes FlexRAM
Info : Disabling Kinetis watchdog (initial WDOG_STCTRLH = 0x01d3)
Info : WDOG_STCTRLH = 0x01d2
*Programming Started *
Error: Flash write error at 0x00000400
*Programming Finished *
*Verify Started *
Error: timed out while waiting for target halted
Error: error executing cortex_m crc algorithm
Error: JTAG-DP STICKY ERROR
Error: Failed to read memory at 0x00000404
embedded:startup.tcl:500: Error: *Verify Failed *
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl",
line 561
at file "embedded:startup.tcl", line 500</transport>
noel@DESKTOP-0AFLL5T MSYS
/w/adgp-1611/portable/sketchbook/BlinkTestBlue/build
$ openocd -f interface/ftdi/olimex-arm-usb-ocd.cfg
-f interface/ftdi/swd-resistor-hack.cfg
-c "transport select swd"
-f target/kx.cfg
-c "program BlinkTestBlue.ino.elf verify reset"
Open On-Chip Debugger 0.10.0 (2020-05-30)
[https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : FTDI SWD mode enabled
Warn : Transport "swd" was already selected
swd
Info : add flash_bank kinetis kx.pflash
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Info : kx.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : kx.cpu: external reset detected
Info : MDM: Chip is unsecured. Continuing.
Info : starting gdb server for kx.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : MDM: Chip is unsecured. Continuing.
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000188 msp: 0x20010000
Info : Kinetis MK22FX512xxx12 detected: 2 flash blocks
Info : 1 PFlash banks: 512k total
Info : 1 FlexNVM banks: 128k total, 128k available as data flash,
4096bytes FlexRAM
Info : Disabling Kinetis watchdog (initial WDOG_STCTRLH = 0x01d3)
Info : WDOG_STCTRLH = 0x01d2
*Programming Started *
Error: Flash write error at 0x00000400
*Programming Finished *
*Verify Started *
Error: timed out while waiting for target halted
Error: error executing cortex_m crc algorithm
Info : SWD DPIDR 0x2ba01477
Error: Failed to read memory at 0x00000404
embedded:startup.tcl:500: Error: *Verify Failed *
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl",
line 561
at file "embedded:startup.tcl", line 500
noel@DESKTOP-0AFLL5T MSYS
/w/adgp-1611/portable/sketchbook/BlinkTestBlue/build
$
I am having difficulty understanding how to manage the FCF flash block.
Any help would be much appreciated.
Many Thanks Noel Diviney
------------------------------------------------------------------------
Sent from sourceforge.net because openocd-devel@lists.sourceforge.net
is subscribed to https://sourceforge.net/p/openocd/tickets/
To unsubscribe from further messages, a project admin can change
settings at https://sourceforge.net/p/openocd/admin/tickets/options.
Or, if this is a mailing list, you can unsubscribe from the mailing list.
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel