Re: [Openocd-development] [OpenOCD][PULL Request][MIPS32] Fixed single byte memory write

2011-07-29 Thread Mahr, Stefan
Hi Drasko. > Drasko DRASKOVIC (1): > mips32 : Fixed memory byte access Your patch fixes the broken byte access, but not the big endian host issue. Since both problems are tied together, I would prefer a more common solution. Attached patch hopefully fixes both issues. It should also fix al

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-07-29 Thread Andreas Fritiofson
On Fri, Jul 29, 2011 at 6:24 PM, Jie Zhang wrote: > On Fri, Jun 24, 2011 at 3:14 PM, Jie Zhang wrote: > > On Mon, Jun 20, 2011 at 6:50 AM, Steve Bennett > wrote: > >> The default is -Werror, so warnings become errors > >> and stop the build. > >> Might be better to simply #define FT_STATUS inst

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-07-29 Thread Jie Zhang
On Fri, Jun 24, 2011 at 3:14 PM, Jie Zhang wrote: > On Mon, Jun 20, 2011 at 6:50 AM, Steve Bennett wrote: >> The default is -Werror, so warnings become errors >> and stop the build. >> Might be better to simply #define FT_STATUS instead. >> >> -               LOG_ERROR("FT_Write returned: %lu", s

Re: [Openocd-development] [PATCH 3/3] ft2232: Add casts to avoid warnings

2011-07-29 Thread Jie Zhang
On Thu, Jun 23, 2011 at 5:43 PM, Steve Bennett wrote: > Then perhaps this is what you are after. > I'm not sure if it is any more correct, since FT_STATUS > is ULONG which is unsigned int (!), not uint32_t > I happened to find a slightly revised version of this patch was merged recently. But it wi

Re: [Openocd-development] [PATCH 3/4] cfg: update scripts to use new stm32 driver names

2011-07-29 Thread Spencer Oliver
On 29 July 2011 16:56, Andreas Fritiofson wrote: > > > On Fri, Jul 29, 2011 at 5:38 PM, Spencer Oliver > wrote: >> >> On 29 July 2011 15:43, Andreas Fritiofson >> wrote: >> > >> > That one won't help for all scripts out there that are currently >> > sourcing >> > target/stm32.cfg. >> > /Andreas

Re: [Openocd-development] [PATCH 3/4] cfg: update scripts to use new stm32 driver names

2011-07-29 Thread Andreas Fritiofson
On Fri, Jul 29, 2011 at 5:38 PM, Spencer Oliver wrote: > On 29 July 2011 15:43, Andreas Fritiofson > wrote: > > > > That one won't help for all scripts out there that are currently sourcing > > target/stm32.cfg. > > /Andreas > > Good point - how about > > http://repo.or.cz/w/openocd/ntfreak.git/c

Re: [Openocd-development] [PATCH] Better fixes for set but not used warnings

2011-07-29 Thread Jie Zhang
On Fri, Jul 29, 2011 at 11:41 AM, Spencer Oliver wrote: > On 29 July 2011 15:32, Jie Zhang wrote: >> I happened to find that two previous fixes for set-but-not-used >> warnings are not correct or not good. This patch should be an >> improvement. Please review and merge if good. >> >> > > I am goi

Re: [Openocd-development] [PATCH] Better fixes for set but not used warnings

2011-07-29 Thread Spencer Oliver
On 29 July 2011 15:32, Jie Zhang wrote: > I happened to find that two previous fixes for set-but-not-used > warnings are not correct or not good. This patch should be an > improvement. Please review and merge if good. > > I am going to look into tis one, as one minute the code is there, next minu

Re: [Openocd-development] [PATCH 3/4] cfg: update scripts to use new stm32 driver names

2011-07-29 Thread Spencer Oliver
On 29 July 2011 15:43, Andreas Fritiofson wrote: > > That one won't help for all scripts out there that are currently sourcing > target/stm32.cfg. > /Andreas Good point - how about http://repo.or.cz/w/openocd/ntfreak.git/commit/e4908b71bcac1e3ae01a4f54cffe475b0be6e336 Cheers Spen ___

Re: [Openocd-development] script vs source

2011-07-29 Thread Jie Zhang
On Fri, Jul 29, 2011 at 11:24 AM, Jie Zhang wrote: > On Fri, Jul 29, 2011 at 8:16 AM, Steve Bennett wrote: >> Makes sense to me to change it to: >> proc script {filename} { >>        uplevel #0 source [find $filename] >> } >> > The attached patch removes "script" command completely. > This is a n

Re: [Openocd-development] script vs source

2011-07-29 Thread Jie Zhang
On Fri, Jul 29, 2011 at 8:16 AM, Steve Bennett wrote: > Makes sense to me to change it to: > proc script {filename} { >        uplevel #0 source [find $filename] > } > The attached patch removes "script" command completely. Jie From f00a57d009fb713091b096521e82600a2e2401c2 Mon Sep 17 00:00:00 20

Re: [Openocd-development] [PATCH 3/4] cfg: update scripts to use new stm32 driver names

2011-07-29 Thread Andreas Fritiofson
On Fri, Jul 29, 2011 at 4:09 PM, Spencer Oliver wrote: > On 29 July 2011 14:54, Andreas Fritiofson > wrote: > > > > On Thu, Jul 28, 2011 at 1:52 PM, Spencer Oliver > > wrote: > >> > >> delete mode 100644 tcl/target/stm32.cfg > >> delete mode 100644 tcl/target/stm32f2xxx.cfg > > > > see patch 4

[Openocd-development] [PATCH] Better fixes for set but not used warnings

2011-07-29 Thread Jie Zhang
I happened to find that two previous fixes for set-but-not-used warnings are not correct or not good. This patch should be an improvement. Please review and merge if good. Regards, Jie diff --git a/src/target/etb.c b/src/target/etb.c index 3cb2254..974ab2b 100644 --- a/src/target/etb.c +++ b/src/

Re: [Openocd-development] [PATCH 3/4] cfg: update scripts to use new stm32 driver names

2011-07-29 Thread Spencer Oliver
On 29 July 2011 14:54, Andreas Fritiofson wrote: > > On Thu, Jul 28, 2011 at 1:52 PM, Spencer Oliver > wrote: >> >>  delete mode 100644 tcl/target/stm32.cfg >>  delete mode 100644 tcl/target/stm32f2xxx.cfg > see patch 4 Spen ___ Openocd-development ma

Re: [Openocd-development] [PATCH 3/4] cfg: update scripts to use new stm32 driver names

2011-07-29 Thread Andreas Fritiofson
On Thu, Jul 28, 2011 at 1:52 PM, Spencer Oliver wrote: > delete mode 100644 tcl/target/stm32.cfg > delete mode 100644 tcl/target/stm32f2xxx.cfg > For compatibility with existing user scripts, it would be best to keep these files during the 0.5.x period. Just make them print a deprecation warnin

Re: [Openocd-development] script vs source

2011-07-29 Thread Steve Bennett
On 29/07/2011, at 8:45 PM, Jie Zhang wrote: > Hi, > > OpenOCD uses script command to execute config file passed through "-f" > option. script command is defined as a function > > proc script {filename} { >source [find $filename] > } > > Thus when executing the config file, global varia

Re: [Openocd-development] script vs source

2011-07-29 Thread Jie Zhang
On Fri, Jul 29, 2011 at 7:12 AM, Øyvind Harboe wrote: > Its historical. Perhaps it should be this way? Perhaps ot is better to pass > args as args to procs rathr than global variables? Perhaps we should retire > "script"? > It's really historical. It was in the first commit in the OpenOCD git repo

Re: [Openocd-development] script vs source

2011-07-29 Thread Jie Zhang
On Fri, Jul 29, 2011 at 7:34 AM, Spencer Oliver wrote: > On 29 July 2011 11:45, Jie Zhang wrote: >> Hi, >> >> OpenOCD uses script command to execute config file passed through "-f" >> option. script command is defined as a function >> >> proc script {filename} { >>        source [find $filename]

Re: [Openocd-development] script vs source

2011-07-29 Thread Jie Zhang
Let's me explain more on what I'm trying to do. In Blackfin gdbproxy, I hardcoded memory maps in C source code. When moving to OpenOCD, I'm trying to put them in the config files, which is something in my TODO list for a long time. At that time I thought about using an XML file for this purpose. B

Re: [Openocd-development] script vs source

2011-07-29 Thread Spencer Oliver
On 29 July 2011 11:45, Jie Zhang wrote: > Hi, > > OpenOCD uses script command to execute config file passed through "-f" > option. script command is defined as a function > > proc script {filename} { >        source [find $filename] > } > > Thus when executing the config file, global variables def

[Openocd-development] script vs source

2011-07-29 Thread Jie Zhang
Hi, OpenOCD uses script command to execute config file passed through "-f" option. script command is defined as a function proc script {filename} { source [find $filename] } Thus when executing the config file, global variables defined in that config file is not global any more. If I def

Re: [Openocd-development] [PATCH 4/4] flash: add support for deprecated stm32 flash cmds

2011-07-29 Thread Spencer Oliver
On 29 July 2011 02:01, Steve Bennett wrote: > > I don't know what parameters may be passed to these procs, but if they could > contain > spaces, quotes or braces this could cause unexpected behaviour. > You might consider using the more correct form: > > proc stm32f2xxx args { >        echo "DEPR

Re: [Openocd-development] script command

2011-07-29 Thread Jie Zhang
On Fri, Jul 29, 2011 at 12:10 AM, Steve Bennett wrote: > On 29/07/2011, at 2:06 PM, Steve Bennett wrote: > >> On 29/07/2011, at 1:40 PM, Jie Zhang wrote: >> >>> Hi, >>> >>> Where is the "script" command defined? I greped in jimtcl and openocd >>> source code, but could not find it. Thank you! >>>