LAUNCHXL-F28P65X: Support Required for Merging DriverLib SysConfig Project with Bitfield Project

Part Number: LAUNCHXL-F28P65X

Hello Team,

I am currently trying to merge a DriverLib SysConfig-based project with a bitfield-based project. I have successfully merged the source files and the project builds without any compilation errors.

However, I am observing the following behavior:

  • When I include f28p65x_headers_nonBIOS_cpu1.cmd, the bitfield-based functionality works correctly, but the DriverLib-based functionality does not work.
  • When I exclude f28p65x_headers_nonBIOS_cpu1.cmd, the DriverLib code works correctly, but the bitfield-based functionality stops working.

It appears that there may be a memory mapping, linker command file, or project configuration conflict between the DriverLib and bitfield environments.

Could you please let me know:

  1. Whether any modifications are required in the .cmd linker files when combining DriverLib and bitfield projects?
  2. If there are any specific project settings, include paths, or linker configurations that need to be updated?
  3. Whether both approaches can coexist in the same project, and if so, what is the recommended method for integrating them?

Kindly let me know the required changes or settings to successfully integrate both DriverLib and bitfield code in a single project.

Thank you for your support.

Best Regards,
Sayali Deshmane

  • Hi Sayali,

    Let me try and  reproduce the issue and get back to you in a bit

    Thanks,

    Ira

  • Hi Sayali,

    Can you try the following

    1. Add the predefined symbil _DUAL_HEADERS to your project properties

    2. Make sure that you have device/support folder in your include path, refer to the following image for more information.

    3. Include driverlib.lib in your linker file search path (C/C++ Linker > File Search Path) so that DriverLib API function calls resolve correctly alongside your direct register/bit-field operations.

    Thanks,

    Ira

  • Hello Ira,

    Thanks for the reply!!

    above suggested changes i have already done by referring the E2E forum threads.

    still i observed the same issue. 

    Please confirm the 3rd point driverlib.lib path is correct.

    Thanks !!

    Sayali Deshmane

  • Hi Sayali,

    Just a heads-up, the expert is OOO today, so they will get back early next week

    Regards,
    Shaunak

  • Hi Sayali,

    1. Make sure you are using only one .cmd file in your project (I assume that this is the case, but it is not clear from your question). Here is how to merge the 2 linker command files to create a single one.

    Step 1  - Open both f28p65x_headers_nonBIOS_cpu1.cmd (Bitfield) and your DriverLib .cmd file in a text editor.

    Identify these two specific blocks in both:

    1. MEMORY { ... } : This defines the hardware boundaries (where Flash starts, where RAM ends).
    2. SECTIONS { ... } : This tells the linker which parts of your code (like .text,.ebss,.stack) go into which memory regions.

    Step 2: Merge the MEMORY Block

    The memory map of the chip is physical; you cannot have two different definitions for the same memory block.
    • Look for overlaps: Check if both files define FLASH,RAML0 , etc.
    • The Rule: If both files define the same memory region (e.g., FLASH: origin 0x080000, length 0x00080000), keep only one definition.
    • Add unique regions: If the Bitfield file defines a specific RAM block that the DriverLib file doesn't mention, add that unique block to your unified MEMORYsection.
    Example of a merged Memory Block:
    MEMORY
    {
        /* Common regions from both files */
        PAGE 0
        /* Keep the definition that is most complete/accurate for your chip */
        FLASH (RX) : origin 0x080000, length 0x00080000 
        RAML0 (RW) : origin 0x000000, length 0x000800
        
        /* Add a unique region found in only one file */
        RAMLS0 (RW) : origin 0x000A00, length 0x000400
        
        /* ... and so on */
    }

    Step 3: Merge the SECTIONS Block

    This is the most critical step. You need to ensure that every piece of code/data has a "home."
    1. Start with the DriverLib SECTIONS: DriverLib requires specific sections for its library functions (usually .text,.const,.ebss).
    2. Append the Bitfield SECTIONS: Add the sections required by your bitfield code (e.g., specific interrupt vectors or custom data sections).
    3. Watch for Conflicts: If both files try to assign .text to different places, you must choose one (usually the one that corresponds to your primary code storage, like Flash).
    Example of a merged Sections Block:
    SECTIONS
    {
        /* 1. Standard DriverLib/Compiler sections */
        .text          : > FLASH, PAGE = 0
        .const         : > FLASH, PAGE = 0
        .ebss          : > RAML0, PAGE = 1  /* Where global variables live */
        
        /* 2. Bitfield-specific sections (e.g., Interrupt Vectors) */
        /* Ensure these don't overlap with the .text section above */
        InterruptVectTable : > FLASH, PAGE = 0
        
        /* 3. Stack and Heap (Ensure these are large enough for both) */
        .stack         : > RAML0, PAGE = 1
    }

    Here, check your
    .text size: Ensure your Flash/RAM section is large enough for both sets of code.

    You have included both the device_support and driverlib folders in your compiler's Include Options - this is correct.

    Can you try creating a single linker command file? If you are already using a single .cmd file can you share it?

    Thanks,
    Ira
  • Hello Ira,

    Thank you for the detailed explanation. I have made the required changes in the CMD file, and the issue is now resolved.

    Could you please suggest whether it is recommended to keep both 28p65x_generic_flash_lnk_cpu1.cmd and f28p65x_headers_nonBIOS_cpu1.cmd in the same project? I have both the files in same project.

    Thanks,

    Sayali Deshmane

  • Hi Sayali,

    I would recommend having a single cmd file.

    Thanks,

    Ira