nuttx/boards/arm/sam4e-ek/tools/openocd.cfg
Alin Jerpelea af28821c77 Merged in alinjerpelea/nuttx (pull request #966)
group boards by architecture

* z80: group boards by architecture

    all boards that share the same architecture are moved to the same arch
    folder following the soc layout

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* z16: group boards by architecture

    all boards that share the same architecture are moved to the same arch
    folder following the soc layout

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* xtensa: group boards by architecture

    all boards that share the same architecture are moved to the same arch
    folder following the soc layout

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* x86: group boards by architecture

    all boards that share the same architecture are moved to the same arch
    folder following the soc layout

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* sim: group boards by architecture

    all boards that share the same architecture are moved to the same arch
    folder following the soc layout

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* risc-v: group boards by architecture

    all boards that share the same architecture are moved to the same arch
    folder following the soc layout

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* renesas: group boards by architecture

    all boards that share the same architecture are moved to the same arch
    folder following the soc layout

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* or1k: group boards by architecture

    all boards that share the same architecture are moved to the same arch
    folder following the soc layout

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* misoc: group boards by architecture

    all boards that share the same architecture are moved to the same arch
    folder following the soc layout

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* mips: group boards by architecture

    all boards that share the same architecture are moved to the same arch
    folder following the soc layout

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* hc: group boards by architecture

    all boards that share the same architecture are moved to the same arch
    folder following the soc layout

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* avr: group boards by architecture

    all boards that share the same architecture are moved to the same arch
    folder following the soc layout

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* arm: group boards by architecture

    all boards that share the same architecture are moved to the same arch
    folder following the soc layout

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

* boards: group boards by architecture

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-06 14:37:27 +00:00

65 lines
1.2 KiB
INI

# This is an SAM4E-EK board with a single SAM4E16 chip.
# http://www.atmel.com/tools/sam4e-ek.aspx
#
# Tested with OpenOCD 0.8.0
source [find interface/jlink.cfg]
# chip name
set CHIPNAME SAM4E16E
# Versions of OpenOCD after have atmel_sam4e_ek.cfg
# source [find board/atmel_sam4e_ek.cfg]
source [find target/at91sam4sXX.cfg]
# SAM4E chip has only NRST signal
# SAM4E-EK board has only nSRST. nTRST is connected to +3V3 by pull-up.
reset_config srst_only
$_TARGETNAME configure -event gdb-attach {
reset init
}
$_TARGETNAME configure -event reset-init {
sam4e_pll_init
}
$_TARGETNAME configure -event reset-start {
adapter_khz 500
}
$_TARGETNAME configure -event reset-end {
adapter_khz 10000
flash probe 0
}
proc sam4e_pll_init {} {
# Same sequence from ASF/pmc.c
mww 0x400E0A00 0x04000500 ;# FLASH 6 WS
# Initialize main oscillator
mww 0x400E0420 0x00373E09 ;# CKGR_MOR
sleep 10
# Switch to 3-20MHz Xtal oscillator
mww 0x400E0420 0x01373E09 ;# CKGR_MOR
sleep 10
# Disable PLL first
mww 0x400E0428 0x20000000 ;# CKGR_PLLAR
sleep 10
# PLLA 240 MHz
mww 0x400E0428 0x20133F01 ;# CKGR_PLLAR
sleep 10
# PRES CLK_2, MAINCK -> MCK = 120 MHz
mww 0x400E0430 0x00000011 ;# PMC_MCKR
sleep 10
# PRES CLK_2, PLLACK
mww 0x400E0430 0x00000012 ;# PMC_MCKR
sleep 10
}