We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have a program I am converting from a Rabbit Dynamic C to Keil Arm C and cant get this one intruction to work.At first it only had a routine warning about implicit function but then I tried to add a function template at the start and cant seem to get this to work with out the error (at the bottom below). Its a simple routine that puts out strings in rom to a svga parallel port depending on the pointer when invoked. I tried the knowledgebase suggestions and they don't make it better. Any help would be appreciated. Thanks and happy Friday. David //function void vmsgo(char *); //actual /* Send out 160 ASCII characters to svga module* The x & y are preset */ vmsgo(char *mp) { char *msgp; char a; char c; c = 0; msgp = mp; loop: a= msgp[c]; if (a == 0) { goto endd; //return; } else { vgaout(a); //send directly to cygnal c++; if (c == 255) goto endd; //safety for illegal messages in debug goto loop; } endd: } //user vmsgo(&msgb); //L= //msessage const char msgb[]="L="; error in Keil is: 8500.C(1075): error: #167: argument of type "const char (*)[3]" is incompatible with parameter of type "char *"
There were instructions above the box where you entered your post about posting source code. Please follow them next time. Anyhow, this line:
vmsgo(&msgb); //L=
vmsgo(msgb); //L=
sorry. Also, that change didn't have any effect.
change didn't have any effect. I'm close to 100% certain that observation is not true. At the very minimum, it'll change the error message you get.
"8500.C(1075): error: #167 ..." Which line is this referring to?
actually the message did change a little to A8500.C(1087): error: #167: argument of type "const char *" is incompatible with parameter of type "char *"
that line you suggested I change is the error line.
"actually the message did change a little ..." "A little" to you perhaps. It's significant to me. This is all basic 'C' stuff. Do one of these things:
That's a bit of a stretch for me. I am basically an assembler guy. That why I use the Rabbit when I must do C. I was hoping to upgrade to Keil but it might be a bit much. I am about halfway in converting a 4000 statement rabbit program and this was the first "toughie".
"That's a bit of a stretch for me." Then I'll be a little more specific. Do one of these things:
vmsgo((char*)msgb);
Just to let you know that doing item 3 worked (casting). Thanks for the help.Maybe I can leave the rabbit patch behind.
"Just to let you know that doing item 3 worked (casting). Thanks for the help." Thanks for the feedback and you're welcome. "Maybe I can leave the rabbit patch behind." I've done a little Rabbit development myself. Too bad Dynamic C isn't closer to "real" C.