当前位置:网站首页>Openocd-jtag debugging

Openocd-jtag debugging

2020-11-09 16:56:30 whoisliang


title: OpenOCD-JTAG debugging
tags: ARM
date: 2018-10-13 23:36:28
---

Todo

  • [ ] JTAG debugging linux kernel
  • [ ] linux Next use OpenOCD debugging
  • [x] win Next use OpenOCD debugging

summary

  • Learning documents Weidong mountain Eclipse,OpenOCD,OpenJTAGv3.1 Embedded development tutorial version 5.pdf

  • Hardware connection : PC>JTAG The debugger >CPU

  • Software control :IDE(KEIL/ADS/)> GDB( Instructions )> OpenOCD( The actual order )> JTAG The debugger > Veneer

  • JTAG control CPU function :
    1. When CPU The address signal of ADDR=xxx, stop it CPU- hardware breakpoint
    2. When CPU The data signal of DATA=xxx, stop it CPU-- Software breakpoint
    3. Rerun CPU
    4. Read R0,.. register
    5. Control peripherals , Memory
  • What's more OpenJTAG.exe This GUI It's actually encapsulated openocd.exe Command line

    1. Set up Workdir To the program code directory
    2. Click on telnet, Or directly cmd Input telnet 127.0.0.1 4444
    3. Use help Check out help or check out `Eclipse,OpenOCD,OpenJTAGv3.1 Embedded development tutorial version 5.pdf

The breakpoint

  • hardware breakpoint : A program can only make two breakpoints (ARM7), Can debug ROM,NOR

    Set up CPU Inside JTAG The comparator , Make hardware breakpoints Addr=A, When CPU issue A Stop at address

    CPU How it works ?CPU You need to take instructions , That is, you need to signal the address to get the instruction ,JTAG This address was detected

  • Software breakpoint , There can be countless software breakpoints . If the address of the breakpoint is writable , So you can't debug NOR, perhaps ROM Procedure on , See the following for details led.c An example of

    1. Set up CPU Inside JTAG Relatively strong , Make it worth = A special value
    2. Replace the desired breakpoint location (A) Value = This special value , Make a backup
    3. When CPU Read this special value , Program breakpoints
    4. When running again , Restore this (A) Position command

Quick to use

Common commands

 
  1.  
    halt stop it cpu
  2.  
    reg Check register
  3.  
    mdw 0 //memory display word Look at the memory
  4.  
    mww 0 0x12345678 //memory write word
  5.  
    load_image leds.bin 0 // Download the program to 0 Address , And then you can use mdw Read 0, See if it's programmed bin
  6.  
    resume 0 // Specify the address to run , If you don't specify an address , It will resume operation
  7.  
    reset Reset the target board
  8.  
    reset halt
  9.  
     
  10.  
    step 0 // Carry out the first sentence , and halt
  11.  
    step // Step by step
  12.  
     
  13.  
    bp To set breakpoints
  14.  
    bp 0x6c 4 hw stay 0x6c Set the breakpoint at the address of , hardware breakpoint
  15.  
    rpb 0x6c Cancel breakpoint

test led The breakpoint of

 
  1.  
    //led.c
  2.  
    void wait(volatile unsigned long dly)
  3.  
    {
  4.  
    for(; dly > 0; dly--);
  5.  
    }
  6.  
     
  7.  
    int main(void)
  8.  
    {
  9.  
    unsigned long i = 0;
  10.  
     
  11.  
    GPFCON = GPF4_out|GPF5_out|GPF6_out;
  12.  
     
  13.  
    while(1){
  14.  
    wait(30000);------------------- Try breaking points here , You can watch the light change
  15.  
    GPFDAT = (~(i<<4));
  16.  
    if(++i == 8)
  17.  
    i = 0;
  18.  
    }
  19.  
     
  20.  
    return 0;
  21.  
    }
  22.  
     
  23.  
     
  24.  
    // Disassembly abstract
  25.  
    00000044 <main>:
  26.  
    44: e52de004 str lr, [sp, #-4]!
  27.  
    48: e24dd004 sub sp, sp, #4 ; 0x4
  28.  
    4c: e3a03000 mov r3, #0 ; 0x0
  29.  
    50: e58d3000 str r3, [sp]
  30.  
    54: e3a03456 mov r3, #1442840576 ; 0x56000000
  31.  
    58: e2833050 add r3, r3, #80 ; 0x50
  32.  
    5c: e3a02c15 mov r2, #5376 ; 0x1500
  33.  
    60: e5832000 str r2, [r3]
  34.  
    64: e3a00c75 mov r0, #29952 ; 0x7500
  35.  
    68: e2800030 add r0, r0, #48 ; 0x30
  36.  
    6c: ebffffe9 bl 18 <wait>--------------------------- Try breaking points here
  37.  
    70: e3a02456 mov r2, #1442840576 ; 0x56000000
  38.  
    74: e2822054 add r2, r2, #84 ; 0x54
  39.  
    78: e59d3000 ldr r3, [sp]
  40.  
    7c: e1a03203 mov r3, r3, lsl #4
  41.  
    80: e1e03003 mvn r3, r3
  42.  
    84: e5823000 str r3, [r2]
  43.  
    88: e59d3000 ldr r3, [sp]
  44.  
    8c: e2833001 add r3, r3, #1 ; 0x1
  45.  
    90: e58d3000 str r3, [sp]
  46.  
    94: e3530008 cmp r3, #8 ; 0x8
  47.  
    98: 1afffff1 bne 64 <main+0x20>
  48.  
    9c: e3a03000 mov r3, #0 ; 0x0
  49.  
    a0: e58d3000 str r3, [sp]
  50.  
    a4: eaffffee b 64 <main+0x20>
  51.  
    Disassembly of section .debug_line:

Use openocd Command to debug breakpoints

 
  1.  
    halt
  2.  
    load_image leds.bin 0 // Download program
  3.  
    resume 0 // Specify the address to run , If you don't specify an address , It will resume operation
  4.  
    halt
  5.  
    bp 0x6c 4 hw // stay 0x6c Set the breakpoint at the address of , hardware breakpoint
  6.  
     
  7.  
    resume // Repeat this breakpoint , You can watch the light change

Test whether the software breakpoint changes ram value

 
  1.  
    // Read the original value
  2.  
    > mdw 0x6c
  3.  
    0x0000006c: ebffffe9
  4.  
    // Set software breakpoints
  5.  
    > bp 0x6c 4
  6.  
    breakpoint set at 0x0000006c
  7.  
    // Read back to this ram value , The discovery changed
  8.  
    > mdw 0x6c
  9.  
    0x0000006c: deeedeee
  10.  
    // Delete this breakpoint
  11.  
    > rbp 0x6c
  12.  
    // Read it back
  13.  
    > mdw 0x6c
  14.  
    0x0000006c: ebffffe9

NAND debugging ( Advanced )

Program Overview :

  1. Link address in 0x30000,0000, It should be running at 0x3000,0000
  2. Burn the program directly into memory , That is, the program runs in 0 Address . Not loading address
  3. Program function :main Light up the light , But burn directly to the inside ram, Run away
  4. programmatic bug lie in , All code should be location independent or code handling is required
 
  1.  
    .text
  2.  
    .global _start
  3.  
    _start:
  4.  
    @ function disable_watch_dog, memsetup, init_nand, nand_read_ll stay init.c In the definition of
  5.  
    ldr sp, =4096 @ Set the stack
  6.  
    bl disable_watch_dog @ Turn off WATCH DOG
  7.  
    bl memsetup @ initialization SDRAM
  8.  
    bl nand_init @ initialization NAND Flash
  9.  
     
  10.  
    @ take NAND Flash Middle address 4096 At the beginning 1024 Byte code (main.c Compile to get ) Copied to the SDRAM in
  11.  
    @nand_read_ll The function needs 3 Parameters :
  12.  
    ldr r0, =0x30000000 @1. Destination address =0x30000000, This is a SDRAM From
  13.  
    mov r1, #0 @2. source address = 0
  14.  
    mov r2, #4096 @3. Copy length = 2048(bytes),
  15.  
    bl nand_read @ call C function nand_read
  16.  
     
  17.  
    ldr sp, =0x34000000 @ Set the stack
  18.  
    ldr lr, =halt_loop @ Set return address
  19.  
    ldr pc, =main @b Instructions and bl Instructions can only jump back and forth 32M The scope of the
  20.  
    @, So here we use to pc The method of assignment is used to jump
  21.  
    halt_loop:
  22.  
    b halt_loop

bug reason :mem_cfg_val It's on the stack , It's location independent , But his initial value is from the link address , That is to say 0x3000000 Back

 
  1.  
    void memsetup()
  2.  
    {
  3.  
    unsigned long const mem_cfg_val[]={ 0x22011110, //BWSCON
  4.  
    0x00000700, //BANKCON0
  5.  
    0x00000700, //BANKCON1
  6.  
    0x00000700, //BANKCON2
  7.  
    0x00000700, //BANKCON3
  8.  
    0x00000700, //BANKCON4
  9.  
    0x00000700, //BANKCON5
  10.  
    0x00018005, //BANKCON6
  11.  
    0x00018005, //BANKCON7
  12.  
    0x008C07A3, //REFRESH
  13.  
    0x000000B1, //BANKSIZE
  14.  
    0x00000030, //MRSRB6
  15.  
    0x00000030, //MRSRB7
  16.  
    };
  17.  
     
  18.  
    }

Debugging begins

 
  1.  
    >reset halt
  2.  
    > load_image nand.bin 0
  3.  
    1520 bytes written at address 0x00000000
  4.  
    downloaded 1520 bytes in 0.063003s (23.560 KiB/s)

perform First sentence step 0 Which is execution mov sp, #4096 ; 0x1000, have access to reg notice sp=0x1000

step Perform jump , You can find pc=0x38, Corresponding assembly

 
  1.  
    30000000 <_start>:
  2.  
    30000000: e3a0da01 mov sp, #4096 ; 0x1000
  3.  
    30000004: eb00000b bl 30000038 <disable_watch_dog>

And then step by step step, And use poll View the current pc It's worth waiting for , Use mdw View the memory of this setting

Jump to memsetup,pc=0x08, Disassembly is put on the stack first , You can find sp=4096-5*4=4076=0xFEC

 have access to  step 0, Then set the  bp 0x50 4 hw  The breakpoint   Jump right to where you want to be 

And then in assembly code , We found a problem

 
  1.  
    // ip=300005bc
  2.  
    30000050: e1a0400c mov r4, ip
  3.  
    30000054: e8b4000f ldmia r4!, {r0, r1, r2, r3}
  4.  
    // from r4 The memory pointed to in the r0~r3
  5.  
     
  6.  
    // That is to say, from 300005bc Read some data , But at this point 300005bc(sdram) It's not initialized and code handling , So there must be something wrong with the data here
  7.  
     
  8.  
    // What's here is actually the value of that local array mem_cfg_val
  9.  
    300005bc <.rodata>:
  10.  
    300005bc: 22011110 andcs r1, r1, #4 ; 0x4
  11.  
    300005c0: 00000700 andeq r0, r0, r0, lsl #14
  12.  
    300005c4: 00000700 andeq r0, r0, r0, lsl #14
  13.  
    300005c8: 00000700 andeq r0, r0, r0, lsl #14
  14.  
    300005cc: 00000700 andeq r0, r0, r0, lsl #14
  15.  
    300005d0: 00000700 andeq r0, r0, r0, lsl #14
  16.  
    300005d4: 00000700 andeq r0, r0, r0, lsl #14
  17.  
    300005d8: 00018005 andeq r8, r1, r5
  18.  
    300005dc: 00018005 andeq r8, r1, r5
  19.  
    300005e0: 008c07a3 addeq r0, ip, r3, lsr #15
  20.  
    300005e4: 000000b1 streqh r0, [r0], -r1
  21.  
    300005e8: 00000030 andeq r0, r0, r0, lsr r0
  22.  
    300005ec: 00000030 andeq r0, r0, r0, lsr r0
  23.  
    Disassembly of section .comment:

OpenOCD

The full name is (Open On-Chip Debugger)

It needs to be opened before use OpenOCD, Connect to the development board , Then open the telent, Or use the command telnet 127.0.0.1 4444

start-up OpenOCD

mark

Expert model : Corresponding to more free and advanced configuration , We usually use normal mode directly

  • Interface Corresponding  OpenOCD\0.4.0\interface` Options in
  • Target Corresponding OpenOCD\0.4.0\ target and OpenOCD\0.4.0\board

Enable telnet

Win7 This function is not turned on by default , Need to be in Procedures and functions > Turn on or off windows function > TelentClient open

OpenOCD command

These orders are all in telnet Run in , The official order index is in here ,PDF file OpenOCD User's Guide.pdf

  • The command to remember

     
    1.  
      reset halt
    2.  
      resume
    3.  
      step
    4.  
      load_image
  • Target board status processing command (Target state handling)

     
    1.  
      poll Query the current status of the target board
    2.  
      halt Interrupt the operation of the target board
    3.  
      resume [address] Restore the target board , If you specify address, From address Start running at
    4.  
      step [address] Step by step , If you specify address, From address Start executing an instruction at
    5.  
      reset Reset the target board
  • Breakpoint command

     
    1.  
      bp <addr> <length> [hw] At the address addr Set breakpoint , The instruction length is length, hw Indicates a hardware breakpoint
    2.  
      rbp <addr> Delete address addr The breakpoint at Memory access instructions (Memory access commands)
  • Memory access instructions (Memory access commands)

     
    1.  
      mdw ['phys'] <addr> [count] Show from ( Physics ) Address addr At the beginning count( The default is 1) A word (4 byte )
    2.  
      mdh ['phys'] <addr> [count] Show from ( Physics ) Address addr At the beginning count( The default is 1) A half word (2 byte )
    3.  
      mdb ['phys'] <addr> [count] Show from ( Physics ) Address addr At the beginning count( The default is 1) Bytes
    4.  
      mww ['phys'] <addr> <value> towards ( Physics ) Address addr Write a word , The value is value
    5.  
      mwh ['phys'] <addr> <value> towards ( Physics ) Address addr Write a word and a half , The value is value
    6.  
      mwb ['phys'] <addr> <value> towards ( Physics ) Address addr Write a byte , The value is value
  • Memory load command , Be careful : Use... Before downloading the program “ halt” Order to suspend the board , To download the code ; If you use “ poll” Order to find the board of MMU or D-cache Has enabled , You need to use “ arm920t cp15 2 0” 、“ step” Two orders forbid MMU and D-cache.

     
    1.  
      load_image <file> <address> [‘bin’|‘ihex’|‘elf’]
    2.  
      ====== Will file <file> The loading address is address Of memory , The format is ‘bin’、 ‘ihex’、 ‘elf’
    3.  
      dump_image <file> <address> <size>
    4.  
      ====== Put memory from address address At the beginning size Byte data read , Save to file <file> in
    5.  
      verify_image <file> <address> [‘bin’|‘ihex’|‘elf’]
    6.  
      ====== Will file <file> With memory address Compare the starting data , The format is ‘bin’、 ‘ihex’、 ‘elf’
  • CPU Architecture related commands (Architecture Specific Commands)

     
    1.  
      reg Print the value of the register
    2.  
      arm7_9 fast_memory_access ['enable'|'disable']
    3.  
      ======= To enable or prohibit “ Fast memory access ”
    4.  
      arm mcr cpnum op1 CRn op2 CRm value Modifying coprocessor registers
    5.  
      ======= such as : arm mcr 15 0 1 0 0 0 close MMU
    6.  
      arm mrc cpnum op1 CRn op2 CRm Read the coprocessor's registers
    7.  
      ======= such as : arm mcr 15 0 1 0 0 read out cp15 Coprocessor registers 1
    8.  
      arm920t cp15 regnum [value] Modify or read cp15 Coprocessor registers
    9.  
      ======= such as arm920t cp15 2 0 close MMU
  • Other commands

    script <file>  perform  file  Commands in files 

mark

OpenOCD Burn program

 
  1.  
    load_image <file> <address> [‘bin’|‘ihex’|‘elf’]
  2.  
    ====== Will file <file> The loading address is address Of memory , The format is ‘bin’、 ‘ihex’、 ‘elf’
  3.  
    ====load_image led.bin 0

SDRAM initialization

OpenOCD Can read and write quickly SDRAM, The premise is that the program needs to be initialized first SDRAM, So you can burn it later u-boot To sdram, And then through u-boot Burn other big programs . Here we need an initialization sdram Location independent code init.bin

 
  1.  
    // from Nand Flash start-up
  2.  
    load_image init/init.bin 0x0
  3.  
    resume 0x0
  4.  
    //NOR start-up
  5.  
    load_image init/init.bin 0x40000000
  6.  
    resume 0x40000000

burn u-boot, Then open the serial port , You can see it running

 
  1.  
    halt
  2.  
    load_image u-boot/u-boot.bin 0x33f80000
  3.  
    resume 0x33f80000

uboot Burn other programs (led/uboot)

  • u-boot The command to treat all numbers as 16 Base number , So whether you prefix the number or not “ 0x”, The number of
    The words are 16 It's binary .
  • erase Flash The length of 、 The length of the data burned , These values are based on the burning
    The length of the file is determined . u-boot.bin Is the length of the 178704 byte , namely 0x2BA10 byte , It's long used
    Degrees are 0x30000, One is for the sake of dealing with Flash The erasable length of (16K Integer multiple ), Second, convenience .

mark

mark

GDB

  • linux Next arm-linux-gdb,win Next arm-elf-gdb
 
  1.  
    arm-elf-gdb nand_elf
  2.  
    target remote 127.0.0.1:3333
  3.  
    load

GDB command

start-up / sign out  
gdb [FILE] arm-elf-gdb [FILE] arm-linux-gdb [FILE] start-up gdb, debugging FILE( You can also leave the file blank )
quit sign out gdb
target remote ip:port Remote connection
File operations  
file load file FILE, Be careful : It won't download to the board
load [FILE] Download the file to the board , If you don't specify FILE, Specify before downloading Yes ( such as file The order designates , or gdb The file specified at runtime )
   
View source program  
list List a function
list Display a section of source program in the middle of a behavior of the current source file
list And then the previous display continues
break * Set a breakpoint at an address , such as break *0x84
list - Show the previous source program
list list A program that displays the specified file
info source View the current source program
info stack View stack information
info args View the current parameters
Breakpoint operation  
break Set a breakpoint at the function entry
break Set a breakpoint on a line in the current source file
break Set a breakpoint on a line in the specified source file
info br View breakpoints
delete Delete breakpoints
diable No breakpoints
enable Enable breakpoint
Watch point (watch) operation  
watch When the specified variable is written , The program is stopped
rwatch When the specified variable is read , The program is stopped
Data manipulation  
print < EXPRESSION > View the data
set varible=value Set a variable
x /NFU ADDR Check the memory value ① N Represents the number of repetitions ② F Represents the output format x : 16 Decimal integer format d : Signed decimal integer format u : Unsigned decimal integer format f : Floating point format ③ U Represents the output format : b : byte (byte) h : Double byte value w : Four byte values g : Octet value such as “ x /4ub 0x0” Will be displayed 0 The address starts at 4 Bytes
Execution procedure  
step next nexti It's all in one step : step Will trace into a function , next Instruction does not enter the function nexti Execute an assembly instruction
continue Continue with the procedure , After loading a program, it can also be used to start a program
help  
help [command] List help information , Or a help letter listing an order
Other commands  
monitor <command …> call gdb Server software commands , such as :“ monitor mdw 0x0” It's called openocd Its own orders “ mdw 0x0”

Conditions of use

  1. The code has been repositioned , At its link address . Why? ?【 Set breakpoints in the source file , It's actually setting breakpoints at the link address , Is to modify the memory according to the link address ( Soft breakpoints )】

  2. The link script must be in a fixed format text,data,bss Separate

  3. The program being debugged contains debug Information , That is, compiling elf From time to tome -g Options

     
    1.  
      %.o:%.c
    2.  
      arm-linux-gcc -Wall -c -g -O2 -o $@ $<
    3.  
       
    4.  
      %.o:%.S
    5.  
      arm-linux-gcc -Wall -c -g -O2 -o $@ $<
  4. FAQ:  Unable to debug relocated code , So code handling and sdram What to do with initialization ? Use opencod To execute , That is to make another program initialization sdram, Use openocd burn

Use steps

  1. open openocd, open telent

  2. If you need to use sdram The program , First of all OpenOCD Download initialization first sdram The program

     
    1.  
      > load_image init/init.bin 0
    2.  
      > resume 0
    3.  
      > halt
    4.  
      target state: halted
    5.  
      target halted in ARM state due to debug-request, current mode: Supervisor
    6.  
      cpsr: 0x200000d3 pc: 0x000000b8
    7.  
      MMU: disabled, D-Cache: disabled, I-Cache: enabled
    8.  
       
    9.  
      // Test it sdram You can use
    10.  
      > mdw 0x30000000
    11.  
      0x30000000: ea000017
    12.  
      > mww 0x30000000 0x12345678
    13.  
      > mdw 0x30000000
    14.  
      0x30000000: 12345678
  3. open cmd, Input arn-elf-gdb leds_elf start-up gdb, Specify procedures

  4. Connect to OpenOCDtarget remote 127.0.0.1:3333

  5. Download program load

Use command scripts directly gdb.init : arm-elf-gdb -x gdb.init leds_elf

 
  1.  
    target remote localhost:3333
  2.  
    monitor halt
  3.  
    monitor arm920t cp15 2 0
  4.  
    monitor step
  5.  
    load
  6.  
    break main
  7.  
    continue

Be careful  gdb After running, there is no breakpoint and then it can't stop , Need to be in telnet Use halt, then GDB The interface can continue to input

Common commands

 
  1.  
    si Execute an order
  2.  
    braek main.c:21 // stay main.c Of 21 Line break point
  3.  
    c perhaps continue Continue operation
  4.  
     
  5.  
    print i // View variable values

mark

Eclipes

Eclipse yes gdb( Include arm-elf-gdb, arm-linux-gdb) The graphic front desk of , Use Eclipse The essence of debugging is
It's using gdb debug .

Use gdb When debugging , gdb Will use the program's link address . For example main Function break point , gdb Huigen
According to the main The link address of the function finds the corresponding instruction in memory , Change this instruction to a special instruction . When the program executes
When it comes to this particular instruction , It will stop .[ It's software breakpoints ]

Conditions of use

  1. The program should be on its link address
  2. If used SDRAM, Initialize first SDRAM, Then download the program to the link address

Simple engineering

  1. Click on the icon Workbenchmark

  2. Create a new one C engineering File -> New -> C Project, choice “ Makefile project->Empty Projects”、“ Other Toolchain”

  3. The import file is in File -> Import Medium General>File System

  4. Engineering setup

    • stay “ Project” In the menu , Click to remove “ Build Automatically” The front sign
      remember , Does not automatically compile the project

    • stay “ Project” In the menu , Click on clean, Remove Start a build immediately

  5. compile , In fact, it's directly under the directory make It's OK, too , The post tool chain has been installed

    • Use Project Medium build all and build project All right
    • Use clean It's OK
    • Be careful ,make It's different , One is arm-linux, The other is arm-elf
  6. Debug configuration

    • Refer to the following uboot With the graph of , Not uboot No configuration required source Options , The command line does not need the first path configuration

    • Remove debug Medium stop on  startup at main

    • project> debug config choice Zylin Native,new Or double click , Configuration appears

    • Main> C/C++ Application Select debug elfleds.elf

    • Debugger> Debugger choice EmbeddedGDB, Below main choice arm-elf-gdb Or is it C:\Program Files\yagarto\bin\arm-elf-gdb.exe

    • GDB command file You can choose , You may not choose , It's actually a command that runs ahead of time

       
      1.  
        target remote localhost:3333
      2.  
        monitor halt
      3.  
        monitor arm mcr 15 0 1 0 0 0
      4.  
        monitor step 0
      5.  
        load
      6.  
        break main
      7.  
        continue

      But although the breakpoint is set here , There seems to be a problem , Still need to be in command Input

       
      1.  
        load
      2.  
        break main
      3.  
        continue

Be careful

If sometimes you don't see debug window , Click in the upper right corner debug View , then F5 try

Sometimes use clean, We need to see if there is debug There is a , Need to turn off

mark

mark

u-boot engineering

Debug the download from the Internet u-boot when , Need to define CONFIG_SKIP_LOWLEVEL_INIT, It said
“ Skip the initial initialization of the underlying layer ”, Just don't initialize the storage controller , Don't copy again u-boot From itself to SDRAM
in . For Weidong mountain's u-boot, Automatic identification code has been added , There is no need to define this macro .

  1. import Related documents

  2. The setup command is as follows , This is to establish path correspondence

     
    1.  
      set substitute-path /work/eclipse_projects/u-boot/u-boot-1.1.6_OpenJTAG E:/Eeclipse_projects/u-boot/u-boot-1.1.6_OpenJTAG
    2.  
      load
    3.  
      break start_armboot
    4.  
      c

    And then again source Delete the original default, Add the following ( This is actually the order above in effect )

     
    1.  
      \work\projects\OpenPDA\u-boot-1.1.6_OpenJTAG
    2.  
      E:\Eeclipse_projects\u-boot\u-boot-1.1.6_OpenJTAG\

    mark

STM32 Burn the program

 
  1.  
    halt
  2.  
    flash probe 0
  3.  
    flash write_image erase STM3210B.bin 0x08000000
  4.  
    verify_image STM3210B.bin 0x08000000

mark

Reproduced in :https://www.cnblogs.com/zongzi10010/p/9784797.html

版权声明
本文为[whoisliang]所创,转载请带上原文链接,感谢