Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: set binary's directory in tcl script
PostPosted: Fri Jul 08, 2011 3:06 pm 
Offline

Joined: Tue Sep 23, 2008 11:14 am
Posts: 9
Hi,

I wrote a tcl script to flash my board with binaries. Binary file names are set like so:

set bootstrap "bootstrap.bin"
DataFlash::SendBootFile "$bootstrap"

Problem is I have to run the tcl script from the directory containing the binaries, otherwise the script can't find the binaries. For this reason the "Execute Script File" SAM-BA GUI option fails, because the current working directory is not changed to that of the script/binaries.

Is there some way for the tcl script to find the binaries?


Last edited by Need4Speed on Thu Aug 04, 2011 1:41 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: set binary's directory in tcl script
PostPosted: Thu Aug 04, 2011 1:39 pm 
Offline

Joined: Tue Sep 23, 2008 11:14 am
Posts: 9
Found the answer:

set path [file dirname [info script]]
set bootstrap [file join $path "bootstrap.bin"]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron