You are here

Structures are overlapping | Cypress Semiconductor

Structures are overlapping

Summary: 1 Reply, Latest post by Bob Marlowe on 03 Jun 2016 12:38 PM PDT
Verified Answers: 1
Last post
Log in to post new comments.
blacktiger's picture
6 posts

Hi.  I'm using PSoC Creator 3.3 SP2 and the supplied arm gcc compiler.

I have some structures which are defined to hold global data.  The structures overlap........  When I clear the memory in 

Session[0]->Receive->Data[ .... ]. I wipe out a significant portion of Source

Anybody have any advice? Can't find out about any maximum structure sizes. All optimization settings are turned off.

// config.h

// this is the main structure for runtime values

struct SourceStr


// bunches of stuff


struct RingBufferStr


      uint8_t Head;

      uint8_t Tail;

      uint8_t Data[256];


struct SessionStr


      struct RingBufferStr    Transmit;

      struct RingBufferStr    Receive;


extern struct SourceStr Source;

extern struct SessionStr Sessions[2];






user_1377889's picture
9268 posts

Your explanation has some conflicts, I cannot see the declaration of "Session" and I cannot see that its member "Receive" is a pointer.

Can you please post your complete project or a compilable excerpt that shows the error, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.




Log in to post new comments.