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.

CC1352P: how to override macros defined in SDK source files?

Part Number: CC1352P


Tool/software:

Hi,

I am trying to increase the TX queue size as defined in one of SDK (v7.41) source files:

// ti154stack\high_level\mac_cfg.c

/* maximum number of data frames in transmit queue */
#ifndef MAC_CFG_TX_DATA_MAX
#define MAC_CFG_TX_DATA_MAX         16
#endif

/* maximum number of frames of all types in transmit queue */
#ifndef MAC_CFG_TX_MAX
#define MAC_CFG_TX_MAX              40
#endif

/* maximum number of frames in receive queue */
#ifndef MAC_CFG_RX_MAX
#define MAC_CFG_RX_MAX              16
#endif

I see a few options, one is to define those macros in application\defines\collector.opt

-DMAC_CFG_TX_DATA_MAX=16
-DMAC_CFG_TX_MAX=40
-DMAC_CFG_RX_MAX=16

The other option is in project properties->CCS Build->Arm Linker->Advanced Options->Command File Preprocessing

Could you please advise which is the recommended way? I don't see an easy way to verify if the macros are successfully overridden, also don't want to change the SDK files themselves.

Thanks,

ZL 

  • Hello Zhiyong Li

    I hope you are doing well. I first wanted to ask if this application is sub-1 frequency band or 2.4 GHz? 

    Macro wise (also called configurable parameters) we have the following structure: 

    /* configurable parameters */
    macCfg_t macCfg =
    {
      MAC_CFG_TX_DATA_MAX,
      MAC_CFG_TX_MAX,
      MAC_CFG_RX_MAX,
      MAC_CFG_DATA_IND_OFFSET,
      MAX_DEVICE_TABLE_ENTRIES,
      MAX_KEY_DEVICE_TABLE_ENTRIES,
      MAX_KEY_TABLE_ENTRIES,
      MAX_NODE_KEY_ENTRIES,
      MAX_KEY_ID_LOOKUP_ENTRIES,
      MAC_CFG_APP_PENDING_QUEUE,
      MAC_MAX_FRAME_SIZE
    };

    And as you have noted you have modified the MAC_CFG_TX_DATA_MAX macro define to 16 (which should now be reflected in debugging). Try to debug the device and in the expressions put the structure (macCfg) or macro (MAC_CFG_TX_DATA_MAX) to see what it is set to. 

    Thanks,
    Alex F