Re: [Openocd-development] OpenOCD master now uses Jim Tcl 0.63

2010-11-02 Thread Laurent Gauch


/ won't it be better compile both jimtcl and openocd with single
// ./configure and make, without needing to install that stuff
// separatelly ?
/
It doesn't need to be installed, that's part of the point.

Although I'm thinking about if it might make sense to package it
anyway. I guess it's like a library.
  


I tried to compile openocd under cygwin, it failed .

What to do on cygwin, to get Jim TCL and to be able to compile openocd.

Before providing this kind of patch, we should write doc and how-to 
compile !!!


OpenOCD community will receive a lot of new messages regarding 
compilation errors / troubles, if we do not give any how-to compile with 
external  JIM TCL.


Regards,
Laurent
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] OpenOCD master now uses Jim Tcl 0.63

2010-11-02 Thread Peter Stuge
Laurent Gauch wrote:
 OpenOCD community will receive a lot of new messages regarding
 compilation errors / troubles, if we do not give any how-to compile
 with external  JIM TCL.

Please contribute documentation.


//Peter
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] OpenOCD master now uses Jim Tcl 0.63

2010-11-02 Thread Laurent Gauch
under Cygwin with external JIM TCL 0.63 in ./openocd/jimtcl, the make 
error is :


../../../src/helper/command.h:34:17: jim.h: No such file or directory


checking whether standard drivers can be built... yes
checking for ftd2xx.lib exists (win32)... checking whether ftd2xx 
library works.

.. Success!
checking for ftd2xx highspeed device support... yes
checking for environ in unistd.h and stdlib.h... yes
checking for a C compiler for build tools... gcc -mno-cygwin -std=gnu99
checking for suffix of executable build tools... .exe
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/helper/Makefile
config.status: creating src/jtag/Makefile
config.status: creating src/jtag/drivers/Makefile
config.status: creating src/xsvf/Makefile
config.status: creating src/svf/Makefile
config.status: creating src/target/Makefile
config.status: creating src/server/Makefile
config.status: creating src/flash/Makefile
config.status: creating src/flash/nor/Makefile
config.status: creating src/flash/nand/Makefile
config.status: creating src/pld/Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
make  all-recursive
make[1]: Entering directory 
`/cygdrive/c/amontec/openocd-builder/git/openocd'

Making all in src
make[2]: Entering directory 
`/cygdrive/c/amontec/openocd-builder/git/openocd/src

'
cat helper/startup.tcl jtag/startup.tcl target/startup.tcl 
flash/startup.tcl ser

ver/startup.tcl  startup.tcl
make  all-recursive
make[3]: Entering directory 
`/cygdrive/c/amontec/openocd-builder/git/openocd/src

'
Making all in jtag
make[4]: Entering directory 
`/cygdrive/c/amontec/openocd-builder/git/openocd/src

/jtag'
cp drivers/minidriver_imp.h minidriver_imp.h
make  all-recursive
make[5]: Entering directory 
`/cygdrive/c/amontec/openocd-builder/git/openocd/src

/jtag'
Making all in drivers
make[6]: Entering directory 
`/cygdrive/c/amontec/openocd-builder/git/openocd/src

/jtag/drivers'
/bin/sh ../../../libtool --tag=CC   --mode=compile gcc -mno-cygwin 
-std=gnu99 -D
HAVE_CONFIG_H -I. -I../../..  -I../../../src -I../../../src   -g -O2 
-I/cygdrive
/c/amontec/jtagkey/driver/d2xx/nt -Wall -Wstrict-prototypes 
-Wformat-security -W
shadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align 
-Wredundan
t-decls -MT driver.lo -MD -MP -MF .deps/driver.Tpo -c -o driver.lo 
driver.c
libtool: compile:  gcc -mno-cygwin -std=gnu99 -DHAVE_CONFIG_H -I. 
-I../../.. -I.
./../../src -I../../../src -g -O2 
-I/cygdrive/c/amontec/jtagkey/driver/d2xx/nt -
Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra 
-Wno-unused-paramete
r -Wbad-function-cast -Wcast-align -Wredundant-decls -MT driver.lo -MD 
-MP -MF .

deps/driver.Tpo -c driver.c -o driver.o
In file included from ../../../src/helper/log.h:29,
 from ../../../src/jtag/jtag.h:27,
 from driver.c:34:
../../../src/helper/command.h:34:17: jim.h: No such file or directory
../../../src/helper/command.h:35:21: jim-nvp.h: No such file or directory


Regards,
Laurent
 http://www.amontec.com

___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] =?ISO-8859-2?Q?Re: Re: Problems with workareasize and STM32F100 (8kB= of RAM)?=

2010-11-02 Thread Freddie Chopin

On 2010-10-29 11:21, freddie_cho...@op.pl wrote:

Yep! Please send patches. I will also.

I'll wait for maintainters' opinions, because if they don't like the idea of 
separate cfg files any patch in that area would be just a waste of time.


Is there really no interest in such change?

4\/3!!
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Problems with workareasize and STM32F100 (8kB of RAM)

2010-11-02 Thread Øyvind Harboe
On Tue, Nov 2, 2010 at 5:51 PM, Freddie Chopin freddie_cho...@op.pl wrote:
 On 2010-10-29 11:21, freddie_cho...@op.pl wrote:

    Yep! Please send patches. I will also.

 I'll wait for maintainters' opinions, because if they don't like the idea
 of separate cfg files any patch in that area would be just a waste of time.

 Is there really no interest in such change?

I saw a long and healthy discussion with some good names, so I
figured this issue was well looked after.

Perhaps you can provide a patch and / or summarize what the problem is and
what your plan / conclusion is in a new thread?

-- 
Øyvind Harboe
US toll free 1-866-980-3434 / International +47 51 63 25 00
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


[Openocd-development] Proposition of new target cfg files scheme

2010-11-02 Thread Freddie Chopin

Hi!

Currently there is no single scheme used. Some chips (like STM32) use 
only one generic target cfg file with (more or less accurate) default 
values that (more or less) suit the whole family. Other chips (like LPC 
from NXP) have separate cfg files for each chip.


In a recent discussion (Problems with workareasize and STM32F100 (8kB of 
RAM)) I mentioned problems with default values of WORKAREASIZE in 
stm32.cfg (16kB), that made flashing chips with lower amount of RAM 
(16kB) really slow (~200 bytes/s) beacuse block writes are impossible 
then. Of course this default value could be changed to least common 
denominator throughout the family (4kB IIRC), but this would limit the 
flashing speed of chips that actually have more RAM (tests - 
https://lists.berlios.de/pipermail/openocd-development/2010-October/016792.html 
).


Therefore I propose a completely new target cfg files scheme for OpenOCD 
- separate cfg files for all target devices and organized directories. 
Something like:

- target
- STM32
stm32f103rb.cfg
stm32f107v8.cfg
stm32f100rb.cfg
...
stm32.cfg   // generic file
- LPC17xx
lpc1758.cfg
lpc1768.cfg
...
lpc17xx.cfg // generic file
- LPC2xxx
lpc2103.cfg
lpc2148.cfg
lpc2214.cfg
...
lpc2xxx.cfg // generic file
- STR7xx
...
- STR9xx
...
- ...

and so on.

The idea is to still have generic cfg files (if possible) with safe 
defaults (least common denominator). Chip-specific cfg files would just 
define right values and include generic family files. It should be 
possible to still use generic files alone - just like now.


Main pros:
- user-friendliness - there would be no need to change anything (or very 
little - crystal frequency) in target cfg files
- low impact on current setups (only change the path to file - 
target/stm32.cfg - target/stm32/stm32.cfg [or sth like that])
- maximize performance - no need to limit workareasize for chips with 
lots of RAM


Main con:
- a lot of files (there are 80 stm32f's, and so on)

I'm willing to prepare patch, but I'd like to hear maintainers' opinion 
first, as my time is limited and wasting it is not my purpose (;


4\/3!!
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Proposition of new target cfg files scheme

2010-11-02 Thread Øyvind Harboe
I think you're looking at a real problem here, but I'd be loathe
to charge off in a particular direction here until we've had some
time to let  the idea mature and cool off.

I'd like any design here to be at least 30% better than what
we have today, i.e. noticeably better to just about anybody
who runs and/or maintains OpenOCD.

Also, I'd like something that is pretty close to what we want
long term.




-- 
Øyvind Harboe
US toll free 1-866-980-3434 / International +47 51 63 25 00
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Proposition of new target cfg files scheme

2010-11-02 Thread Freddie Chopin

On 2010-11-02 21:32, Øyvind Harboe wrote:

I think you're looking at a real problem here, but I'd be loathe
to charge off in a particular direction here until we've had some
time to let  the idea mature and cool off.


Fine with me, but I'm affraid that this good idea may die if it will be 
put on hold for indeterminate period of time.



I'd like any design here to be at least 30% better than what
we have today, i.e. noticeably better to just about anybody
who runs and/or maintains OpenOCD.


This would be better for me, and for the guy who was in trouble using 
OpenOCD with STM32F100 [;



Also, I'd like something that is pretty close to what we want
long term.


You'll have to tell what you want long term then...

4\/3!!
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Proposition of new target cfg files scheme

2010-11-02 Thread Øyvind Harboe
 Also, I'd like something that is pretty close to what we want
 long term.

 You'll have to tell what you want long term then...

I don't know what the answer is long term. I would, like you,
like to hear thoughts from others on this.

-- 
Øyvind Harboe
US toll free 1-866-980-3434 / International +47 51 63 25 00
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] OpenOCD master now uses Jim Tcl 0.63

2010-11-02 Thread Steve Bennett
On 03/11/2010, at 12:23 AM, Laurent Gauch wrote:

 under Cygwin with external JIM TCL 0.63 in ./openocd/jimtcl, the make error 
 is :
 
 ../../../src/helper/command.h:34:17: jim.h: No such file or directory

Did you forget 'make install' in ./openocd/jimtcl?

This is the symptom I see when that step is missed.

(Although as someone pointed out, it would be nice to have
 a single stage configure/build without needing to install jimtcl)

 
 checking whether standard drivers can be built... yes
 checking for ftd2xx.lib exists (win32)... checking whether ftd2xx library 
 works.
 .. Success!
 checking for ftd2xx highspeed device support... yes
 checking for environ in unistd.h and stdlib.h... yes
 checking for a C compiler for build tools... gcc -mno-cygwin -std=gnu99
 checking for suffix of executable build tools... .exe
 configure: creating ./config.status
 config.status: creating Makefile
 config.status: creating src/Makefile
 config.status: creating src/helper/Makefile
 config.status: creating src/jtag/Makefile
 config.status: creating src/jtag/drivers/Makefile
 config.status: creating src/xsvf/Makefile
 config.status: creating src/svf/Makefile
 config.status: creating src/target/Makefile
 config.status: creating src/server/Makefile
 config.status: creating src/flash/Makefile
 config.status: creating src/flash/nor/Makefile
 config.status: creating src/flash/nand/Makefile
 config.status: creating src/pld/Makefile
 config.status: creating doc/Makefile
 config.status: creating config.h
 config.status: executing depfiles commands
 config.status: executing libtool commands
 make  all-recursive
 make[1]: Entering directory `/cygdrive/c/amontec/openocd-builder/git/openocd'
 Making all in src
 make[2]: Entering directory 
 `/cygdrive/c/amontec/openocd-builder/git/openocd/src
 '
 cat helper/startup.tcl jtag/startup.tcl target/startup.tcl flash/startup.tcl 
 ser
 ver/startup.tcl  startup.tcl
 make  all-recursive
 make[3]: Entering directory 
 `/cygdrive/c/amontec/openocd-builder/git/openocd/src
 '
 Making all in jtag
 make[4]: Entering directory 
 `/cygdrive/c/amontec/openocd-builder/git/openocd/src
 /jtag'
 cp drivers/minidriver_imp.h minidriver_imp.h
 make  all-recursive
 make[5]: Entering directory 
 `/cygdrive/c/amontec/openocd-builder/git/openocd/src
 /jtag'
 Making all in drivers
 make[6]: Entering directory 
 `/cygdrive/c/amontec/openocd-builder/git/openocd/src
 /jtag/drivers'
 /bin/sh ../../../libtool --tag=CC   --mode=compile gcc -mno-cygwin 
 -std=gnu99 -D
 HAVE_CONFIG_H -I. -I../../..  -I../../../src -I../../../src   -g -O2 
 -I/cygdrive
 /c/amontec/jtagkey/driver/d2xx/nt -Wall -Wstrict-prototypes 
 -Wformat-security -W
 shadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align 
 -Wredundan
 t-decls -MT driver.lo -MD -MP -MF .deps/driver.Tpo -c -o driver.lo driver.c
 libtool: compile:  gcc -mno-cygwin -std=gnu99 -DHAVE_CONFIG_H -I. -I../../.. 
 -I.
 ./../../src -I../../../src -g -O2 
 -I/cygdrive/c/amontec/jtagkey/driver/d2xx/nt -
 Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra 
 -Wno-unused-paramete
 r -Wbad-function-cast -Wcast-align -Wredundant-decls -MT driver.lo -MD -MP 
 -MF .
 deps/driver.Tpo -c driver.c -o driver.o
 In file included from ../../../src/helper/log.h:29,
 from ../../../src/jtag/jtag.h:27,
 from driver.c:34:
 ../../../src/helper/command.h:34:17: jim.h: No such file or directory
 ../../../src/helper/command.h:35:21: jim-nvp.h: No such file or directory
 
 Regards,
 Laurent
 http://www.amontec.com
 
 ___
 Openocd-development mailing list
 Openocd-development@lists.berlios.de
 https://lists.berlios.de/mailman/listinfo/openocd-development
 

--
µWeb: Embedded Web Framework - http://uweb.workware.net.au/
WorkWare Systems Pty Ltd
W: www.workware.net.au  P: 0434 921 300
E: ste...@workware.net.au   F: 07 3102 9221




___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Proposition of new target cfg files scheme

2010-11-02 Thread Duane Ellis



Main con:
- a lot of files (there are 80 stm32f's, and so on)



? Since there are 80 some odd versions - could a number of these items 
be determined directly from the part number?


Look at the ordering information from this STM32 PDF

http://www.st.com/stonline/products/literature/ds/15057/stm32f102c4.pdf

The 11th symbol is the FLASH size,  4=16K, 6=32K,

could be generalize like this

if   not defined( $STMCHIPNUMBER )
then
 FAIL WITH ERROR
endif

if  STMCHIPNUMBER == STM32F103C6
 STM32FLASHSIZE = 32
 STM32RAMSIZE=10
 endif


... then later do this

if  not defined( $STM32FLASHSIZE) )
then
 FAIL with unknown STM32 chip type
endif

===

OR this could be put into a simple table of some type.

Indexed by MODEL NUMBER

===

-Duane.



___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] OpenOCD master now uses Jim Tcl 0.63

2010-11-02 Thread Steve Bennett
On 03/11/2010, at 8:34 AM, Steve Bennett wrote:

 On 03/11/2010, at 12:23 AM, Laurent Gauch wrote:
 
 under Cygwin with external JIM TCL 0.63 in ./openocd/jimtcl, the make error 
 is :
 
 ../../../src/helper/command.h:34:17: jim.h: No such file or directory
 
 Did you forget 'make install' in ./openocd/jimtcl?
 
 This is the symptom I see when that step is missed.
 
 (Although as someone pointed out, it would be nice to have
 a single stage configure/build without needing to install jimtcl)

Although the link step still fails for me on cygwin.

make[4]: Entering directory `/src/openocd/src'
/bin/sh ../libtool --tag=CC   --mode=link gcc -std=gnu99  -g -O2 -Wall 
-Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter 
-Wbad-function-cast -Wcast-align -Wredundant-decls -Werror   -o openocd.exe 
main.o libopenocd.la -ljim 
libtool: link: gcc -std=gnu99 -g -O2 -Wall -Wstrict-prototypes 
-Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast 
-Wcast-align -Wredundant-decls -Werror -o openocd.exe main.o  
./.libs/libopenocd.a -ljim
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot 
find -ljim
collect2: ld returned 1 exit status
make[4]: *** [openocd.exe] Error 1
make[4]: Leaving directory `/src/openocd/src'

I'm no automake expert. It seems to me that it should be possible to add include
and lib paths directly to the jimtcl directory under openocd, thus avoiding the 
need
to 'make install' and addressing this link problem.

 
 
 checking whether standard drivers can be built... yes
 checking for ftd2xx.lib exists (win32)... checking whether ftd2xx library 
 works.
 .. Success!
 checking for ftd2xx highspeed device support... yes
 checking for environ in unistd.h and stdlib.h... yes
 checking for a C compiler for build tools... gcc -mno-cygwin -std=gnu99
 checking for suffix of executable build tools... .exe
 configure: creating ./config.status
 config.status: creating Makefile
 config.status: creating src/Makefile
 config.status: creating src/helper/Makefile
 config.status: creating src/jtag/Makefile
 config.status: creating src/jtag/drivers/Makefile
 config.status: creating src/xsvf/Makefile
 config.status: creating src/svf/Makefile
 config.status: creating src/target/Makefile
 config.status: creating src/server/Makefile
 config.status: creating src/flash/Makefile
 config.status: creating src/flash/nor/Makefile
 config.status: creating src/flash/nand/Makefile
 config.status: creating src/pld/Makefile
 config.status: creating doc/Makefile
 config.status: creating config.h
 config.status: executing depfiles commands
 config.status: executing libtool commands
 make  all-recursive
 make[1]: Entering directory 
 `/cygdrive/c/amontec/openocd-builder/git/openocd'
 Making all in src
 make[2]: Entering directory 
 `/cygdrive/c/amontec/openocd-builder/git/openocd/src
 '
 cat helper/startup.tcl jtag/startup.tcl target/startup.tcl 
 flash/startup.tcl ser
 ver/startup.tcl  startup.tcl
 make  all-recursive
 make[3]: Entering directory 
 `/cygdrive/c/amontec/openocd-builder/git/openocd/src
 '
 Making all in jtag
 make[4]: Entering directory 
 `/cygdrive/c/amontec/openocd-builder/git/openocd/src
 /jtag'
 cp drivers/minidriver_imp.h minidriver_imp.h
 make  all-recursive
 make[5]: Entering directory 
 `/cygdrive/c/amontec/openocd-builder/git/openocd/src
 /jtag'
 Making all in drivers
 make[6]: Entering directory 
 `/cygdrive/c/amontec/openocd-builder/git/openocd/src
 /jtag/drivers'
 /bin/sh ../../../libtool --tag=CC   --mode=compile gcc -mno-cygwin 
 -std=gnu99 -D
 HAVE_CONFIG_H -I. -I../../..  -I../../../src -I../../../src   -g -O2 
 -I/cygdrive
 /c/amontec/jtagkey/driver/d2xx/nt -Wall -Wstrict-prototypes 
 -Wformat-security -W
 shadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align 
 -Wredundan
 t-decls -MT driver.lo -MD -MP -MF .deps/driver.Tpo -c -o driver.lo driver.c
 libtool: compile:  gcc -mno-cygwin -std=gnu99 -DHAVE_CONFIG_H -I. 
 -I../../.. -I.
 ./../../src -I../../../src -g -O2 
 -I/cygdrive/c/amontec/jtagkey/driver/d2xx/nt -
 Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra 
 -Wno-unused-paramete
 r -Wbad-function-cast -Wcast-align -Wredundant-decls -MT driver.lo -MD -MP 
 -MF .
 deps/driver.Tpo -c driver.c -o driver.o
 In file included from ../../../src/helper/log.h:29,
from ../../../src/jtag/jtag.h:27,
from driver.c:34:
 ../../../src/helper/command.h:34:17: jim.h: No such file or directory
 ../../../src/helper/command.h:35:21: jim-nvp.h: No such file or directory
 
 Regards,
 Laurent
 http://www.amontec.com
 
 ___
 Openocd-development mailing list
 Openocd-development@lists.berlios.de
 https://lists.berlios.de/mailman/listinfo/openocd-development
 
 
 --
 µWeb: Embedded Web Framework - http://uweb.workware.net.au/
 WorkWare Systems Pty Ltd
 W: www.workware.net.au  P: 0434 921 300
 E: ste...@workware.net.au   F: 07 3102 9221
 
 
 
 
 

Re: [Openocd-development] Proposition of new target cfg files scheme

2010-11-02 Thread David Brownell


--- On Tue, 11/2/10, Øyvind Harboe oyvind.har...@zylin.com wrote:

 
 I don't know what the answer is long term. I would, like
 you,
 like to hear thoughts from others on this.

There's a bug filed about us not reporting the
memory maps correctly, with specific reference
to RAM/SRAM regions.  Fixing that would help
make GDB behave better ... it'd use different
commands to write flash vs RAM, etc.

There are three parts to that problem:  collecting
and saving that region info, and most simply,
feeding it to GDB with the rest of the mem map. 


My current thought is:

 - internal API to declare RAM/SRAM regions to
later be reported to GDB (or used internally).

Call that API via some Tcl script command that
takes address and size, in at least some config
scripts (if we must).

For some chips that info is easily gotten
via chip probe, instead of model-specific
(and messy/error-prone) config files.

For example the Stellaris chips report
how much SRAM they've got in flash info, but
that info could be stashed via the API and then
accessed later.

Other chips may need to have drivers consult
tables driven by part numbers, working a bit
differently from the Stellaris chips.  I'm not
suggesting a place the chip probing should be
done; sometime during setup, obviously.

THere could be a command that says allocate some
of the RAM/SRAM for a work-area.  I suspect the
different flash drivers would want different
defaults for work area sizes.

- Dave



___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development