On 16/11/2010, at 9:27 AM, Andrew Leech wrote:

> Hi all,
> I've just found a compiling/usage difficulty with the git version on
> cygwin. Apparently somewhere between 0.4.0 and mainline (possibly
> jimtcl?) openocd no longer handles dos line endings on config files.
> Apparently all my config files of my existing 0.4.0 installation have
> dos line endings and I'd never realised or cared, but I compiled git
> on cygwin and tried to use it with my existing openocd.cfg and was
> treated to this error:
> 
> Open On-Chip Debugger 0.5.0-dev-00589-gfdae512-dirty (2010-11-16-10:00)
> Licensed under GNU GPL v2
> For bug reports, read
>        http://openocd.berlios.de/doc/doxygen/bugs.html
> Runtime Error: embedded:startup.tcl:57:
> in procedure 'script'
> at file "embedded:startup.tcl", line 57
> 
> This is a very un-user-friendly error message and had me stumped, I
> though my build was broken or something. It took me a lot of stuffing
> around with config files to realise it was just a dos2unix on my
> config file away from working, and now I'm all good.
> I personally don't have an issue with requiring unix line endings,
> it's just that this is a nasty way to fail, a cleaner error message
> would have been useful.

I suspect the problem is here in src/helper/startup.tcl

        set errmsg [format "%s: command requires more arguments" \
            [concat $name " " $args]]

The backslash newline sequence will likely have a carriage return inserted.
The easy solution is to ensure that these startup files are read in text mode
or have the \r\n translated to \n before creating startup_tcl.c

But it would also be nice if each startup script were evaluated independently
with the original filename, and any error message shown.

> 
> Cheers,
> Andrew
> _______________________________________________
> Openocd-development mailing list
> [email protected]
> 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: [email protected]   F: 07 3102 9221




_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to