Sign in

username:

password:



Not a member?

Search AT91SAM



Search tips

Subscribe to AT91SAM



Ads

Discussion Groups

Discussion Groups | AT91SAM ARM | SAM-BA + TCL

For users of the Atmel AT91SAM7 and AT91SAM9 ARM CPU chips. Atmel has taken a new direction by combining on chip flash and ram with the ARM CPU on a single die. This provides low cost devices for small systems using the ARM CPU. This group is to exchange information to help users get started and learn how to use the devices.

SAM-BA + TCL - 42Bastian - Jan 30 4:11:24 2008

Hi,

I want to pass arguments to my TCL script. But I can't find
how to address it ?

Does anyone have a small exmaple (s)he would share ?

TIA
--
42Bastian

Note: SPAM-only account, direct mail to bs42@...



(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )


Re: SAM-BA + TCL - roger_lynx - Jan 30 4:46:12 2008

--- In A...@yahoogroups.com, 42Bastian wrote:
>
> Hi,
>
> I want to pass arguments to my TCL script. But I can't find
> how to address it ?
>
> Does anyone have a small exmaple (s)he would share ?
>
> TIA
> --
> 42Bastian
>
> Note: SPAM-only account, direct mail to bs42@
>

Would section 4-4 help?
http://www.atmel.com/dyn/resources/prod_documents/doc6224.pdf



(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )

Re: Re: SAM-BA + TCL - 42Bastian - Jan 30 5:34:18 2008

roger_lynx

>
> Would section 4-4 help?
> http://www.atmel.com/dyn/resources/prod_documents/doc6224.pdf

Thanks, but no, as it has a fixed file-name.

Meanwhile I found out, that $argv contains _all_ parameters given to
sam-ba.exe.
So I need to learn a bit Tcl to extract my parameters from $argv.
My current approach is, to pass my parameter with a "bl=" in front and
use the following to extract the parameter for my script.

if {$argc > 0 } {
puts $argv;
set first [string first "bl=" $argv];
puts "First $first";
set bl [string range $argv $first+3 end];
set last [string last " " $bl];
set bl [string range $bl 0 $last];
puts "$bl";
}
--
42Bastian

Note: SPAM-only account, direct mail to bs42@...



(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )