For intrinsic functions having parameters or return values that indicate addresses, their type is changed from the conventional unsigned long to void *. The changed functions are shown in Table 11.1.
Due to this change, a program using the above functions in V.1.00 may generate a warning or an error about invalid types. In this case, add or delete the cast to correct the types.
An example of a startup program normally used in V.1.00 is shown below. This example will output warning message W0520167 in V.1.01, but this warning can be avoided by deleting the cast to correct the type.
[Usage example of set_intb function]
#include <machine.h> #pragma entry Reset_Program void PowerON_Reset_PC(void) { ... set_intb((unsigned long)__sectop("C$VECT")); //Warning W0520167 is output ... } |
[Example of code changed to match V.1.01]
#include <machine.h> #pragma entry Reset_Program void PowerON_Reset_PC(void) { ... set_intb(__sectop("C$VECT")); //Cast (unsigned long) is deleted ... } |
V.1.01 is provided with section L which is used for storing literal areas, such as, string literal.
Since the number of sections has increased and section L is located at the end at linkage, the optimizing linkage editor may output address error F0563100 in some cases.
To avoid such an error, adopt either one of the following methods.
Add L to the section sequence specified with the Start option of the optimizing linkage editor at linkage. |
[Example of specification in V.1.00]
-start=B_1,R_1,B_2,R_2,B,R,SU,SI/01000,PResetPRG/0FFFF8000,C_1,C_2,C,C$*,D*,P, PIntPRG,W*/0FFFF8100,FIXEDVECT/0FFFFFFD0 |
[Changed example (L is added after C)]
-start=B_1,R_1,B_2,R_2,B,R,SU,SI/01000,PResetPRG/0FFFF8000,C_1,C_2,C,L,C$*,D*, P,PIntPRG,W*/0FFFF8100,FIXEDVECT/0FFFFFFD0 |
By specifying -section=L=C at compilation, the output destination of the literal area is changed to section C, and a section configuration compatible with V.1.00 can be achieved.
Note that this method may affect code efficiency compared to the above method of changing the Start option at linkage.