I am recompiling a known Keil project with the latest Hi Tech compiler. This is a USB application using some reference code from SiLabs application notes. There are 3 string constants in code memory for the USB descriptors and an array that is supposed to point to each of the 3 strings.
The strings are declared like this:
const unsigned char String2Desc[STR2LEN] = ...
And the array of pointers to the strings is declared like this:
I am getting warning "(359) illegal conversion between pointer types", but the code is still compiling. I would like get rid of the warning and be sure that everything is going to work correctly - any suggestions?
Aside from that, the program space with the Hi Tech compiler is 92% of what Keil is generating and the data space is coming in at 119%.
I still have a warning about the illegal conversion between pointer types, but it is because I am assigning one of the elements of StringDescTable to a generic unsigned char pointer variable that is not declared as "code const". Strange to me that it is described as "illegal" but only throws a warning?
My USB device is not enumerating correctly under the HT build, so I think I have it down to either this being the problem, or there is an initialization source file that Keil provides to be built in to your projects. I omitted this thinking that HiTech would generate their own initialization code, but maybe there is something needed in there?
-------------------- Brian St Jacques
Post Extras:
clyde
HI-TECH team member
Reged: Oct 16 2003
Posts: 622