I have made a structure program in dev C++ compiler and the code works. After that i have used same code with slight modification in CCS. after debug section and running the code, the program is halted and showing the illegal interrupt.
the code is below for the reference.
typedef struct{
char substrings[MAX_SUBSTRINGS][MAX_SUBSTRING_LENGTH]; // Array to store substrings
int count; // Count of substrings
int lastSubstringFlag; // Flag indicating the type of last substring
char lastSubstringPart1[MAX_SUBSTRING_LENGTH]; // First part of the last substring
char lastSubstringPart2[MAX_SUBSTRING_LENGTH]; // Second part of the last substring
int lastSubstringPart2IsNumber; // Flag indicating if the second part is a number
char lastSubstringPart2String[MAX_SUBSTRING_LENGTH]; // Second part as string if not a number
int lastSubstringPart2Number; // Second part as number if applicable
} ControlData;
ControlData string;
ControlData storesubstring(char* inputString);
ControlData processString(char* inputString)
{
// ControlData string;
sprintf(Reply_String, "String after semicolon tokenize : %s\n", inputString);
printMsg(Reply_String);
string.count=0;
return string;
}