[Openocd-development] openocd patch: 68f4516 at91sam3: fix warnings
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/160 -- gerrit commit 68f4516e3aa75a29ed3c16a812e4219209f40fab Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Thu Nov 3 21:39:23 2011 +0100 at91sam3: fix warnings - reduce scope of variables - assert on post condition to fix clang warning Change-Id: Id91038f73a632f9688ba52c9c34eae923626e770 Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c index c46829e..160648f 100644 --- a/src/flash/nor/at91sam3.c +++ b/src/flash/nor/at91sam3.c @@ -2926,6 +2926,9 @@ sam3_write(struct flash_bank *bank, page_cur++; } + // By checking that offset is correct here, we also fix a clang warning + assert(offset == pPrivate-page_size); + // intermediate large pages // also - the final *terminal* // if that terminal page is a full page @@ -2972,14 +2975,13 @@ sam3_write(struct flash_bank *bank, COMMAND_HANDLER(sam3_handle_info_command) { struct sam3_chip *pChip; - unsigned x; - int r; - pChip = get_current_sam3(CMD_CTX); if (!pChip) { return ERROR_OK; } + unsigned x; + int r; r = 0; // bank0 must exist before we can do anything -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 4a9cbe6 at91sam9: fix broken error propagation
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/159 -- gerrit commit 4a9cbe6c424a6b40f04a6657c71914cd851f500c Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Thu Nov 3 21:34:00 2011 +0100 at91sam9: fix broken error propagation Change-Id: I3288ce6f7642e519c26dd099be888a395fe1de94 Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/flash/nand/at91sam9.c b/src/flash/nand/at91sam9.c index 3ca9c39..6648953 100644 --- a/src/flash/nand/at91sam9.c +++ b/src/flash/nand/at91sam9.c @@ -348,6 +348,7 @@ static uint8_t * at91sam9_oob_init(struct nand_device *nand, uint8_t *oob, uint3 oob = malloc(*size); if (!oob) { LOG_ERROR(Unable to allocate space for OOB); + return NULL; } memset(oob, 0xFF, *size); -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 6a59e2b flash: update luminary device table
This is an automated email from Gerrit. Spencer Oliver (s...@spen-soft.co.uk) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/161 -- gerrit commit 6a59e2bbe6089b74828bfeab681ae84ccc70ced2 Author: Spencer Oliver s...@spen-soft.co.uk Date: Thu Nov 3 20:42:50 2011 + flash: update luminary device table add support for checking target against the device CLASS rather then just the PARTNO. This change also adds the new LM4F family (Blizzard). Change-Id: Ia9d1e33f1f1c2817c0039a2232ecf932fae072f9 Signed-off-by: Spencer Oliver s...@spen-soft.co.uk diff --git a/contrib/gen-stellaris-part-header.pl b/contrib/gen-stellaris-part-header.pl index 24ddcb1..0cc567f 100755 --- a/contrib/gen-stellaris-part-header.pl +++ b/contrib/gen-stellaris-part-header.pl @@ -7,13 +7,13 @@ $comment = // Autogenerated by contrib/gen-stellaris-part-header.pl // From Stellaris Firmware Development Package revision; $struct_header = static struct { - uint32_t partno; + uint8_t class; + uint8_t partno; const char *partname; -} StellarisParts[] = -{ +} StellarisParts[] = { ; -$struct_footer = \t{0,\Unknown part\}\n};\n; +$struct_footer = \t{0xFF, 0x00, \Unknown Part\}\n};\n; $#ARGV == 1 || die Usage: $0 inc directory output file\n; -d $ARGV[0] || die $ARGV[0]. is not a directory\n; @@ -26,13 +26,11 @@ opendir(DIR, $dir) || die can't open $dir: $!; @files = readdir(DIR); closedir(DIR); -@short_files = sort(grep(/lm3s...\.h/, @files)); -@long_files = sort(grep(/lm3s\.h/, @files)); +@header_files = sort(grep(/lm.+\.h/, @files)); $ver = 0; $new_struct = $struct_header; -process_file(@short_files); -process_file(@long_files); +process_file(@header_files); $new_struct .= $struct_footer; $dump = $comment $ver\n$new_struct; @@ -51,7 +49,7 @@ close(OUTPUT); sub process_file { foreach $h_file (@_) { - ($base) = ($h_file =~ m/lm3s(.{3,4})\.h/ig); + ($base) = ($h_file =~ m/lm..(.{3,7})\.h/ig); $base = uc($base); local($/, *FILE); open(FILE, $dir/$h_file); @@ -66,22 +64,39 @@ sub process_file { $ver = $1; } } - if ($content =~ /SYSCTL_DID1_VER_[^M]\s+0x(\S+)/) { - $did1_ver = hex($1); + + if ($content =~ /SYSCTL_DID0_CLASS_[^M].+?0x(\S+)/s) { + $class = hex($1) 16; } else { - print STDERR $h_file is missing SYSCTL_DID1_VER\n; - $did1_ver = 255; - $invalid = 1; + # attempt another way to get class + if ($content =~ /\s(\S+)-class/) { + $class = getclass($1); + if ($class eq 0xFF) { + print STDERR $h_file unknown class\n; + $invalid = 1; + } + } else { + print STDERR $h_file is missing SYSCTL_DID0_CLASS_\n; + $class = 0; + $invalid = 1; + } } - if ($content =~ /SYSCTL_DID1_PRTNO_$base\s+0x(\S+)/) { + + if ($content =~ /SYSCTL_DID1_PRTNO_$base.+0x(\S+)/) { $prtno = hex($1); + $base = LM3S . $base; } else { - print STDERR $h_file is missing SYSCTL_DID1_PRTNO\n; - $prtno = 0; - $invalid = 1; + # LM4F have a changed header + if ($content =~ /SYSCTL_DID1_PRTNO_LM4F$base.+?0x(\S+)/s) { + $prtno = hex($1); + $base = LM4F . $base; + } else { + print STDERR $h_file is missing SYSCTL_DID1_PRTNO\n; + $prtno = 0; + $invalid = 1; + } } - $id = ($did1_ver | $prtno) 16; - $new_member = sprintf {0x%04X,\LM3S%s\},, $id, $base; + $new_member = sprintf {0x%02X, 0x%02X, \%s\},, $class, $prtno 16, $base; if ($invalid == 1) { #$new_struct .= \t//$new_member\t// Invalid\n; } else { @@ -89,3 +104,21 @@ sub process_file { } } } + +sub getclass { + $class = $_[0]; + if ($class =~ /Sandstorm/i) { + return 0; + } elsif ($class =~ /Fury/i) { + return 1; + } elsif ($class =~ /DustDevil/i) { + return 3; + } elsif ($class =~ /Tempest/i) { + return 4; + } elsif
[Openocd-development] openocd patch: 8a04e8e cortex_m: initialize unused CPU variables to 0 for poll info output
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/163 -- gerrit commit 8a04e8e3c997a8ce0808af0ddf3f4702e16e3cd7 Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Thu Nov 3 21:45:38 2011 +0100 cortex_m: initialize unused CPU variables to 0 for poll info output fixes warnings. Change-Id: I1a9ec09083d4e6269889fb79e6121f25e83eb396 Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index 2a283cd..0f26cda 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -341,7 +341,7 @@ static int cortex_m3_examine_debug_reason(struct target *target) static int cortex_m3_examine_exception_reason(struct target *target) { - uint32_t shcsr, except_sr, cfsr = -1, except_ar = -1; + uint32_t shcsr = 0, except_sr = 0, cfsr = -1, except_ar = -1; struct armv7m_common *armv7m = target_to_armv7m(target); struct adiv5_dap *swjdp = armv7m-dap; int retval; -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 1307ca4 rtos: fix warning by checking post condition
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/164 -- gerrit commit 1307ca49a71a8977e76818ecd062498f608acd51 Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Thu Nov 3 21:48:04 2011 +0100 rtos: fix warning by checking post condition this verifies the promise that more code can be added along the lines of the current string writing code. Change-Id: Id41e5138018b381349d474b9674e687fca70e663 Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index 8a59fd3..559a3d9 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -198,6 +198,8 @@ int gdb_thread_packet(struct connection *connection, char *packet, int packet_si tmp_str_ptr += sprintf( tmp_str_ptr, : %s, detail-extra_info_str ); } + assert(tmp_str + strlen(tmp_str) == tmp_str_ptr); + char * hex_str = (char*) malloc( strlen(tmp_str)*2 +1 ); str_to_hex( hex_str, tmp_str ); -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 4f112d1 etm: fix warning by removing assignment that is immediately overwritten
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/165 -- gerrit commit 4f112d1b8d93eed59fa5e41b4937475cb52b05ac Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Thu Nov 3 21:49:59 2011 +0100 etm: fix warning by removing assignment that is immediately overwritten Change-Id: Ia3a83d3c1fc3a1707d69017fce6cf142a81babc4 Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/etm.c b/src/target/etm.c index 7384764..4e15878 100644 --- a/src/target/etm.c +++ b/src/target/etm.c @@ -314,7 +314,6 @@ struct reg_cache *etm_build_reg_cache(struct target *target, /* figure ETM version then add base registers */ if (config (1 31)) { - bcd_vers = 0x20; LOG_WARNING(ETMv2+ support is incomplete); /* REVISIT more registers may exist; they may now be -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 4d060d2 avr32_regs: add missing error propagation
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/166 -- gerrit commit 4d060d29f5cbafd6703bd36d3ce096d19bdc3a9e Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Thu Nov 3 21:51:31 2011 +0100 avr32_regs: add missing error propagation Change-Id: Ie8b141dd534d73eccfc045069d5f628bd1eea88e Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/avr32_regs.c b/src/target/avr32_regs.c index eb283fc..e3761ad 100644 --- a/src/target/avr32_regs.c +++ b/src/target/avr32_regs.c @@ -97,6 +97,9 @@ int avr32_jtag_write_regs(struct avr32_jtag *jtag_info, uint32_t *regs) int i, retval; retval = avr32_jtag_write_reg(jtag_info, 0, regs[AVR32_REG_SR]); + if (retval != ERROR_OK) + return retval; + /* Restore Status reg */ retval = avr32_jtag_exec(jtag_info, MTSR(0, 0)); if (retval != ERROR_OK) -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: b6d2fa6 tools: add checkpatch script
This is an automated email from Gerrit. Spencer Oliver (s...@spen-soft.co.uk) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/167 -- gerrit commit b6d2fa6a9f0892500b5c632dccc46f0f24cb6031 Author: Spencer Oliver s...@spen-soft.co.uk Date: Thu Nov 3 23:33:37 2011 + tools: add checkpatch script execute from openocd root dir after commiting change but before pushing to gerrit. tools/checkpatch.sh This is the same script used by the jenkins build server to validate a change. Change-Id: Ib40d44b160e1c50a5e47ab55fc48a554381ea763 Signed-off-by: Spencer Oliver s...@spen-soft.co.uk diff --git a/tools/checkpatch.sh b/tools/checkpatch.sh new file mode 100644 index 000..33b6dfc --- /dev/null +++ b/tools/checkpatch.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# + +git format-patch -M --stdout HEAD^ | tools/scripts/checkpatch.pl - --no-tree -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: aa9bc05 HACKING: all you need is http access
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/157 -- gerrit commit aa9bc05890f74e51599e38d5ad195bb7af848261 Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Wed Nov 2 10:48:44 2011 +0100 HACKING: all you need is http access Change-Id: I191c1da5126c4c9ea1ff8826576b6b24feaf9881 Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/HACKING b/HACKING index dc06b45..353e72f 100644 --- a/HACKING +++ b/HACKING @@ -1,3 +1,6 @@ +NB! If you're behind a corporate wall with http only access to the +world, you can still use these instructions! + Submitting patches to the OpenOCD Gerrit server: OpenOCD is to some extent a self service open source project, so to @@ -10,7 +13,7 @@ The procedure to create a patch is essentially: - create a commit - send the changes to the Gerrit server for review - correct the patch and re-send it according to review feedback - + 0. Create a Gerrit account at: @@ -43,7 +46,7 @@ you should scroll down the page till you get to the section: 'Next: Set Up SSH Keys', and follow the steps described. 1. Clone the git repository, rather than just -download the source. +download the source. git clone git://openocd.git.sourceforge.net/gitroot/openocd/openocd @@ -60,24 +63,35 @@ Add a new remote to git using Gerrit username: git remote add review ssh://usern...@openocd.zylin.com:29418/openocd.git git config remote.review.push HEAD:refs/for/master +Or with http only: + +git remote add review http://openocd.zylin.com/p/openocd.git +git config remote.review.push HEAD:refs/for/master + You will need to install this hook, we will look into a better solution: scp -p -P 29418 usern...@openocd.zylin.com:hooks/commit-msg .git/hooks/ +Or with http only: + +wget http://openocd.zylin.com/tools/hooks/commit-msg +mv commit-msg .git/hooks +chmod +x .git/hooks/commit-msg + 3. Set up git with your name and email: git config --global user.name John Smith git config --global user.email j...@smith.org -4. Work on your patches. Split the work into +4. Work on your patches. Split the work into multiple small patches that can be reviewed and applied seperately and safely to the OpenOCD repository. while(!done) { work - edit files using your favorite editor. - run git commit -s -a to commit all changes. + run git commit -s -a to commit all changes. } TIP! use git add . before commit to add new files. -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 2fb67e0 tx27stk5: add board init support for KaRo TX27 CPU module
This is an automated email from Gerrit. Mark Vels (mark.v...@team-embedded.nl) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/158 -- gerrit commit 2fb67e0d442b3e00e81df5fadd4eedc930e3bd6d Author: Mark Vels mark.v...@team-embedded.nl Date: Tue Nov 1 13:29:11 2011 +0100 tx27stk5: add board init support for KaRo TX27 CPU module This patch adds support for a KaRo TX27 CPU module on a StarterkitV base board. The register settings have been extracted from a RedBoot distribution that is distributed along with the hardware by KaRo. This setup has been tested with a JTAGKey. The testing has been focussed on loading a program into memory and start execution. Although the flash seems to be correctly detected, no effort has been put in testing the NAND programming yet. Change-Id: Ib17763f1e3ecacd0eb9b5fdc32f8cba7a5e59be5 Signed-off-by: Mark Vels mark.v...@team-embedded.nl diff --git a/tcl/board/tx27_stk5.cfg b/tcl/board/tx27_stk5.cfg new file mode 100644 index 000..2a1c8b8 --- /dev/null +++ b/tcl/board/tx27_stk5.cfg @@ -0,0 +1,60 @@ +source [find target/imx27.cfg] + +$_TARGETNAME configure -event gdb-attach { reset init } +$_TARGETNAME configure -event reset-init { tx27_init } + +proc tx27_init { } { + # This setup puts RAM at 0xA000 + # init_aipi (AIPI1.PSR0, AIPI2.PSR0, AIPI1.PSR1 and AIPI2.PSR1) + mww 0x1000 0x20040304 + mww 0x1002 0x + mww 0x1004 0xDFFBFCFB + mww 0x10020004 0x + + sleep 100 + + #init_max ( PORT0.MPR, #PORT0.AMPR, #PORT1.MPR, #PORT1.AMPR, #PORT2.MPR, #PORT2.AMPR) + mww 0x1003F000 0x00302145 + mww 0x1003F004 0x00302145 + mww 0x1003F100 0x00302145 + mww 0x1003F104 0x00302145 + mww 0x1003F200 0x00302145 + mww 0x1003F204 0x00302145 + + #init_drive_strength (#DSCR3, #DSCR5, #DSCR6, #DSCR7, #DSCR8 ) + mww 0x10027828 0x + mww 0x10027830 0x + mww 0x10027834 0x + mww 0x10027838 0x5005 + mww 0x1002783C 0x1555 + + #init_sdram_speed + #mww 0xD8001010 0x0004 + mww 0xD8001010 0x0024 + + mww 0xD8001004 0x00395729 + + mww 0xD8001000 0x9212 + mww 0xA400 0x0 + + mww 0xD8001000 0xA212 + mww 0xA000 0x0 + mww 0xA000 0x0 + + mww 0xD8001000 0xB212 + mdb 0xA000 + mdb 0xA033 + + mww 0xD8001000 0x82126485 + + # = + # Sync mode (AHB Clk = 133MHz ; BCLK = 44.3MHz) + # = + mww 0xD8002000 0x23524E80 + mww 0xD8002004 0x1D03 + mww 0xD8002008 0x00720900 + + nand probe 0 +} + +nand device tx27.nand imx27 $_TARGETNAME hwecc -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 4aa8779 target: fix null pointer exception
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/148 -- gerrit commit 4aa87793756ce82541d1c142e63b30c1c0fcc4a6 Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Tue Nov 1 22:00:46 2011 +0100 target: fix null pointer exception check if no target is selected and return error. Change-Id: Ie8abb63c708d09572b45e88fc6766af108715077 Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c index ef9b839..f023211 100644 --- a/src/target/armv4_5.c +++ b/src/target/armv4_5.c @@ -946,7 +946,13 @@ static int jim_mcrmrc(Jim_Interp *interp, int argc, Jim_Obj *const *argv) COMMAND_HANDLER(handle_arm_semihosting_command) { struct target *target = get_current_target(CMD_CTX); - struct arm *arm = target ? target_to_arm(target) : NULL; + + if (target == NULL) { + LOG_ERROR(No target selected); + return ERROR_FAIL; + } + + struct arm *arm = target_to_arm(target); if (!is_arm(arm)) { command_print(CMD_CTX, current target isn't an ARM); -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 9416d08 fix warning: remove assigned to variable
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/149 -- gerrit commit 9416d087f9555d3b28ca7688ba95992dc1e24cc4 Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Tue Nov 1 22:10:54 2011 +0100 fix warning: remove assigned to variable variable is subsequently not used Change-Id: I177d21c6ba9f1f2e3765feffdbf317ea375a8cfe Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/flash/nor/pic32mx.c b/src/flash/nor/pic32mx.c index 69321ac..65d93ad 100644 --- a/src/flash/nor/pic32mx.c +++ b/src/flash/nor/pic32mx.c @@ -724,7 +724,7 @@ static int pic32mx_info(struct flash_bank *bank, char *buf, int buf_size) buf += printed; buf_size -= printed; - printed = snprintf(buf, buf_size, Ver: 0x%02x, + snprintf(buf, buf_size, Ver: 0x%02x, (unsigned)((device_id 28) 0xf)); return ERROR_OK; -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 6bcdf46 cfg: add Blizzard class to stellaris.cfg
This is an automated email from Gerrit. Spencer Oliver (s...@spen-soft.co.uk) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/150 -- gerrit commit 6bcdf461c1b4f0c6a72aaa15a909d828547f2e92 Author: Spencer Oliver s...@spen-soft.co.uk Date: Tue Nov 1 21:12:58 2011 + cfg: add Blizzard class to stellaris.cfg Change-Id: I2a1320c696b6d9b070e4a927c4cd4d68178af751 Signed-off-by: Spencer Oliver s...@spen-soft.co.uk diff --git a/tcl/target/stellaris.cfg b/tcl/target/stellaris.cfg index 7fef4ec..3ab5c0b 100644 --- a/tcl/target/stellaris.cfg +++ b/tcl/target/stellaris.cfg @@ -153,11 +153,12 @@ $_TARGETNAME configure -event reset-start { set device_class [expr (([mrw 0x400fe000] 16) 0xff)] } - if {$device_class == 0 || $device_class == 1 || $device_class == 3} { - # Sandstorm, Fury and DustDevil are able to use NVIC SYSRESETREQ + if {$device_class == 0 || $device_class == 1 || + $device_class == 3 || $device_class == 5} { + # Sandstorm, Fury, DustDevil and Blizzard are able to use NVIC SYSRESETREQ cortex_m3 reset_config sysresetreq } else { - # Tempest and newer default to using NVIC VECTRESET + # Tempest and Firestorm default to using NVIC VECTRESET # peripherals will need reseting manually, see proc reset_peripherals cortex_m3 reset_config vectreset -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 701fc7b cfg: add Stellaris LM4F232 Evaluation Kit config
This is an automated email from Gerrit. Spencer Oliver (s...@spen-soft.co.uk) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/151 -- gerrit commit 701fc7bac5ff533a887c07a00c661a6a734b804d Author: Spencer Oliver s...@spen-soft.co.uk Date: Tue Nov 1 21:13:54 2011 + cfg: add Stellaris LM4F232 Evaluation Kit config Change-Id: Ica754897bef6573a0738ed1afdfe1dfda07292fd Signed-off-by: Spencer Oliver s...@spen-soft.co.uk diff --git a/tcl/board/ek-lm4f232.cfg b/tcl/board/ek-lm4f232.cfg new file mode 100644 index 000..6e3f8e3 --- /dev/null +++ b/tcl/board/ek-lm4f232.cfg @@ -0,0 +1,13 @@ +# +# TI Stellaris LM4F232 Evaluation Kits +# +# http://www.ti.com/tool/ek-lm4f232 +# + +# NOTE: using the bundled FT2232 JTAG/SWD/SWO interface is optional! +# so is using in JTAG mode, as done here. +source [find interface/luminary-icdi.cfg] + +set WORKAREASIZE 0x8000 +set CHIPNAME lm4f23x +source [find target/stellaris.cfg] -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 96c3cbf cortex_m: add missing error checking
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/152 -- gerrit commit 96c3cbfab96ef837464189de0cbc66ce3400172a Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Tue Nov 1 22:53:54 2011 +0100 cortex_m: add missing error checking found by clang. Change-Id: I099c6fe6b044dba36c20221cb439bdcba5a6bb6f Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index 8000b9a..2a283cd 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -124,16 +124,20 @@ static int cortexm3_dap_write_coreregister_u32(struct adiv5_dap *swjdp, if (retval != ERROR_OK) return retval; retval = dap_queue_ap_write(swjdp, AP_REG_BD0 | (DCB_DCRDR 0xC), value); - // XXX check retval + if (retval != ERROR_OK) + return retval; /* mem_ap_write_u32(swjdp, DCB_DCRSR, i | DCRSR_WnR); */ retval = dap_setup_accessport(swjdp, CSW_32BIT | CSW_ADDRINC_OFF, DCB_DCRSR 0xFFF0); if (retval != ERROR_OK) return retval; retval = dap_queue_ap_write(swjdp, AP_REG_BD0 | (DCB_DCRSR 0xC), regnum | DCRSR_WnR); - // XXX check retval + if (retval != ERROR_OK) + return retval; retval = dap_run(swjdp); + if (retval != ERROR_OK) + return retval; /* restore DCB_DCRDR - this needs to be in a seperate * transaction otherwise the emulated DCC channel breaks */ -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 20f3092 cortex_a: add missing error propagation
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/153 -- gerrit commit 20f3092a5c78c284fa4da3fe1816610c8cdaab13 Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Tue Nov 1 22:56:28 2011 +0100 cortex_a: add missing error propagation found by clang. Change-Id: I50eac219d7540fd48d3285f3f213cb659492d0c0 Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c index 2370d95..8a1ca3b 100755 --- a/src/target/cortex_a.c +++ b/src/target/cortex_a.c @@ -1021,6 +1021,8 @@ static int cortex_a8_internal_restore(struct target *target, int current, /* called it now before restoring context because it uses cpu * register r0 for restoring cp15 control register */ retval = cortex_a8_restore_cp15_control_reg(target); + if (retval != ERROR_OK) + return retval; retval = cortex_a8_restore_context(target, handle_breakpoints); if (retval != ERROR_OK) return retval; @@ -1147,7 +1149,9 @@ static int cortex_a8_resume(struct target *target, int current, cortex_a8_internal_restore(target, current, address, handle_breakpoints, debug_execution); if (target-smp) { target-gdb_service-core[0] = -1; - retval += cortex_a8_restore_smp(target, handle_breakpoints); + retval = cortex_a8_restore_smp(target, handle_breakpoints); + if (retval != ERROR_OK) + return retval; } cortex_a8_internal_restart(target); -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 4a81c9d usbtoxxx: remove warning by reducing scope of variable
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/154 -- gerrit commit 4a81c9d741a4743a09c01ca3aac8167ac245ce53 Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Tue Nov 1 22:59:17 2011 +0100 usbtoxxx: remove warning by reducing scope of variable Change-Id: Icc3cfe601082cd83ad1c8818c1e21e7ada014150 Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx.c b/src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx.c index 64e31a6..f92f38c 100644 --- a/src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx.c +++ b/src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx.c @@ -199,9 +199,9 @@ RESULT usbtoxxx_execute_command(void) } if (!processed) { - struct versaloon_want_pos_t *tmp, *free_tmp; + struct versaloon_want_pos_t *tmp; - free_tmp = tmp = versaloon_pending[i].pos; + tmp = versaloon_pending[i].pos; while (tmp != NULL) { if ((tmp-buff != NULL) (tmp-size 0)) @@ -209,6 +209,7 @@ RESULT usbtoxxx_execute_command(void) memcpy(tmp-buff, versaloon_buf + usbtoxxx_buffer_index + tmp-offset, tmp-size); } + struct versaloon_want_pos_t *free_tmp; free_tmp = tmp; tmp = tmp-next; free(free_tmp); -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 9ed9423 arm11: print next address to debug
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/155 -- gerrit commit 9ed94239e8e1113c0aeb249cc6882be0d994282d Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Tue Nov 1 23:20:49 2011 +0100 arm11: print next address to debug fixes clang warning. Basically the next address pointer is not used for anything in the fn, except to be examined in debug. Change-Id: I253519b8e49e54490bbe7da8ec3d2dd31f49052a Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/arm11.c b/src/target/arm11.c index 2d65835..b922b19 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -605,14 +605,14 @@ static int arm11_step(struct target *target, int current, if ((next_instruction 0xFFF00070) == 0xe1200070) { address = arm11_nextpc(arm11, 0, address + 4); - LOG_DEBUG(Skipping BKPT); + LOG_DEBUG(Skipping BKPT %08 PRIx32, address); } /* skip over Wait for interrupt / Standby */ /* mcr 15, 0, r?, cr7, cr0, {4} */ else if ((next_instruction 0x0FFF) == 0xee070f90) { address = arm11_nextpc(arm11, 0, address + 4); - LOG_DEBUG(Skipping WFI); + LOG_DEBUG(Skipping WFI %08 PRIx32, address); } /* ignore B to self */ else if ((next_instruction 0xFEFF) == 0xeafe) -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 09b1704 dsp5680xx: add missing and broken error propagation
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/156 -- gerrit commit 09b17046aaca462496d634508567e3a543719c17 Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Tue Nov 1 23:28:10 2011 +0100 dsp5680xx: add missing and broken error propagation found by clang. Change-Id: Ie7e2ecad71bf0838ece93727e4778ad368b890ef Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/dsp5680xx.c b/src/target/dsp5680xx.c index 116f609..bf406c7 100644 --- a/src/target/dsp5680xx.c +++ b/src/target/dsp5680xx.c @@ -538,7 +538,7 @@ static int eonce_enter_debug_mode_without_reset(struct target * target, uint16_t } if(eonce_status!=NULL) *eonce_status = data_read_from_dr; - return ERROR_OK; + return retval; } #define TIME_DIV_FREESCALE 0.3 @@ -606,6 +606,7 @@ static int eonce_enter_debug_mode(struct target * target, uint16_t * eonce_statu err_check_propagate(retval); instr_16 = 0x1; retval = dsp5680xx_drscan(target,(uint8_t *) instr_16,(uint8_t *) read_16,8); + err_check_propagate(retval); instr_16 = 0x20; retval = dsp5680xx_drscan(target,(uint8_t *) instr_16,(uint8_t *) read_16,8); jtag_add_sleep(TIME_DIV_FREESCALE*100*1000); @@ -1446,7 +1447,7 @@ int dsp5680xx_f_erase(struct target * target, int first, int last){ if(do_mass_erase){ //Mass erase retval = mass_erase(target,hfm_ustat); -err_check_propagate(retval); + err_check_propagate(retval); last = HFM_SECTOR_COUNT-1; }else{ for(int i = first;i=last;i++){ @@ -1704,8 +1705,10 @@ int dsp5680xx_f_unlock(struct target * target){ err_check_propagate(retval); instr_16 = 0x1; retval = dsp5680xx_drscan(target,(uint8_t *) instr_16,(uint8_t *) read_16,8); + err_check_propagate(retval); instr_16 = 0x20; retval = dsp5680xx_drscan(target,(uint8_t *) instr_16,(uint8_t *) read_16,8); + err_check_propagate(retval); jtag_add_sleep(TIME_DIV_FREESCALE*100*1000); jtag_add_reset(0,0); jtag_add_sleep(TIME_DIV_FREESCALE*300*1000); -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: c527ebb bugfixes: tinker a bit with the targets command
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/141 -- gerrit commit c527ebb4f303816a2fa2211379443590ce8659c2 Author: Øyvind Harboe oyvind.har...@zylin.com Date: Thu Oct 27 23:51:50 2011 +0200 bugfixes: tinker a bit with the targets command return error when target can not be found instead of ERROR_OK, split fn. Change-Id: I27bf3a05a6f4c8895dbf4299c8270b2117e4b3dd Signed-off-by: Øyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/target.c b/src/target/target.c index bd15620..18841f2 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -1861,26 +1861,36 @@ int target_write_u8(struct target *target, uint32_t address, uint8_t value) return retval; } +static int find_target(struct command_context *cmd_ctx, const char *name) +{ + struct target *target = get_target(name); + if (target == NULL) { + LOG_ERROR(Target: %s is unknown, try one of:\n, name); + return ERROR_FAIL; + } + if (!target-tap-enabled) { + LOG_USER(Target: TAP %s is disabled, +can't be the current target\n, +target-tap-dotted_name); + return ERROR_FAIL; + } + + cmd_ctx-current_target = target-target_number; + return ERROR_OK; +} + + COMMAND_HANDLER(handle_targets_command) { + int retval = ERROR_OK; if (CMD_ARGC == 1) { - struct target *target = get_target(CMD_ARGV[0]); - if (target == NULL) { - command_print(CMD_CTX,Target: %s is unknown, try one of:\n, CMD_ARGV[0]); - goto DumpTargets; - } - if (!target-tap-enabled) { - command_print(CMD_CTX,Target: TAP %s is disabled, - can't be the current target\n, - target-tap-dotted_name); - return ERROR_FAIL; + retval = find_target(CMD_CTX, CMD_ARGV[0]); + if (retval == ERROR_OK) { + /* we're done! */ + return retval; } - - CMD_CTX-current_target = target-target_number; - return ERROR_OK; } -DumpTargets:; struct target *target = all_targets; command_print(CMD_CTX, TargetName Type Endian TapNameState ); @@ -1899,19 +1909,20 @@ DumpTargets:; marker = '*'; /* keep columns lined up to match the headers above */ - command_print(CMD_CTX, %2d%c %-18s %-10s %-6s %-18s %s, - target-target_number, - marker, - target_name(target), - target_type_name(target), - Jim_Nvp_value2name_simple(nvp_target_endian, - target-endianness)-name, - target-tap-dotted_name, - state); + command_print(CMD_CTX, + %2d%c %-18s %-10s %-6s %-18s %s, + target-target_number, + marker, + target_name(target), + target_type_name(target), + Jim_Nvp_value2name_simple(nvp_target_endian, + target-endianness)-name, + target-tap-dotted_name, + state); target = target-next; } - return ERROR_OK; + return retval; } /* every 300ms we check for reset powerdropout and issue a reset halt if so. */ -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 91a30ac warnings: null pointer check fix
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/142 -- gerrit commit 91a30acedbbd5477e7a22aba4785d7eb5e6b81b2 Author: Øyvind Harboe oyvind.har...@zylin.com Date: Mon Oct 31 21:21:35 2011 +0100 warnings: null pointer check fix rewrite broken null pointer check code by reducing scope of variable. Change-Id: I8254f6849b187e5c9cd083053cdc11973c6fe339 Signed-off-by: Øyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/target_request.c b/src/target/target_request.c index 3cdca5e..1fedfb2 100644 --- a/src/target/target_request.c +++ b/src/target/target_request.c @@ -194,11 +194,9 @@ static int add_debug_msg_receiver(struct command_context *cmd_ctx, struct target static struct debug_msg_receiver* find_debug_msg_receiver(struct command_context *cmd_ctx, struct target *target) { int do_all_targets = 0; - struct debug_msg_receiver **p = target-dbgmsg; /* if no target has been specified search all of them */ - if (target == NULL) - { + if (target == NULL) { /* if no targets haven been specified */ if (all_targets == NULL) return NULL; @@ -207,8 +205,9 @@ static struct debug_msg_receiver* find_debug_msg_receiver(struct command_context do_all_targets = 1; } - do - { + /* so we target != null */ + struct debug_msg_receiver **p = target-dbgmsg; + do { while (*p) { if ((*p)-cmd_ctx == cmd_ctx) -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 87ad830 warning fix: add self-consitency check to remove warning
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/143 -- gerrit commit 87ad830a0b9f6e2d8104f93f3e074b92aba4ef5f Author: Øyvind Harboe oyvind.har...@zylin.com Date: Mon Oct 31 21:26:28 2011 +0100 warning fix: add self-consitency check to remove warning verify promise of code that more code can be pasted with an assert at the end condition of the code passage that builds string. Change-Id: I76a4e5f91b9142fff932e1493cb43c29eb6a0f80 Signed-off-by: Øyvind Harboe oyvind.har...@zylin.com diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index 8a59fd3..f3732f1 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -198,6 +198,8 @@ int gdb_thread_packet(struct connection *connection, char *packet, int packet_si tmp_str_ptr += sprintf( tmp_str_ptr, : %s, detail-extra_info_str ); } + assert(strlen(tmp_str) == (size_t) (tmp_str_ptr - tmp_str)); + char * hex_str = (char*) malloc( strlen(tmp_str)*2 +1 ); str_to_hex( hex_str, tmp_str ); -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 3be0092 warning fix: remove senseless assignment before bailing out of fn w/error
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/144 -- gerrit commit 3be00928f3d407c4476590dcadd3c707ba915c3b Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Mon Oct 31 21:52:10 2011 +0100 warning fix: remove senseless assignment before bailing out of fn w/error Change-Id: I822f3adce0eccb880007673d60c7eccf7d36b398 Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/mips32_pracc.c b/src/target/mips32_pracc.c index 6b43479..7160f8e 100644 --- a/src/target/mips32_pracc.c +++ b/src/target/mips32_pracc.c @@ -183,7 +183,6 @@ static int mips32_pracc_exec_read(struct mips32_pracc_context *ctx, uint32_t add /* TODO: send JMP 0xFF20 instruction. Hopefully processor jump back * to start of debug vector */ - data = 0; LOG_ERROR(Error reading unexpected address 0x%8.8 PRIx32 , address); return ERROR_JTAG_DEVICE_ERROR; } -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: ac49319 str9x: explain compiler that a local variable will always be initialized
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/145 -- gerrit commit ac49319f38c6d8bd7d3a236b4b677e1e7470b0c7 Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Mon Oct 31 22:03:49 2011 +0100 str9x: explain compiler that a local variable will always be initialized Change-Id: I9ddb2793b4cdbf6acea6f69973531491e4ebcc5b Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/flash/nor/str9x.c b/src/flash/nor/str9x.c index 61a438f..63cfd18 100644 --- a/src/flash/nor/str9x.c +++ b/src/flash/nor/str9x.c @@ -280,6 +280,9 @@ static int str9x_erase(struct flash_bank *bank, int first, int last) total_timeout = 1000; } + /* this is so the compiler can *know* */ + assert(total_timeout 0); + for (i = first; i = last; i++) { int retval; -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 459b9f8 flash: add Stellaris Blizzard class
This is an automated email from Gerrit. Spencer Oliver (s...@spen-soft.co.uk) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/146 -- gerrit commit 459b9f8334c55ae38f5d1bb1110dc242a1947b5b Author: Spencer Oliver s...@spen-soft.co.uk Date: Mon Oct 31 22:20:06 2011 + flash: add Stellaris Blizzard class Change-Id: I83f0d6edf3ab31d9fa86682f20cec77dc47ba2f6 Signed-off-by: Spencer Oliver s...@spen-soft.co.uk diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c index 4a21028..39c189c 100644 --- a/src/flash/nor/stellaris.c +++ b/src/flash/nor/stellaris.c @@ -377,7 +377,7 @@ static char * StellarisClassname[7] = Unknown, DustDevil, Tempest, - Unknown, + Blizzard, Firestorm }; -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 8cb99c4 dsp563xxx: fix missing error propagation found by clang
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/140 -- gerrit commit 8cb99c45f508b20fbac9aa9649374b774cb647d8 Author: Øyvind Harboe oyvind.har...@zylin.com Date: Sun Oct 30 18:36:47 2011 +0100 dsp563xxx: fix missing error propagation found by clang Change-Id: I7380ce145b4942e21b174f2a810928a877c32bc7 Signed-off-by: Øyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/dsp563xx.c b/src/target/dsp563xx.c index b7f23c7..6a59e86 100644 --- a/src/target/dsp563xx.c +++ b/src/target/dsp563xx.c @@ -1323,7 +1323,7 @@ static int dsp563xx_run_algorithm(struct target *target, int timeout_ms, void *arch_info) { int i; - int retvaltemp,retval = 0; + int retval = ERROR_OK; struct dsp563xx_common *dsp563xx = target_to_dsp563xx(target); if (target-state != TARGET_HALTED) @@ -1376,9 +1376,13 @@ static int dsp563xx_run_algorithm(struct target *target, for (i = 0; i num_mem_params; i++) { if (mem_params[i].direction != PARAM_OUT) - if ((retvaltemp = target_read_buffer(target, mem_params[i].address, mem_params[i].size, mem_params[i].value)) != ERROR_OK) + retval = target_read_buffer(target, + mem_params[i].address, + mem_params[i].size, + mem_params[i].value); + if (retval != ERROR_OK) { - retval = retvaltemp; + return retval; } } -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 620ba7e clang: fix warning by adding assert that shows that a variable is used
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/134 -- gerrit commit 620ba7e6cd57c951fafa0f1ffab2db102fe2a60f Author: Øyvind Harboe oyvind.har...@zylin.com Date: Sat Oct 29 10:55:02 2011 +0200 clang: fix warning by adding assert that shows that a variable is used Change-Id: I26e0ba9f1ae9d43c9a14c42c4225746782dc4d66 Signed-off-by: Øyvind Harboe oyvind.har...@zylin.com diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c index 468edf5..b634ac0 100644 --- a/src/jtag/tcl.c +++ b/src/jtag/tcl.c @@ -166,6 +166,8 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args } } /* validate args */ + assert(e == JIM_OK); + tap = jtag_tap_by_jim_obj(interp, args[1]); if (tap == NULL) { return JIM_ERR; -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: ccbf006 gdb_server: clarify w/assert impossible condition on malloc()
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/135 -- gerrit commit ccbf006b0af960d6c8462774e76ddc7df933c2b8 Author: Øyvind Harboe oyvind.har...@zylin.com Date: Sat Oct 29 17:37:42 2011 +0200 gdb_server: clarify w/assert impossible condition on malloc() Change-Id: I6ae3e007f4aa768f8bc64de78351750138f12e53 Signed-off-by: Øyvind Harboe oyvind.har...@zylin.com diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 5eb6cac..5599c7b 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -1061,6 +1061,8 @@ static int gdb_get_registers_packet(struct connection *connection, reg_packet_size += reg_list[i]-size; } + assert(reg_list_size 0); + reg_packet = malloc(DIV_ROUND_UP(reg_packet_size, 8) * 2); reg_packet_p = reg_packet; -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 6ada46d config files: Drop incorrect comments.
This is an automated email from Gerrit. Uwe Hermann (u...@hermann-uwe.de) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/136 -- gerrit commit 6ada46d8639bb44800e526111291172506122c0d Author: Uwe Hermann u...@hermann-uwe.de Date: Sat Oct 29 22:58:12 2011 +0200 config files: Drop incorrect comments. There are many force an error till we get a good number comments in target/board files. This refers to the use-case where a config script sets _CPUTAPID to 0x (which presumely gets overridden later): if { [info exists CPUTAPID ] } { set _CPUTAPID $CPUTAPID } else { # Force an error until we get a good number. set _CPUTAPID 0x } However, the same comment was also copy-pasted in many files which do _not_ set _CPUTAPID to 0x, where the comment doesn't make any sense at all. Drop those comments. Also, add one missing comment, and fix small whitespace and grammar issues. Change-Id: Ic4ba3b5ccba87ed40cea0d6a7d66609fbdfa3c71 Signed-off-by: Uwe Hermann u...@hermann-uwe.de diff --git a/tcl/board/at91eb40a.cfg b/tcl/board/at91eb40a.cfg index dc5aacb..b43dee3 100644 --- a/tcl/board/at91eb40a.cfg +++ b/tcl/board/at91eb40a.cfg @@ -19,7 +19,6 @@ if { [info exists ENDIAN] } { if { [info exists CPUTAPID ] } { set _CPUTAPID $CPUTAPID } else { - # force an error till we get a good number set _CPUTAPID 0x1f0f0f0f } diff --git a/tcl/board/mini2440.cfg b/tcl/board/mini2440.cfg index c5adac3..a034538 100644 --- a/tcl/board/mini2440.cfg +++ b/tcl/board/mini2440.cfg @@ -100,7 +100,6 @@ if { [info exists ENDIAN] } { if { [info exists CPUTAPID ] } { set _CPUTAPID $CPUTAPID } else { - # force an error till we get a good number set _CPUTAPID 0x0032409d } diff --git a/tcl/target/at91sam7se512.cfg b/tcl/target/at91sam7se512.cfg index c48afef..7273a06 100644 --- a/tcl/target/at91sam7se512.cfg +++ b/tcl/target/at91sam7se512.cfg @@ -18,7 +18,7 @@ if { [info exists ENDIAN] } { if { [info exists CPUTAPID ] } { set _CPUTAPID $CPUTAPID } else { - # force an error till we get a good number + # Force an error until we get a good number. set _CPUTAPID 0x } diff --git a/tcl/target/at91sam9.cfg b/tcl/target/at91sam9.cfg index ba0197d..08154ce 100644 --- a/tcl/target/at91sam9.cfg +++ b/tcl/target/at91sam9.cfg @@ -17,13 +17,11 @@ if { [info exists ENDIAN] } { if { [info exists CPUTAPID ] } { set _CPUTAPID $CPUTAPID } else { - # force an error till we get a good number set _CPUTAPID 0x0792603f } reset_config trst_and_srst separate trst_push_pull srst_open_drain -# jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID adapter_nsrst_delay 300 diff --git a/tcl/target/avr32.cfg b/tcl/target/avr32.cfg index 7fe98b2..1a2ea33 100644 --- a/tcl/target/avr32.cfg +++ b/tcl/target/avr32.cfg @@ -1,7 +1,6 @@ set _CHIPNAME avr32 set _ENDIAN big -# force an error till we get a good number set _CPUTAPID 0x21e8203f jtag_nsrst_delay 100 diff --git a/tcl/target/dsp56321.cfg b/tcl/target/dsp56321.cfg index 281c4dd..74279d9 100644 --- a/tcl/target/dsp56321.cfg +++ b/tcl/target/dsp56321.cfg @@ -17,7 +17,6 @@ if { [info exists ENDIAN] } { if { [info exists CPUTAPID ] } { set _CPUTAPID $CPUTAPID } else { - # force an error till we get a good number set _CPUTAPID 0x1181501d } diff --git a/tcl/target/dsp568013.cfg b/tcl/target/dsp568013.cfg index 80adc76..2b25ed7 100644 --- a/tcl/target/dsp568013.cfg +++ b/tcl/target/dsp568013.cfg @@ -16,7 +16,6 @@ if { [info exists ENDIAN] } { if { [info exists CPUTAPID ] } { set _CPUTAPID $CPUTAPID } else { - # force an error till we get a good number set _CPUTAPID 0x01f2401d } diff --git a/tcl/target/dsp568037.cfg b/tcl/target/dsp568037.cfg index 6089e9d..21eb0b7 100644 --- a/tcl/target/dsp568037.cfg +++ b/tcl/target/dsp568037.cfg @@ -16,7 +16,6 @@ if { [info exists ENDIAN] } { if { [info exists CPUTAPID ] } { set _CPUTAPID $CPUTAPID } else { - # force an error till we get a good number set _CPUTAPID 0x01f2801d } diff --git a/tcl/target/epc9301.cfg b/tcl/target/epc9301.cfg index d2dc7ec..6b67b9d 100644 --- a/tcl/target/epc9301.cfg +++ b/tcl/target/epc9301.cfg @@ -15,7 +15,7 @@ if { [info exists ENDIAN] } { if { [info exists CPUTAPID ] } { set _CPUTAPID $CPUTAPID } else { - # force an error till we get a good number + # Force an error until we get a good number. set _CPUTAPID 0x } diff --git a/tcl/target/is5114.cfg b/tcl/target/is5114.cfg index 64c0c8e..56b9b65 100644 --- a/tcl/target/is5114.cfg +++ b/tcl/target/is5114.cfg @@ -18,7 +18,7 @@ if { [info exists ENDIAN] } { if { [info exists CPUTAPID ] } { set _CPUTAPID $CPUTAPID } else { - # force an error till we get a good number + # Force an error until we get a good number. set _CPUTAPID 0x } diff --git a/tcl
[Openocd-development] openocd patch: b2c9a43 interface configs: Fix whitespace and other issues.
This is an automated email from Gerrit. Uwe Hermann (u...@hermann-uwe.de) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/139 -- gerrit commit b2c9a43fba25257c692ff78101613aa309b76923 Author: Uwe Hermann u...@hermann-uwe.de Date: Sun Oct 30 01:45:11 2011 +0200 interface configs: Fix whitespace and other issues. Change-Id: I98825c7fb9bdee75b69b06005ed12a3f64ec4db4 Signed-off-by: Uwe Hermann u...@hermann-uwe.de diff --git a/tcl/interface/flashlink.cfg b/tcl/interface/flashlink.cfg index 22abe7b..56dc35e 100644 --- a/tcl/interface/flashlink.cfg +++ b/tcl/interface/flashlink.cfg @@ -6,9 +6,9 @@ # if { [info exists PARPORTADDR] } { - set _PARPORTADDR $PARPORTADDR + set _PARPORTADDR $PARPORTADDR } else { - set _PARPORTADDR 0 + set _PARPORTADDR 0 } interface parport diff --git a/tcl/interface/flossjtag-noeeprom.cfg b/tcl/interface/flossjtag-noeeprom.cfg index 4e3466e..66c010b 100644 --- a/tcl/interface/flossjtag-noeeprom.cfg +++ b/tcl/interface/flossjtag-noeeprom.cfg @@ -4,12 +4,12 @@ # http://github.com/esden/floss-jtag # # This is the pre v0.3 Floss-JTAG compatible config file. It can also be used -# for newer versions of Floss-JTAG with empty or not populated eeprom. If you -# have several Floss-JTAG connected you have to use the usb id to select a +# for newer versions of Floss-JTAG with empty or not populated EEPROM. If you +# have several Floss-JTAG connected you have to use the USB ID to select a # specific one. # -# If you have a Floss-JTAG WITH eeprom that is programmed use flossjtag.cfg -# file. +# If you have a Floss-JTAG WITH EEPROM that is programmed, use the +# flossjtag.cfg file. # interface ft2232 diff --git a/tcl/interface/flossjtag.cfg b/tcl/interface/flossjtag.cfg index 9511dd2..fbbabc1 100644 --- a/tcl/interface/flossjtag.cfg +++ b/tcl/interface/flossjtag.cfg @@ -4,11 +4,11 @@ # http://github.com/esden/floss-jtag # # This is the v0.3 and v1.0 Floss-JTAG compatible config file. It relies on the -# existence of an eeprom on Floss-JTAG containing a name. If you have several +# existence of an EEPROM on Floss-JTAG containing a name. If you have several # Floss-JTAG adapters connected you can use the serial number to select a # specific device. # -# If your Floss-JTAG does not have an eeprom or eeprom is empty use +# If your Floss-JTAG does not have an EEPROM, or the EEPROM is empty, use the # flossjtag-noeeprom.cfg file. # diff --git a/tcl/interface/parport.cfg b/tcl/interface/parport.cfg index 326005a..f7cc23a 100644 --- a/tcl/interface/parport.cfg +++ b/tcl/interface/parport.cfg @@ -2,11 +2,12 @@ # Parallel port wiggler (many clones available) on port 0x378 # # Addresses: 0x378/LPT1 or 0x278/LPT2 ... +# if { [info exists PARPORTADDR] } { - set _PARPORTADDR $PARPORTADDR + set _PARPORTADDR $PARPORTADDR } else { - set _PARPORTADDR 0x378 + set _PARPORTADDR 0x378 } interface parport diff --git a/tcl/interface/parport_dlc5.cfg b/tcl/interface/parport_dlc5.cfg index d0f183f..9834580 100644 --- a/tcl/interface/parport_dlc5.cfg +++ b/tcl/interface/parport_dlc5.cfg @@ -5,9 +5,9 @@ # if { [info exists PARPORTADDR] } { - set _PARPORTADDR $PARPORTADDR + set _PARPORTADDR $PARPORTADDR } else { - set _PARPORTADDR 0 + set _PARPORTADDR 0 } interface parport diff --git a/tcl/interface/usbprog.cfg b/tcl/interface/usbprog.cfg index f0841b9..b4f0da3 100644 --- a/tcl/interface/usbprog.cfg +++ b/tcl/interface/usbprog.cfg @@ -5,6 +5,6 @@ # interface usbprog -# USBprog is broken w/short tms sequences, this is a workaround +# USBprog is broken w/short TMS sequences, this is a workaround # until the C code can be fixed. -tms_sequence long \ No newline at end of file +tms_sequence long -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] openocd patch: 2533760 interface configs: Add missing URLs and names.
This is an automated email from Gerrit. Uwe Hermann (u...@hermann-uwe.de) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/138 -- gerrit commit 2533760c5219527a8887c560babc75087f8b6074 Author: Uwe Hermann u...@hermann-uwe.de Date: Sun Oct 30 01:44:18 2011 +0200 interface configs: Add missing URLs and names. Also, drop author name from interface/hilscher_* files, that info is in the git log, and none of the other files contain author names either. Change-Id: Idf0eb4279c4bff31d15c166619c0bf8b1c5bb877 Signed-off-by: Uwe Hermann u...@hermann-uwe.de diff --git a/tcl/interface/hilscher_nxhx10_etm.cfg b/tcl/interface/hilscher_nxhx10_etm.cfg index d71a1a3..de44322 100644 --- a/tcl/interface/hilscher_nxhx10_etm.cfg +++ b/tcl/interface/hilscher_nxhx10_etm.cfg @@ -1,8 +1,9 @@ - -# Author: Michael Trensch (mtren...@googlemail.com) - +# +# Hilscher NXHX 10-ETM +# +# http://de.hilscher.com/products_details_hardware.html?p_id=P_4ce145a5983e6 +# -#interface interface ft2232 ft2232_device_desc NXHX 10-ETM ft2232_layout comstick diff --git a/tcl/interface/hilscher_nxhx500_etm.cfg b/tcl/interface/hilscher_nxhx500_etm.cfg index fffab49..5df2854 100644 --- a/tcl/interface/hilscher_nxhx500_etm.cfg +++ b/tcl/interface/hilscher_nxhx500_etm.cfg @@ -1,8 +1,9 @@ - -# Author: Michael Trensch (mtren...@googlemail.com) - +# +# Hilscher NXHX 500-ETM +# +# http://de.hilscher.com/files_design/8/NXHX500-ETM_description_Rev01_EN.pdf +# -#interface interface ft2232 ft2232_device_desc NXHX 500-ETM ft2232_layout comstick diff --git a/tcl/interface/hilscher_nxhx500_re.cfg b/tcl/interface/hilscher_nxhx500_re.cfg index bcd54fc..eb31c77 100644 --- a/tcl/interface/hilscher_nxhx500_re.cfg +++ b/tcl/interface/hilscher_nxhx500_re.cfg @@ -1,8 +1,9 @@ - -# Author: Michael Trensch (mtren...@googlemail.com) - +# +# Hilscher NXHX 500-RE +# +# http://de.hilscher.com/products_details_hardware.html?p_id=P_461ff2053bad1bs=20 +# -#interface interface ft2232 ft2232_device_desc NXHX 500-RE ft2232_layout comstick diff --git a/tcl/interface/hilscher_nxhx50_etm.cfg b/tcl/interface/hilscher_nxhx50_etm.cfg index 251d076..561409f 100644 --- a/tcl/interface/hilscher_nxhx50_etm.cfg +++ b/tcl/interface/hilscher_nxhx50_etm.cfg @@ -1,8 +1,9 @@ - -# Author: Michael Trensch (mtren...@googlemail.com) - +# +# Hilscher NXHX 50-ETM +# +# http://de.hilscher.com/files_design/8/NXHX50-ETM_description_Rev01_EN.pdf +# -#interface interface ft2232 ft2232_device_desc NXHX 50-ETM ft2232_layout comstick diff --git a/tcl/interface/hilscher_nxhx50_re.cfg b/tcl/interface/hilscher_nxhx50_re.cfg index 6e428fb..46a365d 100644 --- a/tcl/interface/hilscher_nxhx50_re.cfg +++ b/tcl/interface/hilscher_nxhx50_re.cfg @@ -1,8 +1,9 @@ - -# Author: Michael Trensch (mtren...@googlemail.com) - +# +# Hilscher NXHX 50-RE +# +# http://de.hilscher.com/products_details_hardware.html?p_id=P_483c0f582ad36bs=20 +# -#interface interface ft2232 ft2232_device_desc NXHX50-RE ft2232_layout comstick diff --git a/tcl/interface/ngxtech.cfg b/tcl/interface/ngxtech.cfg index fe9d6af..9dfe01c 100644 --- a/tcl/interface/ngxtech.cfg +++ b/tcl/interface/ngxtech.cfg @@ -1,4 +1,8 @@ +# +# NGX ARM USB JTAG +# # http://shop.ngxtechnologies.com/product_info.php?cPath=26products_id=30 +# interface ft2232 ft2232_device_desc NGX JTAG A diff --git a/tcl/interface/redbee-econotag.cfg b/tcl/interface/redbee-econotag.cfg index 2dcd027..f53261a 100644 --- a/tcl/interface/redbee-econotag.cfg +++ b/tcl/interface/redbee-econotag.cfg @@ -1,6 +1,13 @@ -# The redbee-econotag has an onboard ft2232h with -# ft2232h channel A wired to mc13224v JTAG -# ft2232h channel B wired to mc13224v UART1 +# +# Redwire Redbee-Econotag +# +# http://www.redwirellc.com/store/node/1 +# +# The Redbee-Econotag has an onboard FT2232H with: +# - FT2232H channel A wired to mc13224v JTAG +# - FT2232H channel B wired to mc13224v UART1 +# + interface ft2232 ft2232_layout redbee-econotag ft2232_vid_pid 0x0403 0x6010 diff --git a/tcl/interface/redbee-usb.cfg b/tcl/interface/redbee-usb.cfg index 8fa7b0b..e49dd56 100644 --- a/tcl/interface/redbee-usb.cfg +++ b/tcl
[Openocd-development] openocd patch: 1533d9d cfi: unsupported code paths are now covered by asserts
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/133 -- gerrit commit 1533d9d1fbb0c09e1fcc8d42a02402adaa4011ad Author: Øyvind Harboe oyvind.har...@zylin.com Date: Fri Oct 28 17:22:32 2011 +0200 cfi: unsupported code paths are now covered by asserts Change-Id: If7d7aca8514575d229ed0b17378bf8b1bbf347c4 Signed-off-by: Øyvind Harboe oyvind.har...@zylin.com diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c index f75efac..cd5b31f 100644 --- a/src/flash/nor/cfi.c +++ b/src/flash/nor/cfi.c @@ -1912,11 +1912,9 @@ static int cfi_spansion_write_block(struct flash_bank *bank, uint8_t *buffer, switch (bank-bus_width) { case 1 : - if(armv4_5_info.common_magic == ARM_COMMON_MAGIC) /* armv4_5 target */ - { - target_code_src = armv4_5_word_8_code; - target_code_size = sizeof(armv4_5_word_8_code); - } + assert(armv4_5_info.common_magic == ARM_COMMON_MAGIC); + target_code_src = armv4_5_word_8_code; + target_code_size = sizeof(armv4_5_word_8_code); break; case 2 : /* Check for DQ5 support */ @@ -1931,24 +1929,20 @@ static int cfi_spansion_write_block(struct flash_bank *bank, uint8_t *buffer, { target_code_src = armv7m_word_16_code; target_code_size = sizeof(armv7m_word_16_code); - } + } else assert(false); } else { /* No DQ5 support. Use DQ7 DATA# polling only. */ - if(armv4_5_info.common_magic == ARM_COMMON_MAGIC) // armv4_5 target - { - target_code_src = armv4_5_word_16_code_dq7only; - target_code_size = sizeof(armv4_5_word_16_code_dq7only); - } + assert(armv4_5_info.common_magic == ARM_COMMON_MAGIC); + target_code_src = armv4_5_word_16_code_dq7only; + target_code_size = sizeof(armv4_5_word_16_code_dq7only); } break; case 4 : - if(armv4_5_info.common_magic == ARM_COMMON_MAGIC) // armv4_5 target - { - target_code_src = armv4_5_word_32_code; - target_code_size = sizeof(armv4_5_word_32_code); - } + assert(armv4_5_info.common_magic == ARM_COMMON_MAGIC); + target_code_src = armv4_5_word_32_code; + target_code_size = sizeof(armv4_5_word_32_code); break; default: LOG_ERROR(Unsupported bank buswidth %d, can't do block memory writes, bank-bus_width); -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: afd5a73 * Add flash waitstate support for Atmel SAM3 chips. * Set default waitstates to 6, to workaround a silicon bug in the SAM3 family
This is an automated email from Gerrit. Attila Kinali (att...@kinali.ch) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/128 -- gerrit commit afd5a73681eec417ded58a22fbe12336acdb0563 Author: Attila Kinali att...@kinali.ch Date: Thu Oct 27 12:14:55 2011 +0200 * Add flash waitstate support for Atmel SAM3 chips. * Set default waitstates to 6, to workaround a silicon bug in the SAM3 family This code has been tested on SAM3U4, SAM3N4 and SAM3N1 based on Change-Id: I477446f9bfb3e910ea3e2414a6e9a75beb14a214 by Jim Norris u17...@att.net Change-Id: I8d360080f6968979ca5e197ad638282cadd18fb7 Signed-off-by: Attila Kinali att...@kinali.ch diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c index c46829e..b5442e8 100644 --- a/src/flash/nor/at91sam3.c +++ b/src/flash/nor/at91sam3.c @@ -183,6 +183,7 @@ struct sam3_bank_private { unsigned bank_number; uint32_t controller_address; uint32_t base_address; + uint32_t flash_wait_states; bool present; unsigned size_bytes; unsigned nsectors; @@ -298,6 +299,7 @@ static const struct sam3_chip_details all_sam3_details[] = { .bank_number = 0, .base_address = FLASH_BANK0_BASE_U, .controller_address = 0x400e0800, + .flash_wait_states = 6, // workaround silicon bug .present = 1, .size_bytes = 128 * 1024, .nsectors = 16, @@ -313,6 +315,7 @@ static const struct sam3_chip_details all_sam3_details[] = { .bank_number = 1, .base_address = FLASH_BANK1_BASE_U, .controller_address = 0x400e0a00, + .flash_wait_states = 6, // workaround silicon bug .present = 1, .size_bytes = 128 * 1024, .nsectors = 16, @@ -347,6 +350,7 @@ static const struct sam3_chip_details all_sam3_details[] = { .bank_number = 0, .base_address = FLASH_BANK0_BASE_U, .controller_address = 0x400e0800, + .flash_wait_states = 6, // workaround silicon bug .present = 1, .size_bytes = 128 * 1024, .nsectors = 16, @@ -388,6 +392,7 @@ static const struct sam3_chip_details all_sam3_details[] = { .bank_number = 0, .base_address = FLASH_BANK0_BASE_U, .controller_address = 0x400e0800, + .flash_wait_states = 6, // workaround silicon bug .present = 1, .size_bytes = 64 * 1024, .nsectors = 8, @@ -436,6 +441,7 @@ static const struct sam3_chip_details all_sam3_details[] = { .bank_number = 0, .base_address = FLASH_BANK0_BASE_U, .controller_address = 0x400e0800, + .flash_wait_states = 6, // workaround silicon bug .present = 1, .size_bytes = 128 * 1024, .nsectors = 16, @@ -450,6 +456,7 @@ static const struct sam3_chip_details all_sam3_details[] = { .bank_number = 1, .base_address = FLASH_BANK1_BASE_U, .controller_address = 0x400e0a00, + .flash_wait_states = 6, // workaround silicon bug .present = 1, .size_bytes = 128 * 1024, .nsectors = 16, @@ -484,6 +491,7 @@ static const struct sam3_chip_details all_sam3_details[] = { .bank_number = 0, .base_address = FLASH_BANK0_BASE_U, .controller_address = 0x400e0800, + .flash_wait_states = 6, // workaround silicon bug .present = 1, .size_bytes = 128 * 1024, .nsectors = 16, @@ -525,6 +533,7 @@ static const struct sam3_chip_details all_sam3_details[] = { .bank_number = 0, .base_address = FLASH_BANK0_BASE_U, .controller_address = 0x400e0800, + .flash_wait_states = 6, // workaround silicon bug .present = 1, .size_bytes = 64 * 1024, .nsectors = 8, @@ -561,8 +570,8 @@ static const struct sam3_chip_details all_sam3_details[] = { .pBank = NULL, .bank_number = 0, .base_address = FLASH_BANK_BASE_S, - .controller_address = 0x400e0a00
[Openocd-development] New patch to review for openocd: c5e0a7c clang: fix warning about missing check for return value
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/129 -- gerrit commit c5e0a7c0a539e0fcacd2fd1333dda5adfb5e60cf Author: Øyvind Harboe oyvind.har...@zylin.com Date: Thu Oct 27 19:27:04 2011 +0200 clang: fix warning about missing check for return value Change-Id: I0c6b6b8d1f0c30b6a503cb98df30584252bc0ee1 Signed-off-by: Øyvind Harboe oyvind.har...@zylin.com diff --git a/src/rtos/FreeRTOS.c b/src/rtos/FreeRTOS.c index 10a9b8c..eeab134 100644 --- a/src/rtos/FreeRTOS.c +++ b/src/rtos/FreeRTOS.c @@ -231,7 +231,8 @@ static int FreeRTOS_update_threads( struct rtos *rtos ) // Find out how many lists are needed to be read from pxReadyTasksLists, int64_t max_used_priority = 0; retval = target_read_buffer( rtos-target, rtos-symbols[FreeRTOS_VAL_uxTopUsedPriority].address, param-pointer_width, (uint8_t *)max_used_priority ); - + if (retval != ERROR_OK) + return retval; symbol_address_t* list_of_lists = (symbol_address_t *)malloc( sizeof( symbol_address_t ) * ( max_used_priority+1 + 5 ) ); -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: e043913 bugfixes: numerous bugs in error propagation found by clang
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/130 -- gerrit commit e0439139e9f1cc6d811c6f9bce49a2e36f01163e Author: Øyvind Harboe oyvind.har...@zylin.com Date: Thu Oct 27 23:51:50 2011 +0200 bugfixes: numerous bugs in error propagation found by clang Change-Id: I784068325b422d1918e28c08544bc5a1332d712f Signed-off-by: Øyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/target.c b/src/target/target.c index d4cb577..bd15620 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -1863,11 +1863,9 @@ int target_write_u8(struct target *target, uint32_t address, uint8_t value) COMMAND_HANDLER(handle_targets_command) { - struct target *target = all_targets; - if (CMD_ARGC == 1) { - target = get_target(CMD_ARGV[0]); + struct target *target = get_target(CMD_ARGV[0]); if (target == NULL) { command_print(CMD_CTX,Target: %s is unknown, try one of:\n, CMD_ARGV[0]); goto DumpTargets; @@ -1882,9 +1880,9 @@ COMMAND_HANDLER(handle_targets_command) CMD_CTX-current_target = target-target_number; return ERROR_OK; } -DumpTargets: +DumpTargets:; - target = all_targets; + struct target *target = all_targets; command_print(CMD_CTX, TargetName Type Endian TapNameState ); command_print(CMD_CTX, -- -- -- -- -- ); while (target) @@ -2190,6 +2188,8 @@ COMMAND_HANDLER(handle_reg_command) } } + assert(reg != NULL); /* give clang a hint that we *know* reg is != NULL here */ + /* display a register */ if ((CMD_ARGC == 1) || ((CMD_ARGC == 2) !((CMD_ARGV[1][0] = '0') (CMD_ARGV[1][0] = '9' { @@ -2210,6 +2210,8 @@ COMMAND_HANDLER(handle_reg_command) if (CMD_ARGC == 2) { uint8_t *buf = malloc(DIV_ROUND_UP(reg-size, 8)); + if (buf == NULL) + return ERROR_FAIL; str_to_buf(CMD_ARGV[1], strlen(CMD_ARGV[1]), buf, reg-size, 0); reg-type-set(reg, buf); @@ -3414,9 +3416,9 @@ COMMAND_HANDLER(handle_profile_command) /* hopefully it is safe to cache! We want to stop/restart as quickly as possible. */ struct reg *reg = register_get_by_name(target-reg_cache, pc, 1); + int retval = ERROR_OK; for (;;) { - int retval; target_poll(target); if (target-state == TARGET_HALTED) { @@ -3469,7 +3471,7 @@ COMMAND_HANDLER(handle_profile_command) } free(samples); - return ERROR_OK; + return retval; } static int new_int_array_element(Jim_Interp * interp, const char *varname, int idx, uint32_t val) @@ -3634,7 +3636,7 @@ static int target_mem2array(Jim_Interp *interp, struct target *target, int argc, Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); Jim_AppendStrings(interp, Jim_GetResult(interp), mem2array: cannot read memory, NULL); e = JIM_ERR; - len = 0; + break; } else { v = 0; /* shut up gcc */ for (i = 0 ;i count ;i++, n++) { @@ -3659,7 +3661,7 @@ static int target_mem2array(Jim_Interp *interp, struct target *target, int argc, Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - return JIM_OK; + return e; } static int get_int_array_element(Jim_Interp * interp, const char *varname, int idx, uint32_t *val) @@ -3844,7 +3846,7 @@ static int target_array2mem(Jim_Interp *interp, struct target *target, Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); Jim_AppendStrings(interp, Jim_GetResult(interp), array2mem: cannot read memory, NULL); e = JIM_ERR; - len = 0; + break; } } @@ -3852,7 +3854,7 @@ static int target_array2mem(Jim_Interp *interp, struct target *target, Jim_SetResult(interp, Jim_NewEmptyStringObj(interp)); - return JIM_OK; + return e; } /* FIX? should we propagate errors here rather than printing them @@ -4164,6 +4166,8 @@ static int target_configure(Jim_GetOptInfo *goi, struct target *target) free((void *)(target-variant)); } e = Jim_GetOpt_String(goi, cp, NULL); + if (e != JIM_OK) + return e; target-variant = strdup(cp
[Openocd-development] New patch to review for openocd: 6d22305 bugfixes: tinker a bit with the targets command
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/131 -- gerrit commit 6d223053e3b290678414c021b9f9da1f669d8de0 Author: Øyvind Harboe oyvind.har...@zylin.com Date: Thu Oct 27 23:51:50 2011 +0200 bugfixes: tinker a bit with the targets command return error when target can not be found instead of ERROR_OK, split fn. Change-Id: Iba5232d3862a490d0995c3bfece23685bd6856e3 Signed-off-by: Øyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/target.c b/src/target/target.c index bd15620..d28a9ca 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -1861,26 +1861,37 @@ int target_write_u8(struct target *target, uint32_t address, uint8_t value) return retval; } +static int find_target(struct command_context *cmd_ctx, const char *name) +{ +struct target *target = get_target(name); +if (target == NULL) { + LOG_ERROR(Target: %s is unknown, try one of:\n, name); + return ERROR_FAIL; +} +if (!target-tap-enabled) { + LOG_USER(Target: TAP %s is disabled, +can't be the current target\n, +target-tap-dotted_name); + return ERROR_FAIL; +} + +cmd_ctx-current_target = target-target_number; +return ERROR_OK; +} + + COMMAND_HANDLER(handle_targets_command) { + int retval = ERROR_OK; if (CMD_ARGC == 1) { - struct target *target = get_target(CMD_ARGV[0]); - if (target == NULL) { - command_print(CMD_CTX,Target: %s is unknown, try one of:\n, CMD_ARGV[0]); - goto DumpTargets; - } - if (!target-tap-enabled) { - command_print(CMD_CTX,Target: TAP %s is disabled, - can't be the current target\n, - target-tap-dotted_name); - return ERROR_FAIL; - } - - CMD_CTX-current_target = target-target_number; - return ERROR_OK; + retval = find_target(CMD_CTX, CMD_ARGV[0]); + if (retval == ERROR_OK) + { + /* we're done! */ + return retval; + } } -DumpTargets:; struct target *target = all_targets; command_print(CMD_CTX, TargetName Type Endian TapNameState ); @@ -1911,7 +1922,7 @@ DumpTargets:; target = target-next; } - return ERROR_OK; + return ERROR_FAIL; } /* every 300ms we check for reset powerdropout and issue a reset halt if so. */ -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: a6334c6 clang: fix warning about use of unitialized variable
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/126 -- gerrit commit a6334c6b1313f2bb925f48da73ff6f3c66d5bc5f Author: Øyvind Harboe oyvind.har...@zylin.com Date: Wed Oct 26 22:26:44 2011 +0200 clang: fix warning about use of unitialized variable this was a false positive, silence it. Change-Id: I432e0c466c94cf8fd6bbf0ea153c8501a8a261eb Signed-off-by: Øyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/arm_simulator.c b/src/target/arm_simulator.c index 0a34cfc..1723b43 100644 --- a/src/target/arm_simulator.c +++ b/src/target/arm_simulator.c @@ -519,7 +519,7 @@ static int arm_simulate_step_core(struct target *target, /* load register instructions */ else if ((instruction.type = ARM_LDR) (instruction.type = ARM_LDRSH)) { - uint32_t load_address = 0, modified_address = 0, load_value; + uint32_t load_address = 0, modified_address = 0, load_value = 0; uint32_t Rn = sim-get_reg_mode(sim, instruction.info.load_store.Rn); /* adjust Rn in case the PC is being read */ -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 3dec47d Remove use of undefined variable.
This is an automated email from Gerrit. Jim Norris (u17...@att.net) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/127 -- gerrit commit 3dec47dff267332a638fc8d84702d3658344a51a Author: Jim Norris u17...@att.net Date: Wed Oct 26 19:30:20 2011 -0500 Remove use of undefined variable. Change-Id: Id8fd345438c360b2a42857525f05360ce2794d21 Signed-off-by: Jim Norris u17...@att.net diff --git a/tcl/target/at91sam3nXX.cfg b/tcl/target/at91sam3nXX.cfg index 29c5ddc..5392824 100644 --- a/tcl/target/at91sam3nXX.cfg +++ b/tcl/target/at91sam3nXX.cfg @@ -18,7 +18,7 @@ if { [info exists CPUTAPID ] } { jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID set _TARGETNAME $_CHIPNAME.cpu -target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME +target create $_TARGETNAME cortex_m3 -endian little -chain-position $_TARGETNAME set _FLASHNAME $_CHIPNAME.flash flash bank flash0 at91sam3 0x0040 0 0 0 $_TARGETNAME -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 4205745 stm3220g_eval.cfg: fix CHIPNAME.
This is an automated email from Gerrit. Marti Bolivar (mboli...@leaflabs.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/120 -- gerrit commit 42057451cb8ed248d28a0ac7d7f876f84234404d Author: Marti Bolivar mboli...@leaflabs.com Date: Tue Oct 25 15:52:10 2011 -0400 stm3220g_eval.cfg: fix CHIPNAME. The STM3220G-EVAL board has an STM32F207IGH6. (...H6, not ...T6). Change-Id: Iaf3dae6830c5c0685a1dcd1588d391434bc51be7 Signed-off-by: Marti Bolivar mboli...@leaflabs.com diff --git a/tcl/board/stm3220g_eval.cfg b/tcl/board/stm3220g_eval.cfg index 48b57c1..4728432 100644 --- a/tcl/board/stm3220g_eval.cfg +++ b/tcl/board/stm3220g_eval.cfg @@ -1,4 +1,4 @@ -# STM3220G-EVAL: This is an STM32F2 eval board with a single STM32F207IGT6 +# STM3220G-EVAL: This is an STM32F2 eval board with a single STM32F207IGH6 # (128KB) chip. # http://www.st.com/internet/evalboard/product/250374.jsp @@ -6,6 +6,6 @@ set WORKAREASIZE 0x2 # chip name -set CHIPNAME STM32F207IGT6 +set CHIPNAME STM32F207IGH6 source [find target/stm32f2x.cfg] -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: c9b29a7 Add configuration file for ATMEL SAM3N series.
This is an automated email from Gerrit. Jim Norris (u17...@att.net) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/121 -- gerrit commit c9b29a7dfaae65a583024a1ab0b48cd7875f1d69 Author: Jim Norris u17...@att.net Date: Tue Oct 25 15:50:13 2011 -0500 Add configuration file for ATMEL SAM3N series. Change-Id: Id110455ad199229920e6f38807386988c341a9c0 Signed-off-by: Jim Norris u17...@att.net diff --git a/tcl/target/at91sam3nXX.cfg b/tcl/target/at91sam3nXX.cfg new file mode 100644 index 000..782d8b9 --- /dev/null +++ b/tcl/target/at91sam3nXX.cfg @@ -0,0 +1,30 @@ + +# +# Configuration for Atmel's SAM3N series +# + +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} else { + set _CHIPNAME at91sam3n +} + +if { [info exists ENDIAN] } { + set _ENDIAN $ENDIAN +} else { + set _ENDIAN little +} + +if { [info exists CPUTAPID ] } { + set _CPUTAPID $CPUTAPID +} else { + set _CPUTAPID 0x4ba00477 +} + +jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID + +set _TARGETNAME $_CHIPNAME.cpu +target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME + +set _FLASHNAME $_CHIPNAME.flash +flash bank flash0 at91sam3 0x0040 0 0 0 $_TARGETNAME -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: cc5d73e Add configuration file for ATMEL SAM3N-EK board.
This is an automated email from Gerrit. Jim Norris (u17...@att.net) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/122 -- gerrit commit cc5d73ea869503e70e7cf6ce6a30bee7bf874199 Author: Jim Norris u17...@att.net Date: Tue Oct 25 15:52:06 2011 -0500 Add configuration file for ATMEL SAM3N-EK board. Change-Id: I6def4f04b6f0a93b28f05eb6579bcaea7f76cb95 Signed-off-by: Jim Norris u17...@att.net diff --git a/tcl/board/atmel_sam3n_ek.cfg b/tcl/board/atmel_sam3n_ek.cfg new file mode 100644 index 000..2ae73eb --- /dev/null +++ b/tcl/board/atmel_sam3n_ek.cfg @@ -0,0 +1,12 @@ + +# +# Board configuration for Atmel's SAM3N-EK +# + +reset_config srst_only + +set CHIPNAME at91sam3n4c + +adapter_khz 32 + +source [find target/at91sam3nXX.cfg] -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 2d7fe5d Add flash wait state support.
This is an automated email from Gerrit. Jim Norris (u17...@att.net) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/123 -- gerrit commit 2d7fe5da261bad5008d163d472933c6603ad6505 Author: Jim Norris u17...@att.net Date: Tue Oct 25 16:05:26 2011 -0500 Add flash wait state support. Change-Id: I477446f9bfb3e910ea3e2414a6e9a75beb14a214 Signed-off-by: Jim Norris u17...@att.net diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c index c46829e..1421221 100644 --- a/src/flash/nor/at91sam3.c +++ b/src/flash/nor/at91sam3.c @@ -22,6 +22,20 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * / +/* + * Quirks ... + * + * AT91SAM3N Series Silicon (SILICON BUG - AT91SAM3N - flash wait state) + * The datasheet errate (04-Oct-2010) states for flash writes the + * flash wait state (FWS) must be set to a value of 6. It also appears + * the wait state should be set for reads as well! + * + * AT91SAM3S Series Silicon (SILICON BUG - AT91SAM3S - flash wait state) + * The datasheet errate (09-Feb-2011) states for flash writes the + * flash wait state (FWS) must be set to a value of 6. It also appears + * the wait state should be set for reads as well! + */ + /* Some of the the lower level code was based on code supplied by * ATMEL under this copyright. */ @@ -100,6 +114,11 @@ #define offset_EFC_FSR 8 #define offset_EFC_FRR 12 +typedef enum { + AT91SAM3N, + AT91SAM3S, + AT91SAM3U +} sam3_series; extern struct flash_driver at91sam3_flash; @@ -200,6 +219,7 @@ struct sam3_chip_details { // 'runtime' copy of this structure uint32_t chipid_cidr; const char *name; + sam3_series series; unsigned n_gpnvms; #define SAM3_N_NVM_BITS 3 @@ -207,6 +227,7 @@ struct sam3_chip_details { unsigned total_flash_size; unsigned total_sram_size; unsigned n_banks; + uint8_t flash_wait; #define SAM3_MAX_FLASH_BANKS 2 // these are initialized from the global const data struct sam3_bank_private bank[SAM3_MAX_FLASH_BANKS]; @@ -269,10 +290,12 @@ static const struct sam3_chip_details all_sam3_details[] = { { .chipid_cidr= 0x28100960, .name = at91sam3u4e, + .series = AT91SAM3U, .total_flash_size = 256 * 1024, .total_sram_size = 52 * 1024, .n_gpnvms = 3, .n_banks= 2, + .flash_wait = 0, // System boots at address 0x0 // gpnvm[1] = selects boot code @@ -325,10 +348,12 @@ static const struct sam3_chip_details all_sam3_details[] = { { .chipid_cidr= 0x281a0760, .name = at91sam3u2e, + .series = AT91SAM3U, .total_flash_size = 128 * 1024, .total_sram_size = 36 * 1024, .n_gpnvms = 2, .n_banks= 1, + .flash_wait = 0, // System boots at address 0x0 // gpnvm[1] = selects boot code @@ -364,10 +389,12 @@ static const struct sam3_chip_details all_sam3_details[] = { { .chipid_cidr= 0x28190560, .name = at91sam3u1e, + .series = AT91SAM3U, .total_flash_size = 64 * 1024, .total_sram_size = 20 * 1024, .n_gpnvms = 2, .n_banks= 1, + .flash_wait = 0, // System boots at address 0x0 // gpnvm[1] = selects boot code @@ -407,10 +434,12 @@ static const struct sam3_chip_details all_sam3_details[] = { { .chipid_cidr= 0x28000960, .name = at91sam3u4c, + .series = AT91SAM3U, .total_flash_size = 256 * 1024, .total_sram_size = 52 * 1024, .n_gpnvms = 3, .n_banks= 2, + .flash_wait = 0, // System boots at address 0x0 // gpnvm[1] = selects boot code @@ -462,10 +491,12 @@ static const struct sam3_chip_details all_sam3_details[] = { { .chipid_cidr= 0x280a0760, .name = at91sam3u2c, + .series = AT91SAM3U, .total_flash_size = 128 * 1024, .total_sram_size = 36 * 1024, .n_gpnvms = 2, .n_banks= 1, + .flash_wait = 0
[Openocd-development] New patch to review for openocd: 75885f4 Add configuration for ATMEL SAM3N series.
This is an automated email from Gerrit. Jim Norris (u17...@att.net) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/124 -- gerrit commit 75885f412340321dac7d89edb3edcaefe9902d18 Author: Jim Norris u17...@att.net Date: Tue Oct 25 20:48:35 2011 -0500 Add configuration for ATMEL SAM3N series. Change-Id: Iac498ab37e59127b989f29a1c4167ab29d625b05 Signed-off-by: Jim Norris u17...@att.net diff --git a/tcl/target/at91sam3nXX.cfg b/tcl/target/at91sam3nXX.cfg new file mode 100644 index 000..29c5ddc --- /dev/null +++ b/tcl/target/at91sam3nXX.cfg @@ -0,0 +1,24 @@ + +# +# Configuration for Atmel's SAM3N series +# + +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} else { + set _CHIPNAME at91sam3n +} + +if { [info exists CPUTAPID ] } { + set _CPUTAPID $CPUTAPID +} else { + set _CPUTAPID 0x4ba00477 +} + +jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID + +set _TARGETNAME $_CHIPNAME.cpu +target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME + +set _FLASHNAME $_CHIPNAME.flash +flash bank flash0 at91sam3 0x0040 0 0 0 $_TARGETNAME -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 8fe27c6 Add configuration for ATMEL SAM3N-EK board.
This is an automated email from Gerrit. Jim Norris (u17...@att.net) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/125 -- gerrit commit 8fe27c6b570eec0fc0ae92c5c880ecab8f2babc7 Author: Jim Norris u17...@att.net Date: Tue Oct 25 20:49:12 2011 -0500 Add configuration for ATMEL SAM3N-EK board. Change-Id: I525f6c346cace4e54f47659c5a7aceb29ee4baf2 Signed-off-by: Jim Norris u17...@att.net diff --git a/tcl/board/atmel_sam3n_ek.cfg b/tcl/board/atmel_sam3n_ek.cfg new file mode 100644 index 000..2ae73eb --- /dev/null +++ b/tcl/board/atmel_sam3n_ek.cfg @@ -0,0 +1,12 @@ + +# +# Board configuration for Atmel's SAM3N-EK +# + +reset_config srst_only + +set CHIPNAME at91sam3n4c + +adapter_khz 32 + +source [find target/at91sam3nXX.cfg] -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 23da86b warning: silence gcc by initializing local variables
This is an automated email from Gerrit. Øyvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/116 -- gerrit commit 23da86bf203065c8157c5985cdc9bfcb08ce9a4f Author: Øyvind Harboe oyvind.har...@zylin.com Date: Mon Oct 24 18:11:43 2011 +0200 warning: silence gcc by initializing local variables GCC doesn't understand that these are in fact initialized if they are used. Change-Id: I01988adb0547f785b48d869ddbe44cc17dca4739 Signed-off-by: Øyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c index 7f89f2e..9ea7b5a 100644 --- a/src/target/arm_adi_v5.c +++ b/src/target/arm_adi_v5.c @@ -1352,7 +1352,7 @@ static int dap_info_command(struct command_context *cmd_ctx, struct adiv5_dap *dap, int ap) { int retval; - uint32_t dbgbase, apid; + uint32_t dbgbase = 0, apid = 0; /* Silence gcc by initializing */ int romtable_present = 0; uint8_t mem_ap; uint32_t ap_old; -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 5143927 armv7m: improve error handling
This is an automated email from Gerrit. Andreas Fritiofson (andreas.fritiof...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/117 -- gerrit commit 51439275a222ebd5abd759995289689bae3d10c9 Author: Andreas Fritiofson andreas.fritiof...@gmail.com Date: Tue Oct 25 00:03:42 2011 +0200 armv7m: improve error handling Propagate errors unchanged. Free allocated working area in the error return path. Remove duplicated cleanup code by rewriting the logic. As a side-effect, fixes a scan-build warning. Change-Id: I80e3c0015be672778f916e998c8c2e4f23d7588c Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com diff --git a/src/target/armv7m.c b/src/target/armv7m.c index 39a89b9..d9e63d7 100644 --- a/src/target/armv7m.c +++ b/src/target/armv7m.c @@ -626,17 +626,16 @@ int armv7m_checksum_memory(struct target *target, uint32_t i; - if (target_alloc_working_area(target, sizeof(cortex_m3_crc_code), crc_algorithm) != ERROR_OK) - { - return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; - } + retval = target_alloc_working_area(target, sizeof(cortex_m3_crc_code), crc_algorithm); + if (retval != ERROR_OK) + return retval; /* convert flash writing code into a buffer in target endianness */ - for (i = 0; i ARRAY_SIZE(cortex_m3_crc_code); i++) - if ((retval = target_write_u16(target, crc_algorithm-address + i*sizeof(uint16_t), cortex_m3_crc_code[i])) != ERROR_OK) - { - return retval; - } + for (i = 0; i ARRAY_SIZE(cortex_m3_crc_code); i++) { + retval = target_write_u16(target, crc_algorithm-address + i*sizeof(uint16_t), cortex_m3_crc_code[i]); + if (retval != ERROR_OK) + goto cleanup; + } armv7m_info.common_magic = ARMV7M_COMMON_MAGIC; armv7m_info.core_mode = ARMV7M_MODE_ANY; @@ -649,24 +648,22 @@ int armv7m_checksum_memory(struct target *target, int timeout = 2 * (1 + (count / (1024 * 1024))); - if ((retval = target_run_algorithm(target, 0, NULL, 2, reg_params, - crc_algorithm-address, crc_algorithm-address + (sizeof(cortex_m3_crc_code)-6), timeout, armv7m_info)) != ERROR_OK) - { - LOG_ERROR(error executing cortex_m3 crc algorithm); - destroy_reg_param(reg_params[0]); - destroy_reg_param(reg_params[1]); - target_free_working_area(target, crc_algorithm); - return retval; - } + retval = target_run_algorithm(target, 0, NULL, 2, reg_params, crc_algorithm-address, + crc_algorithm-address + (sizeof(cortex_m3_crc_code) - 6), + timeout, armv7m_info); - *checksum = buf_get_u32(reg_params[0].value, 0, 32); + if (retval == ERROR_OK) + *checksum = buf_get_u32(reg_params[0].value, 0, 32); + else + LOG_ERROR(error executing cortex_m3 crc algorithm); destroy_reg_param(reg_params[0]); destroy_reg_param(reg_params[1]); +cleanup: target_free_working_area(target, crc_algorithm); - return ERROR_OK; + return retval; } /** Checks whether a memory region is zeroed. */ @@ -711,17 +708,12 @@ int armv7m_blank_check_memory(struct target *target, init_reg_param(reg_params[2], r2, 32, PARAM_IN_OUT); buf_set_u32(reg_params[2].value, 0, 32, 0xff); - if ((retval = target_run_algorithm(target, 0, NULL, 3, reg_params, - erase_check_algorithm-address, erase_check_algorithm-address + (sizeof(erase_check_code)-2), 1, armv7m_info)) != ERROR_OK) - { - destroy_reg_param(reg_params[0]); - destroy_reg_param(reg_params[1]); - destroy_reg_param(reg_params[2]); - target_free_working_area(target, erase_check_algorithm); - return 0; - } + retval = target_run_algorithm(target, 0, NULL, 3, reg_params, erase_check_algorithm-address, + erase_check_algorithm-address + (sizeof(erase_check_code) - 2), + 1, armv7m_info); - *blank = buf_get_u32(reg_params[2].value, 0, 32); + if (retval == ERROR_OK) + *blank = buf_get_u32(reg_params[2].value, 0, 32); destroy_reg_param(reg_params[0]); destroy_reg_param(reg_params[1]); @@ -729,7 +721,7 @@ int armv7m_blank_check_memory(struct target *target, target_free_working_area(target, erase_check_algorithm); - return ERROR_OK; + return retval; } int armv7m_maybe_skip_bkpt_inst(struct target *target, bool *inst_found) -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https
[Openocd-development] New patch to review for openocd: 1c43b43 armv7a: fix scan-build warnings
This is an automated email from Gerrit. Andreas Fritiofson (andreas.fritiof...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/119 -- gerrit commit 1c43b43377ed5e0e09a40b09b556b6194dc23958 Author: Andreas Fritiofson andreas.fritiof...@gmail.com Date: Tue Oct 25 00:47:21 2011 +0200 armv7a: fix scan-build warnings Value stored to 'retval' is never read: Check and propagate error Dereference of null pointer: Probably bogus, maybe triggered by the null check on armv7a, so remove the check since it can't be null anyway. Change-Id: I3bc44e52af1589ff40e6a42deda0ce7f3a25e397 Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com diff --git a/src/target/armv7a.c b/src/target/armv7a.c index d74b99b..67c563e 100644 --- a/src/target/armv7a.c +++ b/src/target/armv7a.c @@ -147,6 +147,8 @@ int armv7a_mmu_translate_va(struct target *target, uint32_t va, uint32_t *val) retval = dpm-instr_read_data_r0(dpm, ARMV4_5_MRC(15, 0, 0, 2, 0, ttb), ttb); + if (retval != ERROR_OK) + return retval; retval = armv7a-armv7a_mmu.read_physical_memory(target, (ttb 0xc000) | ((va 0xfff0) 18), 4, 1, (uint8_t*)first_lvl_descriptor); @@ -461,8 +463,6 @@ static int armv7a_l2x_cache_init(struct target *target, uint32_t base, uint32_t struct target *curr; struct armv7a_common *armv7a = target_to_armv7a(target); - if (armv7a == NULL) - LOG_ERROR(not an armv7a target); l2x_cache = calloc(1, sizeof(struct armv7a_l2x_cache)); l2x_cache-base = base; l2x_cache-way = way; @@ -616,6 +616,7 @@ int armv7a_identify_cache(struct target *target) 2, 0, /* op1, op2 */ 0, 0, /* CRn, CRm */ cache_selected); + if (retval!=ERROR_OK) goto done; /* select instruction cache*/ /* MCR p15, 2,Rd, c0, c0, 0; Write CSSELR */ /* [0] : 1 instruction cache selection , 0 data cache selection */ -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: fb14b97 tms470: removed unnecessary operations
This is an automated email from Gerrit. Anonymous Coward (edgar.grimb...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/52 -- gerrit commit fb14b9741d1200a5e3e14523c1abdf9314e2a36f Author: Edgar Grimberg edgar.grimb...@gmail.com Date: Sun Oct 23 11:39:50 2011 +0200 tms470: removed unnecessary operations This should silence a warning. Change-Id: Id91a9ebacae836083b1db2654a8e7bf24b2300e9 Signed-off-by: Edgar Grimberg edgar.grimb...@gmail.com diff --git a/src/flash/nor/tms470.c b/src/flash/nor/tms470.c index dd9ff5b..359d3aa 100644 --- a/src/flash/nor/tms470.c +++ b/src/flash/nor/tms470.c @@ -1244,13 +1244,11 @@ static int get_tms470_info(struct flash_bank *bank, char *buf, int buf_size) return ERROR_FLASH_OPERATION_FAILED; } - used += snprintf(buf, buf_size, \ntms470 information: Chip is %s\n, tms470_info-part_name); + used = snprintf(buf, buf_size, \ntms470 information: Chip is %s\n, tms470_info-part_name); buf += used; buf_size -= used; - used += snprintf(buf, buf_size, Flash protection level 2 is %s\n, tms470_check_flash_unlocked(bank-target) == ERROR_OK ? disabled : enabled); - buf += used; - buf_size -= used; + snprintf(buf, buf_size, Flash protection level 2 is %s\n, tms470_check_flash_unlocked(bank-target) == ERROR_OK ? disabled : enabled); return ERROR_OK; } -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 1b36ba1 cfg: Add interface config for BusBlaster
This is an automated email from Gerrit. Richard Barlow (rich...@richardbarlow.co.uk) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/53 -- gerrit commit 1b36ba14aeb95195664eddda8308233af36f6253 Author: Richard Barlow rich...@richardbarlow.co.uk Date: Sun Oct 23 12:50:34 2011 +0100 cfg: Add interface config for BusBlaster The BusBlaster from Dangerous Prototypes is based on the FTDI FT2232H IC. It has a CPLD between the FT2232H and the JTAG header allowing it to emulate various debugger types. It comes configured as a jtagkey compatible device. Change-Id: Iab56907bf67ded87001e628d93012f1e16287d90 Signed-off-by: Richard Barlow rich...@richardbarlow.co.uk diff --git a/tcl/interface/busblaster.cfg b/tcl/interface/busblaster.cfg new file mode 100644 index 000..6b4b429 --- /dev/null +++ b/tcl/interface/busblaster.cfg @@ -0,0 +1,15 @@ +# +# Dangerous Prototypes - Bus Blaster +# +# The Bus Blaster has a configurable buffer between the FT2232H and the JTAG +# header which allows it to emulate various debugger types. It comes +# configured as a jtagkey device. +# +# http://dangerousprototypes.com/docs/Bus_Blaster +# + +interface ft2232 +ft2232_device_desc Dual RS232-HS +ft2232_layout jtagkey +ft2232_vid_pid 0x0403 0x6010 + -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 614bd20 NOR/CORE: fix clang warning
This is an automated email from Gerrit. Antonio Borneo (borneo.anto...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/86 -- gerrit commit 614bd202d90c83cde9e1e90d280ca22b392a9add Author: Antonio Borneo borneo.anto...@gmail.com Date: Sun Oct 23 12:12:57 2011 +0800 NOR/CORE: fix clang warning The fix is inline with the Linux coding style that forbids assignment in if condition Change-Id: I10338a249bcfeff87d8596f7e17f209e26b41678 Signed-off-by: Antonio Borneo borneo.anto...@gmail.com diff --git a/src/flash/nor/core.c b/src/flash/nor/core.c index 4b5fe7d..7f40bbf 100644 --- a/src/flash/nor/core.c +++ b/src/flash/nor/core.c @@ -344,7 +344,8 @@ int default_flash_blank_check(struct flash_bank *bank) uint32_t address = bank-base + bank-sectors[i].offset; uint32_t size = bank-sectors[i].size; - if ((retval = target_blank_check_memory(target, address, size, blank)) != ERROR_OK) + retval = target_blank_check_memory(target, address, size, blank); + if (retval != ERROR_OK) { fast_check = 0; break; -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 7c966dc FLASH/CFI: fix clang warnings
This is an automated email from Gerrit. Antonio Borneo (borneo.anto...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/84 -- gerrit commit 7c966dc57e22dddcf6df16f6761d90958e4dc6f2 Author: Antonio Borneo borneo.anto...@gmail.com Date: Sun Oct 23 11:21:44 2011 +0800 FLASH/CFI: fix clang warnings Total of 5 warnings: 3x Dead store: removed dead assignment to variable; 1x Dereference of null pointer: this is not an error, but a limited visibility of clang, since pointer erase_region_info is initialized inside cfi_fixup_non_cfi(); 1x Branch condition evaluates to a garbage value: this is a real coding bug that could issue SIGSEGV, since goto cleanup can be executed before initialization of source. Change-Id: Id3c323c82bb15cbd3bb8fc04b23541f11145f109 Signed-off-by: Antonio Borneo borneo.anto...@gmail.com diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c index 5d35801..f75efac 100644 --- a/src/flash/nor/cfi.c +++ b/src/flash/nor/cfi.c @@ -768,7 +768,7 @@ static int cfi_spansion_info(struct flash_bank *bank, char *buf, int buf_size) buf += printed; buf_size -= printed; - printed = snprintf(buf, buf_size, VppMin: %u.%x, VppMax: %u.%x\n, + snprintf(buf, buf_size, VppMin: %u.%x, VppMax: %u.%x\n, (pri_ext-VppMin 0xf0) 4, pri_ext-VppMin 0x0f, (pri_ext-VppMax 0xf0) 4, pri_ext-VppMax 0x0f); @@ -802,7 +802,7 @@ static int cfi_intel_info(struct flash_bank *bank, char *buf, int buf_size) buf += printed; buf_size -= printed; - printed = snprintf(buf, buf_size, protection_fields: %i, prot_reg_addr: 0x%x, + snprintf(buf, buf_size, protection_fields: %i, prot_reg_addr: 0x%x, factory pre-programmed: %i, user programmable: %i\n, pri_ext-num_protection_fields, pri_ext-prot_reg_addr, 1 pri_ext-fact_prot_reg_size, 1 pri_ext-user_prot_reg_size); @@ -1222,7 +1222,7 @@ static int cfi_intel_write_block(struct flash_bank *bank, uint8_t *buffer, struct target *target = bank-target; struct reg_param reg_params[7]; struct arm_algorithm armv4_5_info; - struct working_area *source; + struct working_area *source = NULL; uint32_t buffer_size = 32768; uint32_t write_command_val, busy_pattern_val, error_pattern_val; @@ -2704,6 +2704,7 @@ static int cfi_probe(struct flash_bank *bank) } cfi_info-probed = 0; + cfi_info-num_erase_regions = 0; if (bank-sectors) { free(bank-sectors); @@ -3151,7 +3152,7 @@ static int get_cfi_info(struct flash_bank *bank, char *buf, int buf_size) if (cfi_info-qry[0] == 0xff) { - printed = snprintf(buf, buf_size, \ncfi flash bank not probed yet\n); + snprintf(buf, buf_size, \ncfi flash bank not probed yet\n); return ERROR_OK; } -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 31213ac SERVER: fix clang warning
This is an automated email from Gerrit. Antonio Borneo (borneo.anto...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/87 -- gerrit commit 31213ac4e572e0f515ab0fee542d4054d5de5038 Author: Antonio Borneo borneo.anto...@gmail.com Date: Sun Oct 23 12:16:26 2011 +0800 SERVER: fix clang warning The fix is inline with the Linux coding style that forbids assignment in if condition Change-Id: I0b9d0b419d9c8b7a8c755e048d5faf72d1658ba2 Signed-off-by: Antonio Borneo borneo.anto...@gmail.com diff --git a/src/server/server.c b/src/server/server.c index bb60fc5..a7fddf6 100644 --- a/src/server/server.c +++ b/src/server/server.c @@ -487,7 +487,8 @@ int server_loop(struct command_context *command_context) { if ((FD_ISSET(c-fd, read_fds)) || c-input_pending) { - if ((retval = service-input(c)) != ERROR_OK) + retval = service-input(c); + if (retval != ERROR_OK) { struct connection *next = c-next; if (service-type == CONNECTION_PIPE) -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: e6e3105 NAND/CORE: fix clang warning
This is an automated email from Gerrit. Antonio Borneo (borneo.anto...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/85 -- gerrit commit e6e3105aebd13fe1cf7312af51d375e24cde8a92 Author: Antonio Borneo borneo.anto...@gmail.com Date: Sun Oct 23 12:02:57 2011 +0800 NAND/CORE: fix clang warning The fix is inline with the Linux coding style that forbids assignment in if condition Change-Id: I42a371d6adfdf3b3fb867705211c47d89776ee2a Signed-off-by: Antonio Borneo borneo.anto...@gmail.com diff --git a/src/flash/nand/core.c b/src/flash/nand/core.c index 03deabd..d9bb7de 100644 --- a/src/flash/nand/core.c +++ b/src/flash/nand/core.c @@ -598,7 +598,8 @@ int nand_erase(struct nand_device *nand, int first_block, int last_block) return ERROR_NAND_OPERATION_TIMEOUT; } - if ((retval = nand_read_status(nand, status)) != ERROR_OK) + retval = nand_read_status(nand, status); + if (retval != ERROR_OK) { LOG_ERROR(couldn't read status); return ERROR_NAND_OPERATION_FAILED; -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 0b0da27 warning: fix false positive
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/49 -- gerrit commit 0b0da279276e47b49f002374735e0570544cf32b Author: Øyvind Harboe oyvind.har...@zylin.com Date: Sat Oct 22 08:25:00 2011 +0200 warning: fix false positive may be used uninitialized in this function [-Werror=uninitialized] Change-Id: Ida2cf8efe4e7da6fd9f669b806a20894563ac3d4 Signed-off-by: Øyvind Harboe oyvind.har...@zylin.com diff --git a/src/jtag/core.c b/src/jtag/core.c index b26701e..ad63753 100644 --- a/src/jtag/core.c +++ b/src/jtag/core.c @@ -1398,7 +1398,7 @@ int adapter_init(struct command_context *cmd_ctx) int requested_khz = jtag_get_speed_khz(); int actual_khz = requested_khz; - int jtag_speed_var; + int jtag_speed_var = 0; retval = jtag_get_speed(jtag_speed_var); if (retval != ERROR_OK) return retval; -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: b276d6e FLASH/STMSMI: fix clang dead store warning
This is an automated email from Gerrit. Antonio Borneo (borneo.anto...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/50 -- gerrit commit b276d6e9eeacf7b7c863c6212ae2a883eb0be09d Author: Antonio Borneo borneo.anto...@gmail.com Date: Sat Oct 22 19:23:10 2011 +0800 FLASH/STMSMI: fix clang dead store warning Change-Id: Icfdefdc48432db2057d3fea19dc424571d2385eb Signed-off-by: Antonio Borneo borneo.anto...@gmail.com diff --git a/src/flash/nor/stmsmi.c b/src/flash/nor/stmsmi.c index d298b36..bfec789 100644 --- a/src/flash/nor/stmsmi.c +++ b/src/flash/nor/stmsmi.c @@ -714,20 +714,17 @@ static int stmsmi_protect_check(struct flash_bank *bank) static int get_stmsmi_info(struct flash_bank *bank, char *buf, int buf_size) { struct stmsmi_flash_bank *stmsmi_info = bank-driver_priv; - int printed; if (!(stmsmi_info-probed)) { - printed = snprintf(buf, buf_size, + snprintf(buf, buf_size, \nSMI flash bank not probed yet\n); return ERROR_OK; } - printed = snprintf(buf, buf_size, \nSMI flash information:\n + snprintf(buf, buf_size, \nSMI flash information:\n Device \'%s\' (ID 0x%08x)\n, stmsmi_info-dev-name, stmsmi_info-dev-device_id); - buf += printed; - buf_size -= printed; return ERROR_OK; } -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: cb685c9 add Freescale Kinetis K40 devices and Kwikstik eval board
This is an automated email from Gerrit. Mathias K?ster (kes...@freenet.de) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/51 -- gerrit commit cb685c9f575047b8f0a4853069e775c4f0052498 Author: Mathias K kes...@freenet.de Date: Sat Oct 22 18:00:20 2011 +0200 add Freescale Kinetis K40 devices and Kwikstik eval board Change-Id: I4817921d09ab915c50f42651bc073690033450fe Signed-off-by: Mathias K kes...@freenet.de diff --git a/tcl/board/kwikstik.cfg b/tcl/board/kwikstik.cfg new file mode 100644 index 000..ed9b583 --- /dev/null +++ b/tcl/board/kwikstik.cfg @@ -0,0 +1,19 @@ +# +# Freescale KwikStik development board +# + +# +# JLINK interface is onboard +# +source [find interface/jlink.cfg] + +jtag_rclk 100 + +source [find target/k40.cfg] + +reset_config trst_and_srst + +# +# Bank definition for the 'program flash' (instructions and/or data) +# +flash bank $_CHIPNAME.pflash kinetis 0x 0x4 0 4 $_TARGETNAME diff --git a/tcl/target/k40.cfg b/tcl/target/k40.cfg new file mode 100644 index 000..9984bfc --- /dev/null +++ b/tcl/target/k40.cfg @@ -0,0 +1,35 @@ +# +# Freescale Kinetis K40 devices +# + +# +# K40 devices support both JTAG and SWD transports. +# +source [find target/swj-dp.tcl] + +if { [info exists CHIPNAME] } { +set _CHIPNAME $CHIPNAME +} else { +set _CHIPNAME k40 +} + +if { [info exists ENDIAN] } { +set _ENDIAN $ENDIAN +} else { +set _ENDIAN little +} + +if { [info exists CPUTAPID ] } { +set _CPUTAPID $CPUTAPID +} else { +set _CPUTAPID 0x4ba00477 +} + +set _TARGETNAME $_CHIPNAME.cpu + +swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID + +target create $_TARGETNAME cortex_m3 -chain-position $_CHIPNAME.cpu + +$_CHIPNAME.cpu configure -event examine-start { puts START... ; } +$_CHIPNAME.cpu configure -event examine-end { puts END... ; } -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 48bbfa4 jim: add missing jim license
This is an automated email from Gerrit. Spencer Oliver (s...@spen-soft.co.uk) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/39 -- gerrit commit 48bbfa4ea38ad0acbc64a52c40619f8dba29a9c7 Author: Spencer Oliver s...@spen-soft.co.uk Date: Fri Oct 21 09:51:21 2011 +0100 jim: add missing jim license Change-Id: Ib8e34739d92cd54655b9b47d07b856a82ff25f3c Signed-off-by: Spencer Oliver s...@spen-soft.co.uk diff --git a/src/helper/jim-nvp.c b/src/helper/jim-nvp.c index be94f15..6a78a84 100644 --- a/src/helper/jim-nvp.c +++ b/src/helper/jim-nvp.c @@ -1,3 +1,46 @@ +/* Jim - A small embeddable Tcl interpreter + * + * Copyright 2005 Salvatore Sanfilippo anti...@invece.org + * Copyright 2005 Clemens Hintze c.hin...@gmx.net + * Copyright 2005 patthoyts - Pat Thoyts pattho...@users.sf.net + * Copyright 2008 oharboe - Ãyvind Harboe - oyvind.har...@zylin.com + * Copyright 2008 Andrew Lunn and...@lunn.ch + * Copyright 2008 Duane Ellis open...@duaneellis.com + * Copyright 2008 Uwe Klein ukl...@klein-messgeraete.de + * Copyright 2008 Steve Bennett ste...@workware.net.au + * Copyright 2009 Nico Coesel ncoe...@dealogic.nl + * Copyright 2009 Zachary T Welch z...@superlucidity.net + * Copyright 2009 David Brownell + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + *copyright notice, this list of conditions and the following + *disclaimer in the documentation and/or other materials + *provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE JIM TCL PROJECT ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * JIM TCL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation + * are those of the authors and should not be interpreted as representing + * official policies, either expressed or implied, of the Jim Tcl Project. + */ + #include string.h #include jim-nvp.h diff --git a/src/helper/jim-nvp.h b/src/helper/jim-nvp.h index 12ff889..4428f5d 100644 --- a/src/helper/jim-nvp.h +++ b/src/helper/jim-nvp.h @@ -1,3 +1,46 @@ +/* Jim - A small embeddable Tcl interpreter + * + * Copyright 2005 Salvatore Sanfilippo anti...@invece.org + * Copyright 2005 Clemens Hintze c.hin...@gmx.net + * Copyright 2005 patthoyts - Pat Thoyts pattho...@users.sf.net + * Copyright 2008 oharboe - Ãyvind Harboe - oyvind.har...@zylin.com + * Copyright 2008 Andrew Lunn and...@lunn.ch + * Copyright 2008 Duane Ellis open...@duaneellis.com + * Copyright 2008 Uwe Klein ukl...@klein-messgeraete.de + * Copyright 2008 Steve Bennett ste...@workware.net.au + * Copyright 2009 Nico Coesel ncoe...@dealogic.nl + * Copyright 2009 Zachary T Welch z...@superlucidity.net + * Copyright 2009 David Brownell + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + *copyright notice, this list of conditions and the following + *disclaimer in the documentation and/or other materials + *provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE JIM TCL PROJECT ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * JIM TCL PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY
[Openocd-development] New patch to review for openocd: 7067428 Revert Evaluate 'script' in the global scope
This is an automated email from Gerrit. Freddie Chopin (freddie.cho...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/40 -- gerrit commit 70674284abe1e4106f5b06829a9f8f2f000a3977 Author: Freddie Chopin freddie.cho...@gmail.com Date: Fri Oct 21 18:20:17 2011 +0200 Revert Evaluate 'script' in the global scope This reverts commit a62d8f2271312ba955e839509590f5a5975b1b49. This caused Windows builds behave differently than before because backslash from paths got unescaped and effectively wiped out. Configs could only be passed with -f ../dir/config.cfg or -f ..\\dir\\config.cfg instead of usual -f dir/config.cfg (or using backslash) as previously. Change-Id: I13b4abac6dbe6d770cc11a4e61c9421ef340da83 Signed-off-by: Freddie Chopin freddie.cho...@gmail.com diff --git a/src/helper/startup.tcl b/src/helper/startup.tcl index e2ea27d..2e2982c 100644 --- a/src/helper/startup.tcl +++ b/src/helper/startup.tcl @@ -53,9 +53,9 @@ proc find {filename} { add_usage_text find file add_help_text find print full path to file according to OpenOCD search rules -# Find and run a script +# Run script proc script {filename} { - uplevel #0 source [find $filename] + source [find $filename] } add_help_text script filename of OpenOCD script (tcl) to run add_usage_text script file -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 7405d98 clang: fix malloc() warning with assert
This is an automated email from Gerrit. Ãyvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/41 -- gerrit commit 7405d985b1957c6dfbde3cdf5842bfad914f2873 Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Fri Oct 21 19:00:09 2011 +0200 clang: fix malloc() warning with assert Change-Id: I989d2655622a9f11f4a0a2994014e42822587ecd Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c index 3b2f83b..468edf5 100644 --- a/src/jtag/tcl.c +++ b/src/jtag/tcl.c @@ -172,6 +172,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args } num_fields = (argc-2)/2; + assert(num_fields 0); fields = malloc(sizeof(struct scan_field) * num_fields); for (i = 2; i argc; i += 2) { diff --git a/src/target/image.c b/src/target/image.c index 21ce11f..8f437c0 100644 --- a/src/target/image.c +++ b/src/target/image.c @@ -473,6 +473,8 @@ static int image_elf_read_headers(struct image *image) if ((field32(elf, elf-segments[i].p_type) == PT_LOAD) (field32(elf, elf-segments[i].p_filesz) != 0)) image-num_sections++; + assert(image-num_sections 0); + /** * some ELF linkers produce binaries with *all* the program header * p_paddr fields zero (there can be however one loadable segment -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: d5d891e clang: fix warning w/assert so that clang knows that there will be no division by zero
This is an automated email from Gerrit. Ãyvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/42 -- gerrit commit d5d891eaeff5c4484b2858e90ece1f2ce312c097 Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Fri Oct 21 19:14:57 2011 +0200 clang: fix warning w/assert so that clang knows that there will be no division by zero Change-Id: I98ac62a22f21043bb535a667a4f1f1537ccde2a4 Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/target.c b/src/target/target.c index b68eee3..d4cb577 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -3317,7 +3317,8 @@ static void writeGmon(uint32_t *samples, uint32_t sampleNum, const char *filenam } } - int addressSpace = (max-min + 1); + int addressSpace = (max - min + 1); + assert(addressSpace = 2); static const uint32_t maxBuckets = 16 * 1024; /* maximum buckets. */ uint32_t length = addressSpace; -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 2f7714a buspirate: ignore return value and fix warning
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/43 -- gerrit commit 2f7714a90cdb829a7a5d4f7596b189728ba0ac8d Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Sat Oct 22 00:40:51 2011 +0200 buspirate: ignore return value and fix warning Perhaps we could do one better and propagate the error? Change-Id: Idc45f516c26f09de4ee01fe05e8d3475f4b80db3 Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/jtag/drivers/buspirate.c b/src/jtag/drivers/buspirate.c index 62ab008..3a368eb 100644 --- a/src/jtag/drivers/buspirate.c +++ b/src/jtag/drivers/buspirate.c @@ -757,13 +757,13 @@ static void buspirate_jtag_enable(int fd) static void buspirate_jtag_reset(int fd) { - int ret; char tmp[5]; tmp[0] = 0x00; /* exit OCD1 mode */ buspirate_serial_write(fd, tmp, 1); usleep(1); - ret = buspirate_serial_read(fd, tmp, 5); + /* We ignore the return value here purposly, nothing we can do */ + buspirate_serial_read(fd, tmp, 5); if (strncmp(tmp, BBIO1, 5) == 0) { tmp[0] = 0x0F; /* reset BP */ buspirate_serial_write(fd, tmp, 1); -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: d1857ad tms470: remove dead assignment warning
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/45 -- gerrit commit d1857ad1f392b5e700d9d977ab65d827204f6957 Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Sat Oct 22 01:06:26 2011 +0200 tms470: remove dead assignment warning Change-Id: I21e7ac47f80d93c9c0d7b169f8848b929c664b20 Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/flash/nor/tms470.c b/src/flash/nor/tms470.c index dd9ff5b..f497b38 100644 --- a/src/flash/nor/tms470.c +++ b/src/flash/nor/tms470.c @@ -1248,9 +1248,7 @@ static int get_tms470_info(struct flash_bank *bank, char *buf, int buf_size) buf += used; buf_size -= used; - used += snprintf(buf, buf_size, Flash protection level 2 is %s\n, tms470_check_flash_unlocked(bank-target) == ERROR_OK ? disabled : enabled); - buf += used; - buf_size -= used; + snprintf(buf, buf_size, Flash protection level 2 is %s\n, tms470_check_flash_unlocked(bank-target) == ERROR_OK ? disabled : enabled); return ERROR_OK; } -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: f6522f3 fm3: fix warning for superfluous assignment
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/46 -- gerrit commit f6522f3799e861bb06eec8aae41e27892fbbce13 Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Sat Oct 22 01:08:16 2011 +0200 fm3: fix warning for superfluous assignment Change-Id: I4f8e8c2e676a2728ddc6227daf9ca6a7ceb3d505 Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/flash/nor/fm3.c b/src/flash/nor/fm3.c index 1e2adf5..e852589 100644 --- a/src/flash/nor/fm3.c +++ b/src/flash/nor/fm3.c @@ -643,7 +643,6 @@ static int fm3_probe(struct flash_bank *bank) bank-sectors = malloc(sizeof(struct flash_sector) * num_pages); bank-base = 0x; - num_pages = 2; /* start with smallest Flash pages number */ bank-size = 32 * 1024; /* bytes */ bank-sectors[0].offset = 0; -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 22d28c0 kinetis: fix warning about malloc(0) w/assert
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/47 -- gerrit commit 22d28c08fc5f0d8ef9a87dd5c9588a6e027b54b0 Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Sat Oct 22 01:09:32 2011 +0200 kinetis: fix warning about malloc(0) w/assert Change-Id: Ib40204675bfc5429c744f9ed7e2f7098384b753d Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/flash/nor/kinetis.c b/src/flash/nor/kinetis.c index 2613522..ecc60be 100644 --- a/src/flash/nor/kinetis.c +++ b/src/flash/nor/kinetis.c @@ -467,6 +467,7 @@ static int kinetis_probe(struct flash_bank *bank) } bank-num_sectors = bank-size / (2 * 1024); + assert(bank-num_sectors 0); bank-sectors = malloc(sizeof(struct flash_sector) * bank-num_sectors); for (i = 0; i bank-num_sectors; i++) { -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: d42e353 mx2: add error propagation and remove warnings
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/48 -- gerrit commit d42e3535a11b2ce1dc705e9a5a273c9f75f1829a Author: Ãyvind Harboe oyvind.har...@zylin.com Date: Sat Oct 22 01:11:58 2011 +0200 mx2: add error propagation and remove warnings Change-Id: Idd4fb452790e5d7921a749679dbd865586e5a4a9 Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/flash/nand/mx2.c b/src/flash/nand/mx2.c index 77ae138..6c3c550 100644 --- a/src/flash/nand/mx2.c +++ b/src/flash/nand/mx2.c @@ -501,15 +501,20 @@ static int imx27_read_page(struct nand_device *nand, uint32_t page, return retval; } /* Reset address_cycles before imx27_command ?? */ - retval = ERROR_OK; - retval |= imx27_command(nand, NAND_CMD_READ0); - - retval |= imx27_address(nand, 0); //col - retval |= imx27_address(nand, 0); //col - retval |= imx27_address(nand, page 0xff); //page address - retval |= imx27_address(nand, (page 8) 0xff); //page address - retval |= imx27_address(nand, (page 16) 0xff); //page address - retval |= imx27_command(nand, NAND_CMD_READSTART); + retval = imx27_command(nand, NAND_CMD_READ0); + if (retval != ERROR_OK) return retval; + retval = imx27_address(nand, 0); //col + if (retval != ERROR_OK) return retval; + retval = imx27_address(nand, 0); //col + if (retval != ERROR_OK) return retval; + retval = imx27_address(nand, page 0xff); //page address + if (retval != ERROR_OK) return retval; + retval = imx27_address(nand, (page 8) 0xff); //page address + if (retval != ERROR_OK) return retval; + retval = imx27_address(nand, (page 16) 0xff); //page address + if (retval != ERROR_OK) return retval; + retval = imx27_command(nand, NAND_CMD_READSTART); + if (retval != ERROR_OK) return retval; target_write_u16(target, MX2_NF_BUFADDR, 0); mx2_nf_info-fin = MX2_NF_FIN_DATAOUT; -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: d889fd9 Unused variables
This is an automated email from Gerrit. Freddie Chopin (freddie.cho...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/36 -- gerrit commit d889fd9c01e8e1bc4af31141f126c44c3f26bca9 Author: Freddie Chopin freddie.cho...@gmail.com Date: Wed Oct 19 21:40:48 2011 +0200 Unused variables Fix a few errors with set and unused variables detected by GCC 4.7.0 Change-Id: I59b748e18e514ee9f0cde7883b4ed5116198bd4a Signed-off-by: Freddie Chopin freddie.cho...@gmail.com diff --git a/src/target/armv7a.c b/src/target/armv7a.c index e0d0882..0bac27f 100644 --- a/src/target/armv7a.c +++ b/src/target/armv7a.c @@ -129,7 +129,6 @@ int armv7a_mmu_translate_va(struct target *target, uint32_t va, uint32_t *val) uint32_t first_lvl_descriptor = 0x0; uint32_t second_lvl_descriptor = 0x0; int retval; - uint32_t cb; struct armv7a_common *armv7a = target_to_armv7a(target); struct arm_dpm *dpm = armv7a-armv4_5_common.dpm; uint32_t ttb = 0; /* default ttb0 */ @@ -168,7 +167,6 @@ int armv7a_mmu_translate_va(struct target *target, uint32_t va, uint32_t *val) if ((first_lvl_descriptor 0x3) == 2) { /* section descriptor */ - cb = (first_lvl_descriptor 0xc) 2; *val = (first_lvl_descriptor 0xfff0) | (va 0x000f); return ERROR_OK; } @@ -203,9 +201,6 @@ int armv7a_mmu_translate_va(struct target *target, uint32_t va, uint32_t *val) return ERROR_TARGET_TRANSLATION_FAULT; } - /* cacheable/bufferable is always specified in bits 3-2 */ - cb = (second_lvl_descriptor 0xc) 2; - if ((second_lvl_descriptor 0x3) == 1) { /* large page descriptor */ @@ -243,7 +238,7 @@ int armv7a_mmu_translate_va_pa(struct target *target, uint32_t va, struct armv7a_common *armv7a = target_to_armv7a(target); struct arm_dpm *dpm = armv7a-armv4_5_common.dpm; uint32_t virt = va ~0xfff; - uint32_t NOS,NS,SH,INNER,OUTER; + uint32_t NOS,NS,INNER,OUTER; *val = 0xdeadbeef; retval = dpm-prepare(dpm); if (retval != ERROR_OK) @@ -260,7 +255,6 @@ int armv7a_mmu_translate_va_pa(struct target *target, uint32_t va, /* decode memory attribute */ NOS = (*val 10) 1; /* Not Outer shareable */ NS = (*val 9) 1; /* Non secure */ - SH = (*val 7 ) 1; /* shareable */ INNER = (*val 4) 0x7; OUTER = (*val 2) 0x3; @@ -726,7 +720,6 @@ done: int armv7a_init_arch_info(struct target *target, struct armv7a_common *armv7a) { - struct armv7a_common *again; struct arm *armv4_5 = armv7a-armv4_5_common; armv4_5-arch_info = armv7a; target-arch_info = armv7a-armv4_5_common; @@ -738,7 +731,6 @@ int armv7a_init_arch_info(struct target *target, struct armv7a_common *armv7a) armv7a-armv7a_mmu.armv7a_cache.ctype = -1; armv7a-armv7a_mmu.armv7a_cache.flush_all_data_cache = NULL; armv7a-armv7a_mmu.armv7a_cache.display_cache_info = NULL; -again =target_to_armv7a(target); return ERROR_OK; } diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c index 7547f17..2370d95 100755 --- a/src/target/cortex_a.c +++ b/src/target/cortex_a.c @@ -92,7 +92,7 @@ static int cortex_a8_restore_cp15_control_reg(struct target* target) 1, 0, /* CRn, CRm */ cortex_a8-cp15_control_reg); } - return ERROR_OK; + return retval; } /* check address before cortex_a8_apb read write access with mmu on -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 4d01a6e rtos: return the correct value if the T or H packets are handled
This is an automated email from Gerrit. Andreas Fritiofson (andreas.fritiof...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/38 -- gerrit commit 4d01a6eafd90b6b0af2ad205c55d87ef66df15ce Author: Andreas Fritiofson andreas.fritiof...@gmail.com Date: Thu Oct 20 00:25:08 2011 +0200 rtos: return the correct value if the T or H packets are handled Change-Id: Iea31e20ee4e35c1a9cb7b93424c92b3f38081067 Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index 73e2d29..8a59fd3 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -406,6 +406,7 @@ int gdb_thread_packet(struct connection *connection, char *packet, int packet_si } else { gdb_put_packet(connection, E01, 3); // thread not found } + return ERROR_OK; } else if ( packet[0] == 'H') // Set current thread ( 'c' for step and continue, 'g' for all other operations ) { @@ -414,6 +415,7 @@ int gdb_thread_packet(struct connection *connection, char *packet, int packet_si sscanf(packet, Hg%16 SCNx64, current_threadid); } gdb_put_packet(connection, OK, 2); + return ERROR_OK; } return GDB_THREAD_PACKET_NOT_CONSUMED; -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: a2b8874 rtos: remove broken code for handling the deprecated qP packet
This is an automated email from Gerrit. Andreas Fritiofson (andreas.fritiof...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/37 -- gerrit commit a2b8874f55b71a6318fa9447193d62231c53da9a Author: Andreas Fritiofson andreas.fritiof...@gmail.com Date: Thu Oct 20 00:21:33 2011 +0200 rtos: remove broken code for handling the deprecated qP packet Change-Id: Icca522c1e2a2877abb20665b171c61079b1d8f48 Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index 74e8724..73e2d29 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -132,91 +132,7 @@ int gdb_thread_packet(struct connection *connection, char *packet, int packet_si { struct target *target = get_target_from_connection(connection); - if (strstr(packet, qP)) - { - #define TAG_THREADID 1 /* Echo the thread identifier */ - #define TAG_EXISTS 2/* Is this process defined enough to - fetch registers and its stack */ - #define TAG_DISPLAY 4 /* A short thing maybe to put on a window */ - #define TAG_THREADNAME 8/* string, maps 1-to-1 with a thread is */ - #define TAG_MOREDISPLAY 16 /* Whatever the kernel wants to say about */ - - // TODO: need to scanf the mode variable (or it with the tags), and the threadid - - unsigned long mode; - threadid_t threadid = 0; - struct thread_detail* detail; - sscanf(packet, qP%8lx%16 SCNx64, mode, threadid); - - - int found = -1; - - if ((target-rtos != NULL) (target-rtos-thread_details - != NULL)) { - int thread_num; - for (thread_num = 0; thread_num -target-rtos-thread_count; thread_num++) { - if (target-rtos-thread_details[thread_num].threadid - == threadid) { - if (target-rtos-thread_details[thread_num].exists) { - found = thread_num; - } - } - } - } - if (found == -1) { - gdb_put_packet(connection, E01, 3); // thread not found - return ERROR_OK; - } - - detail = target-rtos-thread_details[found]; - - if ( detail-display_str != NULL ) - { - mode = TAG_DISPLAY; - } - if ( detail-thread_name_str != NULL ) - { - mode = TAG_THREADNAME; - } - if ( detail-extra_info_str != NULL ) - { - mode = TAG_MOREDISPLAY; - } - - - mode = TAG_THREADID | TAG_EXISTS; - - char thread_str[1000]; - - sprintf(thread_str, %08lx, mode); - sprintf(thread_str, %016 PRIx64, threadid); - - - if (mode TAG_THREADID) { - sprintf(thread_str, %08 PRIx32 10%016 PRIx64, TAG_THREADID, threadid); - } - if (mode TAG_EXISTS) { - sprintf(thread_str, %08 PRIx32 08%08 PRIx32, TAG_EXISTS, (detail-exists==true)?1:0); - } - if (mode TAG_DISPLAY) { - sprintf(thread_str, %08 PRIx32 %02x%s, TAG_DISPLAY, (unsigned char)strlen(detail-display_str), detail-display_str ); - } - if (mode TAG_MOREDISPLAY) { - sprintf(thread_str, %08 PRIx32 %02x%s, TAG_MOREDISPLAY, (unsigned char)strlen(detail-extra_info_str), detail-extra_info_str ); - } - if (mode TAG_THREADNAME) { - sprintf(thread_str, %08 PRIx32 %02x%s, TAG_THREADNAME, (unsigned char)strlen(detail-thread_name_str), detail-thread_name_str ); - } - - //gdb_put_packet(connection, tmpstr, sizeof(tmpstr)-1); - gdb_put_packet(connection, thread_str, strlen(thread_str)); - - // gdb_put_packet(connection, , 0); - // gdb_put_packet(connection, OK, 2); // all threads alive - return ERROR_OK; - } - else if (strstr(packet, qThreadExtraInfo,)) + if (strstr(packet, qThreadExtraInfo,)) { if ((target-rtos != NULL) (target-rtos-thread_details != NULL) (target-rtos-thread_count != 0)) { -- ___ Openocd-development mailing list Openocd-development
[Openocd-development] New patch to review for openocd: cc362b6 xscale: fix bug in xscale_receive()
This is an automated email from Gerrit. ?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/32 -- gerrit commit cc362b6a38d9eaa1d30af13cdf2cb6fe1bb042a5 Author: Matt Reimer mrei...@sdgsystems.com Date: Mon Sep 19 10:30:13 2011 -0400 xscale: fix bug in xscale_receive() The code in xscale_receive() that tries to skip invalid reads (i.e. reads that don't have the DBG_SR[0] 'valid' bit set) seems to be wrong, as it only looks at the first word's valid flag rather than each word's own valid flag. Am I reading the code correctly? If so, the attached patch should fix it. If this looks correct, I'll generate a proper patch and commit message. Matt Change-Id: I74ebe2ad7a36d340a9dd3b8487578b6ea7f3cf1e Signed-off-by: Ãyvind Harboe oyvind.har...@zylin.com diff --git a/src/target/xscale.c b/src/target/xscale.c index 3b56745..b469b86 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -317,7 +317,7 @@ static int xscale_receive(struct target *target, uint32_t *buffer, int num_words /* examine results */ for (i = words_done; i num_words; i++) { - if (!(field0[0] 1)) + if (!(field0[i] 1)) { /* move backwards if necessary */ int j; -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 2ce508b jlink libusb1 driver with libusb1 common driver interface.
This is an automated email from Gerrit. Mauro Gamba (maurill...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/33 -- gerrit commit 2ce508b63db8e59caec36e7b28f5847d91f7cd35 Author: Mauro Gamba maurill...@gmail.com Date: Mon Oct 17 22:44:31 2011 +0200 jlink libusb1 driver with libusb1 common driver interface. It add a libusb1 common interface useful for other driver. Change-Id: I7eb045d4e2bd553abefad53f3f4023ff46b0f5f6 Signed-off-by: Mauro Gamba maurill...@gmail.com diff --git a/configure.ac b/configure.ac index d0386bc..f39e43b 100644 --- a/configure.ac +++ b/configure.ac @@ -1052,7 +1052,7 @@ fi # check for usb.h when a driver will require it build_usb=no -if test $build_jlink = yes -o $build_vsllink = yes -o $build_usbprog = yes -o \ +if test -o $build_vsllink = yes -o $build_usbprog = yes -o \ $build_rlink = yes -o $build_ulink = yes -o $build_armjtagew = yes then AC_CHECK_HEADERS([usb.h],[], @@ -1060,6 +1060,16 @@ then build_usb=yes fi +# check for libusb.h when a driver will require it +build_libusb=no +if test $build_jlink = yes +then + AC_CHECK_HEADERS([libusb-1.0/libusb.h],[], + [AC_MSG_ERROR([libusb.h is required to build some OpenOCD driver(s)])]) + build_libusb=yes +fi + + AM_CONDITIONAL(RELEASE, test $build_release = yes) AM_CONDITIONAL(PARPORT, test $build_parport = yes) AM_CONDITIONAL(DUMMY, test $build_dummy = yes) @@ -1089,6 +1099,7 @@ AM_CONDITIONAL(ARMJTAGEW, test $build_armjtagew = yes) AM_CONDITIONAL(REMOTE_BITBANG, test $build_remote_bitbang = yes) AM_CONDITIONAL(BUSPIRATE, test $build_buspirate = yes) AM_CONDITIONAL(USB, test $build_usb = yes) +AM_CONDITIONAL(USB1, test $build_libusb = yes) AM_CONDITIONAL(IS_CYGWIN, test $is_cygwin = yes) AM_CONDITIONAL(IS_MINGW, test $is_mingw = yes) AM_CONDITIONAL(IS_WIN32, test $is_win32 = yes) diff --git a/src/Makefile.am b/src/Makefile.am index 8375683..94d81c2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -84,9 +84,6 @@ endif if USBPROG LIBUSB = -lusb else -if JLINK -LIBUSB = -lusb -else if RLINK LIBUSB = -lusb else @@ -101,6 +98,11 @@ endif endif endif endif + +if JLINK +LIBUSB1 = -lusb-1.0 +else +LIBUSB1 = endif libopenocd_la_LIBADD = \ @@ -114,7 +116,7 @@ libopenocd_la_LIBADD = \ $(top_builddir)/src/server/libserver.la \ $(top_builddir)/src/rtos/librtos.la \ $(top_builddir)/src/helper/libhelper.la \ - $(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB) + $(FTDI2232LIB) $(MINGWLDADD) $(LIBUSB) $(LIBUSB1) STARTUP_TCL_SRCS = \ $(srcdir)/helper/startup.tcl \ diff --git a/src/jtag/drivers/Makefile.am b/src/jtag/drivers/Makefile.am index 408ea81..7842e84 100644 --- a/src/jtag/drivers/Makefile.am +++ b/src/jtag/drivers/Makefile.am @@ -20,6 +20,10 @@ if USB DRIVERFILES += usb_common.c endif +if USB1 +DRIVERFILES += libusb_common.c +endif + if BITBANG DRIVERFILES += bitbang.c endif @@ -93,6 +97,7 @@ noinst_HEADERS = \ rlink_dtc_cmd.h \ rlink_ep1_cmd.h \ rlink_st7.h \ - usb_common.h + usb_common.h \ + libusb_common.h MAINTAINERCLEANFILES = $(srcdir)/Makefile.in diff --git a/src/jtag/drivers/jlink.c b/src/jtag/drivers/jlink.c index adaa640..d59c052 100644 --- a/src/jtag/drivers/jlink.c +++ b/src/jtag/drivers/jlink.c @@ -30,7 +30,7 @@ #include jtag/interface.h #include jtag/commands.h -#include usb_common.h +#include libusb_common.h /* See Segger's public documentation: * Reference manual for J-Link USB Protocol @@ -50,7 +50,7 @@ http://www.segger.com/cms/admin/uploads/productDocs/RM08001_JLinkUSBProtocol.pdf #define PID 0x0101, 0x0102, 0x0103, 0x0104 #define JLINK_WRITE_ENDPOINT 0x02 -#define JLINK_READ_ENDPOINT0x81 +#define JLINK_READ_ENDPOINT0x81 static unsigned int jlink_write_ep = JLINK_WRITE_ENDPOINT; static unsigned int jlink_read_ep = JLINK_READ_ENDPOINT; @@ -199,7 +199,7 @@ static void jlink_tap_append_scan(int length, uint8_t *buffer, /* Jlink lowlevel functions */ struct jlink { - struct usb_dev_handle* usb_handle; + struct libusb_device_handle* usb_handle; }; static struct jlink *jlink_usb_open(void); @@ -1407,10 +1407,11 @@ static int jlink_tap_execute(void) static struct jlink* jlink_usb_open() { - usb_init(); - - struct usb_dev_handle *dev; - if (jtag_usb_open(vids, pids, dev) != ERROR_OK) + libusb_device_handle *devh; + libusb_device *dev; + struct libusb_config_descriptor *config; + + if (jtag_libusb_open(vids, pids, devh) != ERROR_OK) return NULL; /* BE ***VERY CAREFUL*** ABOUT MAKING CHANGES IN THIS @@ -1426,7 +1427,7 @@ static struct jlink* jlink_usb_open() #if IS_WIN32 == 0 - usb_reset(dev); + libusb_reset_device(devh); #if IS_DARWIN == 0 @@ -1434,7 +1435,7 @@ static struct jlink* jlink_usb_open() /* reopen jlink after usb_reset * on win32
[Openocd-development] New patch to review for openocd: bc144f4 Toshiba TMPA900 config: Fix incorrect working area.
This is an automated email from Gerrit. Uwe Hermann (u...@hermann-uwe.de) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/34 -- gerrit commit bc144f4ff2d4564bb6528755f5a32313fd5617e1 Author: Uwe Hermann u...@hermann-uwe.de Date: Wed Oct 19 01:09:44 2011 +0200 Toshiba TMPA900 config: Fix incorrect working area. The Toshiba TMPA900 series (TMPA900/901) only has internal RAM regions RAM-0 (16kB) and RAM-1 (8kB) which we can use as working area. This is probably a copy-paste error from tmpa910.cfg, which has the correct values and sizes for the TMPA910 series (TMPA910/911/912/913): there are RAM-0, RAM-1, and RAM-2 (each 16kB). Also, change built-in RAM to internal RAM to match what the datasheet uses. Change-Id: I993cd6b7fadc28cf34e5cc18426bb2bb42597670 Signed-off-by: Uwe Hermann u...@hermann-uwe.de diff --git a/tcl/target/tmpa900.cfg b/tcl/target/tmpa900.cfg index d5b458f..90851f6 100644 --- a/tcl/target/tmpa900.cfg +++ b/tcl/target/tmpa900.cfg @@ -42,15 +42,9 @@ jtag_ntrst_delay 20 set _TARGETNAME $_CHIPNAME.cpu target create $_TARGETNAME arm926ejs -endian $_ENDIAN -chain-position $_TARGETNAME -# built-in RAM0 -#working_area 0 0xf8004000 0x4000 nobackup -# built-in RAM1 -#working_area 1 0xf8008000 0x4000 nobackup -# built-in RAM2 -#working_area 2 0xf800c000 0x4000 nobackup -# built-in RAM 0-2 48k total -#working_area 0 0xf8004000 0xc000 nobackup - -# Internal sram1 memory -$_TARGETNAME configure -work-area-phys 0xf8004000 -work-area-size 0x8000 \ +# Internal RAM-0 (16kB): 0xf8004000 +# Internal RAM-1 (8kB): 0xf8008000 + +# Use internal RAM-0 and RAM-1 as working area (24kB total). +$_TARGETNAME configure -work-area-phys 0xf8004000 -work-area-size 0x6000 \ -work-area-backup 0 diff --git a/tcl/target/tmpa910.cfg b/tcl/target/tmpa910.cfg index fa6f87b..36874d9 100644 --- a/tcl/target/tmpa910.cfg +++ b/tcl/target/tmpa910.cfg @@ -42,15 +42,10 @@ jtag_ntrst_delay 20 set _TARGETNAME $_CHIPNAME.cpu target create $_TARGETNAME arm926ejs -endian $_ENDIAN -chain-position $_TARGETNAME -# built-in RAM0 -#working_area 0 0xf8004000 0x4000 nobackup -# built-in RAM1 -#working_area 1 0xf8008000 0x4000 nobackup -# built-in RAM2 -#working_area 2 0xf800c000 0x4000 nobackup -# built-in RAM 0-2 48k total -#working_area 0 0xf8004000 0xc000 nobackup - -# Internal sram1 memory +# Internal RAM-0 (16kB): 0xf8004000 +# Internal RAM-1 (16kB): 0xf8008000 +# Internal RAM-2 (16kB): 0xf800c000 + +# Use internal RAM-0, RAM-1, and RAM-2 as working area (48kB total). $_TARGETNAME configure -work-area-phys 0xf8004000 -work-area-size 0xc000 \ -work-area-backup 0 -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: a756b1b TMPA900/910 MCUs are always little endian.
This is an automated email from Gerrit. Uwe Hermann (u...@hermann-uwe.de) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/35 -- gerrit commit a756b1bcdffef34a6d60d7a2706da9574663f544 Author: Uwe Hermann u...@hermann-uwe.de Date: Wed Oct 19 01:54:25 2011 +0200 TMPA900/910 MCUs are always little endian. Signed-off-by: Uwe Hermann u...@hermann-uwe.de Change-Id: I8839f2cf0faf1b5ba9f99901c5ee028b199fabd2 diff --git a/tcl/target/tmpa900.cfg b/tcl/target/tmpa900.cfg index 90851f6..cfb445e 100644 --- a/tcl/target/tmpa900.cfg +++ b/tcl/target/tmpa900.cfg @@ -8,11 +8,8 @@ if { [info exists CHIPNAME] } { set _CHIPNAME tmpa900 } -if { [info exists ENDIAN] } { - set _ENDIAN $ENDIAN -} else { - set _ENDIAN little -} +# Toshiba TMPA900 series MCUs are always little endian as per datasheet. +set _ENDIAN little if { [info exists CPUTAPID ] } { set _CPUTAPID $CPUTAPID diff --git a/tcl/target/tmpa910.cfg b/tcl/target/tmpa910.cfg index 36874d9..4d4d3fc 100644 --- a/tcl/target/tmpa910.cfg +++ b/tcl/target/tmpa910.cfg @@ -8,11 +8,8 @@ if { [info exists CHIPNAME] } { set _CHIPNAME tmpa910 } -if { [info exists ENDIAN] } { - set _ENDIAN $ENDIAN -} else { - set _ENDIAN little -} +# Toshiba TMPA910 series MCUs are always little endian as per datasheet. +set _ENDIAN little if { [info exists CPUTAPID ] } { set _CPUTAPID $CPUTAPID -- ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development
[Openocd-development] New patch to review for openocd: 7b54c46 luminary: add peripheral reset script
This is an automated email from Gerrit. Spencer Oliver (s...@spen-soft.co.uk) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/30 -- gerrit commit 7b54c467d52cca17d62c40e15a063437be647605 Author: Spencer Oliver s...@spen-soft.co.uk Date: Mon Oct 17 22:04:21 2011 +0100 luminary: add peripheral reset script some luminary device classes require a reset script to emulate a hardware reset. Change-Id: Id505c92451244b48b0238c2130aebab2df8d208b Signed-off-by: Spencer Oliver s...@spen-soft.co.uk diff --git a/tcl/chip/ti/lm3s/lm3s.tcl b/tcl/chip/ti/lm3s/lm3s.tcl new file mode 100644 index 000..42da8c6 --- /dev/null +++ b/tcl/chip/ti/lm3s/lm3s.tcl @@ -0,0 +1 @@ +source [find chip/ti/lm3s/lm3s_regs.tcl] diff --git a/tcl/chip/ti/lm3s/lm3s_regs.tcl b/tcl/chip/ti/lm3s/lm3s_regs.tcl new file mode 100644 index 000..cb20812 --- /dev/null +++ b/tcl/chip/ti/lm3s/lm3s_regs.tcl @@ -0,0 +1,84 @@ +#* +# +# The following are defines for the System Control register addresses. +# +#* + +set SYSCTL_DID0 0x400FE000 ;# Device Identification 0 +set SYSCTL_DID1 0x400FE004 ;# Device Identification 1 +set SYSCTL_DC0 0x400FE008 ;# Device Capabilities 0 +set SYSCTL_DC1 0x400FE010 ;# Device Capabilities 1 +set SYSCTL_DC2 0x400FE014 ;# Device Capabilities 2 +set SYSCTL_DC3 0x400FE018 ;# Device Capabilities 3 +set SYSCTL_DC4 0x400FE01C ;# Device Capabilities 4 +set SYSCTL_DC5 0x400FE020 ;# Device Capabilities 5 +set SYSCTL_DC6 0x400FE024 ;# Device Capabilities 6 +set SYSCTL_DC7 0x400FE028 ;# Device Capabilities 7 +set SYSCTL_DC8 0x400FE02C ;# Device Capabilities 8 ADC +;# Channels +set SYSCTL_PBORCTL 0x400FE030 ;# Brown-Out Reset Control +set SYSCTL_LDOPCTL 0x400FE034 ;# LDO Power Control +set SYSCTL_SRCR00x400FE040 ;# Software Reset Control 0 +set SYSCTL_SRCR10x400FE044 ;# Software Reset Control 1 +set SYSCTL_SRCR20x400FE048 ;# Software Reset Control 2 +set SYSCTL_RIS 0x400FE050 ;# Raw Interrupt Status +set SYSCTL_IMC 0x400FE054 ;# Interrupt Mask Control +set SYSCTL_MISC 0x400FE058 ;# Masked Interrupt Status and +;# Clear +set SYSCTL_RESC 0x400FE05C ;# Reset Cause +set SYSCTL_RCC 0x400FE060 ;# Run-Mode Clock Configuration +set SYSCTL_PLLCFG 0x400FE064 ;# XTAL to PLL Translation +set SYSCTL_GPIOHSCTL0x400FE06C ;# GPIO High-Speed Control +set SYSCTL_GPIOHBCTL0x400FE06C ;# GPIO High-Performance Bus +;# Control +set SYSCTL_RCC2 0x400FE070 ;# Run-Mode Clock Configuration 2 +set SYSCTL_MOSCCTL 0x400FE07C ;# Main Oscillator Control +set SYSCTL_RCGC00x400FE100 ;# Run Mode Clock Gating Control +;# Register 0 +set SYSCTL_RCGC10x400FE104 ;# Run Mode Clock Gating Control +;# Register 1 +set SYSCTL_RCGC20x400FE108 ;# Run Mode Clock Gating Control +;# Register 2 +set SYSCTL_SCGC00x400FE110 ;# Sleep Mode Clock Gating Control +;# Register 0 +set SYSCTL_SCGC10x400FE114 ;# Sleep Mode Clock Gating Control +;# Register 1 +set SYSCTL_SCGC20x400FE118 ;# Sleep Mode Clock Gating Control +;# Register 2 +set SYSCTL_DCGC00x400FE120 ;# Deep Sleep Mode Clock Gating +;# Control Register 0 +set SYSCTL_DCGC10x400FE124 ;# Deep-Sleep Mode Clock Gating +;# Control Register 1 +set SYSCTL_DCGC20x400FE128 ;# Deep Sleep Mode Clock Gating +;# Control Register 2 +set SYSCTL_DSLPCLKCFG 0x400FE144 ;# Deep Sleep Clock Configuration +set SYSCTL_CLKVCLR 0x400FE150 ;# Clock Verification Clear +set SYSCTL_PIOSCCAL 0x400FE150 ;# Precision Internal Oscillator +;# Calibration +set SYSCTL_PIOSCSTAT0x400FE154 ;# Precision Internal Oscillator +;# Statistics +set SYSCTL_LDOARST 0x400FE160 ;# Allow Unregulated LDO to Reset +;# the Part +set SYSCTL_I2SMCLKCFG 0x400FE170 ;# I2S MCLK Configuration +set SYSCTL_DC9 0x400FE190 ;# Device Capabilities 9 ADC
[Openocd-development] New patch to review for openocd: c3ee958 luminary: add new targets
This is an automated email from Gerrit. Spencer Oliver (s...@spen-soft.co.uk) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/31 -- gerrit commit c3ee958fc665dbf9d50b46528fd5f0b03ecd218b Author: Spencer Oliver s...@spen-soft.co.uk Date: Mon Oct 17 22:27:49 2011 +0100 luminary: add new targets update target support from latest SW-DRL 8049 Change-Id: I40aba4d30fe2b79fd955f466c64d99a1dfd63ecf Signed-off-by: Spencer Oliver s...@spen-soft.co.uk diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c index 89cc8ef..4a21028 100644 --- a/src/flash/nor/stellaris.c +++ b/src/flash/nor/stellaris.c @@ -124,7 +124,7 @@ struct stellaris_flash_bank }; // Autogenerated by contrib/gen-stellaris-part-header.pl -// From Stellaris Firmware Development Package revision 6734 +// From Stellaris Firmware Development Package revision 8049 static struct { uint32_t partno; const char *partname; @@ -166,6 +166,7 @@ static struct { {0x10C1,LM3S1150}, {0x10C4,LM3S1162}, {0x10C2,LM3S1165}, + {0x10EC,LM3S1166}, {0x10C6,LM3S1332}, {0x10BC,LM3S1435}, {0x10BA,LM3S1439}, @@ -175,10 +176,12 @@ static struct { {0x1006,LM3S1607}, {0x10DA,LM3S1608}, {0x10C0,LM3S1620}, + {0x10CD,LM3S1621}, {0x1003,LM3S1625}, {0x1004,LM3S1626}, {0x1005,LM3S1627}, {0x10B3,LM3S1635}, + {0x10EB,LM3S1636}, {0x10BD,LM3S1637}, {0x10B1,LM3S1651}, {0x10B9,LM3S1751}, @@ -192,14 +195,29 @@ static struct { {0x10BE,LM3S1958}, {0x10B5,LM3S1960}, {0x10B8,LM3S1968}, + {0x10EA,LM3S1969}, + {0x10CE,LM3S1B21}, + {0x10CA,LM3S1C21}, + {0x10CB,LM3S1C26}, + {0x1098,LM3S1C58}, + {0x10B0,LM3S1D21}, + {0x10CC,LM3S1D26}, + {0x101D,LM3S1F11}, + {0x101B,LM3S1F16}, + {0x10AF,LM3S1G21}, + {0x1095,LM3S1G58}, + {0x101E,LM3S1H11}, + {0x101C,LM3S1H16}, {0x100F,LM3S1J11}, {0x103C,LM3S1J16}, {0x100E,LM3S1N11}, {0x103B,LM3S1N16}, {0x10B2,LM3S1P51}, {0x109E,LM3S1R21}, + {0x10C9,LM3S1R26}, {0x1030,LM3S1W16}, {0x102F,LM3S1Z16}, + {0x10D4,LM3S2016}, {0x1051,LM3S2110}, {0x1084,LM3S2139}, {0x1039,LM3S2276}, @@ -221,13 +239,17 @@ static struct { {0x106D,LM3S2793}, {0x10E3,LM3S2911}, {0x10E2,LM3S2918}, + {0x10ED,LM3S2919}, {0x1054,LM3S2939}, {0x108F,LM3S2948}, {0x1058,LM3S2950}, {0x1055,LM3S2965}, {0x106C,LM3S2B93}, + {0x1094,LM3S2D93}, + {0x1093,LM3S2U93}, {0x1008,LM3S3634}, {0x1043,LM3S3651}, + {0x10C8,LM3S3654}, {0x1044,LM3S3739}, {0x1049,LM3S3748}, {0x1045,LM3S3749}, @@ -252,15 +274,28 @@ static struct { {0x100B,LM3S5951}, {0x104E,LM3S5956}, {0x1068,LM3S5B91}, + {0x102E,LM3S5C31}, + {0x102C,LM3S5C36}, + {0x105E,LM3S5C51}, + {0x105B,LM3S5C56}, + {0x105F,LM3S5D51}, + {0x105C,LM3S5D56}, + {0x1087,LM3S5D91}, + {0x102D,LM3S5G31}, + {0x101F,LM3S5G36}, + {0x105D,LM3S5G51}, + {0x104F,LM3S5G56}, {0x1009,LM3S5K31}, {0x104A,LM3S5K36}, {0x100A,LM3S5P31}, {0x1048,LM3S5P36}, + {0x10B6,LM3S5P3B}, {0x100D,LM3S5P51}, {0x104C,LM3S5P56}, {0x1007,LM3S5R31}, {0x104B,LM3S5R36}, {0x1047,LM3S5T36}, + {0x107F,LM3S5U91}, {0x1046,LM3S5Y36}, {0x10A1,LM3S6100}, {0x1074,LM3S6110}, @@ -275,12 +310,18 @@ static struct { {0x108B,LM3S6637}, {0x10A3,LM3S6730}, {0x1077,LM3S6753}, + {0x10D1,LM3S6816}, {0x10E9,LM3S6911}, + {0x10D3,LM3S6916}, {0x10E8,LM3S6918}, {0x1089,LM3S6938}, {0x1072,LM3S6950}, {0x1078,LM3S6952}, {0x1073,LM3S6965}, + {0x10AA,LM3S6C11}, + {0x10AC,LM3S6C65}, + {0x109F,LM3S6G11}, + {0x10AB,LM3S6G65}, {0x1064,LM3S8530}, {0x108E,LM3S8538}, {0x1061,LM3S8630}, @@ -293,24 +334,51 @@ static struct { {0x10A6,LM3S8962}, {0x1062,LM3S8970}, {0x10D7,LM3S8971}, + {0x10AE,LM3S8C62}, + {0x10AD,LM3S8G62}, + {0x10CF,LM3S9781}, {0x1067,LM3S9790}, {0x106B,LM3S9792}, + {0x102D,LM3S9971}, {0x1020,LM3S9997}, + {0x10D0,LM3S9B81}, {0x1066,LM3S9B90}, {0x106A,LM3S9B92}, {0x106E,LM3S9B95}, {0x106F,LM3S9B96}, + {0x101D,LM3S9BN2}, + {0x101E,LM3S9BN5}, + {0x101F,LM3S9BN6}, + {0x1070,LM3S9C97}, + {0x107A,LM3S9CN5}, + {0x10A9,LM3S9D81}, + {0x107E,LM3S9D90}, + {0x1092,LM3S9D92}, + {0x10C8,LM3S9D95}, + {0x109D,LM3S9D96}, + {0x107B,LM3S9DN5}, + {0x107C,LM3S9DN6}, + {0x1060