- Hello
Compiler is using run time library call _LOAD_FAR_16 to load data from banked memory,
For this to work:
1- Make sure to link your application with datapage.c
2- Make sure to place the section NON_BANKED in non banked memory in your .prm file.
For HCS12P family microcontrollers, you need to update datapage.c to specify the appropriate PPAGE register (0x15)
This is done as follows in datapage.c:
/* Compile with option -DHCS12 to activate this code */#if defined(HCS12) || defined(_HCS12) || defined(__HCS12__) /* HCS12 family has PPAGE register only at 0x30 */#if defined (HCS12P) /* HC912P128, HCS12P96, HCS12P64, HCS12P32 derivative has PPAGE register only at 0x15 */#define PPAGE_ADDR (0x15+REGISTER_BASE)#else#define PPAGE_ADDR (0x30+REGISTER_BASE)#endif#ifndef __PPAGE__ /* may be set already by option -CPPPAGE */#define __PPAGE__#endif/* Compile with option -DDG128 to activate this code */#elif defined DG128 /* HC912DG128 derivative has PPAGE register only at 0xFF */#define PPAGE_ADDR (0xFF+REGISTER_BASE)#ifndef __PPAGE__ /* may be set already by option -CPPPAGE */#define __PPAGE__#endif#elif defined(HC812A4)/* all setting default to A4 already */#endif
Make sure to add the option -DHCS12P when building your project.
CrasyCat