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.

MCU-PLUS-SDK-AM243X: "Hello World" project with FreeRTOS that runs on Core-1

Part Number: MCU-PLUS-SDK-AM243X


Tool/software:

Hi,

I'm looking for a simple example project with FreeRTOS that runs on Core-1.

I've successfully run the "Hello World" FreeRTOS project on Core-1.

In main.c, a static task is created in app_main.c, which runs a loop:

while(1)
  {
  printf("%d\n", counter++);
  vTaskDelay(500);
}

The problem is that it starts running but crashes inside vTaskDelay(500);.

I suspect that I might have made a mistake in linker.cmd, possibly misplacing the interrupts.

The same project (the original "Hello World") runs fine on Core-0.

Thanks,
Eli

  • Hello Eli,

    I am looking at your queries and you may reply by EOD.

    Regards,

    Anil.

  • Hi Anil,

    What is EOD ? Do you mean End Of Discussion ?

    Can you please help me activate the "Hello World" with FreeRTOS to run simultaneosly on both cores ?

    I already have Core-0 running , what should be the linker.cmd for the Core-1 so it would not colide with Core-0 ?

    Which timer to select at syscfg for the FreeRTOS on the Core-1 ?

    Thanks,

    Regards,

    Eli

  • Hello Eli,


    Sorry for the confusion, I mean the EOD is the end of the day.

    My suggestion is, rather than moving the linker of R5F0_0 core and other RTOS timer settings to R5F0_1 core, directly use the empty projects they have dedicated RTOS setup for all cores.

    So, that you can easily work on freertos for all cores.

    C:\ti\mcu_plus_sdk_am64x_10_01_00_32\examples\empty\am64x-evm

    You can take the systemfreertos project and compile it.

    Once you complete all projects compilation, then integrate your application into your chosen core.

    Regards,

    Anil

  • Hi Anil,

    There's something I'm missing.

    I see that for Core-0 the vector table is at 0x0000 . For Core-1 should I move the vector to 0x8000 ?

    When I do , on Core-1 the vTaskDelay() crashes and goes to address 0x10.

    Can you please suggest a linker.cmd for Core-1 ?

    For Core-0 I see in syscfg that timer-8 is used for ticks . For Core-1 should I use timer-9 ?

    Thanks,

    Best Regards,

    Eli

  • One More thing , can you please elaborate on where are the examples you've mentioned.

    Thanks,

    Best Regards,

    Eli

  • Hi Anil,

    I've found the example.

    I'm still puzzled the vector for core-0 and core-1 both starts at 0x0 ?

    If I run them both how do they not colide ?

    Thanks,

    Best Regards,

    Eli

  • Hello Eli,

    The vector routines run from the TCM memory.

    This TCM memory can be the same for all R5F cores in the local R5F core view.

    But, this TCM memory is different on each R5F core on in the SOC memory view and there is no possibility of an overlap here.

    Generally, the TCM memory is different for all R5F cores, but when R5F cores are seen in local view, they are the same.

    Regards,

    Anil.

  • Hi Anil,

    I'm using basiccaly the same addresses for the vector and the same timer-8 and I see that both cores run correctely.

    You say that if the vector is at address-0 , each core sees it localy in a different address. Can you please say at which absolute address of tcm this happens ?

    Thanks,

    Best Regards,

    Eli

  • Hello Eli,

    Please look at the TRM image below for the TCM memory.

    Here, each R5F core has TCMA and TCMB for 32KB.

    When we configure R5F cores into individual cores, then the R5F0_0 can be used a maximum of 32KB and 64KB can be used when two cores can be configured as a single core.

    Now, in the MCU+SDK, the R5F0_0 core will use 0x78000000 memory for TCMA at 0x00 memory location .

    And, another R5F0_1 core uses the TCM 0x78200000 memory location at 0x00 memory location. 

    But, in the R5F local view, these memories start from 0x00 only.

      

    Please use the two timer instants for two applications .

    Regards,

    Anil.

  • Hi Anil,

    Thanks for the explanation.  I've managed to run the FreeRTOS "Hello World" on both cores simultaneously !

    Now I've used timer-8 for both and it works. I''l try to use separate timers.

    Thanks for all the help,

    Best Regards,

    Eli