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.

How to place an initialized struct in FLASH memory when using ARM linker/compiler TI v5.1.9?

Other Parts Discussed in Thread: TMS570LC4357, TMS320F28335, TMS320F2812, HALCOGEN

I have been using a way to create a common data struct in FLASH memory at a specific address for many years. The struct is initialized and contains exchange information used between separate applications. This has been working just fine in the C2000 world.

I am trying to transfer this system to the TMS570LC4357 (ARM) using TI compiler v5.1.9 at this moment. No matter what I do, the linker is putting the initialization values for the struct in the .cinit section and making an attempt to initialize the FLASH during startup. It is trying to write the initialization values to the correct address, but obviously the FLASH is not ready to accept those.

I have tried pretty much everything including an assembler version similar to "HL_sys_intvecs.asm", but nothing is working! The initialization values are pointers to strings, pointers to functions and regular integers. Any ideas out there???????

Thank you!!!

  • Marek Christer said:
    No matter what I do, the linker is putting the initialization values for the struct in the .cinit section and making an attempt to initialize the FLASH during startup.

    Is the initialized structure const qualified?

    It the initialized structure isn't const qualified the linker will try and initialize the structure at run time.

    How to correctly declare initialized data into FLASH using C/C++ has an example CCS project, for a TM4C ARM device, which places constant structures in flash in a custom section.

  • Yes it is! As a matter of fact I did try to remove the const qualification just to see if it would make a difference in either placement or initialization but it did not. Maybe it is the content of the struct that is causing it? I have character pointers to __DATE__, __TIME__, pointers to several other strings within the application and the entry point address (_c_int00). The remaining data in the struct is initialized to 0xFF (in proper sizes). Those areas is where the bootloader (custom) is storing information from the other interacting applications.
  • The strange thing is that what I have in place here has been working just fine for many years within both TMS320F2812 and TMS320F28335 environments!
  • The C2000 compiler only supports one ABI (application binary interface) called COFF ABI. The ARM compiler supports the older COFF ABI and a newer ABI named EABI. The ARM compiler uses EABI by default. Thus, you are changing from COFF ABI to EABI. I don't specifically know that is the cause of your problems. But I suspect it is. Please show one small example of the C source for a structure which is not getting initialized properly. I think I'll be able to explain what is occurring.

    Thanks and regards,

    -George


  • #include "ProjectSpecificDefinitions.h"
    #include "commonUDS_midpt.h"

    extern void _c_int00 (void);

    #pragma RETAIN(BootloaderInfo)

    // Flash structure definition for the application interface//
    #ifdef __cplusplus
    #pragma DATA_SECTION("MidptFile")
    #else
    #pragma DATA_SECTION(BootloaderInfo, "MidptFile");
    #endif  // __cplusplus //

    BOOTLOADER_INFO_CV_QUAL BOOTLOADER_INFO BootloaderInfo =
    {
      FLASH_ERASED_STATE_16,                    // bootInfoIdentifier //
      FLASH_ERASED_STATE_16,                    // bootInfoVersion //
      (char *)FLASH_ERASED_STATE_PTR,           // BootBuildVersionPtr //
      (char *)FLASH_ERASED_STATE_PTR,           // BootBuildDatePtr //
      (char *)FLASH_ERASED_STATE_PTR,           // BootBuildTimePtr //
      (void (*)(void))FLASH_ERASED_STATE_PTR,   // BootEntryPtr //
      BOOT_APP_BUILD_VERSION_STRING,            // AppBuildVersionPtr //
      __DATE__,                                 // AppBuildDatePtr //
      __TIME__,                                 // AppBuildTimePtr //
      BOOT_APP_PART_NUMBER_STRING,              // AppPartNumberPtr //
      _c_int00,                                 // AppEntryPtr //
      (char *)FLASH_ERASED_STATE_PTR,           // AppStartAddressPtr //
      (char *)FLASH_ERASED_STATE_PTR,           // AppEndAddressPtr //
      FLASH_ERASED_STATE_16,                    // onChipChecksum //
      FLASH_ERASED_STATE_16,                    // downloadCount //
      FLASH_ERASED_STATE_16,                    // reserved_1 //
      FLASH_ERASED_STATE_16,                    // reserved_2 //
      FLASH_ERASED_STATE_16,                    // reserved_3 //
      FLASH_ERASED_STATE_16,                    // reserved_4 //
      FLASH_ERASED_STATE_16,                    // reserved_5 //
      FLASH_ERASED_STATE_16                     // checksum //
    };

    // end of file commonUDS_midptapp.c //

    George,

    What you see above are the complete contents of the C-file creating the struct. MidptFile is located in a memory section defined to be at 0x0000C000 using a linker command file. The memory is specified as (RIX) and I did try all kinds of alternate combinations. No matter what I do, in the map file this memory comes out as 'rw'.

    BOOTLOADER_INFO is the struct definition, while BOOTLOADER_INFO_CV_QUAL is a define that is not specified in the bootloader code, but #defined as volatile const in the applications. I did try to remove the volatile part with no difference. I kind of expected that, as volatile should only have impact on the optimizer. All optimizations are disabled anyway...

    I sure hope that you can figure this one out!!! It has been holding me up for almost a week now!

    Thank you!

    Marek

  • I don't see anything here that explains your problem.  That said, I'm having to guess about a few details.  I might be guessing wrong.  Please send the source file which contains this problem structure, preprocessed like this .  I also need to see the exact compiler options you use when building it.

    Thanks and regards,

    -George

  • George, here is an update. While trying to provide you with a sample, I took the offending C-file and needed .h files (only two)and created a brand new project with a single main() that reads some of the struct data. I have no HalcoGen initialization files and no startup code whatsoever. The project compiled and linked just fine and the struct was programmed properly in the FLASH at address 0x0000c000.

    Main difference #1 - the project was created from scratch and NOT imported from CCS3.3. I will compare all the project settings for the two projects tomorrow.

    Difference #2 - no initialization code from HalcoGen present.

    Difference #3 - the remainder of our code is left out with unknown pragmas eliminated.

    The first thing tomorrow will be to compare the project build settings. After that it will get tough, as I am not sure how to build the project (and link) with only partial files present.

    I just hope that there is some kind of a simple issue with a build setting!!!

    Marek

    PS Is there some simple way to print out the complete summary of the project settings for comparison between two projects?

  • OK George, it is something within the imported project settings or pragmas in the original files from CCS3.3. I had a basic HalcoGen created project to evaluate the Hercules chip. I added my c-file, the two .h files and replaced the linker command files. It is working fine! It is too late here now. I will continue tomorrow.
    Marek
  • This has been one of the most frustrating experiences in my professional life, and I have been around for a long time!

    I have two projects now. One that is building just fine and one that is not. I did compare the project settings and those are identical.

    A few comments: The CCS is tuning off the ARM Hex utility by it's own decision, and always after a software upgrade - not good! The set of flags in the compiler and linker calls is changing for the same project between different times when CCS is invoked. When opening the properties window on the "Build" selection and the last time the window was open the "Dependencies" tab was selected, no other tabs are visible. Yes, there are two tiny arrows on the right side of the window indicating that this is the view of window number two. Sorry, but that is a horrible presentation!

    I looked at the pragmas in the project. Our original files had a lot of pragmas to load code  sections into RAM, as the older CPU's required the FLASH burning access to be performed from RAM. All of these pragmas are commented out. The only pragmas present in the project are the ones created by HalcoGen for the interrupts. I added one RETAIN pragma for the struct in question, but it is not really necessary and the pragma exists in both projects.

    The "preprocessed" file versions do not make any sense at this moment. What I did in the last hour was to start adding nothing else but our .h files to the project that was linking properly. Those definitions should be insignificant; however, the linking finally failed in the same way as the original project. After lunch I will start commenting out the .h files and later the contents until I find the offending statement(s).

    Marek

  • Marek,

    One possibility is that a section that is marked read/write is being included in the output section that is being placed in flash. In this case, the linker will make the entire output section read/write which will cause initialization from .cinit. Can you post the linker command file you are using and the map file from the linker. This might help to shed some light on the problem.

  • OK,

    I have two linker command files, one that is for the project and one that is solely for this struct so that it can be used by all the applications. Here those are:


    //////////////////////////////////////////////////////////////////////////////////
    // Module name: c:\...\commonUDS\UQMBoot-AppSharedBlock-f28335.cmd //
    // //
    // Copyright 2014 ALL RIGHTS RESERVED UQM Technologies //
    // //
    // UPDATED: Tuesday 06/10/2014 10:12 by Marek W. Christer //
    // //
    // Module notes: //
    // Linker command file for the UQM shared data block //
    // //
    // //
    // //
    // //
    // //
    //////////////////////////////////////////////////////////////////////////////////


    MEMORY
    {
    //////////////////////
    // Program Memory //
    //////////////////////
    PAGE 0:

    //////////////////////////////////////////////////////////////////////////////
    // Reserved address range in application area of flash, used by bootloader //
    // and the application to share data like jump vectors to each other, build //
    // dates, version numbers, etc. //
    //////////////////////////////////////////////////////////////////////////////
    // Shared memory area, never change this location for the same CPU //
    //////////////////////////////////////////////////////////////////////////////
    MIDPT_C (RIX) : origin = 0x0000C000, length = 0x000100
    }

    SECTIONS
    {
    // Allocate area for functions that need to execute from fast memory //
    // bootfuncs: //
    // LOAD = FLASH, //
    // RUN = H0_SARAM, //
    // LOAD_START(_BootfuncsLoadStart), //
    // LOAD_END(_BootfuncsLoadEnd), //
    // RUN_START(_BootfuncsRunStart), //
    // PAGE = 0 //

    // ramfuncs: //
    // LOAD = FLASHA, //
    // RUN = H0_SARAM, //
    // LOAD_START(_RamfuncsLoadStart), //
    // LOAD_END(_RamfuncsLoadEnd), //
    // RUN_START(_RamfuncsRunStart), //
    // PAGE = 0 //

    MidptFile : > MIDPT_C, PAGE = 0
    }

    //////////////////////////////////////////////////////
    // end of file UQMBoot-AppSharedBlock-f28335.cmd //
    //////////////////////////////////////////////////////




    //////////////////////////////////////////////////////////////////////////////
    and here is the other one:
    //////////////////////////////////////////////////////////////////////////////






    //////////////////////////////////////////////////////////////////////////////////
    // Module name: c:\...\commonUDS\commonUDSf28335.cmd //
    // //
    // Copyright 2014 ALL RIGHTS RESERVED UQM Technologies //
    // //
    // UPDATED: Tuesday 06/10/2014 10:12 by Marek W. Christer //
    // //
    // Module notes: //
    // Linker command file for the CAN UDS bootloader //
    // //
    // //
    // //
    // //
    // //
    //////////////////////////////////////////////////////////////////////////////////


    //////////////////////////////////////////////////////////////////////////////////
    // Linker Settings //
    //////////////////////////////////////////////////////////////////////////////////

    --retain="*(.intvecs)"

    //////////////////////////////////////////////////////////////////////////////////
    // Memory Map //
    //////////////////////////////////////////////////////////////////////////////////

    MEMORY
    {
    VECTORS (X) : origin=0x00000000 length=0x00000020
    UQM_STARTUP_CODE (RX) : origin=0x00000020 length=0x00003FE0
    UQM_FACTORY_BOOTLOADER (RX) : origin=0x00004000 length=0x00004000
    UQM_BOOTLOADER_UPDATE (RX) : origin=0x00008000 length=0x00004000
    UQM_REMAINDER_OF_MIDPT (RX) : origin=0x0000C100 length=0x00003F00

    FLASH0 (RX) : origin=0x00010000 length=0x001F0000
    FLASH1 (RX) : origin=0x00200000 length=0x00200000
    STACKS (RW) : origin=0x08000000 length=0x00001500
    RAM (RW) : origin=0x08001500 length=0x0007EB00
    }


    //////////////////////////////////////////////////////////////////////////////////
    // Section Configuration //
    //////////////////////////////////////////////////////////////////////////////////

    SECTIONS
    {
    .intvecs : {} > VECTORS
    .text align(8) : {} > FLASH0 | FLASH1
    .const align(8) : {} > FLASH0 | FLASH1
    .cinit align(8) : {} > FLASH0 | FLASH1
    .pinit align(8) : {} > FLASH0 | FLASH1
    .bss : {} > RAM
    .data : {} > RAM
    .sysmem : {} > RAM


    ramfuncs:
    {
    } LOAD = FLASH0,
    RUN = RAM,
    LOAD_START(_RamfuncsLoadStart),
    LOAD_END(_RamfuncsLoadEnd),
    RUN_START(_RamfuncsRunStart),
    PAGE = 0

    }

    //////////////////////////////////////////////////////////////////////////////
    and her is the map file:
    //////////////////////////////////////////////////////////////////////////////


    ******************************************************************************
    TI ARM Linker PC v5.1.9
    ******************************************************************************
    >> Linked Tue Dec 16 11:20:51 2014

    OUTPUT FILE NAME: <tms570lc4357_hl_test.out>
    ENTRY POINT SYMBOL: "_c_int00" address: 00015488


    MEMORY CONFIGURATION

    name origin length used unused attr fill
    ---------------------- -------- --------- -------- -------- ---- --------
    VECTORS 00000000 00000020 00000020 00000000 X
    UQM_STARTUP_CODE 00000020 00003fe0 00000000 00003fe0 R X
    UQM_FACTORY_BOOTLOADE 00004000 00004000 00000000 00004000 R X
    UQM_BOOTLOADER_UPDATE 00008000 00004000 00000000 00004000 R X
    MIDPT_C 0000c000 00000100 00000040 000000c0 R IX
    UQM_REMAINDER_OF_MIDP 0000c100 00003f00 00000000 00003f00 R X
    FLASH0 00010000 001f0000 000059e8 001ea618 R X
    FLASH1 00200000 00200000 00000000 00200000 R X
    STACKS 08000000 00001500 00000000 00001500 RW
    RAM 08001500 0007eb00 00000016 0007eaea RW


    SEGMENT ALLOCATION MAP

    run origin load origin length init length attrs members
    ---------- ----------- ---------- ----------- ----- -------
    00000000 00000000 00000020 00000020 r-x
    00000000 00000000 00000020 00000020 r-x .intvecs
    0000c000 0000c000 00000040 00000000 rw-
    0000c000 0000c000 00000040 00000000 rw- MidptFile
    00010000 00010000 000059f0 000059f0 r-x
    00010000 00010000 00005734 00005734 r-x .text
    00015738 00015738 00000254 00000254 r-- .const
    00015990 00015990 00000060 00000060 r-- .cinit
    08001500 08001500 00000016 00000000 rw-
    08001500 08001500 00000010 00000000 rw- .data
    08001510 08001510 00000006 00000000 rw- .bss


    SECTION ALLOCATION MAP

    output attributes/
    section page origin length input sections
    -------- ---- ---------- ---------- ----------------
    .intvecs 0 00000000 00000020
    00000000 00000020 HL_sys_intvecs.obj (.intvecs)

    MidptFile
    * 0 0000c000 00000040 UNINITIALIZED
    0000c000 00000040 commonUDS_midptapp.obj (MidptFile:BootloaderInfo)

    .text 0 00010000 00005734
    00010000 00000b08 HL_can.obj (.text)
    00010b08 000009d0 HL_pinmux.obj (.text)
    000114d8 000009a8 HL_system.obj (.text)
    00011e80 00000934 HL_sys_vim.obj (.text)
    000127b4 000007ec HL_esm.obj (.text)
    00012fa0 0000069c HL_rti.obj (.text)
    0001363c 000004b8 HL_errata.obj (.text)
    00013af4 00000484 HL_gio.obj (.text)
    00013f78 00000408 HL_sys_core.obj (.text)
    00014380 00000394 HL_sys_mpu.obj (.text)
    00014714 0000034c HL_sys_vim.obj (.text:retain)
    00014a60 000001a0 HL_can.obj (.text:retain)
    00014c00 00000188 HL_esm.obj (.text:retain)
    00014d88 00000180 rtsv7R4_A_be_v3D16_eabi.lib : memcpy32.obj (.text)
    00014f08 00000168 HL_notification.obj (.text)
    00015070 00000168 HL_sys_main.obj (.text)
    000151d8 00000114 HL_sys_pmu.obj (.text)
    000152ec 000000d4 rtsv7R4_A_be_v3D16_eabi.lib : auto_init.obj (.text)
    000153c0 000000c8 HL_rti.obj (.text:retain)
    00015488 000000b8 HL_sys_startup.obj (.text:retain)
    00015540 00000098 rtsv7R4_A_be_v3D16_eabi.lib : copy_decompress_rle.obj (.text)
    000155d8 00000080 : cpy_tbl.obj (.text)
    00015658 00000078 : exit.obj (.text)
    000156d0 00000024 : _lock.obj (.text)
    000156f4 00000020 : copy_zero_init.obj (.text:decompress:ZI)
    00015714 00000014 : copy_decompress_none.obj (.text:decompress:none)
    00015728 00000008 : copy_decompress_rle.obj (.text:decompress:rle24)
    00015730 00000004 HL_sys_phantom.obj (.text:retain)

    .const 0 00015738 00000254
    00015738 00000200 HL_sys_vim.obj (.const:s_vim_init)
    00015938 00000034 commonUDS_midptapp.obj (.const:.string)
    0001596c 00000020 HL_can.obj (.const)

    .cinit 0 00015990 00000060
    00015990 00000020 (.cinit.MidptFile.load) [load image, compression = rle]
    000159b0 00000011 (.cinit..data.load) [load image, compression = rle]
    000159c1 00000003 --HOLE-- [fill = 0]
    000159c4 0000000c (__TI_handler_table)
    000159d0 00000008 (.cinit..bss.load) [load image, compression = zero_init]
    000159d8 00000018 (__TI_cinit_table)

    ramfuncs 0 08001500 00000000 UNINITIALIZED

    .data 0 08001500 00000010 UNINITIALIZED
    08001500 00000008 rtsv7R4_A_be_v3D16_eabi.lib : _lock.obj (.data)
    08001508 00000008 : exit.obj (.data)

    .bss 0 08001510 00000006 UNINITIALIZED
    08001510 00000004 (.common:InterruptFlagsFor5msInterrupt)
    08001514 00000002 (.common:RTI_5ms_Counter)


    LINKER GENERATED COPY TABLES

    __TI_cinit_table @ 000159d8 records: 3, size/record: 8, table size: 24
    MidptFile: load addr=00015990, load size=00000020 bytes, run addr=0000c000, run size=00000040 bytes, compression=rle
    .data: load addr=000159b0, load size=00000011 bytes, run addr=08001500, run size=00000010 bytes, compression=rle
    .bss: load addr=000159d0, load size=00000008 bytes, run addr=08001510, run size=00000006 bytes, compression=zero_init


    LINKER GENERATED HANDLER TABLE

    __TI_handler_table @ 000159c4 records: 3, size/record: 4, table size: 12
    index: 0, handler: __TI_zero_init
    index: 1, handler: __TI_decompress_rle24
    index: 2, handler: __TI_decompress_none


    GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name

    address name
    -------- ----
    0000c000 BootloaderInfo
    00015658 C$$EXIT
    08001510 InterruptFlagsFor5msInterrupt
    0001336c IsdwdKeySequenceCorrect
    08001514 RTI_5ms_Counter
    UNDEFED SHT$$INIT_ARRAY$$Base
    UNDEFED SHT$$INIT_ARRAY$$Limit
    00015730 UnexpectedInterrupt
    08001500 _RamfuncsLoadEnd
    08001500 _RamfuncsLoadStart
    08001500 _RamfuncsRunStart
    000159d8 __TI_CINIT_Base
    000159f0 __TI_CINIT_Limit
    000159c4 __TI_Handler_Table_Base
    000159d0 __TI_Handler_Table_Limit
    00014378 __TI_PINIT_Base
    0001437c __TI_PINIT_Limit
    000152ec __TI_auto_init
    08001508 __TI_cleanup_ptr
    00015714 __TI_decompress_none
    00015728 __TI_decompress_rle24
    0800150c __TI_dtors_ptr
    00000000 __TI_static_base__
    000156f4 __TI_zero_init
    00014d88 __aeabi_memcpy
    00014d88 __aeabi_memcpy4
    00014d88 __aeabi_memcpy8
    ffffffff __binit__
    ffffffff __c_args__
    00015488 _c_int00
    0001431c _cacheDisable_
    000142ec _cacheEnable_
    000142cc _checkMemInitOn_
    000141c8 _coreClearAuxiliaryDataFault_
    000141e4 _coreClearAuxiliaryInstructionFault_
    00014190 _coreClearDataFaultAddress_
    00014158 _coreClearDataFault_
    000141ac _coreClearInstructionFaultAddress_
    00014174 _coreClearInstructionFault_
    00014120 _coreDisableEventBusExport_
    00014108 _coreEnableEventBusExport_
    00014138 _coreEnableIrqVicOffset_
    000140f0 _coreEnableVfp_
    000141c0 _coreGetAuxiliaryDataFault_
    000141dc _coreGetAuxiliaryInstructionFault_
    00014188 _coreGetDataFaultAddress_
    00014150 _coreGetDataFault_
    000141a4 _coreGetInstructionFaultAddress_
    0001416c _coreGetInstructionFault_
    00013f78 _coreInitRegisters_
    00014084 _coreInitStackPointer_
    00014340 _dCacheInvalidate_
    000141f8 _disable_IRQ_interrupt_
    00014200 _enable_IRQ_interrupt_
    00014208 _enable_interrupt_
    00014210 _esmCcmErrorsClear_
    000140d0 _getCPSRValue_
    000140d8 _gotoCPUIdle_
    0001435c _iCacheInvalidate_
    08001500 _lock
    00014298 _memInit_
    000146bc _mpuAreRegionsSeparate_
    00014698 _mpuDisableBackgroundRegion_
    00014660 _mpuDisable_
    00014680 _mpuEnableBackgroundRegion_
    00014640 _mpuEnable_
    000146b0 _mpuGetNumberOfRegions_
    000146e0 _mpuGetRegionBaseAddress_
    00014700 _mpuGetRegionPermission_
    000146f4 _mpuGetRegionType_
    000146d0 _mpuGetRegion_
    00014380 _mpuInit_
    000146d8 _mpuSetRegionBaseAddress_
    0001470c _mpuSetRegionSizeRegister_
    000146e8 _mpuSetRegionTypeAndPermission_
    000146c8 _mpuSetRegion_
    000156e8 _nop
    00015240 _pmuDisableCountersGlobal_
    00015228 _pmuEnableCountersGlobal_
    000152c0 _pmuGetCycleCount_
    000152c8 _pmuGetEventCount_
    000152d8 _pmuGetOverflow_
    000151d8 _pmuInit_
    00015288 _pmuResetCounters_
    00015258 _pmuResetCycleCounter_
    00015270 _pmuResetEventCounters_
    000152b0 _pmuSetCountEvent_
    000152a0 _pmuStartCounters_
    000152a8 _pmuStopCounters_
    000156dc _register_lock
    000156d0 _register_unlock
    08001504 _unlock
    00015660 abort
    00014f68 adcNotification
    ffffffff binit
    00010938 can1GetConfigValue
    00014a60 can1HighLevelInterrupt
    00014b4c can1LowLevelInterrupt
    000107d8 canDisableErrorNotification
    000107b8 canDisableStatusChangeNotification
    00010830 canDisableloopback
    00010778 canEnableErrorNotification
    00010798 canEnableStatusChangeNotification
    000107f8 canEnableloopback
    00014f7c canErrorNotification
    00010520 canFillMessageObjectData
    00010248 canGetData
    00010754 canGetErrorLevel
    000103a0 canGetID
    00010730 canGetLastError
    00010000 canInit
    0001091c canIoRxGetBit
    00010860 canIoSetDirection
    000108b0 canIoSetPort
    00010900 canIoTxGetBit
    000106d4 canIsMessageBoxValid
    00010678 canIsRxMessageArrived
    0001061c canIsTxMessagePending
    00014fa4 canMessageNotification
    00010480 canSendRemoteFrame
    00014f90 canStatusChangeNotification
    0001014c canTransmit
    00010408 canUpdateID
    000155d8 copy_in
    00014fb8 dccNotification
    00014f40 dmaGroupANotification
    000133dc dwdClearFlag
    000132e0 dwdCounterEnable
    00013344 dwdGenerateSysReset
    000133a4 dwdGetStatus
    000133f8 dwdGetViolationStatus
    00013250 dwdInit
    0001331c dwdReset
    000132fc dwdSetPreload
    000132c8 dwwdGetCurrentDownCounter
    0001327c dwwdInit
    00015060 emacRxNotification
    00015050 emacTxNotification
    0001503c epcCAMFullNotification
    00015040 epcFIFOFullNotification
    0001363c errataFailNotification
    0001364c errata_PBIST_4
    000129fc esmActivateNormalOperation
    00012b64 esmClearStatus
    00012bcc esmClearStatusBuffer
    00012ba4 esmClearStatusUpper
    000129a4 esmDisableError
    000129d0 esmDisableErrorUpper
    00012a54 esmDisableInterrupt
    00012a80 esmDisableInterruptUpper
    0001295c esmEnableError
    00012988 esmEnableErrorUpper
    00012a0c esmEnableInterrupt
    00012a38 esmEnableInterruptUpper
    00012cf4 esmEnterSelfTest
    00012940 esmError
    00012dcc esmGetConfigValue
    00012c08 esmGetStatus
    00012ccc esmGetStatusBuffer
    00012c7c esmGetStatusUpper
    00014f08 esmGroup1Notification
    00014f1c esmGroup2Notification
    00014f30 esmGroup3Notification
    00014c00 esmHighInterrupt
    000127b4 esmInit
    00012d7c esmSelfTestStatus
    00012be8 esmSetCounterPreloadValue
    00012a9c esmSetInterruptLevel
    00012b20 esmSetInterruptLevelUpper
    000129ec esmTriggerErrorPinReset
    00015018 etpwmNotification
    00015028 etpwmTripNotification
    0001566c exit
    0001186c getResetSource
    00013d54 gioDisableNotification
    00013cec gioEnableNotification
    00013c54 gioGetBit
    00013dbc gioGetConfigValue
    00013c7c gioGetPort
    00013af4 gioInit
    00014fcc gioNotification
    00013be4 gioSetBit
    00013bc4 gioSetDirection
    00013c34 gioSetPort
    00013c94 gioToggleBit
    00015070 main
    00011674 mapClocks
    00014d88 memcpy
    00010b08 muxInit
    000115c0 periphInit
    00000000 resetEntry
    000153c0 rtiCompare0Interrupt
    000153e0 rtiCompare1Interrupt
    0001543c rtiCompare2Interrupt
    0001545c rtiCompare3Interrupt
    000134b0 rtiDisableNotification
    00013484 rtiEnableNotification
    000134d0 rtiGetConfigValue
    000131b8 rtiGetCurrentTick
    0001318c rtiGetPeriod
    00012fa0 rtiInit
    00014f54 rtiNotification
    000130f4 rtiResetCounter
    00013160 rtiSetPeriod
    00013094 rtiStartCounter
    000130c4 rtiStopCounter
    00014fe0 sciNotification
    00011580 setupFlash
    000114d8 setupPLL
    00015008 spiEndNotification
    00014ff4 spiNotification
    000119b8 systemGetConfigValue
    000117a0 systemInit
    0001183c systemPowerDown
    00011538 trimLPO
    00011f54 vimChannelMap
    000121b8 vimDisableInterrupt
    00014714 vimECCErrorHandler
    00011ff0 vimEnableInterrupt
    00012264 vimGetConfigValue
    00011e80 vimInit


    GLOBAL SYMBOLS: SORTED BY Symbol Address

    address name
    -------- ----
    00000000 __TI_static_base__
    00000000 resetEntry
    0000c000 BootloaderInfo
    00010000 canInit
    0001014c canTransmit
    00010248 canGetData
    000103a0 canGetID
    00010408 canUpdateID
    00010480 canSendRemoteFrame
    00010520 canFillMessageObjectData
    0001061c canIsTxMessagePending
    00010678 canIsRxMessageArrived
    000106d4 canIsMessageBoxValid
    00010730 canGetLastError
    00010754 canGetErrorLevel
    00010778 canEnableErrorNotification
    00010798 canEnableStatusChangeNotification
    000107b8 canDisableStatusChangeNotification
    000107d8 canDisableErrorNotification
    000107f8 canEnableloopback
    00010830 canDisableloopback
    00010860 canIoSetDirection
    000108b0 canIoSetPort
    00010900 canIoTxGetBit
    0001091c canIoRxGetBit
    00010938 can1GetConfigValue
    00010b08 muxInit
    000114d8 setupPLL
    00011538 trimLPO
    00011580 setupFlash
    000115c0 periphInit
    00011674 mapClocks
    000117a0 systemInit
    0001183c systemPowerDown
    0001186c getResetSource
    000119b8 systemGetConfigValue
    00011e80 vimInit
    00011f54 vimChannelMap
    00011ff0 vimEnableInterrupt
    000121b8 vimDisableInterrupt
    00012264 vimGetConfigValue
    000127b4 esmInit
    00012940 esmError
    0001295c esmEnableError
    00012988 esmEnableErrorUpper
    000129a4 esmDisableError
    000129d0 esmDisableErrorUpper
    000129ec esmTriggerErrorPinReset
    000129fc esmActivateNormalOperation
    00012a0c esmEnableInterrupt
    00012a38 esmEnableInterruptUpper
    00012a54 esmDisableInterrupt
    00012a80 esmDisableInterruptUpper
    00012a9c esmSetInterruptLevel
    00012b20 esmSetInterruptLevelUpper
    00012b64 esmClearStatus
    00012ba4 esmClearStatusUpper
    00012bcc esmClearStatusBuffer
    00012be8 esmSetCounterPreloadValue
    00012c08 esmGetStatus
    00012c7c esmGetStatusUpper
    00012ccc esmGetStatusBuffer
    00012cf4 esmEnterSelfTest
    00012d7c esmSelfTestStatus
    00012dcc esmGetConfigValue
    00012fa0 rtiInit
    00013094 rtiStartCounter
    000130c4 rtiStopCounter
    000130f4 rtiResetCounter
    00013160 rtiSetPeriod
    0001318c rtiGetPeriod
    000131b8 rtiGetCurrentTick
    00013250 dwdInit
    0001327c dwwdInit
    000132c8 dwwdGetCurrentDownCounter
    000132e0 dwdCounterEnable
    000132fc dwdSetPreload
    0001331c dwdReset
    00013344 dwdGenerateSysReset
    0001336c IsdwdKeySequenceCorrect
    000133a4 dwdGetStatus
    000133dc dwdClearFlag
    000133f8 dwdGetViolationStatus
    00013484 rtiEnableNotification
    000134b0 rtiDisableNotification
    000134d0 rtiGetConfigValue
    0001363c errataFailNotification
    0001364c errata_PBIST_4
    00013af4 gioInit
    00013bc4 gioSetDirection
    00013be4 gioSetBit
    00013c34 gioSetPort
    00013c54 gioGetBit
    00013c7c gioGetPort
    00013c94 gioToggleBit
    00013cec gioEnableNotification
    00013d54 gioDisableNotification
    00013dbc gioGetConfigValue
    00013f78 _coreInitRegisters_
    00014084 _coreInitStackPointer_
    000140d0 _getCPSRValue_
    000140d8 _gotoCPUIdle_
    000140f0 _coreEnableVfp_
    00014108 _coreEnableEventBusExport_
    00014120 _coreDisableEventBusExport_
    00014138 _coreEnableIrqVicOffset_
    00014150 _coreGetDataFault_
    00014158 _coreClearDataFault_
    0001416c _coreGetInstructionFault_
    00014174 _coreClearInstructionFault_
    00014188 _coreGetDataFaultAddress_
    00014190 _coreClearDataFaultAddress_
    000141a4 _coreGetInstructionFaultAddress_
    000141ac _coreClearInstructionFaultAddress_
    000141c0 _coreGetAuxiliaryDataFault_
    000141c8 _coreClearAuxiliaryDataFault_
    000141dc _coreGetAuxiliaryInstructionFault_
    000141e4 _coreClearAuxiliaryInstructionFault_
    000141f8 _disable_IRQ_interrupt_
    00014200 _enable_IRQ_interrupt_
    00014208 _enable_interrupt_
    00014210 _esmCcmErrorsClear_
    00014298 _memInit_
    000142cc _checkMemInitOn_
    000142ec _cacheEnable_
    0001431c _cacheDisable_
    00014340 _dCacheInvalidate_
    0001435c _iCacheInvalidate_
    00014378 __TI_PINIT_Base
    0001437c __TI_PINIT_Limit
    00014380 _mpuInit_
    00014640 _mpuEnable_
    00014660 _mpuDisable_
    00014680 _mpuEnableBackgroundRegion_
    00014698 _mpuDisableBackgroundRegion_
    000146b0 _mpuGetNumberOfRegions_
    000146bc _mpuAreRegionsSeparate_
    000146c8 _mpuSetRegion_
    000146d0 _mpuGetRegion_
    000146d8 _mpuSetRegionBaseAddress_
    000146e0 _mpuGetRegionBaseAddress_
    000146e8 _mpuSetRegionTypeAndPermission_
    000146f4 _mpuGetRegionType_
    00014700 _mpuGetRegionPermission_
    0001470c _mpuSetRegionSizeRegister_
    00014714 vimECCErrorHandler
    00014a60 can1HighLevelInterrupt
    00014b4c can1LowLevelInterrupt
    00014c00 esmHighInterrupt
    00014d88 __aeabi_memcpy
    00014d88 __aeabi_memcpy4
    00014d88 __aeabi_memcpy8
    00014d88 memcpy
    00014f08 esmGroup1Notification
    00014f1c esmGroup2Notification
    00014f30 esmGroup3Notification
    00014f40 dmaGroupANotification
    00014f54 rtiNotification
    00014f68 adcNotification
    00014f7c canErrorNotification
    00014f90 canStatusChangeNotification
    00014fa4 canMessageNotification
    00014fb8 dccNotification
    00014fcc gioNotification
    00014fe0 sciNotification
    00014ff4 spiNotification
    00015008 spiEndNotification
    00015018 etpwmNotification
    00015028 etpwmTripNotification
    0001503c epcCAMFullNotification
    00015040 epcFIFOFullNotification
    00015050 emacTxNotification
    00015060 emacRxNotification
    00015070 main
    000151d8 _pmuInit_
    00015228 _pmuEnableCountersGlobal_
    00015240 _pmuDisableCountersGlobal_
    00015258 _pmuResetCycleCounter_
    00015270 _pmuResetEventCounters_
    00015288 _pmuResetCounters_
    000152a0 _pmuStartCounters_
    000152a8 _pmuStopCounters_
    000152b0 _pmuSetCountEvent_
    000152c0 _pmuGetCycleCount_
    000152c8 _pmuGetEventCount_
    000152d8 _pmuGetOverflow_
    000152ec __TI_auto_init
    000153c0 rtiCompare0Interrupt
    000153e0 rtiCompare1Interrupt
    0001543c rtiCompare2Interrupt
    0001545c rtiCompare3Interrupt
    00015488 _c_int00
    000155d8 copy_in
    00015658 C$$EXIT
    00015660 abort
    0001566c exit
    000156d0 _register_unlock
    000156dc _register_lock
    000156e8 _nop
    000156f4 __TI_zero_init
    00015714 __TI_decompress_none
    00015728 __TI_decompress_rle24
    00015730 UnexpectedInterrupt
    000159c4 __TI_Handler_Table_Base
    000159d0 __TI_Handler_Table_Limit
    000159d8 __TI_CINIT_Base
    000159f0 __TI_CINIT_Limit
    08001500 _RamfuncsLoadEnd
    08001500 _RamfuncsLoadStart
    08001500 _RamfuncsRunStart
    08001500 _lock
    08001504 _unlock
    08001508 __TI_cleanup_ptr
    0800150c __TI_dtors_ptr
    08001510 InterruptFlagsFor5msInterrupt
    08001514 RTI_5ms_Counter
    ffffffff __binit__
    ffffffff __c_args__
    ffffffff binit
    UNDEFED SHT$$INIT_ARRAY$$Base
    UNDEFED SHT$$INIT_ARRAY$$Limit
  • Okay, so only the one section is being placed in the MidptFile output section, but it is still being marked for auto initialization. The next step is to examine the object file, commonUDS_midptapp.obj. Can you either post the file, or run armofd -v commonUDS_midptapp.obj and post the results? armofd is included with the compiler tools, but you will need to run it on the command line.
  • OK, so I found it!!!! The former software engineer here was trying to keep all the include files identical for the different CPUs used within the company. He had a lot of #if, #ifdef, #indef and #if defined() statements. This became rather complex and very dependent on the order in which the include files are preprocessed. I have been slowly de-tangling this mess, but some stuff still remains and this was just one more gotcha! Depending on the preprocessing order and which CPU is selected, the "volatile const" definition could be removed prior to compiling the file with the struct.

    Hopefully, I am up and running now! THANK YOU FOR ALL THE HELP!!!

    Marek Christer
  • Marek Christer said:
    #if, #ifdef, #indef and #if defined() statements. This became rather complex and very dependent on the order in which the include files are preprocessed. I have been slowly de-tangling this mess, but some stuff still remains and this was just one more gotcha!

    The option --gen_acp_raw can help you see what happens during preprocessing.  Read about it in the ARM compiler manual.

    Thanks and regards,

    -George

  • Thank you again George!

    Take care!