Juergen Beisert a écrit :
> Nicolas,
>
> On Wednesday 11 July 2007 11:21, Nicolas TOUCHARD wrote:
>   
>> In my soft I use, global structure. In using, some of them are destroyed.
>> I verify all my size declaration, and all seem to be good.
>>     
>
> Are you using initialised or uninitialised structures? Do you share them 
> between different source files?
>   

the structures  are initialised and I've both case , global structure 
exported for other source file, and global structure not exported ...

>   
>> to resolv it, sometime I've to declar the global static and sometimes
>> not .. not very rigorous !!
>>     
>
> Send some pieces of your code, please.
>   


see below
>   
>> The most strange is when it's working with static global structure, if I
>> pass it to non static , it's not working !!
>>     
>
> ? "pass to no static"?
>   
no problem with "static T_SYTGEOBusManager tSytgeoBus;"
but memory problem with "T_SYTGEOBusManager tSytgeoBus;"


>   
>> I really think of a linker or compiler problem.... My compiler command
>> is : arm-softfloat-linux-gcc -wall -O3 -msoftoat.
>>     
>
> PEBCAC? ;-)
>
> Juergen
>
>   

#######################################################################
structure declaration
#######################################################################


// Objet utilisé pour l'émission des trames maître
typedef struct
{
unsigned char ucMaster;                  unsigned char 
ucFonction;               unsigned char ucAdresse;               
unsigned char tucData[aMAC_BUFSIZE_DATA]; union
{
    unsigned char tucCRC[2];
    unsigned short int uiCRC;
} uIntegrity;                       unsigned char ucSize;         } 
T_MACMasterFrame;

// Objet utilisé pour la réception des trames esclaves
typedef struct
{
unsigned char ucError;       unsigned char ucAdresse;  unsigned char 
ucFonction; unsigned char ucSize;        unsigned char 
tucData[aMAC_BUFSIZE_DATA];
 union
{
    unsigned char tucCRC[2];
    unsigned short  int uiCRC;
} uIntegrity;                       } T_MACSlaveFrame;

typedef struct
{
   unsigned char ucState;
    T_MACMasterFrame tAsk;
    T_MACSlaveFrame tAnswer;
   unsigned char ucTimeOutSec;
    TDateTimeObject tDateTimeout;
   unsigned char ucCptTentative;
} T_SYTGEOBusManager;

static T_SYTGEOBusManager tSytgeoBus;

-- 

Nicolas Touchard
NKE electronics
Rue Gutenberg Z.I. de Kerandré
56700 HENNEBONT - FRANCE
Email : [EMAIL PROTECTED]
Tél. : (33) 2-97-36-10-12
Fax : (33) 2-97-36-55-17 


-- 
ptxdist mailing list
[email protected]

Reply via email to