The first thing that you must know it is that when you create a project with the wizard that wavecom gives you have the main that means your main function is unuseless (it defined too 2 vars for stack). you can move your main code there.
generate the project and then you can your code to the main function supplied in appli.c
About your code it has some things that show that you have not to much control about C, let me explain to you that C it is easy to make some simple things but it is difficult to manage in a proper way, i strongly recomend that you take some tutorials or books about C.
void tokenArr(char *theString,char *charArr,char *chDel);
void showArray(char *charArr);
you are passing the address of the first position in the array, it has no sense give the length of the array (indeed you have no way to know that if you do not pass an extra argument giving the size)
i think you can not use use in wavecom software
i hope you are trying to declare a array of 10 pointers to char and not a pointer to an array of 10 chars.
and why do not initialize to NULL ??? as you must know the auto vars have garbage as init values
another thing, you have 10 pointers to char, but do you get the arrays space? where are declared?
(as i see in your code the pointers will point to somewhere in String (all of them) )
i strongly recomend init vars
char String[30] = “\0”;
char *token = NULL;
i think you will be agree that is better as you give the token in the function
token = strtok(theString, charDel); //first token
this not save the string in the array, indeed you have no array of chars you have only an array of pointers to char,
you are assign the pointer of charArr[i] to point to token (some memory location inside of String array)
to save it on array you must reserve some mem position by define an array and then use strcpy if you really want to do that.
do you know that this will be assign to your last used charArr[i] = NULL?
that means that you can only get 9 words before to crash
do you considerer to make some secure array length test?
well guy ansi C and gcc used by wavecom do not allow you to declare i inside the for loop you have to do previusly.
int i = 0;
for (i =0;i < 10;i++)
since we have not standard output like a monitor in the modem i think that you can not use printf inside wavecom modem .
do you still think that you do not need a tutorial of C?