Rolf,

You faced with loop elimination and non-volatile issues tricks.
This been discussed a lot here, so, search through mailing list.
Most important issues were transferred to docs.

Briefly:
1. Loop you've got:
        do {} while (condition);
being translated to
        if( not condition ) hang forever;

2. Nested interrupts supported via 'enablenested' keyword (attribute
'signal') . Check docs.

Cheers,
~d

-----Original Message-----
From: mspgcc-users-ad...@lists.sourceforge.net
[mailto:mspgcc-users-ad...@lists.sourceforge.net] On Behalf Of
nobo...@web.de
Sent: Friday, June 04, 2004 11:03 PM
To: mspgcc-users@lists.sourceforge.net
Subject: [Mspgcc-users] uart0 can't send

Hi,

a program (compiled the IAR compiler) which sends data from uart0 does
send nothing after compiled with mspgcc:

...
void
Send_Data (void)
{
  if (COM_TRANSMIT.len > 0)     // Ignore data packets of length zero.
  {
    COM_TRANSMIT.cnt = 1;
    U0TXBUF = COM_TRANSMIT.buffer[0];
    
    do                          // Interrupt
    {

// ddd hangs at this point while it works with IAR
/////////////////////////////////////////

    }
    while (COM_TRANSMIT.cnt < COM_TRANSMIT.len);
    COM_TRANSMIT.len = 0;
  }
  return;
}
...
#ifdef MSPGCC
interrupt (UART0TX_VECTOR)
#endif
#ifdef IAR
interrupt[UART0TX_VECTOR]
     void
#endif
       uart0_transmit (void)
{
  if (COM_TRANSMIT.cnt < COM_TRANSMIT.len)
    U0TXBUF = COM_TRANSMIT.buffer[COM_TRANSMIT.cnt++];
  return;
}

What's wrong with that code?

And i've got other problems (measuring voltages with comparators) with
another code with nested interrupts. 
Does mspgcc handle nested interrupts in another way as iar does?

Rolf




-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


Reply via email to