This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

J-Link TM4C123x

Other Parts Discussed in Thread: LM3S8962, TM4C123AH6PM, SEGGER

Hi,

I'm using JLinkExe on GNU/Linux system, I can successfully program a LM3S8962 with the following script

########################

speed 32

device LM3Sx9xx
Sleep 500
h
w4 0x400FE100, 0x00000009
w4 0x40000C00, 0x1ACCE551
w4 0x40000008, 0x00000000
Sleep 500
r
Sleep 500
loadbin /usr/local/src/qs-bldc/gcc/qs-bldc.bin , 0x00001000
Sleep 500
r
Sleep 500
h
Sleep 500
g

#################################

now I wish to program a TM4C123AH6PM but with this script 

#################################

speed 32
device TM4C123AH6PM
Sleep 500
h
w4 0x400FD008, 0xA4420001
Sleep 500
loadbin /usr/local/src/COMAN_shared/src/ecat/slave/HyQ_IO/gcc/HyQ_IO.bin , 0x0
Sleep 500
r
Sleep 500
h
Sleep 500
g
q

#######################################

I got this error ...

J-Link>w4 0x400fd008 0xa4420001
Writing A4420001 -> 400FD008
J-Link>loadbin /tmp/HYQ_IO.bin, 0x0
Loading binary file... [/tmp/HYQ_IO.bin]
Writing bin data into target memory @ 0x00000000.
Info: J-Link: Flash download: Flash programming performed for 1 range (16384 bytes)

****** Error: Programming failed @ address 0x00004F80 (block verification error)
Verification failed @ address 0x00004000
Info: J-Link: Flash download: Total time needed: 2.157s (Prepare: 1.034s, Compare: 0.053s, Erase: 0.143s, Program: 0.417s, Verify: 0.000s, Restore: 0.508s)

Any hints ?

Thanks

ALessio

  • Hi,

    Not using Jlink, but please note the differences between the two micros: while 8962 uses JTAG, TM4C had implemented SWJ-DP protocol. Did you configured Jlink for serial?

    Petrei

  • If I read & understand the error message (pgm. failed @ 0x0000.4F80) - much data was programmed successfully.  Thus - SWD vs. JTAG may not be the exclusive issue.

    If you have a JLink - suspect a visit to Segger site - and download of latest/greatest (and free) JLink updates may resolve.

  • thanks all,

    I try to set SWD but the issue remains.

    this is the script

    #############################

    si 1
    speed 32
    device TM4C123AH6PM
    Sleep 500
    h
    Sleep 500
    loadbin /usr/local/src/COMAN_shared/src/ecat/slave/HyQ_IO/gcc/HyQ_IO.bin , 0x0
    Sleep 500
    r
    Sleep 500
    h
    Sleep 500
    g
    q

    #######################

    SEGGER J-Link Commander V4.78g ('?' for help)
    Compiled Nov 8 2013 18:36:45

    Script file read successfully.
    DLL version V4.78g, compiled Nov 8 2013 18:36:42
    Firmware: J-Link ARM V8 compiled Nov 8 2013 12:07:30
    Hardware: V8.00
    S/N: 158000885
    OEM: IAR
    VTarget = 3.261V
    Info: Found SWD-DP with ID 0x2BA01477
    Info: Found Cortex-M4 r0p1, Little endian.
    Info: FPUnit: 6 code (BP) slots and 2 literal slots
    Info: TPIU fitted.
    Info: ETM fitted.
    Found 1 JTAG device, Total IRLen = 4:
    Cortex-M4 identified.
    Target interface speed: 100 kHz
    Processing script file...

    Selecting SWD as current target interface.
    Setting target interface speed to 1MHz. Use "Speed" to change.

    Target interface speed: 32 kHz

    Info: Device "TM4C123AH6PM" selected (256 KB flash, 32 KB RAM).
    Reconnecting to target...
    Info: Found SWD-DP with ID 0x2BA01477
    Info: Found Cortex-M4 r0p1, Little endian.
    Info: FPUnit: 6 code (BP) slots and 2 literal slots
    Info: TPIU fitted.
    Info: ETM fitted.

    Sleep(500)

    R0 = F0012201, R1 = 4873F931, R2 = 00000000, R3 = 0000000A
    R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
    R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
    R12= 00000000, R13= 20000228, MSP= 20000228, PSP= 00000000
    R14(LR) = FFFFFFF9, R15(PC) = 000003D6
    XPSR = 41000003, APSR = 40000000, EPSR = 01000000, IPSR = 00000003
    CFBP = 00000000, CONTROL = 00, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00
    CycleCnt = 19DC1964

    FPS0 = 00000000, FPS1 = 00000000, FPS2 = 00000000, FPS3 = 00000000
    FPS4 = 00000000, FPS5 = 00000000, FPS6 = 00000000, FPS7 = 00000000
    FPS8 = 00000000, FPS9 = 00000000, FPS10= 00000000, FPS11= 00000000
    FPS12= 00000000, FPS13= 00000000, FPS14= 00000000, FPS15= 00000000
    FPS16= 00000000, FPS17= 00000000, FPS18= 00000000, FPS19= 00000000
    FPS20= 00000000, FPS21= 00000000, FPS22= 00000000, FPS23= 00000000
    FPS24= 00000000, FPS25= 00000000, FPS26= 00000000, FPS27= 00000000
    FPS28= 00000000, FPS29= 00000000, FPS30= 00000000, FPS31= 00000000
    FPSCR= 00000000

    Sleep(500)

    Loading binary file... [/usr/local/src/COMAN_shared/src/ecat/slave/HyQ_IO/gcc/HyQ_IO.bin]
    Writing bin data into target memory @ 0x00000000.
    Info: J-Link: Flash download: Flash programming was not necessary

    ****** Error: Programming failed @ address 0x00000400 (block verification error)
    Info: J-Link: Flash download: Total time needed: 2.731s (Prepare: 1.741s, Compare: 0.025s, Erase: 0.284s, Program: 0.516s, Verify: 0.000s, Restore: 0.164s)

    Sleep(500)

    Reset delay: 0 ms
    Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.

    Sleep(500)

    R0 = 00000000, R1 = 00000000, R2 = 00000000, R3 = 00000000
    R4 = 00000000, R5 = 00000000, R6 = 00000000, R7 = 00000000
    R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
    R12= 00000000, R13= 20000258, MSP= 20000258, PSP= 00000000
    R14(LR) = FFFFFFFF, R15(PC) = 000003DC
    XPSR = 01000000, APSR = 00000000, EPSR = 01000000, IPSR = 00000000
    CFBP = 00000000, CONTROL = 00, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00
    CycleCnt = 1ACB7244

    FPS0 = 00000000, FPS1 = 00000000, FPS2 = 00000000, FPS3 = 00000000
    FPS4 = 00000000, FPS5 = 00000000, FPS6 = 00000000, FPS7 = 00000000
    FPS8 = 00000000, FPS9 = 00000000, FPS10= 00000000, FPS11= 00000000
    FPS12= 00000000, FPS13= 00000000, FPS14= 00000000, FPS15= 00000000
    FPS16= 00000000, FPS17= 00000000, FPS18= 00000000, FPS19= 00000000
    FPS20= 00000000, FPS21= 00000000, FPS22= 00000000, FPS23= 00000000
    FPS24= 00000000, FPS25= 00000000, FPS26= 00000000, FPS27= 00000000
    FPS28= 00000000, FPS29= 00000000, FPS30= 00000000, FPS31= 00000000
    FPSCR= 00000000

    Sleep(500)

    Script processing completed.

  • Well - you are current (V4.78g) - is exactly what we use successfully.  Here's a screen cap from moment ago:

    Note our interface speed: 100 kHz and yours (below):

    Selecting SWD as current target interface.
    Setting target interface speed to 1MHz. Use "Speed" to change.

    A long shot - but perhaps worthwhile to reduce speed - even lower than our 100kHz.

    We program entirely w/in the IAR environment (fast, easy) and have never noted your issue.  You may consider downloading the free (code size reduced) ver. of IAR - and attempting to program w/in that environment.  On a post here yesterday I provided key screen caps of the IAR set-up/config - may prove useful...   Good luck...