Hi,
Let me answer in general.
The message you got reports that the variable has different length of the address and the pointer was implicitly converted. If you want to have correct length I suggest you to step the code and check what is happening. The new project and copy/paste c and h files is faster than never ending solution of possible issues.
In this case, it could be probably enough to use explicit conversions. However, in these cases I suggest always to be sure you use correct addressing mode of processing selected by compiler. Probably recompiling of the files is not enough because NEAR/SMALL project has NEAR default placement of variables (up to 64B address) and FAR/BANKED project uses paged addressing/pointers as default. However all accesses can be explicitly handled by near/far modifiers.
I believe when you step the code you will see the issue of pointer usage and conversions.
BW, regarding pointers and functions like memcpy, memmove, I suggest to create own functions if you have uncompatible addresses. The system can use Global, RPAGE or near addressing modes so it is easy to get error.
These functions also uses “void” input parameter so I do not believe they are able to accept correctly input parameters of different formats.
From the CW…when you use project wizard…
Small memory model
The Small memory model is best suited if both the code and the data do fit into the 64 kB address space.
By default all variables and functions are accessed with 16 bit addresses. The compiler does support banked functions or paged variables in this memory model, however
all accesses have to be explicitly handled.
The small memory model should be used for all derivatives with less than 64k
Banked memory model
“The Banked memory model is using banked function calls by default. The default data access however is still 16 bit.
Because the overhead of the far function call is not very large, this memory model suits all applications with more than 64k code.
Data paging can be used in the banked memory model, however all far objects and pointers to them have to be specially declared.”
--------
You also will see my “far” modifiers to be sure the variable is correctly compiled.
In order to change memory model from near to banked I always suggest to create a new project for given model because there can be any issues which we are not able to locate.
I have attached examples of RAM addressing for XDT and one for XP. The XEP is a different family but principle of addressing is the same. The example shows how to use RAM linearly by GPAGE instructions. (look also into prm file)
Best regards,
Ladislav