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.

Are all sections of Board.h and associated Files required?

Hello,

I'm trying to minimize my firmware size while using the TI-RTOS and wanted to know of all sections of the hardware description files are required. All of the TI-RTOS examples I've looked at have code for:

  • Board_initGeneral
  • Board_initGPIO
  • Board_initI2C
  • Board_initSDSPI
  • Board_initSPI
  • Board_initUART
  • Board_initUSB 
  • Board_initWatchdog
  • Board_initWiFi

Each area contains the actual initialization function, but also has some DATA_SECTION pragmas. If I'm not using say the Wifi or Watchdog, can I delete all of the code from the .c and .h files relevant to it? 

Thank you!

Regards,

Blair

  • Hi Blair,

    Actually, the #pragma DATA_SECTION() statements in the board files were added to help the TI linker remove code that is not used. If your application does not use SPI (for example), all SPI related objects and functions are removed. You can confirm this by searching the .map file for unused APIs.

    If you want to minimize the size of your application, please see the Memory Usage with TI-RTOS section of the TI-RTOS Users Guide.

    Regards,
    -- Emmanuel.