Hello
Just my 10 cents on that one.
When you are building in BANKED memory model, strcpy assumes per default, that all pointer are 16-bit wide.
If you need to pass 24-bit pointer to strcpy, you need to rebuild an ansi library supporting 24-bit pointer to char.
There should be an FAQ around that in the system.
BAsically:
- Open the project HC12Lib.mcp
- Edit the file libdefs.h located in the installation directory "LIB\HC12C\include". In this file modify lines 74 and 78 as follows:
#define LIBDEF_FAR_CONST_STRINGS 1
#define LIBDEF_FAR_STRINGS 1
- Generate the library again. This can be done using the project hc12 lib.mcp located in the installation LIB\HC12C directory. Technical note TN105 provide you information how to generate a new library.
If you are using HCS12 CPU, make sure to compile your application and the library with -CpPPAGE=RUNTIME to let compiler know banked constant must be accessed using runtime function.
I attached the referenced Technical note to this thread.
CrasyCat