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.

TMS320F28379D: ControlSuite to C2000Ware USB Conversion

Part Number: TMS320F28379D
Other Parts Discussed in Thread: CONTROLSUITE

I have a large program that we have been writing and testing for the last few years.

It initially was created using controlSuite and some USB throughput test code I got from TI.
I got the USB running and pushing data out at the required rate.
After this I did not need the USB so I excluded it from the build to speed up compiling and testing.

Now we are getting close to releasing the product and I have spent a week trying to put the USB back.
The F2837xD Peripheral Driver Library has been deprecated, so I tried to add the driverlib.lib where the USB is now.
Now I get plenty of conflicts like this below, what can I do to get the USB running again easily.
Any steps for adding this without saying take an example and start from it, I have thousands of lines of code.

Example issue:
None of these are deprecated and from what I read they should work together.

This TI file is in the projecet "F2837xD_Adc.c" it includes "F2837xD_Adc_defines.h" which defines:
#define ADC_RESOLUTION_12BIT 0

To add driverlib.lib I have included this in the project "driverlib.h" it includes "adc.h" which defines
typedef enum
{
     ADC_RESOLUTION_12BIT = 0x00, //!< 12-bit conversion resolution
     ADC_RESOLUTION_16BIT = 0x40 //!< 16-bit conversion resolution
} ADC_Resolution;

This redefinition causes an error, this is only an example a few more exist.

  • Gomez, 

    Looks like your code is using both driverlib and bitfield headers , hence you are seeing this issue. 

    DUAL_HEADERS predefine should be added if you are combing both driverlib and bitfield headers in a single CCS project.

    You can add it as a predefined symbol in the CCS project.

    It is added to avoid such conflicts in enums/structs/macros which share the exact same names in bitfield and driverlib headers

    Let me know what are the other errors that you are observing.

    Best Regards

    Siddharth

  • Great, that helped a lot, thanks.
    By the way the actual predefined symbol is "_DUAL_HEADERS" with a leading underscore.

    Now all I have left looks to be the items below:

    It looks like the functions "SysCtlAuxClockSet" and "SysCtlClockSet" have been deprecated, so I need replacements.

    I get the warnings "incompatible redefinition of macro" for the 15 defines: 
         BROM_IPC_EXECUTE_BOOTMODE_CMD
         C1C2_BROM_BOOTMODE_BOOT_COMMAND_MAX_SUPPORT_VALUE
         C1C2_BROM_BOOTMODE_BOOT_FROM_CAN
         C1C2_BROM_BOOTMODE_BOOT_FROM_FLASH
         C1C2_BROM_BOOTMODE_BOOT_FROM_I2C
         C1C2_BROM_BOOTMODE_BOOT_FROM_PARALLEL
         C1C2_BROM_BOOTMODE_BOOT_FROM_RAM
         C1C2_BROM_BOOTMODE_BOOT_FROM_SCI
         C1C2_BROM_BOOTMODE_BOOT_FROM_SPI
         C2_BOOTROM_BOOTSTS_C2TOC1_BOOT_CMD_ACK
         C2_BOOTROM_BOOTSTS_C2TOC1_BOOT_CMD_NAK_STATUS_BUSY_WITH_BOOT
         C2_BOOTROM_BOOTSTS_C2TOC1_BOOT_CMD_NAK_STATUS_NOT_SUPPORTED
         C2_BOOTROM_BOOTSTS_C2TOC1_IGNORE
         C2_BOOTROM_BOOTSTS_SYSTEM_READY
         C2_BOOTROM_BOOTSTS_SYSTEM_START_BOOT

    In "F2837xD_Ipc_drivers.h" the hexadecimal literals have no "U" at the end and in "device.h" they do.
    TI should probably fix this in the next update, unless you have something.

    I think I can ignore the warnings unless you have something to clean that up.

  • Gomez, 

    SysCtlAuxClockSet is available in driverlib as SysCtl_setAuxClock whereas SysCtlClockSet is available as SysCtl_setClock. 

    Best Regards

    Siddharth

  • It' running again, thanks.