Issue with compiler optimization mode in eclipse (EZ USB Suite)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ViKu_2048416
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

Hi,

We are using EZ USB SDK to build our project, the issue we are facing is that, by default the optimization mode for compiling is set to size optimization mode, we can successfully compile the project without any error.

After that, we changed the optimization to none and compiled the project, now we are getting errors like SYS_MEM overflow. Please refer the screen shot for example.

pastedImage_0.png

The above error is expected. But again if I change the optimization to size optimization mode without changing anything, we should not get any error, because we already compiled with this setting and that too complied successfully without any memory overflow error.

But we are facing memory overflow error with 2000 to 3000 bytes. Why is this behavior? The behavior of firmware also has some changes. Can anyone please explain about this.

Changes in the firmware behavior as follows,

1. Same unique ID issue - (Please refer the following link - FX3 Unique ID is same for more than one device) we are facing this issue with initial default setting without changing anything for compiler optimization.

2. If we change the optimization from default (size optimization) to none compiling the project and again revert back to size optimization mode, compiling the project with clearing the memory overflow errors provides the firmware image which does not has same unique ID issue.

Note: We need to know about this variations in optimization modes, because we are fearing about some other issues with this behavior of the SDK. The SDK version we are using is 1.3.3. Please guide us in this issue.

Thanks and Regards,

Vignesh Kumar R.

0 Likes
8 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Vignesh,

Can you please provide a screenshot of EZ-USB Suite IDE showing the optimization setting you are talking about?

Regards,

Hemanth

Hemanth
0 Likes

Hi Hemanth,

Please find the screen shots below,

Optimization level set to Optimize size.

pastedImage_0.png

Optimization level set as none,

pastedImage_1.png

Regards,

Vignesh Kumar R.

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Vignesh,

Did you perform 'clean project' before building it again?

Regards,

Hemanth

Hemanth
0 Likes

Hi Hemanth,

I have tried to clean project before building again, the behavior is same. The memory overflow happens again. But this behavior seems to be differs from SDK version 1.3.1 and 1.3.3. In 1.3.1 the is no memory overflow as well as unique ID issue still persist.

However one thing is clear, that the issue (same unique ID) does not occurs if I make optimization level as none. Could you please comment on this.

Thanks,

Vignesh Kumar R.

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Vignesh,

Did you try using SDK 1.3.4?

Please share your project so that I can check with 1.3.3

Regards,

Hemanth

Hemanth
0 Likes

Hi Hemanth,

I have not tested with SDK 1.3.4 version, will try and update. But the problem is that, we are not sure how changes in 1.3.4 from 1.3.3 will affect our project. So we can not go with latest SDK (V - 1.3.4) even the problem got solved now. However I will test and update for your reference.

I don't have permission to share the project, but I guess we can recreate this issue just by increasing the size of the code. For your information the resultant image file size of our project is 195 KB (with optimization level - Size optimization). With this information could you please reproduce this issue at your side.

Thanks and Regards,

Vignesh Kumar R.

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

If the resulting image size is 195 KB, did you change the .ld file accordingly to support that size?

Regards,

Hemanth

Hemanth
0 Likes

Yes, we normally change fx3.ld file once there is a need, we usually do this for all our projects.

Regards,

Vignesh

0 Likes