AnsweredAssumed Answered

Errors:range error for small data relocation

Question asked by khadgar yu on Jan 17, 2017

         There is a struct in my [roject,like this,

         typedef struct
           unsigned char Count;
           LabelMapping Mappings[];

       Code warrior 10.6 shows a error of range error for small data relocation,when i used the struct(LabelMappings, show above) in my project. There is a indefinite lengh array that support by C99 in the struct. And the code warrior supports C99. But there is a error when commpiling.

       There are two necessary conditions that lead to this error.One is the flexible array in the struct,the other I define varible ina file and refer the varible in another file.But I can't edit the files in my project.
       If i set the sdata and sdata2 to 0, I can compile the project successfully.But when sdata and sdata2 is 0,my project can;t run into main().My test result,if sdata = 0 and sdata2 = 0,project can run in debug mode, and can't run in noemal mode.

       I updata the new attachments,it is a whole project and can be open by code warrior 10.6.

Original Attachment has been moved to: MPC5645S_TEST.rar