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.

RTOS/CC1310: Application hard fault when moving from rtos to main thread

Part Number: CC1310
Other Parts Discussed in Thread: SYSBIOS, CC1350

Tool/software: TI-RTOS

Hello

I took the tirtos empty example and changed in icf the __intvec_start__ and the ROM_start__
"
define symbol __intvec_start__ = 0x00000400;
/*-Memory Regions-*/
define symbol ROM_start__ = 0x00000400;
define symbol ROM_end__ = 0x00010000;
define symbol RAM_start__ = 0x20000000;
define symbol RAM_end__ = 0x20004FFF;
"
and added to tirtos cfg file:
m3Hwi.vectorTableAddress = 0x0000400;
m3Hwi.resetVectorAddress = 0x0000400;

 I use the simplelink_cc13x0_sdk_2_20_00_38 with IAR.

The idea is create a boot that will be in page 0 and page 31 that will jump to the application.
for that if I understand correctly I need to create application with its own interrupt vectors and re-locate TI-RTOS.
The problem is that the TI-RTOS started to run ,but it crashes before it gets to the application mainThread


What am I missing?

Vitaly

  • Vitaly,

    To allow interrupts to be configured at runtime the “m3Hwi.vectorTableAddress” needs to point to a RAM location.  If you change this to a RAM address (aligned to 64 word boundary) does it resolve the problem?

    Thanks,
    Scott

  • Hello,

    I tried 2 things:

    1.

    I changed rtos cfg file:

    m3Hwi.vectorTableAddress =  0x00000400;
    m3Hwi.resetVectorAddress  = 0x20000000;

    empty icf file:

    define symbol __intvec_start__ = 0x00000400;
    /*-Memory Regions-*/
    define symbol ROM_start__ = 0x00000400;
    define symbol ROM_end__   = 0x00010000;
    define symbol RAM_start__ = 0x20000000;
    define symbol RAM_end__   = 0x20004FFF;

    /* Define a memory region that covers the entire 4 GB addressable space */
    define memory mem with size = 4G;

    /* Define a region for the on-chip flash */
    define region FLASH_region   = mem:[from ROM_start__ to ROM_end__];

    /* Define a region for the on-chip SRAM */
    define region RAM_region     = mem:[from RAM_start__ to RAM_end__];

    /* Place the interrupt vectors at the start of flash */
    place at address mem:__intvec_start__ { readwrite section .intvec };
    keep { section .intvec};

    2.

    cfg file:

    I changed rtos cfg file:

    m3Hwi.vectorTableAddress =  0x00001000;
    m3Hwi.resetVectorAddress  = 0x20000000;

    empty icf file:

    define symbol __intvec_start__ = 0x00001000;
    /*-Memory Regions-*/
    define symbol ROM_start__ = 0x00001000;
    define symbol ROM_end__   = 0x00010000;
    define symbol RAM_start__ = 0x20000000;
    define symbol RAM_end__   = 0x20004FFF;

    /* Define a memory region that covers the entire 4 GB addressable space */
    define memory mem with size = 4G;

    /* Define a region for the on-chip flash */
    define region FLASH_region   = mem:[from ROM_start__ to ROM_end__];

    /* Define a region for the on-chip SRAM */
    define region RAM_region     = mem:[from RAM_start__ to RAM_end__];

    /* Place the interrupt vectors at the start of flash */
    place at address mem:__intvec_start__ { readwrite section .intvec };
    keep { section .intvec};

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    In both cases I got the meassage:

    XDS reported an error: Unknown cpu status When the application moved from RTOS to Empty

    After the debug the leds on the board didn't turned on so the application can't do it without debug either.

    Vitaly

  • sdk: simplelink_cc13x0_sdk_2_20_00_38
    I also tried :
    m3Hwi.vectorTableAddress = 0x20000000;
    m3Hwi.resetVectorAddress = 0x00001000;
    in both cases I get the error:

    Error[Lp022]: absolute placement (in [0x00001000-0x0000103b]) overlaps with previous absolute placement A0 rw (in [0x00001000-0x0000103b]), at line 50 of "C:\ti\simplelink_cc13x0_sdk_2_20_00_38\examples\rtos\CC1310_LAUNCHXL\ C:/ti/simplelink_cc13x0_sdk_2_20_00_38/kernel/tirtos/packages/ti/sysbios/rom/cortexm/cc13xx/golden/CC13xx/TIRTOS_ROM.icf 71
    drivers\empty\tirtos\iar/empty_CC1310_LAUNCHXL_TIRTOS.icf"
    Error while running Linker

    what do you suggest?

    Vitaly
  • Vitaly,

    For the first two tries the m3Hwi.vectorTableAddress was being placed in Flash, when it needs to be placed in RAM.

    For the third, that placement error is due to a collision with locations that are reserved when the application chooses to use SYS/BIOS in ROM.  To use the kernel in ROM there are two memory regions that need to be reserved, one in Flash and one in RAM.  The locations are summarized in the table below:

    This summary table is in the release in “TI_RTOS_CC13XX_ROM_6_40_03_31_Release_Notes.docx” at the location: ..\simplelink_cc13x0_sdk_2_20_00_38\kernel\tirtos\packages\ti\sysbios\rom\cortexm\cc13xx\golden\CC13xx.  Note that this doc refers to an earlier kernel release and a CC1350 device, but these apply for CC1310 as well.

    By default the empty example is using the kernel in ROM, so these reserved regions need to be maintained. If you do not want to use the kernel in ROM you can disable the usage by commenting out the following two lines in the kernel configuration project “tirtos_builds_CC1310_LAUNCHXL_release”, in release.cfg:

    var ROM = xdc.useModule('ti.sysbios.rom.ROM');
    ROM.romName = ROM.CC1350;

    If you continue to see issues, I think it would be best if you can export and attach your modified empty project to this forum thread so we can look at it.

    Thanks,
    Scott

  • Hello,
    Can we set a session to talk about it?
    I still see a strange behavior.

    Vitaly
  • Vitaly,

    Are you able to discuss this directly with your TI field application engineer?  That is the normal approach to discuss directly, and then they can loop in the kernel or other apps team members as needed.

    Scott