[Tinyos-help] AVR GCC compiler problems
Kevin Klues
klueska at gmail.com
Wed Feb 27 10:28:48 PST 2008
I'm very skeptical in saying that its a problem with the compiler.
How have you verified that the parameters do not contain the proper
values?
Kevin
On Wed, Feb 27, 2008 at 10:18 AM, José Moyano <josehmoyano at yahoo.com.ar> wrote:
>
>
> Take a look at this code:
>
> One module has:
>
> command result_t CPSSetReceive.setReceive[uint8_t channel](uint32_t id,
> uint32_t mask) {
> if ((call CANReceive.setReceive[channel](id, mask)) && (call
> CANReceive.setReceive[channel + 7](id, mask))) {
> ...
> }
>
> This operation is called with a mask equal to CAN_DEFAULT_MASK, and is
> connected to a module with this code:
>
> command result_t CANReceive.setReceive[uint8_t channel](uint32_t id,
> uint32_t mask) {
> //DEBUG
> if (channel == 10)
> if (mask != CAN_DEFAULT_MASK)
> call Leds.yellowOff();
> //*********************
>
> call MOb.disable[channel]();
> atomic status[channel] = IDLE;
> if (id >= MAX_ID)
> return SUCCESS;
> if (call MOb.prepareRx[channel](id, mask)) {
> atomic status[channel] = RX;
> return SUCCESS;
> }
> else
> return FAIL;
> }
>
> As you can see, in CPSSetReceive.setReceive[..](..) there are two calls to
> CANReceive.setReceive[..](..). In the first call, the actual parameters of
> CPSSetReceive.setReceive are equal to the actual parameters of
> CANReceive.setReceive. When you make the second call, in the body of
> CANReceive.setReceive[](), the actual parameters doesn't match with the
> parameters sent by CPSSetReceive.setReceive[](), even when the parameters
> aren't modified and aren't references or global variables. Is easy to
> conclude that the compiler is changing the semantic of my program. The
> cuestion is why. Any ideas?
> I'm using TinyOS 1.1
>
> Thanks in advance.
>
>
>
> ________________________________
>
> Tarjeta de crédito Yahoo! de Banco Supervielle. Solicitá tu nueva Tarjeta de
> crédito. De tu PC directo a tu casa.
> Visitá www.tuprimeratarjeta.com.ar
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
--
~Kevin
More information about the Tinyos-help
mailing list