Skip to content

Instantly share code, notes, and snippets.

@yifanlu
Last active April 8, 2017 22:23
Show Gist options
  • Select an option

  • Save yifanlu/65c4fdceb3429dfcf98f222380c65ec6 to your computer and use it in GitHub Desktop.

Select an option

Save yifanlu/65c4fdceb3429dfcf98f222380c65ec6 to your computer and use it in GitHub Desktop.

Revisions

  1. yifanlu revised this gist Apr 8, 2017. 1 changed file with 34 additions and 0 deletions.
    34 changes: 34 additions & 0 deletions jetson_tx1_cortexa9_attach.cmm
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    ; get to a determinstic state
    SYSTEM.RESET

    ; set up JTAG
    SYSTEM.CPU CORTEXA9

    ; ARM 14-pin cable does not have RTCK
    ; If you have a newer cable you can use
    ; SYSTEM.JtagClock Rtck
    SYSTEM.JtagClock 12.15MHz

    ; Similarly the old cable does not have DBGAUTH/DBGACK
    SYSTEM.Option.DBGACK OFF

    ; Jetson TX1 uses TRST differently, we ignore it
    SYSTEM.Option.TRST OFF

    ; DAP settings
    SYSTEM.Config.DAPIRPOST 4
    SYSTEM.Config.DAPDRPOST 1
    SYSTEM.Config.DAPIRPRE 0
    SYSTEM.Config.DAPDRPRE 0

    ; Debug regs found on APB bus
    SYSTEM.Config.APBACCESSPORT 0
    SYSTEM.Config.DEBUGACCESSPORT 0
    ; System mem found on AXI bus
    SYSTEM.Config.AXIACCESSPORT 1
    SYSTEM.Config.MEMORYACCESSPORT 1
    SYSTEM.MemAccess DAP

    ; select Cortex A9
    SYSTEM.Config.COREBASE 0x80A10000
    SYSTEM.Attach
  2. yifanlu revised this gist Apr 8, 2017. 1 changed file with 15 additions and 1 deletion.
    16 changes: 15 additions & 1 deletion jetson_tx1_arm7_attach.cmm
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ SYSTEM.CPU ARM7TDMI
    ; ARM 14-pin cable does not have RTCK
    ; If you have a newer cable you can use
    ; SYSTEM.JtagClock Rtck
    SYSTEM.JtagClock 10MHz
    SYSTEM.JtagClock 12.15MHz

    ; Similarly the old cable does not have DBGAUTH/DBGACK
    SYSTEM.Option.DBGACK OFF
    @@ -21,6 +21,20 @@ SYSTEM.Config.IRPOST 0
    SYSTEM.Config.DRPRE 1
    SYSTEM.Config.DRPOST 0

    ; DAP settings
    SYSTEM.Config.DAPIRPOST 4
    SYSTEM.Config.DAPDRPOST 1
    SYSTEM.Config.DAPIRPRE 0
    SYSTEM.Config.DAPDRPRE 0

    ; Debug regs found on APB bus
    SYSTEM.Config.APBACCESSPORT 0
    SYSTEM.Config.DEBUGACCESSPORT 0
    ; System mem found on AXI bus
    SYSTEM.Config.AXIACCESSPORT 1
    SYSTEM.Config.MEMORYACCESSPORT 1
    SYSTEM.MemAccess DAP

    ; Reset and hook
    ; you can only use SYSTEM.Up on a non JTAG_DISABLE blown unit!
    ; SYSTEM.Up
  3. yifanlu created this gist Apr 8, 2017.
    27 changes: 27 additions & 0 deletions jetson_tx1_arm7_attach.cmm
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    ; get to a determinstic state
    SYSTEM.RESET

    ; set up JTAG
    SYSTEM.CPU ARM7TDMI

    ; ARM 14-pin cable does not have RTCK
    ; If you have a newer cable you can use
    ; SYSTEM.JtagClock Rtck
    SYSTEM.JtagClock 10MHz

    ; Similarly the old cable does not have DBGAUTH/DBGACK
    SYSTEM.Option.DBGACK OFF

    ; Jetson TX1 uses TRST differently, we ignore it
    SYSTEM.Option.TRST OFF

    ; Jetson TX1 settings for ARM7
    SYSTEM.Config.IRPRE 4
    SYSTEM.Config.IRPOST 0
    SYSTEM.Config.DRPRE 1
    SYSTEM.Config.DRPOST 0

    ; Reset and hook
    ; you can only use SYSTEM.Up on a non JTAG_DISABLE blown unit!
    ; SYSTEM.Up
    SYSTEM.Attach