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.

can not implement custom pre_init.c using _system_pre_init()

Other Parts Discussed in Thread: MSP430G2553, CC1101

I've read all through these forums about the issue that I'm having.  The watchdog timer is expiring and resetting the micro before my main loop is ever reached.  I've attempted to disable the watchdog within the function _system_pre_init() but not having much luck.  

When I try to include pre_init.c in my project, I get a compiler error:

Description Resource Path Location Type
#10056 symbol "_system_pre_init" redefined: first defined in "./pre_init.obj"; redefined in "C:\TI\grace_2_10_02_85\packages\ti\targets\msp430\rts430\lib\ti.targets.msp430.rts430.ae430<pre_init.oe430>" Keyfob_AGVTC C/C++ Problem

I get the same error when I try defining the function in another c file.  I've not been able to successfully compile with _system_pre_init() defined as my own.  

suggestions?

by the way I'm using CCS 5.3 with a msp430g2553 microprocessor 

  • Apparently, GRACE is already putting its own version into your project. So it is there three times: yours, the one form GRACE and the one in the runtime library. The linker will automatically exclude the one from the runtime lib, if there is any other version in one of the object files, but there is still one too much.

    Check grace whether it provides a hook (a callback function that can be used to call your code). Maybe the GRACE config has a field where you can enter a function name.

  • There is an option in CCS to hold the watchdog during cinit: MSP430 Linker\Basic Options. Maybe this will help.

  • i didn't see the option to hold the watchdog in here.  However, there is a field to "Specify output file name (--output_file, -o)"

    This box had already had the text "pre_init.o".  I tried replacing this with my .c file path.  It does build when I do this, however my pre_init.c is then overwritten with what I'm assuming is machine code.  

    So then I tried replacing with the file pre_init.obj from my project debug folder.  When I do that, pre_init.obj no longer will build, therefore doesn't exist.

  • There is no such option in the Grace configuration for the watchdog.  

    The ONLY bit set in the WDTCTL is bit7 (WDT HOLD).  I also do not have any interrupts enabled for the watchdog

  • Hi Anthony,

    I've brought this issue to the attention of the Grace development team. Unfortunately at the moment there isn't a super easy workaround for you, but because you've notified us of this issue they are going to look into possible changes that they can make to make it where dropping in a file with _system_pre_init() will work with Grace the way you would expect.

    For now, they said that there's this workaround if you just need to be able to disable the watchdog:

    Grace team said:

    Configuration Workarounds

    • If you just need to disable the watchdog, you only need to add the following line to your application’s .cfg script:

    var Boot = xdc.useModule("ti.catalog.msp430.init.Boot");

    The Boot module disables the watchdog by default at startup.  It does this by adding a function to a table of functions, managed by the Reset module, that are called just before _system_pre_init().

     

    So this is something that you can try in the meantime. Thanks so much for posting - it will hopefully help us to make this easier in future versions.

    Regards,

    Katie

  • I'm assuming this is something to try in lieu of implementing _system_pre_init()

    If so, then it didn't work.  The debugger still never reaches my main loop.

  • Anthony Moeder said:
    The watchdog timer is expiring and resetting the micro before my main loop is ever reached.

    Are you sure the reason that the main loop not being reached is due to the watchdog timer expiring?

    e.g. I have seen some other (obscure) reasons why main fails to be reached such as a linker command file error which causes the start-up code to trigger a watchdog password violation leading to a reset.

    Given that main still isn't being reached when "var Boot = xdc.useModule("ti.catalog.msp430.init.Boot"); was added in the .cfg script suggest try and single step the run time start-up to try and determine where the failure occurs. To do this under the CCS project properties Debug -> Auto Run and Launch Options -> Auto Run Options untick the Run to Symbol "On a Program load or restart" and "On a reset" options. When start a debug session the processor will halt at the reset vector, and you can single step the start-up code.

  • Well, I had this issue months ago and the only way I was able to get around it was moving some of my variables into flash ram which decreased the ram allocation.  After I did that, I could hit breakpoints in my main loop.

    Since then I've added functionality and pretty well filled up the ram, so it's back.  

    Just single stepped through the entry code and was looping in _TI_zero_init() before suddenly jumping back to the entry-point.

  • Actually it jumps to the end of memory (0xFFFC) just before jumping back to the entry-point.

    And it always occurs when _TI_zero_init() is looking at address 0x0121.  I don't know if that is of any significance or not.  

    Here's something else I've done I didn't think of earlier.  I've combined  PERIPHERALS_8BIT and PERIPHERALS_16BIT with the RAM definition within the linker script.  So actually PERIPHERALS_8BIT and PERIPHERALS_16BIT are undefined and RAM is redefined using the pre-defined space for those 2 definitions.

    I didn't think that would be an issue, but I guess I don't know for sure.  Could this be the cause?

  • Anthony Moeder said:
    And it always occurs when _TI_zero_init() is looking at address 0x0121.  I don't know if that is of any significance or not.

    Address 0x121 is the address of the WatchDog timer, and _TI_zero_init() writing to that address will trigger a reset due to a Watchdog Password Violation.
    Anthony Moeder said:
     So actually PERIPHERALS_8BIT and PERIPHERALS_16BIT are undefined and RAM is redefined using the pre-defined space for those 2 definitions.
    Telling the linker to use the peripheral address space for RAM will cause the reset during the run time code initialisation (even if a reset didn't occur the program wouldn't run correctly). What problem were you trying to address by modifying the linker command file in that way?

  • ok, that all makes sense.  I've redefined PERIPHERALS_8BIT and PERIPHERALS_16BIT  and RAM all back to the way it was.  Reason I changed originally was to try and use that additional 0x90 bytes for my objects.  instead I'll just relocate some more variables into flash ram.

    but still the problem persists.  the micro resets when _TI_zero_init() reaches address 0x0121

  • Anthony Moeder said:
    but still the problem persists.  the micro resets when _TI_zero_init() reaches address 0x0121

    When compiling the program due you get any warnings of the form "creating output section "<section_name>" without a SECTIONS specification"?

    Also, can you post your linker command file and linker map files?

  • I do still have several warnings, but that's not one of them.  The flash ram appears to map correctly.

    here is my linker.

    /****************************************************************************/
    /* SPECIFY THE SYSTEM MEMORY MAP                                            */
    /****************************************************************************/
    MEMORY
    {
        SFR                     : origin = 0x0000, length = 0x0010
        PERIPHERALS_8BIT        : origin = 0x0010, length = 0x0040 //application
        PERIPHERALS_16BIT       : origin = 0x0050, length = 0x0050 //application
        RAM                     : origin = 0x0100, length = 0x0300 //application
    //    INFOA                   : origin = 0x10C0, length = 0x0040
    //    INFOB                   : origin = 0x1080, length = 0x0040
    //    INFOC                   : origin = 0x1040, length = 0x0040
    //    INFOD                   : origin = 0x1000, length = 0x0040
        FLASH_RAM               : origin = 0x1000, length = 0x0160 //application redefines info sections as flash_ram
        FLASH                   : origin = 0xC000, length = 0x3FE0
        INT00                   : origin = 0xFFE0, length = 0x0002
        INT01                   : origin = 0xFFE2, length = 0x0002
        INT02                   : origin = 0xFFE4, length = 0x0002
        INT03                   : origin = 0xFFE6, length = 0x0002
        INT04                   : origin = 0xFFE8, length = 0x0002
        INT05                   : origin = 0xFFEA, length = 0x0002
        INT06                   : origin = 0xFFEC, length = 0x0002
        INT07                   : origin = 0xFFEE, length = 0x0002
        INT08                   : origin = 0xFFF0, length = 0x0002
        INT09                   : origin = 0xFFF2, length = 0x0002
        INT10                   : origin = 0xFFF4, length = 0x0002
        INT11                   : origin = 0xFFF6, length = 0x0002
        INT12                   : origin = 0xFFF8, length = 0x0002
        INT13                   : origin = 0xFFFA, length = 0x0002
        INT14                   : origin = 0xFFFC, length = 0x0002
        RESET                   : origin = 0xFFFE, length = 0x0002
    }
    /****************************************************************************/
    /* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY                              */
    /****************************************************************************/
    SECTIONS
    {
        .bss        : {} > RAM                /* GLOBAL & STATIC VARS              */
        .data       : {} > RAM                /* GLOBAL & STATIC VARS              */
        .sysmem     : {} > RAM                /* DYNAMIC MEMORY ALLOCATION AREA    */
        .stack      : {} > RAM (HIGH)         /* SOFTWARE SYSTEM STACK             */
        .text       : {} > FLASH              /* CODE                              */
        .cinit      : {} > FLASH              /* INITIALIZATION TABLES             */
        .const      : {} > FLASH              /* CONSTANT DATA                     */
        .cio        : {} > RAM                /* C I/O BUFFER                      */
        .pinit      : {} > FLASH              /* C++ CONSTRUCTOR TABLES            */
        .init_array : {} > FLASH              /* C++ CONSTRUCTOR TABLES            */
        .mspabi.exidx : {} > FLASH            /* C++ CONSTRUCTOR TABLES            */
        .mspabi.extab : {} > FLASH            /* C++ CONSTRUCTOR TABLES            */
    //    .infoA     : {} >            /* MSP430 INFO FLASH MEMORY SEGMENTS */
    //    .infoB     : {} >
    //    .infoC     : {} >
    //    .infoD     : {} >
        .flashRam  : {} > FLASH_RAM type=NOINIT //application redefines info sections as flash_ram
        /* MSP430 INTERRUPT VECTORS          */
        .int00       : {}               > INT00
        .int01       : {}               > INT01
        PORT1        : { * ( .int02 ) } > INT02 type = VECT_INIT
        PORT2        : { * ( .int03 ) } > INT03 type = VECT_INIT
        .int04       : {}               > INT04
        ADC10        : { * ( .int05 ) } > INT05 type = VECT_INIT
        USCIAB0TX    : { * ( .int06 ) } > INT06 type = VECT_INIT
        USCIAB0RX    : { * ( .int07 ) } > INT07 type = VECT_INIT
        TIMER0_A1    : { * ( .int08 ) } > INT08 type = VECT_INIT
        TIMER0_A0    : { * ( .int09 ) } > INT09 type = VECT_INIT
        .int10       : {} > INT10
        COMPARATORA   : { * ( .int11 ) } > INT11 type = VECT_INIT
        TIMER1_A1    : { * ( .int12 ) } > INT12 type = VECT_INIT
        TIMER1_A0    : { * ( .int13 ) } > INT13 type = VECT_INIT
        NMI          : { * ( .int14 ) } > INT14 type = VECT_INIT
        .reset       : {}               > RESET  /* MSP430 RESET VECTOR         */ 
    }
    /****************************************************************************/
    /* INCLUDE PERIPHERALS MEMORY MAP                                           */
    /****************************************************************************/
    -l msp430g2553.cmd
    And here's my map file minus the GLOBAL SYMBOLS table
    ******************************************************************************
                      MSP430 Linker PC v4.1.8                      
    ******************************************************************************
    >> Linked Wed Mar 19 07:28:43 2014
    OUTPUT FILE NAME:   <pre_init.o>
    ENTRY POINT SYMBOL: "_c_int00"  address: 0000e9a2
    MEMORY CONFIGURATION
             name            origin    length      used     unused   attr    fill
    ----------------------  --------  ---------  --------  --------  ----  --------
      SFR                   00000000   00000010  00000000  00000010  RWIX
      PERIPHERALS_8BIT      00000010   00000040  00000000  00000040  RWIX
      PERIPHERALS_16BIT     00000050   00000050  00000000  00000050  RWIX
      RAM                   00000100   00000300  000002d0  00000030  RWIX
      FLASH_RAM             00001000   00000160  000000dc  00000084  RWIX
      FLASH                 0000c000   00003fe0  00002fb2  0000102e  RWIX
      INT00                 0000ffe0   00000002  00000000  00000002  RWIX
      INT01                 0000ffe2   00000002  00000000  00000002  RWIX
      INT02                 0000ffe4   00000002  00000002  00000000  RWIX
      INT03                 0000ffe6   00000002  00000002  00000000  RWIX
      INT04                 0000ffe8   00000002  00000000  00000002  RWIX
      INT05                 0000ffea   00000002  00000002  00000000  RWIX
      INT06                 0000ffec   00000002  00000002  00000000  RWIX
      INT07                 0000ffee   00000002  00000002  00000000  RWIX
      INT08                 0000fff0   00000002  00000002  00000000  RWIX
      INT09                 0000fff2   00000002  00000002  00000000  RWIX
      INT10                 0000fff4   00000002  00000002  00000000  RWIX
      INT11                 0000fff6   00000002  00000002  00000000  RWIX
      INT12                 0000fff8   00000002  00000002  00000000  RWIX
      INT13                 0000fffa   00000002  00000002  00000000  RWIX
      INT14                 0000fffc   00000002  00000002  00000000  RWIX
      RESET                 0000fffe   00000002  00000002  00000000  RWIX
    SECTION ALLOCATION MAP
     output                                  attributes/
    section   page    origin      length       input sections
    --------  ----  ----------  ----------   ----------------
    xdc.meta   0    00000000    000000f0     COPY SECTION
                      00000000    000000f0     main_pe430.oe430 (xdc.meta)
    .init_array 
    *          0    0000c000    00000000     UNINITIALIZED
    .bss       0    00000100    00000254     UNINITIALIZED
                      00000100    00000118     timer.obj (.bss)
                      00000218    000000a2     spi.obj (.bss)
                      000002ba    00000030     event.obj (.bss)
                      000002ea    00000019     AIRPushProtocol.obj (.bss)
                      00000303    00000001     --HOLE--
                      00000304    00000016     SystemVariables.obj (.bss)
                      0000031a    00000014     PhysicalBridge.obj (.bss)
                      0000032e    00000010     led.obj (.bss)
                      0000033e    00000010     pushButton.obj (.bss)
                      0000034e    00000004     flags.obj (.bss)
                      00000352    00000002     keyfob.obj (.bss)
    .TI.noinit 
    *          0    00000100    00000000     UNINITIALIZED
    .data      0    00000354    0000003c     
                      00000354    00000024     SystemVariables.obj (.data)
                      00000378    0000000a     PhysicalBridge.obj (.data)
                      00000382    00000006     PhysicalBridge.obj (.data:gGdo)
                      00000388    00000005     AIRPushProtocol.obj (.data)
                      0000038d    00000001     --HOLE--
                      0000038e    00000002     iic.obj (.data)
    .TI.persistent 
    *          0    00000354    00000000     UNINITIALIZED
    .stack     0    000003c0    00000040     UNINITIALIZED
                      000003c0    00000002     ti.targets.msp430.rts430.ae430 : boot.oe430 (.stack)
                      000003c2    0000003e     --HOLE--
    .flashRam 
    *          0    00001000    000000dc     UNINITIALIZED
                      00001000    00000090     io.obj (.flashRam)
                      00001090    00000044     iic.obj (.flashRam)
                      000010d4    00000008     throttleControl.obj (.flashRam)
    .text      0    0000c000    00002eee     
                      0000c000    00000354     timer.obj (.text:timerEvent_1msHandler)
                      0000c354    00000346     dataTypes.obj (.text:compareData)
                      0000c69a    000001f8     AIRPushProtocol.obj (.text:ProtocolFrameProcessing)
                      0000c892    00000172     io.obj (.text:readInputs)
                      0000ca04    00000166     pushButton.obj (.text:pushbuttonTimerEvent)
                      0000cb6a    00000122     event.obj (.text:newEventHandler)
                      0000cc8c    00000116     io.obj (.text:readPin)
                      0000cda2    000000fe     iic.obj (.text:iicRxInterruptHandler)
                      0000cea0    000000fc     led.obj (.text:flashLeds)
                      0000cf9c    000000c2     A1101R09.obj (.text:A1101R09SetPaTable)
                      0000d05e    000000b8     grace.lib : GPIO_init.obj (.text:GPIO_graceInit)
                      0000d116    000000b4     io.obj (.text:clearPin)
                      0000d1ca    000000ae     event.obj (.text:hasEventHandle)
                      0000d278    000000a4     timer.obj (.text:setTimerEvent)
                      0000d31c    0000009e     hardware.obj (.text:processHardwareFlags)
                      0000d3ba    0000009c     CC1101.obj (.text:CC1101GetRegisterWithSpiSyncProblem)
                      0000d456    0000009c     pushButton.obj (.text:buttonPressedEvent)
                      0000d4f2    0000009a     io.obj (.text:setPin)
                      0000d58c    00000090     PhysicalBridge.obj (.text:InitializePhysicalBridge)
                      0000d61c    0000008c     led.obj (.text:initLeds)
                      0000d6a8    0000008a     hardware.obj (.text:initHardware)
                      0000d732    00000086     A1101R09.obj (.text:A1101R09SetChannr)
                      0000d7b8    00000076     iic.obj (.text:iicTxInterruptHandler)
                      0000d82e    00000074     pushButton.obj (.text:initPushbuttons)
                      0000d8a2    0000006e     AIRPushProtocol.obj (.text:Transmit)
                      0000d910    0000006c     io.obj (.text:initPins)
                      0000d97c    0000006a     ti.targets.msp430.rts430.ae430 : autoinit.oe430 (.text:_auto_init)
                      0000d9e6    00000068     rts430_eabi.lib : fs_toi.obj (.text)
                      0000da4e    00000064     CC1101.obj (.text:CC1101GdoInit)
                      0000dab2    00000064     AIRPushProtocol.obj (.text:InitializeChannelGroup)
                      0000db16    00000064     PhysicalBridge.obj (.text:TransmitFrame)
                      0000db7a    00000062     keyfob.obj (.text:keyfobEventHandler)
                      0000dbdc    00000060     event.obj (.text:setEventStatus)
                      0000dc3c    0000005e     CC1101.obj (.text:CC1101GetChip)
                      0000dc9a    0000005e     rts430_eabi.lib : copy_decompress_rle.obj (.text:__TI_decompress_rle_core)
                      0000dcf8    0000005e     timer.obj (.text:getTimerEvent)
                      0000dd56    0000005e     throttleControl.obj (.text:setMotorState)
                      0000ddb4    0000005e     spi.obj (.text:spiClearRxBuffer)
                      0000de12    0000005c     A1101R09.obj (.text:A1101R09Init)
                      0000de6e    0000005a     io.obj (.text:setPinDirection)
                      0000dec8    00000058     CC1101.obj (.text:CC1101ReadRxFifo)
                      0000df20    00000058     rts430_eabi.lib : div32u.obj (.text)
                      0000df78    00000054     AIRPushProtocol.obj (.text:FrameReceivedChGroupUpdate)
                      0000dfcc    00000054     grace.lib : InterruptVectors_init.obj (.text:PORT2_ISR_HOOK)
                      0000e020    00000050     CC1101.obj (.text:CC1101Read)
                      0000e070    0000004c     rts430_eabi.lib : lsr16.obj (.text)
                      0000e0bc    0000004a                     : fs_cmp.obj (.text)
                      0000e106    0000004a                     : fs_ltof.obj (.text)
                      0000e150    0000004a     spi.obj (.text:spiExchange)
                      0000e19a    0000004a     timer.obj (.text:startCounter)
                      0000e1e4    00000048     CC1101.obj (.text:CC1101GetRegister)
                      0000e22c    00000048     PhysicalBridge.obj (.text:ReceiveOn)
                      0000e274    00000044     grace.lib : USCI_B0_init.obj (.text:USCI_B0_graceInit)
                      0000e2b8    00000044     spi.obj (.text:startSpi)
                      0000e2fc    00000044     timer.obj (.text:startTimer)
                      0000e340    00000042     CC1101.obj (.text:CC1101SetAndVerifyState)
                      0000e382    00000040     CC1101.obj (.text:CC1101Write)
                      0000e3c2    00000040     iic.obj (.text:iicAttached)
                      0000e402    00000040     rts430_eabi.lib : div32s.obj (.text)
                      0000e442    00000040     led.obj (.text:setLedState)
                      0000e482    0000003e     AIRPushProtocol.obj (.text:FrameValidationNumber)
                      0000e4c0    0000003a     event.obj (.text:compareHandles)
                      0000e4fa    00000036     A1101R09.obj (.text:A1101R09Configure)
                      0000e530    00000036     rts430_eabi.lib : fs_itof.obj (.text)
                      0000e566    00000036                     : strstr.obj (.text:strstr)
                      0000e59c    00000034     grace.lib : BCSplus_init.obj (.text:BCSplus_graceInit)
                      0000e5d0    00000034     pushButton.obj (.text:isButtonHeld)
                      0000e604    00000034     timer.obj (.text:setTimer)
                      0000e638    00000032     CC1101.obj (.text:CC1101Configure)
                      0000e66a    00000032     io.obj (.text:getIoEvent)
                      0000e69c    00000032     event.obj (.text:getMaxIndex)
                      0000e6ce    00000032     pushButton.obj (.text:isButtonPressed)
                      0000e700    00000032     rts430_eabi.lib : fs_ultof.obj (.text)
                      0000e732    00000032     throttleControl.obj (.text:updateThrottlePosition)
                      0000e764    00000030     flags.obj (.text:readHardwareFlag)
                      0000e794    00000030     timer.obj (.text:resetCounter)
                      0000e7c4    00000030     io.obj (.text:setInverted)
                      0000e7f4    0000002e     PhysicalBridge.obj (.text:DebugCatch)
                      0000e822    0000002e     PhysicalBridge.obj (.text:SoftwareTickWait)
                      0000e850    0000002e     io.obj (.text:processIO)
                      0000e87e    0000002c     iic.obj (.text:iicTxFlush)
                      0000e8aa    0000002c     rts430_eabi.lib : lsl16.obj (.text)
                      0000e8d6    0000002a     PhysicalBridge.obj (.text:CatastrophicError)
                      0000e900    0000002a     main.obj (.text:start)
                      0000e92a    00000028     CC1101.obj (.text:CC1101SpiInit)
                      0000e952    00000028     grace.lib : Grace_init.obj (.text:Grace_init)
                      0000e97a    00000028     iic.obj (.text:iicInit)
                      0000e9a2    00000026     ti.targets.msp430.rts430.ae430 : boot.oe430 (.text:_c_int00_noexit)
                      0000e9c8    00000024     PhysicalBridge.obj (.text:Gdo0Enable)
                      0000e9ec    00000024     flags.obj (.text:clearHardwareFlag)
                      0000ea10    00000024     iic.obj (.text:iicBusy)
                      0000ea34    00000024     rts430_eabi.lib : fs_utof.obj (.text)
                      0000ea58    00000022     A1101R09.obj (.text:A1101R09GetLookup)
                      0000ea7a    00000022     CC1101.obj (.text:CC1101WriteTxFifo)
                      0000ea9c    00000022     grace.lib : InterruptVectors_init.obj (.text:TIMER0_A0_ISR_HOOK)
                      0000eabe    00000022     iic.obj (.text:iicClearRxBuffer)
                      0000eae0    00000022     flags.obj (.text:setHardwareFlag)
                      0000eb02    00000020     instrumentFeatures.obj (.text:initInstrumentFeatures)
                      0000eb22    0000001e     CC1101.obj (.text:CC1101SetRegister)
                      0000eb40    0000001e     CC1101.obj (.text:CC1101Strobe)
                      0000eb5e    0000001e     grace.lib : InterruptVectors_init.obj (.text:USCI0RX_ISR_HOOK)
                      0000eb7c    0000001e               : InterruptVectors_init.obj (.text:USCI0TX_ISR_HOOK)
                      0000eb9a    0000001e     spi.obj (.text:spiWrite)
                      0000ebb8    0000001c     CC1101.obj (.text:CC1101TimeoutEvent)
                      0000ebd4    0000001c     led.obj (.text:blinkError)
                      0000ebf0    0000001c     timer.obj (.text:getCount)
                      0000ec0c    0000001c     timer.obj (.text:setCounterEventInterval)
                      0000ec28    0000001c     spi.obj (.text:spiRead)
                      0000ec44    0000001a     CC1101.obj (.text:CC1101WriteRegisters)
                      0000ec5e    0000001a     PhysicalBridge.obj (.text:Gdo0Assert)
                      0000ec78    0000001a     PhysicalBridge.obj (.text:Gdo0Deassert)
                      0000ec92    0000001a     PhysicalBridge.obj (.text:Gdo0Init)
                      0000ecac    0000001a     PhysicalBridge.obj (.text:GetReceivedFrame)
                      0000ecc6    0000001a     grace.lib : InterruptVectors_init.obj (.text:PORT1_ISR_HOOK)
                      0000ece0    0000001a               : USCI_A0_init.obj (.text:USCI_A0_graceInit)
                      0000ecfa    0000001a     wireless.obj (.text:initWireless)
                      0000ed14    0000001a     io.obj (.text:isInverted)
                      0000ed2e    0000001a     spi.obj (.text:spiBusy)
                      0000ed48    0000001a     spi.obj (.text:spiInit)
                      0000ed62    00000018     PhysicalBridge.obj (.text:Gdo0Event)
                      0000ed7a    00000018     rts430_eabi.lib : strcmp.obj (.text:strcmp)
                      0000ed92    00000016                     : div16u.obj (.text)
                      0000eda8    00000014     grace.lib : Timer0_A3_init.obj (.text:Timer0_A3_graceInit)
                      0000edbc    00000014     rts430_eabi.lib : copy_zero_init.obj (.text:decompress:ZI:__TI_zero_init)
                      0000edd0    00000014     timer.obj (.text:getTimerState)
                      0000ede4    00000014     rts430_eabi.lib : memset.obj (.text:memset)
                      0000edf8    00000014                     : mult16.obj (.text)
                      0000ee0c    00000012     AIRPushProtocol.obj (.text:GetCurrentChannel)
                      0000ee1e    00000012     PhysicalBridge.obj (.text:MilliSecondsToTimerTics)
                      0000ee30    00000012     rts430_eabi.lib : copy_decompress_none.obj (.text:decompress:none:__TI_decompress_none)
                      0000ee42    00000012                     : memcpy.obj (.text:memcpy)
                      0000ee54    00000010     PhysicalBridge.obj (.text:Gdo0State)
                      0000ee64    00000010     grace.lib : System_init.obj (.text:System_graceInit)
                      0000ee74    00000010     rts430_eabi.lib : epilog.obj (.text)
                      0000ee84    0000000e     PhysicalBridge.obj (.text:LinkReporting)
                      0000ee92    0000000a     AIRPushProtocol.obj (.text:ProtocolInitialization)
                      0000ee9c    00000008     grace.lib : WDTplus_init.obj (.text:WDTplus_graceInit)
                      0000eea4    00000008     instrumentFeatures.obj (.text:goToSleep)
                      0000eeac    00000008     throttleControl.obj (.text:initThrottleController)
                      0000eeb4    00000006     A1101R09.obj (.text:A1101R09GetPowerLookupSize)
                      0000eeba    00000006     errorHandling.obj (.text:ISR_trap)
                      0000eec0    00000006     rts430_eabi.lib : copy_decompress_rle.obj (.text:decompress:rle24:__TI_decompress_rle24)
                      0000eec6    00000006     throttleControl.obj (.text:getMotorState)
                      0000eecc    00000006     main_pe430.oe430 (.text:main)
                      0000eed2    00000006     wireless.obj (.text:wirelessExchange)
                      0000eed8    00000004     ti.targets.msp430.rts430.ae430 : pre_init.oe430 (.text:_system_pre_init)
                      0000eedc    00000004     rts430_eabi.lib : exit.obj (.text:abort)
                      0000eee0    00000004     wireless.obj (.text:wirelessClearRxBuffer)
                      0000eee4    00000002     grace.lib : InterruptVectors_init.obj (.text:InterruptVectors_graceInit)
                      0000eee6    00000002     iic.obj (.text:iicStop)
                      0000eee8    00000002     relay.obj (.text:initRelays)
                      0000eeea    00000002     keyfob.obj (.text:transmitterPairingEventHandler)
                      0000eeec    00000002     io.obj (.text:updateOutputs)
    .const     0    0000eeee    0000009a     
                      0000eeee    0000003e     A1101R09.obj (.const:gA1101R09Lookup)
                      0000ef2c    0000001a     AIRPushProtocol.obj (.const:.string)
                      0000ef46    00000014     A1101R09.obj (.const:gA1101R09PowerLookup)
                      0000ef5a    00000013     AIRPushProtocol.obj (.const:.string:FrameValidationTable)
                      0000ef6d    00000001     --HOLE-- [fill = 0]
                      0000ef6e    0000000c     PhysicalBridge.obj (.const)
                      0000ef7a    00000008     PhysicalBridge.obj (.const:.string:PATABLE_List)
                      0000ef82    00000003     AIRPushProtocol.obj (.const:.string:DefaultChannelList)
                      0000ef85    00000001     --HOLE-- [fill = 0]
                      0000ef86    00000002     CC1101.obj (.const:.string:$P$T0$1)
    .cinit     0    0000ef88    0000002a     
                      0000ef88    00000018     (.cinit..data.load) [load image, compression = rle]
                      0000efa0    00000006     (__TI_handler_table)
                      0000efa6    00000004     (.cinit..bss.load) [load image, compression = zero_init]
                      0000efaa    00000008     (__TI_cinit_table)
    PORT1      0    0000ffe4    00000002     
                      0000ffe4    00000002     grace.lib : InterruptVectors_init.obj (.int02)
    PORT2      0    0000ffe6    00000002     
                      0000ffe6    00000002     grace.lib : InterruptVectors_init.obj (.int03)
    ADC10      0    0000ffea    00000002     
                      0000ffea    00000002     errorHandling.obj (.int05)
    USCIAB0TX 
    *          0    0000ffec    00000002     
                      0000ffec    00000002     grace.lib : InterruptVectors_init.obj (.int06)
    USCIAB0RX 
    *          0    0000ffee    00000002     
                      0000ffee    00000002     grace.lib : InterruptVectors_init.obj (.int07)
    TIMER0_A1 
    *          0    0000fff0    00000002     
                      0000fff0    00000002     errorHandling.obj (.int08)
    TIMER0_A0 
    *          0    0000fff2    00000002     
                      0000fff2    00000002     grace.lib : InterruptVectors_init.obj (.int09)
    .int10     0    0000fff4    00000002     
                      0000fff4    00000002     errorHandling.obj (.int10)
    COMPARATORA 
    *          0    0000fff6    00000002     
                      0000fff6    00000002     errorHandling.obj (.int11)
    TIMER1_A1 
    *          0    0000fff8    00000002     
                      0000fff8    00000002     errorHandling.obj (.int12)
    TIMER1_A0 
    *          0    0000fffa    00000002     
                      0000fffa    00000002     errorHandling.obj (.int13)
    NMI        0    0000fffc    00000002     
                      0000fffc    00000002     errorHandling.obj (.int14)
    .reset     0    0000fffe    00000002     
                      0000fffe    00000002     ti.targets.msp430.rts430.ae430 : boot.oe430 (.reset)
    LINKER GENERATED COPY TABLES
    __TI_cinit_table @ 0000efaa records: 2, size/record: 4, table size: 8
    .data: load addr=0000ef88, load size=00000018 bytes, run addr=00000354, run size=0000003c bytes, compression=rle
    .bss: load addr=0000efa6, load size=00000004 bytes, run addr=00000100, run size=00000254 bytes, compression=zero_init
    LINKER GENERATED HANDLER TABLE
    __TI_handler_table @ 0000efa0 records: 3, size/record: 2, table size: 6
    index: 0, handler: __TI_zero_init
    index: 1, handler: __TI_decompress_rle24
    index: 2, handler: __TI_decompress_none
  • By the way, (and this is why I originally removed the definitions) I noticed that the PERIPHERALS_8BIT and PERIPHERALS_16BIT sections are both unused according to the map output file.

    Why then is it a problem to redefine them as a single larger block of RAM?

  • Anthony Moeder said:
    Why then is it a problem to redefine them as a single larger block of RAM?

    The peripheral address space can't be redefined as RAM since:

    a) Not all the bits read back the last value written

    b) Writing to some peripheral addresses, such as the watchdog timer key, can trigger a reset as has been observed when _TI_zero_init writes to address 0x0121.

  • Alright, thanks for the info.  

  • Anthony Moeder said:
    Why then is it a problem to redefine them as a single larger block of RAM?

    Because those addresses are not RAM. They are the control/status/data registers for the peripherals in the device.

  • Got it.  I've already reverted back to the way peripherals were originally defined.

    But I still have the issue with the watchdog resetting the micro before reaching my main loop.

    Even adding this line to the config script like Katie suggested didn't help.

    var Boot = xdc.useModule("ti.catalog.msp430.init.Boot");

  • Perhaps you should post your code (or at least the part that is executed before main, the global definitions and the ISRs).
    Maybe there’s something that makes your code trigger a reset (are you sure it is the watchdog?) before main.

  • I got it.  Didn't actually have the perifs restored correctly like I though.  Thanks everyone for your helpful advice.

**Attention** This is a public forum