J-Link and SQI flash

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • J-Link and SQI flash

    Hi,
    I need to flash an SQI flash memory (Serial Quad I/O) using the J-Link and J-Link GDB Server.

    With OpenOCD and Flyswatter i can configure a work area to download an algorithm in axf format used to write into the SQI.
    In the openOCD cfg file i use the following piece of script to read the binary file and write to the SQI using the axf in the work area:

    Source Code

    1. proc loadsqi { image_file } {
    2. set blksize 32768
    3. load_image [find target/sqi_loader.axf] 0 elf
    4. set bin_image [find $image_file]
    5. set file_size [exec ls -lH $bin_image | awk "{print \$5}"]
    6. for {set buf_pos 0} {$buf_pos < $file_size} {set buf_pos [expr $buf_pos + $blksize]} {
    7. set remain [expr $file_size - $buf_pos]
    8. set xfer $blksize
    9. if {$remain < $blksize} {
    10. set xfer $remain
    11. }
    12. mww 0x00100ff8 $buf_pos
    13. mww 0x00100ffc $xfer
    14. load_image $bin_image 0x00101000 bin 0x00101000 $blksize $buf_pos
    15. reg pc 0
    16. reg cpsr 0xd3
    17. bp 0xc00 4
    18. resume 0
    19. puts ">>>>> flashing $xfer bytes at $buf_pos of $file_size ..."
    20. wait_halt 100
    21. }
    22. puts ">>>>> $bin_image $file_size bytes loaded"
    23. }
    Display All


    My question is: How can i replicate this mechanism with J-Link and J-Link GDB Server via JTAG ?

    Thanks in advance.
  • Hi,

    My question is: How can i replicate this mechanism with J-Link and J-Link GDB Server via JTAG ?


    Where is the problem?
    Load the file into RAM via GDB "load" command.
    Set breakpoint to the appropriate position in the algorithm when flashing is finished.
    use the GDB commands for loading additional binary files which are used as data input for the algorithm.
    Use the GDB "continue" command to start the algorithm.


    Best regards
    Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.