This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR2355: strncat not adding value ??

Part Number: MSP430FR2355


Why won't my mssg add sensor into it?

See code below:

sensor is 0x30 but for some reason it will not add it to the message.  permanent_Info gets added into mssg just fine....BUFFER is 32

#pragma DATA_SECTION (permanent_Info, ".info")
char permanent_Info[5] = { [0 ... 4] = 0xFF};
#pragma RETAIN (permanent_Info)

char *mssg, sensor = 0xFF, Send[BUFFER_SIZE] = {[0 ... BUFFER_SIZE-1] = 0xFF};

    mssg = Send;

                            strcpy(Send, "JA");
                            mssg = strncat(mssg, permanent_Info, 4);
                            mssg = strncat(mssg, sensor, 1); //system ID from client
                            m = strlen(mssg);
                            CRC_Result = CRC(mssg, m);

**Attention** This is a public forum