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.

CCS/TMS320F28377S: CCS compile issue: fatal error #6001: cannot open file ".\Bootloader_2.map": No error

Part Number: TMS320F28377S

Tool/software: Code Composer Studio

Hi, when I compile the code, I got the issue " fatal error #6001: cannot open file ".\Bootloader_2.map":  No error" or " fatal error #6001: cannot open file ".\Bootloader_2.map":  No such file or directory". Here is the compile log. And the cmd file is pasted in this post. Anyone can help me with this? Thanks

Building target: "Bootloader_2.out"
Invoking: C2000 Linker
"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_16.9.11.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --advice:performance=all --define=_F2837xS --define=BOOTLOADER=TRUE -g --diag_warning=225 --diag_wrap=off --display_error_number -z -m"Bootloader_2.map" --stack_size=0x200 --warn_sections -i"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_16.9.11.LTS/lib" -i"D:/OBC_Firmware/Bootloader_2/include/VCU2API/lib" -i"D:/OBC_Firmware/Bootloader_2/include/FlashAPI" -i"C:/ti/ccsv8/tools/compiler/ti-cgt-c2000_16.9.11.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="Bootloader_2_linkInfo.xml" --rom_model -o "Bootloader_2.out" "./FlashInterface.obj" "./GlobalMath.obj" "./c2837xSBoard_Realtime_Support.obj" "./main.obj" "./App/AppSrc/AppDID.obj" "./App/AppSrc/AppDTC.obj" "./App/AppSrc/AppIO.obj" "./App/AppSrc/Bootloader.obj" "./App/AppSrc/CANApp.obj" "./App/AppSrc/Fifo.obj" "./App/AppSrc/GeneralFunction.obj" "./App/AppSrc/OS.obj" "./App/AppSrc/crc32.obj" "./App/AppSrc/crc8.obj" "./App/AppSrc/flashrchw.obj" "./App/AppSrc/msTickCounter.obj" "./App/AppSrc/nvdata.obj" "./App/AppSrc/securityAccess.obj" "./App/UDS/ISOUDS_ClrDTC/ISOUDS_ClrDTC.obj" "./App/UDS/ISOUDS_CntrlDTCSetting/ISOUDS_CntrlDTCSetting.obj" "./App/UDS/ISOUDS_CommCntrl/ISOUDS_CommCntrl.obj" "./App/UDS/ISOUDS_ECUReset/ISOUDS_ECUReset.obj" "./App/UDS/ISOUDS_IOCtrlByID/ISOUDS_IOCtrlByID.obj" "./App/UDS/ISOUDS_MAIN/ISOUDS.obj" "./App/UDS/ISOUDS_RdDTCInf/ISOUDS_RdDTCInf.obj" "./App/UDS/ISOUDS_RdDaByID/ISOUDS_RdCfg.obj" "./App/UDS/ISOUDS_RdDaByID/ISOUDS_RdDaByID.obj" "./App/UDS/ISOUDS_ReqDwnld/ISOUDS_ReqDwnld.obj" "./App/UDS/ISOUDS_RtnCntrl/ISOUDS_RtnCfg.obj" "./App/UDS/ISOUDS_RtnCntrl/ISOUDS_RtnCntrl.obj" "./App/UDS/ISOUDS_SA/ISOUDS_SA.obj" "./App/UDS/ISOUDS_StrtDiagSess/ISOUDS_StrtDiagSess.obj" "./App/UDS/ISOUDS_TrnsfrDa/ISOUDS_TrnsfrDa.obj" "./App/UDS/ISOUDS_TrnsfrExit/ISOUDS_TrnsfrExit.obj" "./App/UDS/ISOUDS_TstrPrsnt/ISOUDS_TstrPrsnt.obj" "./App/UDS/ISOUDS_WrDaByID/ISOUDS_WrCfg.obj" "./App/UDS/ISOUDS_WrDaByID/ISOUDS_WrDaByID.obj" "./App/UDS/UDS_App/UDSApp.obj" "./App/UDS/UDS_App/UDSApp_CommCntrl.obj" "./App/UDS/UDS_App/UDSApp_CommonDID.obj" "./App/UDS/UDS_App/UDSApp_DTC.obj" "./App/udsclient/canTransport.obj" "./App/udsclient/udsServices.obj" "./Driver/Driver_Src/adc_library.obj" "./Driver/Driver_Src/can_library.obj" "./Driver/Driver_Src/crc_library.obj" "./Driver/Driver_Src/flash_library.obj" "./Driver/Driver_Src/gpio_library.obj" "./Driver/Driver_Src/pwm_library.obj" "./Driver/Driver_Src/sys_library.obj" "./Driver/Driver_Src/timer_library.obj" "./Link/LinkSrc/CanCommon.obj" "./Link/LinkSrc/CrcInterface.obj" "./Link/LinkSrc/INT.obj" "./Link/LinkSrc/SystemInterface.obj" "./Link/LinkSrc/TIMER.obj" "./Link/UDS_ISOTP/ISOTP.obj" "./Link/UDS_ISOTP/ISOTP_Cfg.obj" "./Link/UDS_ISOTP/UDSFifo.obj" "./source/F2837xS_Adc.obj" "./source/F2837xS_CodeStartBranch.obj" "./source/F2837xS_CpuTimers.obj" "./source/F2837xS_DBGIER.obj" "./source/F2837xS_DefaultISR.obj" "./source/F2837xS_Dma.obj" "./source/F2837xS_ECap.obj" "./source/F2837xS_EPwm.obj" "./source/F2837xS_EQep.obj" "./source/F2837xS_Emif.obj" "./source/F2837xS_GlobalVariableDefs.obj" "./source/F2837xS_Gpio.obj" "./source/F2837xS_I2C.obj" "./source/F2837xS_Mcbsp.obj" "./source/F2837xS_PieCtrl.obj" "./source/F2837xS_PieVect.obj" "./source/F2837xS_Sci.obj" "./source/F2837xS_Spi.obj" "./source/F2837xS_SysCtrl.obj" "./source/F2837xS_TempSensorConv.obj" "./source/F2837xS_Upp.obj" "./source/F2837xS_can.obj" "./source/F2837xS_sci_io.obj" "./source/F2837xS_sdfm_drivers.obj" "./source/F2837xS_struct.obj" "./source/F2837xS_usDelay.obj" "../28377S_BootLoader.cmd" "../F2837xS_Headers_nonBIOS.cmd" "../rts2800_fpu32_fast_supplement.lib" "../include/FlashAPI/F021_API_F2837xS_FPU32.lib" "../include/VCU2API/lib/c28x_vcu0_crcTables_library.lib" "../include/VCU2API/lib/c28x_vcu0_crcTables_library_fpu32.lib" "../include/VCU2API/lib/c28x_vcu0_library.lib" "../include/VCU2API/lib/c28x_vcu0_library_fpu32.lib" "../include/VCU2API/lib/c28x_vcu2_library.lib" "../include/VCU2API/lib/c28x_vcu2_library_fpu32.lib" -llibc.a -l"D:/OBC_Firmware/Bootloader_2/include/FlashAPI/F021_API_F2837xS_FPU32.lib" -l"D:/OBC_Firmware/Bootloader_2/include/VCU2API/lib/c28x_vcu2_library_fpu32.lib"

<Linking>
".\Bootloader_2.map", line 1: fatal error #6001: cannot open file ".\Bootloader_2.map": No error

>> Compilation failure
makefile:286: recipe for target 'Bootloader_2.out' failed
gmake[1]: *** [Bootloader_2.out] Error 1
makefile:282: recipe for target 'all' failed
gmake: *** [all] Error 2


MEMORY
{
PAGE 0 : /* Program Memory */
/* Memory (RAM/FLASH) blocks can be moved to PAGE1 for data allocation */
/* BEGIN is used for the "boot to Flash" bootloader mode */

BOOTBEGIN : origin = 0x080000, length = 0x000002
RAMM0 : origin = 0x000122, length = 0x0002DE
RAMD0 : origin = 0x00B000, length = 0x000800
RAMAPP : origin = 0x008000, length = 0x000800
RAMAPP_1 : origin = 0x008800, length = 0x000800
RAMAPP_2 : origin = 0x009000, length = 0x000800
RAMLS3 : origin = 0x009800, length = 0x000800
RAMBOOT : origin = 0x00A000, length = 0x000800 /*Here is the RAM for Bootloader use*/
RAMBOOT_1 : origin = 0x01A000, length = 0x001000
RAMBOOT_2 : origin = 0x01B000, length = 0x001000
RESET : origin = 0x3FFFC0, length = 0x000002

/* Flash sectors */

BOOTFLASH : origin = 0x080002, length = 0x00FFFE
FLASHF : origin = 0x090000, length = 0x008000 /* on-chip Flash */
FLASHG : origin = 0x098000, length = 0x008000 /* on-chip Flash */
FLASHH : origin = 0x0A0000, length = 0x008000 /* on-chip Flash */
FLASHI : origin = 0x0A8000, length = 0x008000 /* on-chip Flash */
FLASHJ : origin = 0x0B0000, length = 0x008000 /* on-chip Flash */
FLASHK : origin = 0x0B8000, length = 0x002000 /* on-chip Flash */
FLASHL : origin = 0x0BA000, length = 0x002000 /* on-chip Flash */
FLASHM : origin = 0x0BC000, length = 0x002000 /* on-chip Flash */
FLASHN : origin = 0x0BE000, length = 0x002000 /* on-chip Flash */
APPBEGIN : origin = 0x0C0000, length = 0x000002 /* APPCODE start */
APPFLASH :origin = 0x0C0002, length = 0x02FFFE /*APP FLASH*/
FLASHX : origin = 0x0F0000, length = 0x008000 /* on-chip Flash */
FLASHY : origin = 0x0F8000, length = 0x002000 /* on-chip Flash */
FLASHZ : origin = 0x0FA000, length = 0x002000 /* on-chip Flash */
FLASHAA : origin = 0x0FC000, length = 0x002000 /* on-chip Flash */
FLASHAB : origin = 0x0FE000, length = 0x002000 /* on-chip Flash */

PAGE 1 : /* Data Memory */
/* Memory (RAM/FLASH) blocks can be moved to PAGE0 for program allocation */

BOOT_RSVD : origin = 0x000002, length = 0x000120 /* Part of M0, BOOT rom will use this for stack */
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */

RAMD1 : origin = 0x00B800, length = 0x000800

RAMLS5 : origin = 0x00A800, length = 0x000800

BOOTDATA : origin = 0x00C000, length = 0x001000
BOOTDATA_2 : origin = 0x00D000, length = 0x001000
BOOTDATA_3 : origin = 0x00E000, length = 0x001000
RAMGS3 : origin = 0x00F000, length = 0x001000
RAMGS4 : origin = 0x010000, length = 0x001000
RAMGS5 : origin = 0x011000, length = 0x001000
APPDATA : origin = 0x012000, length = 0x001000
APPDATA_1 : origin = 0x013000, length = 0x001000
APPDATA_2 : origin = 0x014000, length = 0x001000
APPDATA_3 : origin = 0x015000, length = 0x001000
RAMGS10 : origin = 0x016000, length = 0x001000
RAMGS11 : origin = 0x017000, length = 0x001000
RAMGS12 : origin = 0x018000, length = 0x001000
RAMGS13 : origin = 0x019000, length = 0x001000

}


SECTIONS
{
/* Allocate program areas: */
.cinit : > BOOTFLASH PAGE = 0, ALIGN(4)
.pinit : > BOOTFLASH PAGE = 0, ALIGN(4)
.text : > BOOTFLASH PAGE = 0, ALIGN(4)
codestart : > BOOTBEGIN PAGE = 0, ALIGN(4)

.TI.ramfunc :
LOAD = FLASHBL,
RUN = RAMBOOT | RAMBOOT_1,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
PAGE = 0, ALIGN(4)


/* Allocate uninitalized data sections: */
.stack : > BOOTDATA PAGE = 1
.ebss : >> BOOTDATA_2 | BOOTDATA_3 PAGE = 1
.esysmem : > BOOTDATA_2 PAGE = 1

/* Initalized sections go in Flash */
.econst : >> BOOTFLASH PAGE = 0, ALIGN(4)
.switch : > BOOTFLASH PAGE = 0, ALIGN(4)

.reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */


}

/*
//===========================================================================
// End of file.
//===========================================================================
*/

/*


.cinit : > APPFLASH PAGE = 0, ALIGN(4)
.pinit : > APPFLASH, PAGE = 0, ALIGN(4)
.text : > APPFLASH PAGE = 0, ALIGN(4)
codestart : > APPBEGIN PAGE = 0, ALIGN(4)


.TI.ramfunc : {} LOAD = APPFLASH,
RUN = RAMAPP | RAMAPP_1 | RAMAPP_2,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
PAGE = 0, ALIGN(4)

.stack : > APPDATA PAGE = 1
.ebss : >> APPDATA | APPDATA_1 | APPDATA_2 PAGE = 1
.esysmem : > APPDATA PAGE = 1


.econst : > APPFLASH PAGE = 0, ALIGN(4)
.switch : > APPFLASH PAGE = 0, ALIGN(4)

.reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */

*/

  • Among the options you use is ...

    Li Wei30 said:
    -m"Bootloader_2.map"

    This says to create a linker map file.  This is a text file with information about how sections are formed, and where they are allocated in memory, among other things.  The linker attempts to open this text file for writing.  That open call fails and the diagnostic you see is issued.  I don't know why.  Do you have permission to write that file?  Is the disk full?  Might there be some other system related issue?

    Thanks and regards,

    -George

  • HI George,

    There is no permission or disk issue there. The funny thing is that when I swap back to the original link file provided by TI, then everything works. So I doubt there is something wrong with my cmd file definition. But I cannot tell which part cause this. Can you help?

    Thanks.

  • I did find one error in your linker command file. The last 20 lines are all commented out, and end like this ...

    Li Wei30 said:
    .reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */

    */

    Because of that /* not used */, the comment is closed out twice.  The linker ought to catch that and issue a diagnostic.  But, before worrying about that ... Please delete the entire /* not used */ comment and see if that fixes your problem.

    Thanks and regards,

    -George

  • Thanks George, that solves the issue...