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.

TMS320F28388D: Limit the number of Strings to uint8_t pointer array

Part Number: TMS320F28388D

Hi

I am trying to apply cJSON to 28388D (using CPU 2).
There are two problems.

Problem 1. What is the string length limit for a pointer variable declared as uint8_t?
When declaring more than a certain number, a compilation warning occurs.

Problem 2. I received JSON data with SCI and saved it as an array.
I am trying to parse using the cJSON_Parse function, but the cJSON_Parse function returns NULL.

Are there any users who have encountered this problem?

add. attached cJSON.C, cJSON.h

Thanks

<SCI RX Interrupt Source code>

__interrupt void sciaRXFIFOISR(void)
{

    receivedChar1[test_flag] = SCI_readCharBlockingFIFO(SCIA_BASE);

    test_flag++;

    SCI_clearOverflowStatus(SCIA_BASE);

    SCI_clearInterruptStatus(SCIA_BASE, SCI_INT_RXFF);

    //
    // Issue PIE ack
    //
    Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP9);
}

<<cJSON Parse Function>>

void cJSON_Parser_Test(void)
{
    if(Parse_Test_Flag == 1)
    {
        json = cJSON_Parse(receivedChar1);
       Parse_Test_Flag = 0;
       Parse_Test_Flag = 0;

    }
    if(Test1 == 1)
    {
        if(json == NULL)
        {
            ERR_Flag_Test = 1;
            cJSON_GetErrorPtr();
            Test1 = 0;
        }
        else
        {
            Test1 = 2;
        }
    }
    else if (Test1 == 2)
    {
        responseType = cJSON_GetObjectItem(json, "InitialRequest");
        if( responseType == NULL )
        {
            ERR_Flag_Test = 2;
        }
        else
        {
            Test1 = 3;

        }
    }
    else if (Test1 == 3)
    {
        obj = cJSON_GetObjectItem(responseType, "messageID");
        if(obj == NULL)
        {
            ERR_Flag_Test = 3;
        }
        else
        {
            Test1 = 4;
        }
    }
}

7558.cJSON_git.c3005.cJSON_git.h