CuoreDiGhiaccio 0 Posted December 12, 2013 Report Share Posted December 12, 2013 (edited) Hi, sometime with unsigned int variable and optimization flag = on, compiler fail in some comparison test: unsigned int i; // in asm file: gbl_i EQU 0x00000050 ; bytes:2 if (i==0) { do something } the generated code (some times, randomly), this is: movf gbl_i, f btfss status, z goto label the code: movf gbl_i+D'1', f btfss status, z is missing, so when value is 256 the expression is condidered true. Recompiling all work fine for some times but it can appear in other part of code with other variable with the same comparison type. Apparently appear to be optimization the cause, but i'm not sure, i'll see it with the time. In the meantime I can only hope that the 500 elevators with only the firmware recompiled not have the problem. Regards Please do not consider this post, i found that sometime Build Fail and sometime no. Edited December 12, 2013 by CuoreDiGhiaccio Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.