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.

CC1310: Modifying startup_iar.c file

Part Number: CC1310

Hi Team,

My customer has a project based on TI-RTOS easylink, he want to know what will happen when code running away.

Is there any way to modify startup_iar.c file or exception handling functions like FaultISRHandler、ResetISR、NmiSRHandler、IntDefaultHandler? 

Best Regards

Viki

  • I'd like to know how TI provide TI RTOS demo for abnormal processing. How can I add hint in abnormal interrupt service(FaultISRHandler), and then reset cc1310.

  • Is there any suggestion for this question? Thanks in advance.

    Best Regards

    Viki

  • Hi,

    This should not be a problem. You can modify the fault handlers in the startup code with assert and make the code more production friendly.

    Thanks.

  • Hi,

    In TI  RTOS rfWsnNode  project does not contain "startup_iar.c".Seems to be encapsulated into the library file.

    When I add "startup_iar.c" in rfWsnNode project , and try to modify the exception handler(such as FaultISRHandler(void)). The compiled found that conflict.

    Error[Li006]: duplicate definitions for "ResetISR"; in "E:\work\02_Product\Source\CC1310_bosma\Debug\Obj\startup_iar.o", and "C:\ti\simplelink_cc13x0_sdk_3_10_00_11\kernel\tirtos\builds\CC1310_LAUNCHXL\release\iar\package\cfg\release_prm3.orm3"

    Error[Li006]: duplicate definitions for "__vector_table"; in "E:\work\02_Product\Source\CC1310_bosma\Debug\Obj\startup_iar.o", and "C:\ti\simplelink_cc13x0_sdk_3_10_00_11\kernel\tirtos\builds\CC1310_LAUNCHXL\release\iar\package\cfg\release_prm3.orm3"

    How do I do to modify the function in TI  RTOS rfWsnNode project. 

  • Hi Viki,

    You can easily plug your own fault handler as such:

    #include <ti/devices/DeviceFamily.h>
    #include DeviceFamily_constructPath(driverlib/interrupt.h)
    #include DeviceFamily_constructPath(inc/hw_ints.h)
    
    void customHardFaultIsr(void)
    {
       /* This code runs whenever a hard fault is raised */
    }
    
    int main(void)
    {
      IntRegister(INT_HARD_FAULT, customHardFaultIsr);
    
      /* ... rest of code ... */
    }

    No need to include startup_iar or whatnot.