]> git.sur5r.net Git - openocd/commitdiff
Add support for the Atmel SAMG53
authorAndrey Yurovsky <yurovsky@gmail.com>
Wed, 26 Feb 2014 06:18:03 +0000 (22:18 -0800)
committerSpencer Oliver <spen@spen-soft.co.uk>
Tue, 4 Mar 2014 20:18:37 +0000 (20:18 +0000)
flash: at91sam4: add support for the SAMG53 family (this also covers the
SAMG51).  The SAMG5x parts have an EEFC (enhanced embedded flash controller)
which seems to be identical to the EFC that the sam4 driver supports.

Add a script for the Xplained Pro G53 board, this has the onboard CMSIS-DAP
debugger and a SAMG53N19.  Tested on this board and chip combination.

Change-Id: I12af50402cd2069b3c7380d92e6fe54816d6c045
Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-on: http://openocd.zylin.com/1974
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/flash/nor/at91sam4.c
tcl/board/atmel_samg53_xplained_pro.cfg [new file with mode: 0644]
tcl/target/at91samg5x.cfg [new file with mode: 0644]

index cda74f9b22f4d5c58a862efc7dee75dd83a59bdb..84d09c2117bf0cf6dc7ab9f5c6e2915ccf4eaf1b 100644 (file)
@@ -504,6 +504,41 @@ static const struct sam4_chip_details all_sam4_details[] = {
                },
        },
 
+       /* at91samg53n19 */
+       {
+               .chipid_cidr    = 0x247e0ae0,
+               .name           = "at91samg53n19",
+               .total_flash_size     = 512 * 1024,
+               .total_sram_size      = 96 * 1024,
+               .n_gpnvms       = 2,
+               .n_banks        = 1,
+
+/*             .bank[0] = {*/
+               {
+                       {
+                               .probed = 0,
+                               .pChip  = NULL,
+                               .pBank  = NULL,
+                               .bank_number = 0,
+                               .base_address = FLASH_BANK_BASE_S,
+                               .controller_address = 0x400e0a00,
+                               .flash_wait_states = 6, /* workaround silicon bug */
+                               .present = 1,
+                               .size_bytes =  512 * 1024,
+                               .nsectors   =  64,
+                               .sector_size = 8192,
+                               .page_size   = 512,
+                       },
+/*             .bank[1] = {*/
+                 {
+                       .present = 0,
+                       .probed = 0,
+                       .bank_number = 1,
+
+                 },
+               }
+       },
+
        /* terminate */
        {
                .chipid_cidr    = 0,
@@ -1078,6 +1113,10 @@ static const struct archnames { unsigned value; const char *name; } archnames[]
        { 0x3B,  "CAP11 Series"                                                         },
        { 0x40,  "AT91x40 Series"                                                       },
        { 0x42,  "AT91x42 Series"                                                       },
+       { 0x43,  "SAMG51 Series"
+       },
+       { 0x47,  "SAMG53 Series"
+       },
        { 0x55,  "AT91x55 Series"                                                       },
        { 0x60,  "AT91SAM7Axx Series"                                           },
        { 0x61,  "AT91SAM7AQxx Series"                                          },
diff --git a/tcl/board/atmel_samg53_xplained_pro.cfg b/tcl/board/atmel_samg53_xplained_pro.cfg
new file mode 100644 (file)
index 0000000..06638cf
--- /dev/null
@@ -0,0 +1,11 @@
+#
+# Atmel SAMG53 Xplained Pro evaluation kit.
+# http://www.atmel.com/tools/ATSAMG53-XPRO.aspx
+#
+
+source [find interface/cmsis-dap.cfg]
+
+# chip name
+set CHIPNAME ATSAMG53N19
+
+source [find target/at91samg5x.cfg]
diff --git a/tcl/target/at91samg5x.cfg b/tcl/target/at91samg5x.cfg
new file mode 100644 (file)
index 0000000..d26455b
--- /dev/null
@@ -0,0 +1,7 @@
+# script for the ATMEL samg5x CORTEX-M4F chip family
+#
+
+source [find target/at91sam4XXX.cfg]
+
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME at91sam4 0x00400000 0 1 1 $_TARGETNAME