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.

F28377D-SEP: Selection of different CPU

Part Number: F28377D-SEP
Other Parts Discussed in Thread: TMS320F28388D, SYSCONFIG, C2000WARE

Hi, I am working with the TMS320F28388D dual‑core MCU (CPU1 + CPU2).

My use case is as follows:

  • Fault data is generated in CPU1.
  • I want to store all fault logs in a dedicated raw flash area owned by CPU2.
  • Therefore, CPU1 will transfer the fault data to CPU2 (using IPC), and CPU2 will write the data into its flash region.

This design is intentional: CPU1 only sends data, and CPU2 alone accesses and writes to its flash.

From my understanding:

  • CPU1 is responsible for system boot, flash configuration, and overall ownership setup.
  • CPU2 is booted by CPU1 and runs its own application.
  • The application is built as two separate CCS projects, one for CPU1 and one for CPU2.

I run into errors when trying to set up or program these flash‑related settings. I found recommendations stating that:

  • Flash configuration must be done from a CPU1‑dedicated project.

The problem is that:

  • When creating a new project in CCS, TI‑provided example projects appear generic, and it’s unclear how to ensure the project is truly CPU1/CPU2‑specific.
  • Because of this, I’m unsure whether my CPU1 project is correctly set up to handle flash configuration and CPU2 booting. (Becuase it throws error when I write boot commands)

How to correctly create or identify a CPU1‑dedicated CCS project suitable for:

  • Flash configuration
  • Flash sector allocation
  • CPU2 boot control

What is the recommended way to manage this kind of cross‑CPU flash logging use case on F28388D without running into flash ownership or boot configuration errors.


Below is the image for creating new project - no option to select the CPUs
image.png

When I use an example project (dual empty projects with sysconfig - as recommended by Ti), I enable the flash in sysconfig and write the below line of code in c. But when I build it, errors are present

void main(void)
{
    Device_init();
    Device_initGPIO();

    Board_init();

    MemCfg_setBusMasterAccess(MEMCFG_SECT14, MEMCFG_MASTER_CPU2);
    MemCfg_setBusMasterAccess(MEMCFG_SECT15, MEMCFG_MASTER_CPU2);

    Device_bootCPU2(C1C2_BROM_BOOTMODE_BOOT_FROM_FLASH);

    while(1)
    {

    }

}
image.png

This has blocked me from working further on the project. Let me know how to solve it.

  • Hi Reshma,

    Looking into your issue. Please allow me a day's time to get back to you.

    Thanks,

    Ira

  • I have checked it in 12.8 and 20.5 version of ccs studio and I have the same issue

  • Hi Reshma,

    I would recommend that you use CCS 20.5, and import the CPU1, CPU2 and multi project from C2000Ware_x_x_x_x\driverlib\f2837xd\examples\dual\empty_projects into your clean workspace.

    Here you can edit empty_driverlib_main_cpu1.c and empty_driverlib_main_cpu2.c as per your project. Then you can debug the multi project (it contains a system.xml file which maps the correct binary to the correct cpu) and proceed with your development in that manner.

    Each CPU will have an independent sys config and linker command file but they will work together correctly because of how the system.xml file is set up in the multi project.

    Can you try it in this way and let me know if it works for you?

    Thanks,

    Ira

  • Hi Ira,

    I have used both the ccs studio versions and both have similar issue.

    I started with the example project empty_c28x_dual_sysconfig, as it closely matches my requirement. When this project is created, it generates two separate SysConfig files, one for each CPU.

    To meet my requirement, I made the following changes:

    • In the CPU1 project:

      • Enabled Flash using SysConfig.
      • Added a single line in main.c to boot CPU2.
      • Configured IPC in the same SysConfig file to enable communication between CPU1 and CPU2.
    • In the CPU2 project:

      • Configured IPC to generate an interrupt when a specific IPC flag is set (the same flag configured in CPU1).
      • Wrote a small piece of code to handle the interrupt and log data into Flash.

    I also updated the build includes, include options, and path symbols as required.

    The CPU1 project builds successfully without any errors.

    Problem

    When I try to build the CPU2 project, I encounter multiple build errors. I’m unsure why these errors are appearing or what I might be doing wrong.
    Below is the error

    Below is my main.c from CPU2

    #include "driverlib.h"
    #include "device.h"
    #include "flash.h"
    #include "board.h"
    
    #define FAULT_LOG_FLASH_ADDR 0x08BE00UL // last sector example
    
    typedef struct
    {
    uint32_t source; // CPU1, peripheral ID, etc.
    uint32_t code; // fault code
    uint32_t timestamp;
    uint32_t extra;
    } FaultRecord_t;
    
    
    #pragma DATA_SECTION(cpu1FaultMsg, "MSGRAM_CPU1_TO_CPU2");
    volatile FaultRecord_t cpu1FaultMsg;
    
    
    extern uint16_t Flash_program(uint32_t *, uint32_t *, uint16_t);
    volatile uint16_t *force_flash_link = (uint16_t *)&Flash_program;
    
    
    __interrupt void IPC_0_ISR(void);
    
    void main(void)
    {
    Device_init();
    Interrupt_initModule();
    Interrupt_initVectorTable();
    
    Board_init();
    
    // Register IPC ISR
    // IPC_registerInterrupt(IPC_CPU2_L_CPU1_R,
    // IPC_INT0,
    // IPC_0_ISR);
    //
    // IPC_enableInterrupt(IPC_CPU2_L_CPU1_R, IPC_INT0);
    
    EINT;
    
    while(1)
    {
    
    }
    }
    
    
    void FaultLog_store(FaultRecord_t *fault)
    {
    Flash_claimPumpSemaphore(FLASH_CPU2_WRAPPER);
    
    // Example: append or overwrite logic here
    Flash_program((uint32_t *)FAULT_LOG_FLASH_ADDR,
    (uint32_t *)fault,
    sizeof(FaultRecord_t) / 2);
    }
    
    __interrupt void IPC_0_ISR(void)
    {
    // Acknowledge IPC flag
    IPC_ackFlagRtoL(IPC_CPU2_L_CPU1_R, IPC_FLAG0);
    
    // Copy MSGRAM fault record (important!)
    FaultRecord_t fault = cpu1FaultMsg;
    
    // Store in flash (CPU2-owned)
    FaultLog_store(&fault);
    }


    Below is the linker modifications


    Below is build configurations


    Below is the symbol configuration

    Below is the general configuration

    Regards,

    Reshma

  • Hi Reshma,

    For your CPU2 project, can you remove the FLASH symbol and keep only the _FLASH symbol?

    Thanks,

    Ira

  • Yes, Ira. I removed it and it still has the same errors.

  • Hi Reshma,

    Can you give me these details? 

    A few details would help refine the answer further:

    • Are you using COFF or EABI executable format?
    • Which C2000Ware version is installed?
    • Does your linker command file already have a .TI.ramfunc section configured?

    Thanks,

    Ira

  • Hi Ira,

    I am using empty_c28x_dual_sysconfig example project. In that I'm under CPU2 project. Most of the settings are same apart from the ones that I have already shown before in screenshots.

    1. It is EABI executable format. 

    2. I have installed C2000Ware_26_00_00_00. Most of my settings come from this file that has been shown in the screen shots from before.

    3. .TI.RAMFUNC is preset.

  • Hi Reshma,

    Can you check if you have "C2000Ware_26_00_00_00\libraries\flash_api\f2837xd\lib\F021_API_F2837xD_EABI.lib" library added to your project? If not can you please add it?

    Thanks,

    Ira

  • Hi Ira,

    I'm using F28388D MCU. There was no option to select this MCU during new ticket creation in the community portal. Hence, I have selected a MCU close to this.

    Similar to what you have mentioned, I have already added those files into my project. You can see it in my previous images. I am attaching it again for your reference. Here, I'm only able to add till lib file. Further selection is not possible since during selection it shows empty. I've attached the screenshot for that also.

      

    Regards,

    Reshma.

  • Hi Reshma,

    In your first screenshot, in the Include Library File field , select the add option (the green + symbol), and try to add F2838x_C28x_FlashAPI.lib from the "C2000Ware_26_00_00_00\libraries\flash_api\f2838x\c28x\lib\" path.

    Are you able to do that?

    Thanks,

    Ira

  • Hi Ira,

    No, I'm not able to add "F2838x_C28x_FlashAPI.lib" from "C2000Ware_26_00_00_00\libraries\flash_api\f2838x\c28x\lib\" path. My second screenshot shows the same.

    Right now, I have put these libraries under settings/c2000 linker/file search path. Is that the right place to be put in?

    Should I put them in include options> (settings/build//c2000 compiler/include options)? Here also, I tried adding "F2838x_C28x_FlashAPI.lib" from "C2000Ware_26_00_00_00\libraries\flash_api\f2838x\c28x\lib\" path. But here also, I don't see that option.

    Regards,

    Reshma.

  • Hi Reshma,

    I've sent you an email requesting for a debug call.

    Thanks,

    Ira

  • Thanks Ira,

    The call really helped me understand what was going on.

    The "Flash_program" function was not being called properly because of which the errors were popping up. Once it was commented out for testing. The build was fine.

    Thanks again.