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.

TMS320F28374S: Debug Error with TMS320F28374S and Request for Assistance

Part Number: TMS320F28374S

Dear Sir or Madam,

I am encountering an issue while debugging a project using the TMS320F28374S microcontroller. During debugging, I receive the following error message:

"No source available for '_system_post_cinit() at D:\LLCDebugProblem\EVDP-UA603W0001_LLC_S0.01T25\Debug\EVDP-UA603W0001_LLC_S0.01T25.out:{3} 0x3fe493{4}'"

The compiler version used is TIv20.2.5.LTS. We have taken the following actions to address this issue:

  1. Switching the compiler version to TIv22.6.1LTS (with optimization level set to 'off') also resolves the problem and enables normal debugging.

Additionally, debugging can proceed into the main function; however, after initializing the EEPROM, just before initializing the Flash, the debug process encounters an error and cannot continue further.

I need assistance with the following:

  1. The root cause of this issue.

Currently, we speculate that our company's encryption software might be causing file parsing errors, and the newer compiler version (TIv22.6.1LTS) may have implemented isolation measures for these files. However, we do not have concrete evidence to support this theory. We sincerely request assistance from TI engineers.

Additionally, I have attached relevant screenshots of the settings for your reference.

Best Regards,

Cheng Yulong

  • Hi Cheng,

    The message from CCS means that the program has stopped in "_system_post_cinit()" but CCS is not able to locate the source code for that.  It will show that message and prompt you to provide the location where the source is located or give the option to open the disassembly view. In your case that function is likely implemented in assembly code or a library that is part of the example being run.

    It seems like you have a custom _system_post_cinit function in your .out. The standard _system_post_cinit function provided in the compiler is an empty function. Please check your function implementation and check what condition led to the error.

    I also have a couple clarifying questions:

    1. What is the startup code that you are using before branching to main function?

    2. Can you share your compilation log?

    the debug process encounters an error and cannot continue further.

    3. What is this error?

    Best,

    Taylor

  • Dear Taylor,

    Firstly, I will answer your three questions:

    1. I don't quite understand what you mean by branching to the main function; the issue occurs during flash initialization;
    2. Fullscreen
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      **** Clean-only build of configuration Debug for project EVDP-UA603W0001_LLC_S0.01T25 ****
      "D:\\ti\\ccs1120\\ccs\\utils\\bin\\gmake" -k clean
      DEL /F "EVDP-UA603W0001_LLC_S0.01T25.hex" "EVDP-UA603W0001_LLC_S0.01T25.out"
      DEL /F "Sources\01_common\AppBootShareRam.obj" "Sources\01_common\AppCodeStart.obj" "Sources\01_common\ClaTab_CosQ14_AngleQ7.obj" "Sources\01_common\ClaTab_FtoQ.obj" "Sources\01_common\ClaTab_QtoF.obj" "Sources\01_common\ClaTab_SinQ14_AngleQ7.obj" "Sources\01_common\CpuTab_CosF32_AngleQ7.obj" "Sources\01_common\CpuTab_FtoQ.obj" "Sources\01_common\CpuTab_QtoF.obj" "Sources\01_common\CpuTab_SinF32_AngleQ7.c.obj" "Sources\01_common\F2837xS_CodeStartBranch.obj" "Sources\01_common\common.obj" "Sources\01_common\logger.obj" "Sources\02_Driver\adca_v2.obj" "Sources\02_Driver\adcb_v2.obj" "Sources\02_Driver\adcc_v2.obj" "Sources\02_Driver\adcd_v2.obj" "Sources\02_Driver\cana.obj" "Sources\02_Driver\canb.obj" "Sources\02_Driver\cla_v2_PRAM4K_DRAM8K.obj" "Sources\02_Driver\cmpss_v3.obj" "Sources\02_Driver\dac.obj" "Sources\02_Driver\ecap_apwm.obj" "Sources\02_Driver\epwm_hb_pwm_v3.obj" "Sources\02_Driver\epwm_independent_v3.obj" "Sources\02_Driver\epwm_interleave_v3.obj" "Sources\02_Driver\epwm_llc_burst_v4.obj"
      DEL /F "Sources\02_Driver\epwm_llc_pfm_v3.obj" "Sources\02_Driver\epwm_llc_sr_v5.obj" "Sources\02_Driver\epwm_soca_v2.obj" "Sources\02_Driver\scia.obj" "Sources\02_Driver\scib.obj" "Sources\02_Driver\scic.obj" "Sources\02_Driver\tim0_soc.obj" "Sources\02_Driver\tim1_sys_tick.obj" "Sources\02_Driver\tim2_clock_cycle.obj" "Sources\02_Driver\watchdog.obj" "Sources\02_Driver\cpu\cpu.obj" "Sources\02_Driver\cpu\cpu1_f2837xs_default_isr_FULL.obj" "Sources\02_Driver\flash\flash.obj" "Sources\03_ServiceLayerLib\flextoolset_lib\03_console.obj" "Sources\03_ServiceLayerLib\flextoolset_lib\03_virtual_sci.obj" "Sources\03_ServiceLayerLib\load_share_v2_lib\load_share_v2.obj" "Sources\03_ServiceLayerLib\onewire_eeprom_lib\onewire_eeprom_v2.obj" "Sources\03_ServiceLayerLib\snap_protocol_lib\Snap.obj" "Sources\04_ServiceLayerAPI\CanProtocolAPI\CanProtocolAPI.obj" "Sources\04_ServiceLayerAPI\CanProtocolAPI\CustomerProtocolHandler_A.obj" "Sources\04_ServiceLayerAPI\CanProtocolAPI\CustomerProtocolHandler_B.obj" "Sources\04_ServiceLayerAPI\CanProtocolAPI\CustomerProtocolHandler_Debug.obj"
      DEL /F "Sources\04_ServiceLayerAPI\EepromAPI\EepromAPI.obj" "Sources\04_ServiceLayerAPI\EepromAPI\EepromAPI_UserHandler.obj" "Sources\04_ServiceLayerAPI\FactoryProtocolAPI\FactoryProtocolAPI.obj" "Sources\04_ServiceLayerAPI\FactoryProtocolAPI\FactoryProtocol_CailCmdVbusUserHandler.obj" "Sources\04_ServiceLayerAPI\FactoryProtocolAPI\FactoryProtocol_CailCmdVrstUserHandler.obj" "Sources\04_ServiceLayerAPI\FactoryProtocolAPI\FactoryProtocol_CaliCmdUserHandlerDefault.obj" "Sources\04_ServiceLayerAPI\FactoryProtocolAPI\FactoryProtocol_CaliVoutVoltageUserHandler.obj" "Sources\04_ServiceLayerAPI\FactoryProtocolAPI\FactoryProtocol_RdCmdUserHandlerDefault.obj" "Sources\04_ServiceLayerAPI\FactoryProtocolAPI\FactoryProtocol_SendCanMessageHandlerDefault.obj" "Sources\04_ServiceLayerAPI\FactoryProtocolAPI\FactoryProtocol_WrCmdUserHandlerDefault.obj" "Sources\04_ServiceLayerAPI\FlexToolSetAPI\AppFwCode.obj" "Sources\04_ServiceLayerAPI\FlexToolSetAPI\FlexToolSetAPI.obj" "Sources\04_ServiceLayerAPI\FlexToolSetAPI\IdTableTemplate.obj"
      DEL /F "Sources\04_ServiceLayerAPI\FlexToolSetAPI\SlipMasterEventHandler\SlipMaster1EventHandler.obj" "Sources\04_ServiceLayerAPI\FlexToolSetAPI\SlipMasterEventHandler\SlipMaster2EventHandler.obj" "Sources\04_ServiceLayerAPI\FlexToolSetAPI\SlipMasterEventHandler\SlipMaster3EventHandler.obj" "Sources\04_ServiceLayerAPI\FlexToolSetAPI\SlipMasterEventHandler\SlipMaster4EventHandler.obj" "Sources\04_ServiceLayerAPI\LoadShareAPI\LoadShareAPI.obj" "Sources\04_ServiceLayerAPI\LoadShareAPI\LoadShareCtrl.obj" "Sources\04_ServiceLayerAPI\LoadShareAPI\LoadShareV2_CFG.obj" "Sources\04_ServiceLayerAPI\SlipProtocolAPI\SlipMasterArm.obj" "Sources\04_ServiceLayerAPI\SlipProtocolAPI\SlipMasterPFC.obj" "Sources\04_ServiceLayerAPI\SlipProtocolAPI\SlipSlaveLLC.obj" "Sources\04_ServiceLayerAPI\SnapProtocolAPI\SnapProtocolAPI.obj" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\anti_windup_pi.obj" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\differentiator.obj" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\dsp_ctrl_lib.obj" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\dynamic_test.obj"
      DEL /F "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\fan_speed_detector.obj" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\first_order_bpf.obj" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\first_order_hpf.obj" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\first_order_lpf.obj" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\incremental_pi.obj" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\integrator.obj" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\one_p_one_z.obj" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\period_detector.obj" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\poly_fit.obj" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\rate_limiter.obj" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\resonator.obj" "Sources\06_DigitalCtrlAPI\DigitalLLC.obj" "Sources\06_DigitalCtrlAPI\FastShortDetect.obj" "Sources\06_DigitalCtrlAPI\TPLlcDriver.obj" "Sources\06_DigitalCtrlAPI\digital_llc_ea.obj" "Sources\06_DigitalCtrlAPI\digital_llc_err.obj" "Sources\06_DigitalCtrlAPI\digital_llc_fdbk.obj" "Sources\06_DigitalCtrlAPI\digital_llc_ref.obj" "Sources\06_DigitalCtrlAPI\sample_calib.obj"
      DEL /F "Sources\06_DigitalCtrlAPI\vea_pwm_tab_curve.obj" "Sources\07_Sample\ExtendAD.obj" "Sources\07_Sample\Sample.obj" "Sources\07_Sample\TestAD.obj" "Sources\08_Diagnostic\01_StatusEvents.obj" "Sources\08_Diagnostic\02_ExceptionEvents.obj" "Sources\08_Diagnostic\03_FailureEvents.obj" "Sources\08_Diagnostic\04_BlackBox.obj" "Sources\08_Diagnostic\Diagnostic.obj" "Sources\09_TimSeqFSM\AutoPowerON.obj" "Sources\09_TimSeqFSM\AvailableCurrent.obj" "Sources\09_TimSeqFSM\DerateCtrl.obj" "Sources\09_TimSeqFSM\RemoteCtrl.obj" "Sources\09_TimSeqFSM\TimSeqFSM.obj" "Sources\10_Auxiliary\FanCtrl_Table.obj" "Sources\10_Auxiliary\FanSpeedTable230_Outside.obj" "Sources\10_Auxiliary\OperateTime.obj" "Sources\10_Auxiliary\PfcBusCtrl.obj" "Sources\10_Auxiliary\PfcLedCtrl.obj" "Sources\10_Auxiliary\RmStatus.obj" "Sources\10_Auxiliary\Version.obj" "Sources\11_ProjectCFG\AdcPwmTrigSys_CFG.obj" "Sources\11_ProjectCFG\ClaDefaultTask.obj" "Sources\11_ProjectCFG\Gpio.obj" "Sources\11_ProjectCFG\IoMap.obj" "Sources\11_ProjectCFG\Project_CFG.obj"
      DEL /F "Sources\main.obj" "Ti.Headers\F2837xS_GlobalVariableDefs.obj" "Ti.Headers\F2837xS_usDelay.obj"
      DEL /F "Sources\01_common\AppBootShareRam.d" "Sources\01_common\AppCodeStart.d" "Sources\01_common\ClaTab_CosQ14_AngleQ7.d" "Sources\01_common\ClaTab_FtoQ.d" "Sources\01_common\ClaTab_QtoF.d" "Sources\01_common\ClaTab_SinQ14_AngleQ7.d" "Sources\01_common\CpuTab_CosF32_AngleQ7.d" "Sources\01_common\CpuTab_FtoQ.d" "Sources\01_common\CpuTab_QtoF.d" "Sources\01_common\CpuTab_SinF32_AngleQ7.c.d" "Sources\01_common\common.d" "Sources\01_common\logger.d" "Sources\02_Driver\adca_v2.d" "Sources\02_Driver\adcb_v2.d" "Sources\02_Driver\adcc_v2.d" "Sources\02_Driver\adcd_v2.d" "Sources\02_Driver\cana.d" "Sources\02_Driver\canb.d" "Sources\02_Driver\cla_v2_PRAM4K_DRAM8K.d" "Sources\02_Driver\cmpss_v3.d" "Sources\02_Driver\dac.d" "Sources\02_Driver\ecap_apwm.d" "Sources\02_Driver\epwm_hb_pwm_v3.d" "Sources\02_Driver\epwm_independent_v3.d" "Sources\02_Driver\epwm_interleave_v3.d" "Sources\02_Driver\epwm_llc_burst_v4.d" "Sources\02_Driver\epwm_llc_pfm_v3.d" "Sources\02_Driver\epwm_llc_sr_v5.d" "Sources\02_Driver\epwm_soca_v2.d"
      DEL /F "Sources\02_Driver\scia.d" "Sources\02_Driver\scib.d" "Sources\02_Driver\scic.d" "Sources\02_Driver\tim0_soc.d" "Sources\02_Driver\tim1_sys_tick.d" "Sources\02_Driver\tim2_clock_cycle.d" "Sources\02_Driver\watchdog.d" "Sources\02_Driver\cpu\cpu.d" "Sources\02_Driver\cpu\cpu1_f2837xs_default_isr_FULL.d" "Sources\02_Driver\flash\flash.d" "Sources\03_ServiceLayerLib\flextoolset_lib\03_console.d" "Sources\03_ServiceLayerLib\flextoolset_lib\03_virtual_sci.d" "Sources\03_ServiceLayerLib\load_share_v2_lib\load_share_v2.d" "Sources\03_ServiceLayerLib\onewire_eeprom_lib\onewire_eeprom_v2.d" "Sources\03_ServiceLayerLib\snap_protocol_lib\Snap.d" "Sources\04_ServiceLayerAPI\CanProtocolAPI\CanProtocolAPI.d" "Sources\04_ServiceLayerAPI\CanProtocolAPI\CustomerProtocolHandler_A.d" "Sources\04_ServiceLayerAPI\CanProtocolAPI\CustomerProtocolHandler_B.d" "Sources\04_ServiceLayerAPI\CanProtocolAPI\CustomerProtocolHandler_Debug.d" "Sources\04_ServiceLayerAPI\EepromAPI\EepromAPI.d" "Sources\04_ServiceLayerAPI\EepromAPI\EepromAPI_UserHandler.d"
      DEL /F "Sources\04_ServiceLayerAPI\FactoryProtocolAPI\FactoryProtocolAPI.d" "Sources\04_ServiceLayerAPI\FactoryProtocolAPI\FactoryProtocol_CailCmdVbusUserHandler.d" "Sources\04_ServiceLayerAPI\FactoryProtocolAPI\FactoryProtocol_CailCmdVrstUserHandler.d" "Sources\04_ServiceLayerAPI\FactoryProtocolAPI\FactoryProtocol_CaliCmdUserHandlerDefault.d" "Sources\04_ServiceLayerAPI\FactoryProtocolAPI\FactoryProtocol_CaliVoutVoltageUserHandler.d" "Sources\04_ServiceLayerAPI\FactoryProtocolAPI\FactoryProtocol_RdCmdUserHandlerDefault.d" "Sources\04_ServiceLayerAPI\FactoryProtocolAPI\FactoryProtocol_SendCanMessageHandlerDefault.d" "Sources\04_ServiceLayerAPI\FactoryProtocolAPI\FactoryProtocol_WrCmdUserHandlerDefault.d" "Sources\04_ServiceLayerAPI\FlexToolSetAPI\AppFwCode.d" "Sources\04_ServiceLayerAPI\FlexToolSetAPI\FlexToolSetAPI.d" "Sources\04_ServiceLayerAPI\FlexToolSetAPI\IdTableTemplate.d" "Sources\04_ServiceLayerAPI\FlexToolSetAPI\SlipMasterEventHandler\SlipMaster1EventHandler.d" "Sources\04_ServiceLayerAPI\FlexToolSetAPI\SlipMasterEventHandler\SlipMaster2EventHandler.d"
      DEL /F "Sources\04_ServiceLayerAPI\FlexToolSetAPI\SlipMasterEventHandler\SlipMaster3EventHandler.d" "Sources\04_ServiceLayerAPI\FlexToolSetAPI\SlipMasterEventHandler\SlipMaster4EventHandler.d" "Sources\04_ServiceLayerAPI\LoadShareAPI\LoadShareAPI.d" "Sources\04_ServiceLayerAPI\LoadShareAPI\LoadShareCtrl.d" "Sources\04_ServiceLayerAPI\LoadShareAPI\LoadShareV2_CFG.d" "Sources\04_ServiceLayerAPI\SlipProtocolAPI\SlipMasterArm.d" "Sources\04_ServiceLayerAPI\SlipProtocolAPI\SlipMasterPFC.d" "Sources\04_ServiceLayerAPI\SlipProtocolAPI\SlipSlaveLLC.d" "Sources\04_ServiceLayerAPI\SnapProtocolAPI\SnapProtocolAPI.d" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\anti_windup_pi.d" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\differentiator.d" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\dsp_ctrl_lib.d" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\dynamic_test.d" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\fan_speed_detector.d" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\first_order_bpf.d" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\first_order_hpf.d"
      DEL /F "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\first_order_lpf.d" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\incremental_pi.d" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\integrator.d" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\one_p_one_z.d" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\period_detector.d" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\poly_fit.d" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\rate_limiter.d" "Sources\05_DigitalCtrlLib\dsp_ctrl_lib\resonator.d" "Sources\06_DigitalCtrlAPI\DigitalLLC.d" "Sources\06_DigitalCtrlAPI\FastShortDetect.d" "Sources\06_DigitalCtrlAPI\TPLlcDriver.d" "Sources\06_DigitalCtrlAPI\digital_llc_ea.d" "Sources\06_DigitalCtrlAPI\digital_llc_err.d" "Sources\06_DigitalCtrlAPI\digital_llc_fdbk.d" "Sources\06_DigitalCtrlAPI\digital_llc_ref.d" "Sources\06_DigitalCtrlAPI\sample_calib.d" "Sources\06_DigitalCtrlAPI\vea_pwm_tab_curve.d" "Sources\07_Sample\ExtendAD.d" "Sources\07_Sample\Sample.d" "Sources\07_Sample\TestAD.d" "Sources\08_Diagnostic\01_StatusEvents.d" "Sources\08_Diagnostic\02_ExceptionEvents.d"
      DEL /F "Sources\08_Diagnostic\03_FailureEvents.d" "Sources\08_Diagnostic\04_BlackBox.d" "Sources\08_Diagnostic\Diagnostic.d" "Sources\09_TimSeqFSM\AutoPowerON.d" "Sources\09_TimSeqFSM\AvailableCurrent.d" "Sources\09_TimSeqFSM\DerateCtrl.d" "Sources\09_TimSeqFSM\RemoteCtrl.d" "Sources\09_TimSeqFSM\TimSeqFSM.d" "Sources\10_Auxiliary\FanCtrl_Table.d" "Sources\10_Auxiliary\FanSpeedTable230_Outside.d" "Sources\10_Auxiliary\OperateTime.d" "Sources\10_Auxiliary\PfcBusCtrl.d" "Sources\10_Auxiliary\PfcLedCtrl.d" "Sources\10_Auxiliary\RmStatus.d" "Sources\10_Auxiliary\Version.d" "Sources\11_ProjectCFG\AdcPwmTrigSys_CFG.d" "Sources\11_ProjectCFG\Gpio.d" "Sources\11_ProjectCFG\IoMap.d" "Sources\11_ProjectCFG\Project_CFG.d" "Sources\main.d" "Ti.Headers\F2837xS_GlobalVariableDefs.d"
      DEL /F "Sources\11_ProjectCFG\ClaDefaultTask.d"
      DEL /F "Sources\01_common\F2837xS_CodeStartBranch.d" "Ti.Headers\F2837xS_usDelay.d"
      D:\LLCDebugProblem\EVDP-UA603W0001_LLC_S0.01T25\Debug\Sources\01_common\F2837xS_CodeStartBranch.d
      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    3. "No source available for '_system_post_cinit() at D:\LLCDebugProblem\EVDP-UA603W0001_LLC_S0.01T25\Debug\EVDP-UA603W0001_LLC_S0.01T25.out:{3} 0x3fe493{4}'"

    Secondly, during debugging, I found that there are no error with compiler versions TIv21.12.0.LTS and above, while versions TIv21.6.1.LTS and below do have error. Additionally, I conducted experiments using three different versions of Code Composer Studio: 11.2.0, 12.6.0, and 12.8.1, and obtained consistent results. This suggests that the issue most likely lies with the compiler, and it appears to have been resolved in compiler version TIv21.12.0.LTS.

    Lastly, I would like to ask for your help in identifying the true cause of this issue. Thank you very much.

    Best,

    Cheng

  • Hi Cheng,

    Can you narrow down which flash initialization function causes the issue? I'll also loop in the compiler team to see if there was a possible fix in between versions, but there will be delays due to the holidays.

    Best,

    Taylor

  • Dear Taylor:

    I have narrowed down the issue. When pressing F5 to debug, it fails to proceed further when reaching the line flash_init();. This line of code is located within the main() function. Everything works normally before executing this line, but upon reaching flash_init(), pressing F5 does not step into the flash_init() function; instead, it immediately results in an error. Below is part of the code for your reference.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    void main(void)
    {
    AppBootShareRam.AppCodeCnt ++;
    AppBootShareRam.AppCpu_RESC = CpuSysRegs.RESC.all;
    // --------------------------------------------------------------------
    // EepromWriteReadEepromStopwatch
    // step1Time2 clock
    // step2Eeprom Init
    tim2_clock_cycle_init();
    Eeprom_InitAPI();
    cpu_init(XTAL_20MHZ, PLL_200MHZ);
    scheduler_init(get_clock_cycle);
    // --------------------------------------------------------------------
    // data_flashdata_flash
    flash_init();
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    bool flash_init(void)
    {
    uint32_t CpuClockMhz = get_clock_freq() / 1000000;
    Fapi_StatusType oReturnCheck;
    bool ok = true;
    EALLOW;
    // ----------------------------------------------------------------------------------------
    // This function is required to initialize the Flash API based on System
    // frequency before any other Flash API operation can be performed
    oReturnCheck = Fapi_initializeAPI(F021_CPU0_W0_BASE_ADDRESS, CpuClockMhz);
    if(oReturnCheck != Fapi_Status_Success)
    {
    ok = false;
    }
    // ----------------------------------------------------------------------------------------
    // Fapi_setActiveFlashBank function sets the Flash bank and FMC for further
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Best,

    Cheng

  • Hi Cheng,

    Thank you for narrowing this down. The flash_init() function must run from the RAM -- is this the case?

    Can you share your linker command file (.cmd) as well?

    Best,

    Taylor

  • Dear Taylor:

            We use a total of two CMD files, one of which is the CMD file provided by TI, as follows:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    // Define a size for the CLA scratchpad area that will be used
    // by the CLA compiler for local symbols and temps
    // Also force references to the special symbols that mark the
    // scratchpad are.
    CLA_SCRATCHPAD_SIZE = 0x100;
    --undef_sym=__cla_scratchpad_end
    --undef_sym=__cla_scratchpad_start
    MEMORY
    {
    PAGE 0 :
    /* CLA program ram:*/
    CLA_PROG_RAM : origin = 0x009000, length = 0x002000 /* LS2~5: 8KW */
    /* CPU program ram:*/
    //CPU_PROG_RAM : origin = 0x00B000, length = 0x001000 /* D0~1: 4KW */
    CPU_PROG_RAM : origin = 0x00B000, length = 0x002000 /* D0~1: 8KW */
    /* CPU program flash:*/
    /* SectorA~B, 8KW*2 = 16KW for bootloader: */
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    MEMORY
    {
    PAGE 0: /* Program Memory */
    PAGE 1: /* Data Memory */
    ACCESSPROTECTION : origin = 0x0005F4C0, length = 0x00000040
    ADCA : origin = 0x00007400, length = 0x00000080
    ADCB : origin = 0x00007480, length = 0x00000080
    ADCC : origin = 0x00007500, length = 0x00000080
    ADCD : origin = 0x00007580, length = 0x00000080
    ADCARESULT : origin = 0x00000B00, length = 0x00000018
    ADCBRESULT : origin = 0x00000B20, length = 0x00000018
    ADCCRESULT : origin = 0x00000B40, length = 0x00000018
    ADCDRESULT : origin = 0x00000B60, length = 0x00000018
    ANALOGSUBSYS : origin = 0x0005D180, length = 0x00000048
    CANA : origin = 0x00048000, length = 0x00000200
    CANB : origin = 0x0004A000, length = 0x00000200
    CLA1 : origin = 0x00001400, length = 0x00000080
    CLB1DATAEXCH : origin = 0x00003200, length = 0x00000200
    CLB2DATAEXCH : origin = 0x00003600, length = 0x00000200
    CLB3DATAEXCH : origin = 0x00003A00, length = 0x00000200
    CLB4DATAEXCH : origin = 0x00003E00, length = 0x00000200
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Best,

    Cheng

  • Hi Cheng,

    No source available for '_system_post_cinit() at D:\LLCDebugProblem\EVDP-UA603W0001_LLC_S0.01T25\Debug\EVDP-UA603W0001_LLC_S0.01T25.out:{3} 0x3fe493{4}

    Taking another look at this, the address points to an ITRAP ISR:

    Meaning there was likely some illegal op code here causing the jump. What predefined symbols do you have added to the project properties?

    Best,

    Taylor