Forum : ST7/STM8
Post Information | Post |
---|---|
March 10, 2010 - 5:25pm
|
Hi, I am experiencing a problem where the RKit-STM8 build tools are sometimes removing a function because it appears "uncalled" but actually it is called. Optimization is disabled (Size / 0), but I tried enabling it (Size / 3), and found it to make no difference. I do find that shortening the size of the function in which this problem occurs seems to cause the problem to disappear, but I am not sure why. Could you please help me determine what is going on here? If you email me I may be able to send you portions of the source code, but I do not want to post it to the forum. From bad map file: From good map file: Image of correctly generated call instruction: Image of incorrectly generated call instruction: Here is my version information: |
Hi Jacob,
Thanks for your detailed report. We have succesfully reproduced and fixed the problem. It can arise on projects with a very large number of externs, which was the case with your Args.h "EXT" trick (which I will not disclose here ;^)
In such cases the linker can mess up a fixup, hence will not correctly resolve an object address, which was the case of your I2C_Deinit() function.
The problem has been fixed. We were about to release a new RKit-STM8 but we will perform a new validation pass that includes this fix, so hopefully you will have a corrected RKit within few days.
BTW although I only spent few hours on it I wanted to congratulate you and your team for the quality of your code, very well documented and appropriately structured for an 8-bit architecture!
Best Regards,
Bruno
Thanks again for all of your efforts; we are looking forward to the new release!