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.

LAUNCHXL-F28379D: What is the exact purpose of the "board.h" files in most "driverlib" examples within the Launchpad directory?

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: SYSCONFIG

We are using the F2837xD launchpad to develop a phase-shift modulator. Often I will come across the following error when attempting to port code over from "driverlib examples" to my current project:

"../main.c", line 33: fatal error #1965: cannot open source file "board.h"

I have fished around the forums and I have noticed this is something to do with the "sysconfig" library developed by TI which allows one to use the GUI to program the PWM and GPIO peripherals, among others.

If one is not utilizing the sysconfig functionalities and is instead using driverlib to program the peripherals, is there any need to include these files.

Maybe I am not fully understanding the way sysconfig works, but a majority of these examples also have functions which directly program the PWM, such as:

EPWM_setFallingEdgeDelayCount(base, 200);
EPWM_setRisingEdgeDelayCount(base, 400);

For setting the FED and RED values.

Can someone elaborate on why "board.h" is included in these files if it is not being used, or if it is being used, where?

Will my program work the same if I copy this code over and remove the board.h inclusion?

Best regards,

JMH

  • Hi JMH,

    We need to include board.h header if the example that you are working is based on Sysconfig.

    If one is not utilizing the sysconfig functionalities and is instead using driverlib to program the peripherals, is there any need to include these files

    if the example is not utilizing sysconfig funcitonality, you can exclude the board.h header.

    Can someone elaborate on why "board.h" is included in these files if it is not being used, or if it is being used, where?

    If you are setting the peripheral configuration (Eg GPIO) through Sysconfig, board.h file will include the corresponding GPIO macros and the initialization function for GPIOs.

    Will my program work the same if I copy this code over and remove the board.h inclusion?

    Yes, you can remove the board.h header if the example is not using Sysconfig tool to configure the peripherals.

    Thanks

    Aswin