Hi Daniel,
Indeed, this error was my own poor understanding of the C language pointer syntax in general. ;o)
10 years without coding will do that to you.
By using atoi(&tempbuf[0]) or atoi(tempbuf+0) the compile error went away.
The error was: illegal implicit converstion from 'char' to 'const char *'
I used the bracket [0] because I need an index in the string, i.e tempbuf[k] where k points at different locations.
the sample code is
switch (parse_state)
{
case JobParseState_head:
while ((tempbuf[k]==0)||(tempbuf[k]=='*'))
{
job.Job_id = atoi(tempbuf[k]);
do { k++;} while (tempbuf[k]!=' ');
k++;
.....
}
I agree with you that the address space is flat but the modifier const tells the compiler that the variable is not changed during execution and it gets placed in the same segment as code (.rodata and .text respectively). The linker command file then places them into the flash portion of that linear address space. (0x0 on the MCF51AC256)
I guess what threw me off is the difference between atoi(tempbuf+k) and atoi(tempbuf[k]) when accessing a char array. It has nothing to do with const from my embedded point of view.
At any rate... thank you !!!