How to upload image to nor flash (stm32 board) with Jlink ?

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

  • How to upload image to nor flash (stm32 board) with Jlink ?

    How to upload image to nor flash (stm32 board) with Jlink ?

    Hello, i have downloaded the Linux version package of Jlink and started success.
    But how could i upload image into the nor flash with command line ?
    The "loadbin" command only upload image to memory ...

    Does anyone give me some suggestion ?
  • 1. Jlink start log:

    Source Code

    1. zwang@wzc-laptop:~/source/JLink_Linux_V422$ ./start
    2. SEGGER J-Link Commander V4.22 ('?' for help)
    3. Compiled Dec 17 2010 17:41:09
    4. DLL version V4.22, compiled Dec 17 2010 17:41:06
    5. Firmware: J-Link ARM V7 compiled Sep 6 2010 10:43:31
    6. Hardware: V7.00
    7. S/N: 11111117
    8. Feature(s): RDI, FlashBP, FlashDL, JFlash, GDBFull
    9. VTarget = 3.293V
    10. Info: Could not measure total IR len. TDO is constant high.
    11. WARNING: CPU core not found.
    12. No devices found on JTAG chain. Trying to find device on SWD.
    13. Info: Found SWD-DP with ID 0x1BA01477
    14. Info: TPIU fitted.
    15. Info: ETM fitted.
    16. Info: FPUnit: 6 code (BP) slots and 2 literal slots
    17. Info: Found Cortex-M3 r1p1, Little endian.
    18. Cortex-M3 identified.
    19. JTAG speed: 100 kHz
    20. J-Link>
    21. J-Link>
    Display All


    2. Refer to the link: [ANSWERED]J-Link flash download available for free or not?, have tried the following commands:

    Brainfuck Source Code

    1. exec device = STM32F103Zx
    2. speed 12000
    3. h
    4. loadbin /home/zwang/work_dir/stm32/rt-thread-read-only/bsp/stm3210/rtthread.bin 0x08000000
    5. r
    6. g
    7. -----------------------------
    8. J-Link>loadbin /home/zwang/work_dir/stm32/rt-thread-read-only/bsp/stm3210/rtthread.bin 0x08000000
    9. Loading binary file... [/home/zwang/work_dir/stm32/rt-thread-read-only/bsp/stm3210/rtthread.bin]
    10. Writing bin data into target memory @ 0x08000000.
    Display All


    But the board still run the old image, it seems nothing have been uploaded ?

    What's the reason ?

    A question: Does the "loadbin" command only load image to memory? or can write data to nor flash ?
  • It works now:

    J-Link> exec device = STM32F103VE
    J-Link> loadbin /home/zwang/work_dir/stm32/rt-thread-read-only/bsp/stm3210/rtt.bin 0x8000000
    J-Link> r
    J-Link> g

    --------------------------------------------------------------------

    The chip is STM32F103VET6, but could not run "exec device = STM32F103VET6"

    --------------------------------------------------------------------

    loadbin log such as below:

    Loading binary file... [/home/zwang/work_dir/stm32/rt-thread-read-only/bsp/stm3210/rtt.bin]
    Writing bin data into target memory @ 0x08000000.
    Info: Found SWD-DP with ID 0x1BA01477
    Info: TPIU fitted.
    Info: ETM fitted.
    Info: FPUnit: 6 code (BP) slots and 2 literal slots
    Info: Found Cortex-M3 r1p1, Little endian.