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.

MSP432E401Y: Error when setting NDK stack priorities via sysconfig

Part Number: MSP432E401Y
Other Parts Discussed in Thread: SYSCONFIG

sysconfig versions 1.17.0 and 1.18.0

SimpleLink MSP432e4 SDK 6.41.00.17

When changing the default values of the NDK Created Thread section of sysconfig will use a not-declared variable "u32cval" in ti_ndk_config.c.

.syscfg

General.kernPriLevel        = 20;
General.highPriTaskPriLevel = 15;
General.normPriTaskPriLevel = 10;
General.stackThreadPriLevel = 15;
General.lowPriTaskPriLevel  = 5;

Auto generated ti_ndk_config.c:

    /* config low priority task level */
    u32cval = ;
    CfgAddEntry(hCfg, CFGTAG_OS, CFGITEM_OS_TASKPRILOW, CFG_ADDMODE_UNIQUE,
            sizeof(uint32_t), (unsigned char *)&u32cval, 0);

    /* config normal priority task level */
    u32cval = 10;
    CfgAddEntry(hCfg, CFGTAG_OS, CFGITEM_OS_TASKPRINORM, CFG_ADDMODE_UNIQUE,
            sizeof(uint32_t), (unsigned char *)&u32cval, 0);

    /* config high priority task level */
    u32cval = 15;
    CfgAddEntry(hCfg, CFGTAG_OS, CFGITEM_OS_TASKPRIHIGH, CFG_ADDMODE_UNIQUE,
            sizeof(uint32_t), (unsigned char *)&u32cval, 0);

    /* config kernel priority task level */
    u32cval = 20;
    CfgAddEntry(hCfg, CFGTAG_OS, CFGITEM_OS_TASKPRIKERN, CFG_ADDMODE_UNIQUE,
            sizeof(uint32_t), (unsigned char *)&u32cval, 0);

The "General.lowPriTaskPriLevel  = 5;" entry is translated into an empty value, the others are set correctly, just that "u32cval" has never been declared before.

  • Hi Peter,

      Unfortunately, I actually don't know what went wrong with the generated code. If I change to General.lowPriTaskPriLevel  = 5, I do see that u32cval becomes unassigned.

      When I look at the stock example in the SDK for tcpecho, the u32cval is supposed to be the pointer to the task stack, not the priority level. The priority level should be encoded in CFGITEM_OS_TASKPRILOW. It seems to me it is more than just the u32cval is not declared correctly. Seemingly there are other issues which I don't have the knowledge into the generated code. 


  • I have added a function setting the prio levels as a workaround so I do not rely on the sysconfig settings, however something is wrong here.

  • Hi Peter,

      Agree that something is wrong here. Please let me know if your added function is able to fully resolve the issue. 

  • Yes yes, adding the function resolves it. I just told you in case someone wanted to fix this...

        /* config low priority task level */
        p = TASK_PRIO_LOW;
        CfgAddEntry(hCfg, CFGTAG_OS, CFGITEM_OS_TASKPRILOW, CFG_ADDMODE_UNIQUE, sizeof(uint32_t), &p, 0);
    
        /* config normal priority task level */
        p = TASK_PRIO_MEDIUM;
        CfgAddEntry(hCfg, CFGTAG_OS, CFGITEM_OS_TASKPRINORM, CFG_ADDMODE_UNIQUE, sizeof(uint32_t), (unsigned char*) &p, 0);
    
        /* config high priority task level */
        p = TASK_PRIO_HIGH;
        CfgAddEntry(hCfg, CFGTAG_OS, CFGITEM_OS_TASKPRIHIGH, CFG_ADDMODE_UNIQUE, sizeof(uint32_t), (unsigned char*) &p, 0);

  • Hi Peter,

      Thank you for sharing.