public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: John Dallaway <john@dallaway.org.uk>
To: Richard Rauch <rrauch@itrgmbh.de>
Cc: eCos Discussion <ecos-discuss@sourceware.org>
Subject: [ECOS] Re: CDL/TCL issue building macro names in loops
Date: Thu, 28 Mar 2013 17:10:00 -0000	[thread overview]
Message-ID: <51547990.4090309@dallaway.org.uk> (raw)
In-Reply-To: <000301ce2bd1$d0acd530$72067f90$@itrgmbh.de>

Hi Richard

On 28/03/13 16:32, Richard Rauch wrote:

> I have problems with creating  macro name dynamically with TCL language.
> 
> I have to implement an ADC driver. I want to create the list of channels.
> Because the large number of channels (10 internal channel with ACT value,
> MIN value and MAX value and 15 external channels) I want to create the
> channel list more convenient.
> 
> The following code (some excerpt of my CDL script) works already good, but
> it is not matching my requirements completely:
> 
> #---------------------------------------------------------------------------
> ----------------------------------------
> set SensorList { temp vccint vccaux vpvn vrefp vrefn vccbram vccpint vccpaux
> vcc0ddr } foreach Sensor $SensorList {
> 
> 	cdl_component CYGNUM_DEVS_ADC_ARM_XC7Z_ONCHIP_$Sensor {

You may be able to adapt the approach used in the MCF52xx CAN driver CDL
script to work with your list of sensors:

>     for { set ::flexcan 0 } { $::flexcan < 2 } { incr ::flexcan } {
>         cdl_interface CYGINT_DEVS_CAN_MCF52xx_FLEXCAN[set ::flexcan] {

I hope this helps...

John Dallaway
eCos maintainer
http://www.dallaway.org.uk/john

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

      reply	other threads:[~2013-03-28 17:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-28 16:32 [ECOS] " Richard Rauch
2013-03-28 17:10 ` John Dallaway [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51547990.4090309@dallaway.org.uk \
    --to=john@dallaway.org.uk \
    --cc=ecos-discuss@sourceware.org \
    --cc=rrauch@itrgmbh.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).