|
|||||||||||
Technical Support Support Resources
Product Information |
C51: Data Overlaying Problem with Struct ParametersInformation in this article applies to:
SYMPTOMWhen a function receives two or more struct arguments, and one of these arguments is the return value of another function, the data overlaying may fail. Example:
CAUSEstructs are returned in fixed memory addresses. When the struct is used again as a parameter to another function, the parameter may overwrite the values in the return struct. RESOLUTIONFunctions that receive more than one struct parameter can be excluded from data overlaying using the overlay directive of the linker. The following linker directive excludes the function cfloat_mul from data overlaying:
Similar functions may be overlaid in a separate root. The following linker directive overlays the data of cfloat_mul and cfloat_add but ensures that the struct parameters of the individual functions are not overwritten:
In µVision, the arguments of the OVERLAY directive are entered under Project - Options - Linker Misc. MORE INFORMATION
Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.