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.

AM62P: AM62P: Request for McASP+UDMA (BCDMA) Example running on MCU-R5F Core (mcu-r5fss0-0) in MCU+ SDK

Part Number: AM62P
Other Parts Discussed in Thread: SYSCONFIG

Hello TI Team,

We are currently bringing up an audio application on the AM62P / AM62Px platform using MCU+ SDK v11.00.00.16.

We notice that all provided McASP example are strictly located under the wkup-r5fss0-0 folder structure and target the Wakeup domain / Device Manager core. However, our system architecture requires the real-time audio pipeline to run entirely on the user-programmable MCU domain R5F core (mcu-r5fss0-0) utilizing DMA.

When attempting to manually migrate the example from the Wakeup core to the MCU core via SysConfig, we hit a persistent data flow stall on the Transmit path.

Could the TI SDK team provide an official reference example, patch, or updated .syscfg / driver initialization sequence demonstrating a fully operational McASP1 instance running on the MCU-R5F core (mcu-r5fss0-0) with active BCDMA pacing?

Thank you

  • When attempting to manually migrate the example from the Wakeup core to the MCU core via SysConfig, we hit a persistent data flow stall on the Transmit path.

    Hi ,

    Can you send the current changes that you have made to manually migrate to MCU core? 
    Then we can  understand the transmit stall issue and review what needs to be corrected there. 

    Regards,
    Ritapravo

  • Hi,

    Basically I just modified based on the example (mcasp_early_chrime). As your request, I have attached the project below.

    Thanks.

    mcasp_early_chime_mcu.zip

    Best Regards,

    Wei Han

  • Hi Wei,

    Thank you for sending it out. I will look into it and get back to you. 

    Regards,
    Ritapravo

  • Hi Ritapravo,

    I hope you are doing well. Do you have any updates or initial findings from reviewing the attached project regarding the McASP transmit path stall?

    Thanks for your support!

    Best Regards,

    Wei Han

  • Hi Wei,

    diff --git a/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/example.syscfg b/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/example.syscfg
    new file mode 100644
    index 0000000..4b65d17
    --- /dev/null
    +++ b/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/example.syscfg
    @@ -0,0 +1,106 @@
    +/**
    + * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
    + * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
    + * @cliArgs --device "AM62Px" --part "Default" --package "AMH" --context "mcu-r5fss0-0" --product "MCU_PLUS_SDK_AM62Px@11.00.00"
    + * @v2CliArgs --device "AM62P" --package "FCBGA (AMH)" --variant "AM62P54-M" --context "mcu-r5fss0-0" --product "MCU_PLUS_SDK_AM62Px@11.00.00"
    + * @versions {"tool":"1.23.0+4000"}
    + */
    +
    +/**
    + * Import the modules used in this configuration.
    + */
    +const i2c        = scripting.addModule("/drivers/i2c/i2c", {}, false);
    +const i2c1       = i2c.addInstance();
    +const mcasp      = scripting.addModule("/drivers/mcasp/mcasp", {}, false);
    +const mcasp1     = mcasp.addInstance();
    +const clock      = scripting.addModule("/kernel/dpl/clock");
    +const debug_log  = scripting.addModule("/kernel/dpl/debug_log");
    +const mpu_armv7  = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
    +const mpu_armv71 = mpu_armv7.addInstance();
    +const mpu_armv72 = mpu_armv7.addInstance();
    +const mpu_armv73 = mpu_armv7.addInstance();
    +const mpu_armv74 = mpu_armv7.addInstance();
    +const mpu_armv75 = mpu_armv7.addInstance();
    +const mpu_armv76 = mpu_armv7.addInstance();
    +
    +/**
    + * Write custom configuration values to the imported modules.
    + */
    +i2c1.$name                   = "CONFIG_I2C0";
    +i2c1.useMcuDomainPeripherals = false;
    +i2c1.I2C_child.$name         = "drivers_i2c_v0_i2c_v0_template0";
    +i2c1.I2C.$assign             = "I2C1";
    +
    +mcasp1.$name                                   = "CONFIG_MCASP0";
    +mcasp1.enableLoopback                          = false;
    +mcasp1.enableMcaspRx                           = false;
    +mcasp1.txCallbackFxn                           = "mcasp_txcb";
    +mcasp1.txActiveSlotMask                        = 0x3;
    +mcasp1.txDataMask                              = 0xFFFFFFFF;
    +mcasp1.txFsSource                              = 0;
    +mcasp1.txAclkSource                            = 0;
    +mcasp1.rxFsSource                              = 0;
    +mcasp1.rxAclkSource                            = 0;
    +mcasp1.externTxLoopjob                         = true;
    +mcasp1.txLoopjobBufExtern                      = "unsigned int audio_sample[]";
    +mcasp1.txLoopjobBuf                            = "audio_sample";
    +mcasp1.txLoopjobBufLength                      = 384000;
    +mcasp1.mcaspSer.create(1);
    +mcasp1.mcaspSer[0].$name                       = "CONFIG_MCASP_SER0";
    +mcasp1.mcaspSer[0].MCASP.$assignAllowConflicts = "MCASP1";
    +mcasp1.MCASP.$assignAllowConflicts             = "MCASP1";
    +scripting.suppress("Resource conflict,MCASP1 is also in use by @@@.+?@@@", mcasp1.mcaspSer[0].MCASP, "$assign");
    +scripting.suppress("Resource conflict,MCASP1 is also in use by @@@.+?@@@", mcasp1.MCASP, "$assign");
    +
    +const udma         = scripting.addModule("/drivers/udma/udma", {}, false);
    +const udma1        = udma.addInstance({}, false);
    +udma1.$name        = "CONFIG_UDMA0";
    +mcasp1.bcDmaDriver = udma1;
    +
    +debug_log.enableUartLog      = true;
    +debug_log.uartTrace          = true;
    +debug_log.uartLog.intrEnable = "DISABLE";
    +debug_log.uartLog.$name      = "CONFIG_UART_APP";
    +
    +mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
    +mpu_armv71.allowExecute      = false;
    +mpu_armv71.size              = 31;
    +mpu_armv71.attributes        = "Device";
    +mpu_armv71.$name             = "REGISTER_REGION";
    +
    +mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";
    +mpu_armv72.size              = 15;
    +mpu_armv72.$name             = "TCMA";
    +
    +mpu_armv73.$name             = "TCMB";
    +mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";
    +mpu_armv73.baseAddr          = 0x41010000;
    +mpu_armv73.size              = 15;
    +
    +mpu_armv74.$name             = "CONFIG_MPU_MCU_MSRAM";
    +mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
    +mpu_armv74.baseAddr          = 0x79100000;
    +mpu_armv74.size              = 19;
    +
    +mpu_armv75.$name    = "DDR";
    +mpu_armv75.baseAddr = 0x80000000;
    +mpu_armv75.size     = 31;
    +
    +mpu_armv76.baseAddr = 0x43C00000;
    +mpu_armv76.size     = 18;
    +mpu_armv76.$name    = "HSM_RAM";
    +
    +/**
    + * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
    + * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
    + * re-solve from scratch.
    + */
    +i2c1.I2C.SCL.$suggestSolution                   = "I2C1_SCL";
    +i2c1.I2C.SDA.$suggestSolution                   = "I2C1_SDA";
    +mcasp1.SYSTEM.$suggestSolution                  = "SYSTEM0";
    +mcasp1.mcaspSer[0].MCASP.AXR0.$suggestSolution  = "GPMC0_WEn";
    +mcasp1.MCASP.AFSX.$suggestSolution              = "GPMC0_WAIT0";
    +mcasp1.MCASP.ACLKX.$suggestSolution             = "GPMC0_BE0n_CLE";
    +debug_log.uartLog.MCU_UART.$suggestSolution     = "MCU_USART0";
    +debug_log.uartLog.MCU_UART.RXD.$suggestSolution = "MCU_UART0_RXD";
    +debug_log.uartLog.MCU_UART.TXD.$suggestSolution = "MCU_UART0_TXD";
    diff --git a/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/main.c b/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/main.c
    new file mode 100644
    index 0000000..9b585b2
    --- /dev/null
    +++ b/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/main.c
    @@ -0,0 +1,99 @@
    +/*
    + *  Copyright (C) 2023-2025 Texas Instruments Incorporated
    + *
    + *  Redistribution and use in source and binary forms, with or without
    + *  modification, are permitted provided that the following conditions
    + *  are met:
    + *
    + *    Redistributions of source code must retain the above copyright
    + *    notice, this list of conditions and the following disclaimer.
    + *
    + *    Redistributions in binary form must reproduce the above copyright
    + *    notice, this list of conditions and the following disclaimer in the
    + *    documentation and/or other materials provided with the
    + *    distribution.
    + *
    + *    Neither the name of Texas Instruments Incorporated nor the names of
    + *    its contributors may be used to endorse or promote products derived
    + *    from this software without specific prior written permission.
    + *
    + *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    + *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    + *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    + *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    + *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    + *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    + *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    + *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    + *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    + *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    + *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    + */
    +
    +#include <stdlib.h>
    +#include <kernel/dpl/DebugP.h>
    +#include "ti_drivers_config.h"
    +#include "ti_board_config.h"
    +#include "ti_drivers_open_close.h"
    +#include "ti_board_open_close.h"
    +#include "FreeRTOS.h"
    +#include "task.h"
    +
    +#define MAIN_TASK_PRI  (configMAX_PRIORITIES-1)
    +
    +#define MAIN_TASK_SIZE (16384U/sizeof(configSTACK_DEPTH_TYPE))
    +StackType_t gMainTaskStack[MAIN_TASK_SIZE] __attribute__((aligned(32)));
    +
    +StaticTask_t gMainTaskObj;
    +TaskHandle_t gMainTask;
    +
    +void mcasp_chime(void *args);
    +
    +void freertos_main(void *args)
    +{
    +    int32_t status = SystemP_SUCCESS;
    +
    +    /* Open drivers */
    +    Drivers_open();
    +    /* Open flash and board drivers */
    +    status = Board_driversOpen();
    +    DebugP_assert(status==SystemP_SUCCESS);
    +
    +    mcasp_chime(NULL);
    +
    +    /* Close board and flash drivers */
    +    Board_driversClose();
    +    /* Close drivers */
    +    Drivers_close();
    +
    +    vTaskDelete(NULL);
    +}
    +
    +
    +int main()
    +{
    +    /* init SOC specific modules */
    +    System_init();
    +    Board_init();
    +
    +    /* This task is created at highest priority, it should create more tasks and then delete itself */
    +    gMainTask = xTaskCreateStatic( freertos_main,   /* Pointer to the function that implements the task. */
    +                                  "freertos_main", /* Text name for the task.  This is to facilitate debugging only. */
    +                                  MAIN_TASK_SIZE,  /* Stack depth in units of StackType_t typically uint32_t on 32b CPUs */
    +                                  NULL,            /* We are not using the task parameter. */
    +                                  MAIN_TASK_PRI,   /* task priority, 0 is lowest priority, configMAX_PRIORITIES-1 is highest */
    +                                  gMainTaskStack,  /* pointer to stack base */
    +                                  &gMainTaskObj ); /* pointer to statically allocated task object memory */
    +    configASSERT(gMainTask != NULL);
    +
    +    /* Start the scheduler to start the tasks executing. */
    +    vTaskStartScheduler();
    +
    +    /* The following line should never be reached because vTaskStartScheduler()
    +    will only return if there was not enough FreeRTOS heap memory available to
    +    create the Idle and (if configured) Timer tasks.  Heap management, and
    +    techniques for trapping heap exhaustion, are described in the book text. */
    +    DebugP_assertNoLog(0);
    +
    +    return 0;
    +}
    diff --git a/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/example.projectspec b/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/example.projectspec
    new file mode 100644
    index 0000000..4894666
    --- /dev/null
    +++ b/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/example.projectspec
    @@ -0,0 +1,112 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<projectSpec>
    +    <applicability>
    +        <when>
    +            <context
    +                deviceFamily="ARM"
    +                deviceId="Cortex R.AM62Px"
    +            />
    +        </when>
    +    </applicability>
    +
    +    <project
    +        title="Mcasp Early Chime"
    +        name = "mcasp_early_chime_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang"
    +        products="sysconfig;MCU-PLUS-SDK-AM62P"
    +        configurations="
    +            Debug,
    +            Release,
    +        "
    +        connection="TIXDS110_Connection.xml"
    +        toolChain="TICLANG"
    +        cgtVersion="4.0.1"
    +        device="Cortex R.AM62Px"
    +        deviceCore="MCUSS_Cortex_R5_0_0"
    +        ignoreDefaultDeviceSettings="true"
    +        ignoreDefaultCCSSettings="true"
    +        endianness="little"
    +        outputFormat="ELF"
    +        outputType="executable"
    +
    +        compilerBuildOptions="
    +            -I${CG_TOOL_ROOT}/include/c
    +            -I${MCU_PLUS_SDK_PATH}/source
    +            -I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/FreeRTOS-Kernel/include
    +            -I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F
    +            -I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/config/am62px/r5f
    +            -mcpu=cortex-r5
    +            -mfloat-abi=hard
    +            -mfpu=vfpv3-d16
    +            -mthumb
    +            -Wall
    +            -Werror
    +            -g
    +            -Wno-gnu-variable-sized-type-not-at-end
    +            -Wno-unused-function
    +            -DSOC_AM62PX
    +        "
    +        linkerBuildOptions="
    +            -i${MCU_PLUS_SDK_PATH}/source/kernel/freertos/lib
    +            -i${MCU_PLUS_SDK_PATH}/source/drivers/lib
    +            -i${MCU_PLUS_SDK_PATH}/source/board/lib
    +            -i${CG_TOOL_ROOT}/lib
    +            -m=mcasp_early_chime.${ConfigName}.map
    +            --diag_suppress=10063
    +            --priority
    +            --ram_model
    +            --reread_libs
    +        "
    +
    +        postBuildStep="$(MAKE) -C ${CCS_PROJECT_DIR} -f makefile_ccs_bootimage_gen OUTNAME=${BuildArtifactFileBaseName} PROFILE=${ConfigName} MCU_PLUS_SDK_PATH=${MCU_PLUS_SDK_PATH} CG_TOOL_ROOT=${CG_TOOL_ROOT} CCS_INSTALL_DIR=${CCS_INSTALL_DIR} CCS_IDE_MODE=${CCS_IDE_MODE}"
    +
    +        enableSysConfigTool="true"
    +        sysConfigBuildOptions="
    +            --context mcu-r5fss0-0 --part Default --package AMH
    +        "
    +
    +        description="A Mcasp Early Chime FREERTOS project">
    +
    +        <configuration name="Debug"
    +            compilerBuildOptions="
    +                -D_DEBUG_=1
    +            "
    +            linkerBuildOptions="
    +                -lfreertos.am62px.r5f.ti-arm-clang.debug.lib
    +                -ldrivers.am62px.mcu-r5f.ti-arm-clang.debug.lib
    +                -lboard.am62px.r5f.ti-arm-clang.debug.lib
    +                -llibc.a
    +                -llibsysbm.a
    +            "
    +        ></configuration>
    +        <configuration name="Release"
    +            compilerBuildOptions="
    +                -Os
    +            "
    +            linkerBuildOptions="
    +                -lfreertos.am62px.r5f.ti-arm-clang.release.lib
    +                -ldrivers.am62px.mcu-r5f.ti-arm-clang.release.lib
    +                -lboard.am62px.r5f.ti-arm-clang.release.lib
    +                -llibc.a
    +                -llibsysbm.a
    +            "
    +        ></configuration>
    +        <pathVariable name="MCU_PLUS_SDK_PATH" path="${COM_TI_MCU_PLUS_SDK_AM62PX_INSTALL_DIR}" scope="project" />
    +        <file path="../../../mcasp_early_chime.c" openOnCreation="false" excludeFromBuild="false" action="copy">
    +        </file>
    +        <file path="../main.c" openOnCreation="false" excludeFromBuild="false" action="copy">
    +        </file>
    +        <file path="../../../audio_sample.h" openOnCreation="false" excludeFromBuild="false" action="copy">
    +        </file>
    +        <file path="linker.cmd" openOnCreation="false" excludeFromBuild="false" action="copy">
    +        </file>
    +        <file path="../example.syscfg" openOnCreation="false" excludeFromBuild="false" action="copy">
    +        </file>
    +        <file path="${MCU_PLUS_SDK_PATH}/docs/api_guide_am62px/EXAMPLES_DRIVERS_MCASP_EARLY_CHIME.html"
    +                openOnCreation="false" excludeFromBuild="false" targetName="README.html" action="link">
    +        </file>
    +        <file path="syscfg_c.rov.xs" openOnCreation="false" excludeFromBuild="false" action="copy">
    +        </file>
    +        <file path="makefile_ccs_bootimage_gen" openOnCreation="false" excludeFromBuild="false" action="copy">
    +        </file>
    +    </project>
    +</projectSpec>
    diff --git a/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/linker.cmd b/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/linker.cmd
    new file mode 100644
    index 0000000..cfc9b5a
    --- /dev/null
    +++ b/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/linker.cmd
    @@ -0,0 +1,111 @@
    +
    +/* This is the stack that is used by code running within main()
    + * In case of NORTOS,
    + * - This means all the code outside of ISR uses this stack
    + * In case of FreeRTOS
    + * - This means all the code until vTaskStartScheduler() is called in main()
    + *   uses this stack.
    + * - After vTaskStartScheduler() each task created in FreeRTOS has its own stack
    + */
    +--stack_size=16384
    +/* This is the heap size for malloc() API in NORTOS and FreeRTOS
    + * This is also the heap used by pvPortMalloc in FreeRTOS
    + */
    +--heap_size=32768
    +-e_vectors  /* This is the entry of the application, _vector MUST be placed at starting address 0x0 */
    +
    +/* This is the size of stack when R5 is in IRQ mode
    + * In NORTOS,
    + * - Here interrupt nesting is enabled
    + * - This is the stack used by ISRs registered as type IRQ
    + * In FreeRTOS,
    + * - Here interrupt nesting is disabled
    + * - This is stack that is used initally when a IRQ is received
    + * - But then the mode is switched to SVC mode and SVC stack is used for all user ISR callbacks
    + * - Hence in FreeRTOS, IRQ stack size is less and SVC stack size is more
    + */
    +__IRQ_STACK_SIZE = 256;
    +/* This is the size of stack when R5 is in IRQ mode
    + * - In both NORTOS and FreeRTOS nesting is disabled for FIQ
    + */
    +__FIQ_STACK_SIZE = 256;
    +__SVC_STACK_SIZE = 4096; /* This is the size of stack when R5 is in SVC mode */
    +__ABORT_STACK_SIZE = 256;  /* This is the size of stack when R5 is in ABORT mode */
    +__UNDEFINED_STACK_SIZE = 256;  /* This is the size of stack when R5 is in UNDEF mode */
    +
    +SECTIONS
    +{
    +    /* This has the R5F entry point and vector table, this MUST be at 0x0 */
    +    .vectors:{} palign(8) > R5F_VECS
    +
    +    /* This has the R5F boot code until MPU is enabled,  this MUST be at an address < 0x80000000
    +     * i.e this cannot be placed in DDR
    +     */
    +    GROUP {
    +        .text.hwi: palign(8)
    +        .text.cache: palign(8)
    +        .text.mpu: palign(8)
    +        .text.boot: palign(8)
    +        .text:abort: palign(8) /* this helps in loading symbols when using XIP mode */
    +    } > MSRAM
    +
    +    /* Rest of code and read-only data (includes the large audio_sample array) go to DDR */
    +    GROUP {
    +        .text:   {} palign(8)   /* This is where code resides */
    +        .rodata: {} palign(8)   /* This is where const's go */
    +    } > DDR_CODE_DATA
    +
    +    /* Initialized data in DDR */
    +    GROUP {
    +        .data:   {} palign(8)   /* This is where initialized globals and static go */
    +    } > DDR_CODE_DATA
    +
    +    /* Uninitialized data, heap and main stack in DDR */
    +    GROUP {
    +        .bss:    {} palign(8)   /* This is where uninitialized globals go */
    +        RUN_START(__BSS_START)
    +        RUN_END(__BSS_END)
    +        .sysmem: {} palign(8)   /* This is where the malloc heap goes */
    +        .stack:  {} palign(8)   /* This is where the main() stack goes */
    +    } > DDR_CODE_DATA
    +
    +    /* This is where the stacks for different R5F modes go */
    +    GROUP {
    +        .irqstack: {. = . + __IRQ_STACK_SIZE;} align(8)
    +        RUN_START(__IRQ_STACK_START)
    +        RUN_END(__IRQ_STACK_END)
    +        .fiqstack: {. = . + __FIQ_STACK_SIZE;} align(8)
    +        RUN_START(__FIQ_STACK_START)
    +        RUN_END(__FIQ_STACK_END)
    +        .svcstack: {. = . + __SVC_STACK_SIZE;} align(8)
    +        RUN_START(__SVC_STACK_START)
    +        RUN_END(__SVC_STACK_END)
    +        .abortstack: {. = . + __ABORT_STACK_SIZE;} align(8)
    +        RUN_START(__ABORT_STACK_START)
    +        RUN_END(__ABORT_STACK_END)
    +        .undefinedstack: {. = . + __UNDEFINED_STACK_SIZE;} align(8)
    +        RUN_START(__UNDEFINED_STACK_START)
    +        RUN_END(__UNDEFINED_STACK_END)
    +    } > DDR_CODE_DATA
    +
    +    /* Sections needed for C++ projects */
    +    GROUP {
    +        .ARM.exidx:  {} palign(8)   /* Needed for C++ exception handling */
    +        .init_array: {} palign(8)   /* Contains function pointers called before main */
    +        .fini_array: {} palign(8)   /* Contains function pointers called after main */
    +    } > DDR_CODE_DATA
    +
    +}
    +
    +MEMORY
    +{
    +    R5F_VECS  : ORIGIN = 0x00000000 , LENGTH = 0x00000040
    +    R5F_TCMA  : ORIGIN = 0x00000040 , LENGTH = 0x00007FC0
    +    R5F_TCMB0 : ORIGIN = 0x41010000 , LENGTH = 0x00004000
    +
    +    /* MCU SRAM - used only for boot-critical sections that must run before MPU enables DDR */
    +    MSRAM     : ORIGIN = 0x79100000 , LENGTH = 0x80000
    +
    +    /* DDR - used for all code, rodata (incl. audio_sample ~375KB), data, bss, stacks */
    +    DDR_CODE_DATA : ORIGIN = 0x9BA00000, LENGTH = 0xE00000
    +}
    diff --git a/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/makefile b/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/makefile
    new file mode 100644
    index 0000000..d622171
    --- /dev/null
    +++ b/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/makefile
    @@ -0,0 +1,313 @@
    +#
    +# Auto generated makefile
    +#
    +
    +export MCU_PLUS_SDK_PATH?=$(abspath ../../../../../../..)
    +include $(MCU_PLUS_SDK_PATH)/imports.mak
    +include $(MCU_PLUS_SDK_PATH)/devconfig/devconfig.mak
    +
    +CG_TOOL_ROOT=$(CGT_TI_ARM_CLANG_PATH)
    +
    +CC=$(CG_TOOL_ROOT)/bin/tiarmclang
    +LNK=$(CG_TOOL_ROOT)/bin/tiarmclang
    +STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
    +OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
    +ifeq ($(OS), Windows_NT)
    +	PYTHON=python
    +else
    +	PYTHON=python3
    +endif
    +
    +PROFILE?=release
    +ConfigName:=$(PROFILE)
    +
    +OUTNAME:=mcasp_early_chime.$(PROFILE).out
    +
    +BOOTIMAGE_PATH=$(abspath .)
    +BOOTIMAGE_NAME:=mcasp_early_chime.$(PROFILE).appimage
    +BOOTIMAGE_NAME_XIP:=mcasp_early_chime.$(PROFILE).appimage_xip
    +BOOTIMAGE_NAME_SIGNED:=mcasp_early_chime.$(PROFILE).appimage.signed
    +BOOTIMAGE_RPRC_NAME:=mcasp_early_chime.$(PROFILE).rprc
    +BOOTIMAGE_RPRC_NAME_XIP:=mcasp_early_chime.$(PROFILE).rprc_xip
    +BOOTIMAGE_RPRC_NAME_TMP:=mcasp_early_chime.$(PROFILE).rprc_tmp
    +BOOTIMAGE_NAME_HS:=mcasp_early_chime.$(PROFILE).appimage.hs
    +BOOTIMAGE_NAME_HS_FS:=mcasp_early_chime.$(PROFILE).appimage.hs_fs
    +TARGETS := $(BOOTIMAGE_NAME)
    +ifeq ($(DEVICE_TYPE), HS)
    +   TARGETS += $(BOOTIMAGE_NAME_HS)
    +endif
    +
    +FILES_common := \
    +	mcasp_early_chime.c \
    +	main.c \
    +	ti_drivers_config.c \
    +	ti_drivers_open_close.c \
    +	ti_board_config.c \
    +	ti_board_open_close.c \
    +	ti_dpl_config.c \
    +	ti_pinmux_config.c \
    +	ti_power_clock_config.c \
    +
    +FILES_PATH_common = \
    +	.. \
    +	../../.. \
    +	generated \
    +
    +INCLUDES_common := \
    +	-I${CG_TOOL_ROOT}/include/c \
    +	-I${MCU_PLUS_SDK_PATH}/source \
    +	-I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/FreeRTOS-Kernel/include \
    +	-I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F \
    +	-I${MCU_PLUS_SDK_PATH}/source/kernel/freertos/config/am62px/r5f \
    +	-Igenerated \
    +
    +DEFINES_common := \
    +	-DSOC_AM62PX \
    +
    +CFLAGS_common := \
    +	-mcpu=cortex-r5 \
    +	-mfloat-abi=hard \
    +	-mfpu=vfpv3-d16 \
    +	-mthumb \
    +	-Wall \
    +	-Werror \
    +	-g \
    +	-Wno-gnu-variable-sized-type-not-at-end \
    +	-Wno-unused-function \
    +
    +CFLAGS_cpp_common := \
    +	-Wno-c99-designator \
    +	-Wno-extern-c-compat \
    +	-Wno-c++11-narrowing \
    +	-Wno-reorder-init-list \
    +	-Wno-deprecated-register \
    +	-Wno-writable-strings \
    +	-Wno-enum-compare \
    +	-Wno-reserved-user-defined-literal \
    +	-Wno-unused-const-variable \
    +	-x c++ \
    +
    +CFLAGS_debug := \
    +	-D_DEBUG_=1 \
    +
    +CFLAGS_release := \
    +	-Os \
    +
    +LNK_FILES_common = \
    +	linker.cmd \
    +
    +LIBS_PATH_common = \
    +	-Wl,-i${MCU_PLUS_SDK_PATH}/source/kernel/freertos/lib \
    +	-Wl,-i${MCU_PLUS_SDK_PATH}/source/drivers/lib \
    +	-Wl,-i${MCU_PLUS_SDK_PATH}/source/board/lib \
    +	-Wl,-i${CG_TOOL_ROOT}/lib \
    +
    +LIBS_common = \
    +	-lfreertos.am62px.r5f.ti-arm-clang.${ConfigName}.lib \
    +	-ldrivers.am62px.mcu-r5f.ti-arm-clang.${ConfigName}.lib \
    +	-lboard.am62px.r5f.ti-arm-clang.${ConfigName}.lib \
    +	-llibc.a \
    +	-llibsysbm.a \
    +
    +LFLAGS_common = \
    +	-Wl,--diag_suppress=10063 \
    +	-Wl,--priority \
    +	-Wl,--ram_model \
    +	-Wl,--reread_libs \
    +
    +
    +LIBS_NAME = \
    +	freertos.am62px.r5f.ti-arm-clang.${ConfigName}.lib \
    +	drivers.am62px.mcu-r5f.ti-arm-clang.${ConfigName}.lib \
    +	board.am62px.r5f.ti-arm-clang.${ConfigName}.lib \
    +	libc.a \
    +	libsysbm.a \
    +
    +LIBS_PATH_NAME = \
    +	${MCU_PLUS_SDK_PATH}/source/kernel/freertos/lib \
    +	${MCU_PLUS_SDK_PATH}/source/drivers/lib \
    +	${MCU_PLUS_SDK_PATH}/source/board/lib \
    +	${CG_TOOL_ROOT}/lib \
    +
    +FILES := $(FILES_common) $(FILES_$(PROFILE))
    +ASMFILES := $(ASMFILES_common) $(ASMFILES_$(PROFILE))
    +FILES_PATH := $(FILES_PATH_common) $(FILES_PATH_$(PROFILE))
    +CFLAGS := $(CFLAGS_common) $(CFLAGS_$(PROFILE))
    +DEFINES := $(DEFINES_common) $(DEFINES_$(PROFILE))
    +INCLUDES := $(INCLUDES_common) $(INCLUDE_$(PROFILE))
    +LIBS := $(LIBS_common) $(LIBS_$(PROFILE))
    +LIBS_PATH := $(LIBS_PATH_common) $(LIBS_PATH_$(PROFILE))
    +LFLAGS := $(LFLAGS_common) $(LFLAGS_$(PROFILE))
    +LNKOPTFLAGS := $(LNKOPTFLAGS_common) $(LNKOPTFLAGS_$(PROFILE))
    +LNK_FILES := $(LNK_FILES_common) $(LNK_FILES_$(PROFILE))
    +
    +OBJDIR := obj/$(PROFILE)/
    +OBJS := $(FILES:%.c=%.obj)
    +OBJS += $(ASMFILES:%.S=%.obj)
    +DEPS := $(FILES:%.c=%.d)
    +
    +vpath %.obj $(OBJDIR)
    +vpath %.c $(FILES_PATH)
    +vpath %.S $(FILES_PATH)
    +vpath %.lib $(LIBS_PATH_NAME)
    +vpath %.a $(LIBS_PATH_NAME)
    +
    +$(OBJDIR)/%.obj %.obj: %.c
    +	@echo  Compiling: am62px:mcu-r5fss0-0:freertos:ti-arm-clang $(OUTNAME): $<
    +	$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFINES) -MMD -o $(OBJDIR)/$@ $<
    +
    +$(OBJDIR)/%.obj %.obj: %.S
    +	@echo  Compiling: am62px:mcu-r5fss0-0:freertos:ti-arm-clang $(LIBNAME): $<
    +	$(CC) -c $(CFLAGS) -o $(OBJDIR)/$@ $<
    +
    +all: $(TARGETS)
    +
    +SYSCFG_GEN_FILES=generated/ti_drivers_config.c generated/ti_drivers_config.h
    +SYSCFG_GEN_FILES+=generated/ti_drivers_open_close.c generated/ti_drivers_open_close.h
    +SYSCFG_GEN_FILES+=generated/ti_dpl_config.c generated/ti_dpl_config.h
    +SYSCFG_GEN_FILES+=generated/ti_pinmux_config.c generated/ti_power_clock_config.c
    +SYSCFG_GEN_FILES+=generated/ti_board_config.c generated/ti_board_config.h
    +SYSCFG_GEN_FILES+=generated/ti_board_open_close.c generated/ti_board_open_close.h
    +
    +$(OUTNAME): syscfg $(SYSCFG_GEN_FILES) $(OBJS) $(LNK_FILES) $(LIBS_NAME)
    +	@echo  .
    +	@echo  Linking: am62px:mcu-r5fss0-0:freertos:ti-arm-clang $@ ...
    +	$(LNK) $(LNKOPTFLAGS) $(LFLAGS) $(LIBS_PATH) -Wl,-m=$(basename $@).map -o $@ $(addprefix $(OBJDIR), $(OBJS)) $(LIBS) $(LNK_FILES)
    +	@echo  Linking: am62px:mcu-r5fss0-0:freertos:ti-arm-clang $@ Done !!!
    +	@echo  .
    +
    +clean:
    +	@echo  Cleaning: am62px:mcu-r5fss0-0:freertos:ti-arm-clang $(OUTNAME) ...
    +	$(RMDIR) $(OBJDIR)
    +	$(RM) $(OUTNAME)
    +	$(RM) $(BOOTIMAGE_NAME)
    +	$(RM) $(BOOTIMAGE_NAME_XIP)
    +	$(RM) $(BOOTIMAGE_NAME_SIGNED)
    +	$(RM) $(BOOTIMAGE_NAME_HS)
    +	$(RM) $(BOOTIMAGE_NAME_HS_FS)
    +	$(RM) $(BOOTIMAGE_RPRC_NAME)
    +	$(RM) $(BOOTIMAGE_RPRC_NAME_XIP)
    +	$(RMDIR) generated/
    +
    +scrub:
    +	@echo  Scrubing: am62px:mcu-r5fss0-0:freertos:ti-arm-clang mcasp_early_chime ...
    +	$(RMDIR) obj
    +ifeq ($(OS),Windows_NT)
    +	$(RM) \*.out
    +	$(RM) \*.map
    +	$(RM) \*.appimage*
    +	$(RM) \*.rprc*
    +	$(RM) \*.tiimage*
    +	$(RM) \*.bin
    +else
    +	$(RM) *.out
    +	$(RM) *.map
    +	$(RM) *.appimage*
    +	$(RM) *.rprc*
    +	$(RM) *.tiimage*
    +	$(RM) *.bin
    +endif
    +	$(RMDIR) generated
    +
    +$(OBJS): | $(OBJDIR)
    +
    +$(OBJDIR):
    +	$(MKDIR) $@
    +
    +.NOTPARALLEL:
    +
    +.INTERMEDIATE: syscfg
    +$(SYSCFG_GEN_FILES): syscfg
    +
    +syscfg: ../example.syscfg
    +	@echo Generating SysConfig files ...
    +	$(SYSCFG_NODE) $(SYSCFG_CLI_PATH)/dist/cli.js --product $(SYSCFG_SDKPRODUCT) --device AM62Px --context mcu-r5fss0-0 --part Default --package AMH --output generated/ ../example.syscfg
    +
    +syscfg-gui:
    +	$(SYSCFG_NWJS) $(SYSCFG_PATH) --product $(SYSCFG_SDKPRODUCT) --device AM62Px --context mcu-r5fss0-0 --part Default --package AMH --output generated/  ../example.syscfg
    +
    +#
    +# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
    +#
    +ifeq ($(OS),Windows_NT)
    +EXE_EXT=.exe
    +endif
    +ifeq ($(OS),Windows_NT)
    +  BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MCU_PLUS_SDK_PATH)/tools/boot/signing/x509CertificateGen.ps1
    +else
    +  BOOTIMAGE_CERT_GEN_CMD=$(MCU_PLUS_SDK_PATH)/tools/boot/signing/x509CertificateGen.sh
    +endif
    +BOOTIMAGE_TEMP_OUT_FILE=temp_stdout_$(PROFILE).txt
    +
    +BOOTIMAGE_CERT_KEY=$(APP_SIGNING_KEY)
    +
    +BOOTIMAGE_CORE_ID_a53ss0-0 = 0
    +BOOTIMAGE_CORE_ID_a53ss0-1 = 1
    +BOOTIMAGE_CORE_ID_a53ss1-0 = 2
    +BOOTIMAGE_CORE_ID_a53ss1-1 = 3
    +BOOTIMAGE_CORE_ID_wkup-r5fss0-0 = 4
    +BOOTIMAGE_CORE_ID_mcu-r5fss0-0 = 5
    +BOOTIMAGE_CORE_ID_hsm-m4fss0-0 = 6
    +SBL_RUN_ADDRESS=0x43C00000
    +SBL_DEV_ID=55
    +
    +MULTI_CORE_IMAGE_GEN = $(SYSCFG_NODE) $(MCU_PLUS_SDK_PATH)/tools/boot/multicoreImageGen/multicoreImageGen.js
    +OUTRPRC_CMD = $(SYSCFG_NODE) $(MCU_PLUS_SDK_PATH)/tools/boot/out2rprc/elf2rprc.js
    +APP_IMAGE_SIGN_CMD = $(MCU_PLUS_SDK_PATH)/tools/boot/signing/appimage_x509_cert_gen.py
    +
    +ifeq ($(OS),Windows_NT)
    +  XIPGEN_CMD=$(MCU_PLUS_SDK_PATH)/tools/boot/xipGen/xipGen.exe
    +else
    +  XIPGEN_CMD=$(MCU_PLUS_SDK_PATH)/tools/boot/xipGen/xipGen.out
    +endif
    +
    +MULTI_CORE_IMAGE_PARAMS = \
    +	$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_mcu-r5fss0-0) \
    +
    +MULTI_CORE_IMAGE_PARAMS_XIP = \
    +	$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_mcu-r5fss0-0) \
    +
    +$(BOOTIMAGE_NAME): $(OUTNAME)
    +	@echo  Boot image: am62px:mcu-r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ ...
    +ifneq ($(OS),Windows_NT)
    +	$(CHMOD) a+x $(XIPGEN_CMD)
    +endif
    +	$(OUTRPRC_CMD) $(OUTNAME) $(SW_VERSION)>> $(BOOTIMAGE_TEMP_OUT_FILE)
    +	$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
    +	$(RM) $(BOOTIMAGE_RPRC_NAME)
    +	$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
    +	$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
    +	$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
    +# Sign the appimage for HS-FS using appimage signing script
    +    #
    +    #   Authentication type 0 with load address 0x84000000
    +    #
    +	$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 0  --loadaddr 84000000 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME_HS_FS) --keyversion $(VERSION)
    +	$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
    +	$(RM) $(BOOTIMAGE_TEMP_OUT_FILE)
    +	@echo  Boot image: am62px:mcu-r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_PATH)/$@ Done !!!
    +	@echo  .
    +	@echo  Boot image: am62px:mcu-r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME_HS_FS) Done !!!
    +	@echo  .
    +
    +$(BOOTIMAGE_NAME_HS): $(BOOTIMAGE_NAME)
    +ifeq ($(DEVICE_TYPE), HS)
    +# Sign the appimage using appimage signing script
    +ifeq ($(ENC_ENABLED),no)
    +	@echo Boot image signing: Encryption is disabled.
    +    #
    +    #   Authentication type 0 with load address 0x84000000
    +    #
    +	$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 0  --loadaddr 84000000 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME_HS) --keyversion $(VERSION)
    +else
    +	@echo Boot image signing: Encryption is enabled.
    +    #
    +    #   Authentication type 0 with load address 0x84000000
    +    #
    +	$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 0  --loadaddr 84000000 --key $(APP_SIGNING_KEY) --enc y --enckey $(APP_ENCRYPTION_KEY) --output $(BOOTIMAGE_NAME_HS) --keyversion $(VERSION)
    +	$(RM) $(BOOTIMAGE_NAME)-enc
    +endif
    +	@echo  Boot image: am62px:mcu-r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_PATH)/$(BOOTIMAGE_NAME_HS) Done !!!
    +	@echo  .
    +endif
    +-include $(addprefix $(OBJDIR)/, $(DEPS))
    diff --git a/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/makefile_ccs_bootimage_gen b/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/makefile_ccs_bootimage_gen
    new file mode 100644
    index 0000000..9e3f9a7
    --- /dev/null
    +++ b/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/makefile_ccs_bootimage_gen
    @@ -0,0 +1,108 @@
    +#
    +# Auto generated makefile
    +#
    +
    +# Below variables need to be defined outside this file or via command line
    +# - MCU_PLUS_SDK_PATH
    +# - PROFILE
    +# - CG_TOOL_ROOT
    +# - OUTNAME
    +# - CCS_INSTALL_DIR
    +# - CCS_IDE_MODE
    +
    +CCS_PATH=$(CCS_INSTALL_DIR)
    +include $(MCU_PLUS_SDK_PATH)/imports.mak
    +include $(MCU_PLUS_SDK_PATH)/devconfig/devconfig.mak
    +
    +STRIP=$(CG_TOOL_ROOT)/bin/tiarmstrip
    +OBJCOPY=$(CG_TOOL_ROOT)/bin/tiarmobjcopy
    +ifeq ($(OS), Windows_NT)
    +	PYTHON=python
    +else
    +	PYTHON=python3
    +endif
    +
    +OUTFILE=$(PROFILE)/$(OUTNAME).out
    +BOOTIMAGE_PATH=$(abspath ${PROFILE})
    +BOOTIMAGE_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage
    +BOOTIMAGE_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage_xip
    +BOOTIMAGE_NAME_SIGNED:=$(BOOTIMAGE_PATH)/$(OUTNAME).appimage.signed
    +BOOTIMAGE_RPRC_NAME:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc
    +BOOTIMAGE_RPRC_NAME_XIP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_xip
    +BOOTIMAGE_RPRC_NAME_TMP:=$(BOOTIMAGE_PATH)/$(OUTNAME).rprc_tmp
    +
    +#
    +# Generation of boot image which can be loaded by Secondary Boot Loader (SBL)
    +#
    +ifeq ($(OS),Windows_NT)
    +EXE_EXT=.exe
    +endif
    +ifeq ($(OS),Windows_NT)
    +  BOOTIMAGE_CERT_GEN_CMD=powershell -executionpolicy unrestricted -command $(MCU_PLUS_SDK_PATH)/tools/boot/signing/x509CertificateGen.ps1
    +else
    +  BOOTIMAGE_CERT_GEN_CMD=$(MCU_PLUS_SDK_PATH)/tools/boot/signing/x509CertificateGen.sh
    +endif
    +BOOTIMAGE_TEMP_OUT_FILE=$(PROFILE)/temp_stdout_$(PROFILE).txt
    +
    +BOOTIMAGE_CORE_ID_a53ss0-0 = 0
    +BOOTIMAGE_CORE_ID_a53ss0-1 = 1
    +BOOTIMAGE_CORE_ID_a53ss1-0 = 2
    +BOOTIMAGE_CORE_ID_a53ss1-1 = 3
    +BOOTIMAGE_CORE_ID_wkup-r5fss0-0 = 4
    +BOOTIMAGE_CORE_ID_mcu-r5fss0-0 = 5
    +BOOTIMAGE_CORE_ID_hsm-m4fss0-0 = 6
    +SBL_RUN_ADDRESS=0x43C00000
    +SBL_DEV_ID=55
    +
    +MULTI_CORE_IMAGE_GEN = $(CCS_NODE) $(MCU_PLUS_SDK_PATH)/tools/boot/multicoreImageGen/multicoreImageGen.js
    +OUTRPRC_CMD = $(CCS_NODE) $(MCU_PLUS_SDK_PATH)/tools/boot/out2rprc/elf2rprc.js
    +APP_IMAGE_SIGN_CMD = $(MCU_PLUS_SDK_PATH)/tools/boot/signing/appimage_x509_cert_gen.py
    +
    +ifeq ($(OS),Windows_NT)
    +  XIPGEN_CMD=$(MCU_PLUS_SDK_PATH)/tools/boot/xipGen/xipGen.exe
    +else
    +  XIPGEN_CMD=$(MCU_PLUS_SDK_PATH)/tools/boot/xipGen/xipGen.out
    +endif
    +
    +MULTI_CORE_IMAGE_PARAMS = \
    +	$(BOOTIMAGE_RPRC_NAME)@$(BOOTIMAGE_CORE_ID_mcu-r5fss0-0) \
    +
    +MULTI_CORE_IMAGE_PARAMS_XIP = \
    +	$(BOOTIMAGE_RPRC_NAME_XIP)@$(BOOTIMAGE_CORE_ID_mcu-r5fss0-0)  \
    +
    +all:
    +ifeq ($(CCS_IDE_MODE),cloud)
    +#	No post build steps
    +else
    +	@echo  Boot image: am62px:mcu-r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_NAME)  ...
    +	$(OUTRPRC_CMD) $(OUTFILE) $(SW_VERSION)>> $(BOOTIMAGE_TEMP_OUT_FILE)
    +	$(COPY) $(OUTNAME).rprc $(BOOTIMAGE_RPRC_NAME)
    +	$(COPY) $(BOOTIMAGE_RPRC_NAME) $(BOOTIMAGE_RPRC_NAME_TMP)
    +	$(RM) $(BOOTIMAGE_RPRC_NAME)
    +	$(XIPGEN_CMD) -i $(BOOTIMAGE_RPRC_NAME_TMP) -o $(BOOTIMAGE_RPRC_NAME) -x $(BOOTIMAGE_RPRC_NAME_XIP) --flash-start-addr 0x60000000 -v > $(BOOTIMAGE_TEMP_OUT_FILE)
    +	$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME) $(MULTI_CORE_IMAGE_PARAMS) >> $(BOOTIMAGE_TEMP_OUT_FILE)
    +	$(MULTI_CORE_IMAGE_GEN) --devID $(SBL_DEV_ID) --out $(BOOTIMAGE_NAME_XIP) $(MULTI_CORE_IMAGE_PARAMS_XIP) >> $(BOOTIMAGE_TEMP_OUT_FILE)
    +# Sign the appimage for HS-FS using appimage signing script
    +	$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 0  --loadaddr 84000000 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME).hs_fs --keyversion $(VERSION)
    +ifeq ($(DEVICE_TYPE),HS)
    +# Sign the appimage using appimage signing script
    +ifeq ($(ENC_ENABLED),no)
    +	@echo Boot image signing: Encryption is disabled.
    +	$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 0  --loadaddr 84000000 --key $(APP_SIGNING_KEY) --output $(BOOTIMAGE_NAME).hs --keyversion $(VERSION)
    +else
    +	@echo Boot image signing: Encryption is enabled.
    +	$(PYTHON) $(APP_IMAGE_SIGN_CMD) --bin $(BOOTIMAGE_NAME) --authtype 0  --loadaddr 84000000 --key $(APP_SIGNING_KEY) --enc y --enckey $(APP_ENCRYPTION_KEY) --output $(BOOTIMAGE_NAME).hs --keyversion $(VERSION)
    +	$(RM) $(BOOTIMAGE_NAME)-enc
    +endif
    +endif
    +	$(RM) $(BOOTIMAGE_RPRC_NAME_TMP)
    +	@echo  Boot image: am62px:mcu-r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_NAME) Done !!!
    +	@echo  .
    +ifeq ($(DEVICE_TYPE),HS)
    +	@echo  Boot image: am62px:mcu-r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_NAME).hs Done !!!
    +	@echo  .
    +else
    +	@echo  Boot image: am62px:mcu-r5fss0-0:freertos:ti-arm-clang $(BOOTIMAGE_NAME).hs_fs Done !!!
    +	@echo  .
    +endif
    +endif
    diff --git a/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/makefile_projectspec b/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/makefile_projectspec
    new file mode 100644
    index 0000000..571b4ff
    --- /dev/null
    +++ b/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/makefile_projectspec
    @@ -0,0 +1,20 @@
    +#
    +# Auto generated makefile
    +#
    +
    +export MCU_PLUS_SDK_PATH?=$(abspath ../../../../../../..)
    +include $(MCU_PLUS_SDK_PATH)/imports.mak
    +
    +PROFILE?=Release
    +
    +PROJECT_NAME=mcasp_early_chime_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang
    +
    +all:
    +	$(CCS_ECLIPSE) -noSplash -data $(MCU_PLUS_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE)
    +
    +clean:
    +	$(CCS_ECLIPSE) -noSplash -data $(MCU_PLUS_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectBuild -ccs.projects $(PROJECT_NAME) -ccs.configuration $(PROFILE) -ccs.clean
    +
    +export:
    +	$(MKDIR) $(MCU_PLUS_SDK_PATH)/ccs_projects
    +	$(CCS_ECLIPSE) -noSplash -data $(MCU_PLUS_SDK_PATH)/ccs_projects -application com.ti.ccstudio.apps.projectCreate -ccs.projectSpec example.projectspec -ccs.overwrite full
    diff --git a/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/syscfg_c.rov.xs b/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/syscfg_c.rov.xs
    new file mode 100644
    index 0000000..472ab38
    --- /dev/null
    +++ b/examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang/syscfg_c.rov.xs
    @@ -0,0 +1,8 @@
    +/*
    + *  ======== syscfg_c.rov.xs ========
    + *  This file contains the information needed by the Runtime Object
    + *  View (ROV) tool.
    + */
    +var crovFiles = [
    +    "kernel/freertos/rov/FreeRTOS.rov.js",
    +];
    diff --git a/makefile.am62px b/makefile.am62px
    index 07b3b45..7afc555 100644
    --- a/makefile.am62px
    +++ b/makefile.am62px
    @@ -142,6 +142,7 @@ help:
     	@echo  $(MAKE) -s -C examples/drivers/mcan/mcan_loopback_interrupt/am62px-sk/mcu-r5fss0-0_nortos/ti-arm-clang [all clean syscfg-gui syscfg]
     	@echo  $(MAKE) -s -C examples/drivers/mcan/mcan_loopback_interrupt/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
     	@echo  $(MAKE) -s -C examples/drivers/mcan/mcan_loopback_interrupt/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
    +	@echo  $(MAKE) -s -C examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
     	@echo  $(MAKE) -s -C examples/drivers/mcasp/mcasp_early_chime/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
     	@echo  $(MAKE) -s -C examples/drivers/mcspi/mcspi_loopback/am62px-sk/mcu-r5fss0-0_nortos/ti-arm-clang [all clean syscfg-gui syscfg]
     	@echo  $(MAKE) -s -C examples/drivers/mcspi/mcspi_loopback/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang [all clean syscfg-gui syscfg]
    @@ -708,6 +709,7 @@ BUILD_COMBO_EXAMPLE_ALL += mcan_loopback_polling_am62px-sk_wkup-r5fss0-0_freerto
     BUILD_COMBO_EXAMPLE_ALL += mcan_loopback_interrupt_am62px-sk_mcu-r5fss0-0_nortos_ti-arm-clang
     BUILD_COMBO_EXAMPLE_ALL += mcan_loopback_interrupt_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang
     BUILD_COMBO_EXAMPLE_ALL += mcan_loopback_interrupt_am62px-sk_wkup-r5fss0-0_freertos_ti-arm-clang
    +BUILD_COMBO_EXAMPLE_ALL += mcasp_early_chime_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang
     BUILD_COMBO_EXAMPLE_ALL += mcasp_early_chime_am62px-sk_wkup-r5fss0-0_freertos_ti-arm-clang
     BUILD_COMBO_EXAMPLE_ALL += mcspi_loopback_am62px-sk_mcu-r5fss0-0_nortos_ti-arm-clang
     BUILD_COMBO_EXAMPLE_ALL += mcspi_loopback_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang
    @@ -945,6 +947,9 @@ examples-private: $(BUILD_COMBO_EXAMPLE_PRIVATE_ALL)
      mcan_loopback_interrupt_am62px-sk_wkup-r5fss0-0_freertos_ti-arm-clang:
     	$(MAKE) -C examples/drivers/mcan/mcan_loopback_interrupt/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang -f makefile all
     
    + mcasp_early_chime_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang:
    +	$(MAKE) -C examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang -f makefile all
    +
      mcasp_early_chime_am62px-sk_wkup-r5fss0-0_freertos_ti-arm-clang:
     	$(MAKE) -C examples/drivers/mcasp/mcasp_early_chime/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang -f makefile all
     
    @@ -1298,6 +1303,7 @@ BUILD_COMBO_EXAMPLE_CLEAN_ALL += mcan_loopback_polling_am62px-sk_wkup-r5fss0-0_f
     BUILD_COMBO_EXAMPLE_CLEAN_ALL += mcan_loopback_interrupt_am62px-sk_mcu-r5fss0-0_nortos_ti-arm-clang_clean
     BUILD_COMBO_EXAMPLE_CLEAN_ALL += mcan_loopback_interrupt_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang_clean
     BUILD_COMBO_EXAMPLE_CLEAN_ALL += mcan_loopback_interrupt_am62px-sk_wkup-r5fss0-0_freertos_ti-arm-clang_clean
    +BUILD_COMBO_EXAMPLE_CLEAN_ALL += mcasp_early_chime_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang_clean
     BUILD_COMBO_EXAMPLE_CLEAN_ALL += mcasp_early_chime_am62px-sk_wkup-r5fss0-0_freertos_ti-arm-clang_clean
     BUILD_COMBO_EXAMPLE_CLEAN_ALL += mcspi_loopback_am62px-sk_mcu-r5fss0-0_nortos_ti-arm-clang_clean
     BUILD_COMBO_EXAMPLE_CLEAN_ALL += mcspi_loopback_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang_clean
    @@ -1535,6 +1541,9 @@ examples-private-clean: $(BUILD_COMBO_EXAMPLE_PRIVATE_CLEAN_ALL)
      mcan_loopback_interrupt_am62px-sk_wkup-r5fss0-0_freertos_ti-arm-clang_clean:
     	$(MAKE) -C examples/drivers/mcan/mcan_loopback_interrupt/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang -f makefile clean
     
    + mcasp_early_chime_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang_clean:
    +	$(MAKE) -C examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang -f makefile clean
    +
      mcasp_early_chime_am62px-sk_wkup-r5fss0-0_freertos_ti-arm-clang_clean:
     	$(MAKE) -C examples/drivers/mcasp/mcasp_early_chime/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang -f makefile clean
     
    @@ -1888,6 +1897,7 @@ BUILD_COMBO_EXAMPLE_SCRUB_ALL += mcan_loopback_polling_am62px-sk_wkup-r5fss0-0_f
     BUILD_COMBO_EXAMPLE_SCRUB_ALL += mcan_loopback_interrupt_am62px-sk_mcu-r5fss0-0_nortos_ti-arm-clang_scrub
     BUILD_COMBO_EXAMPLE_SCRUB_ALL += mcan_loopback_interrupt_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang_scrub
     BUILD_COMBO_EXAMPLE_SCRUB_ALL += mcan_loopback_interrupt_am62px-sk_wkup-r5fss0-0_freertos_ti-arm-clang_scrub
    +BUILD_COMBO_EXAMPLE_SCRUB_ALL += mcasp_early_chime_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang_scrub
     BUILD_COMBO_EXAMPLE_SCRUB_ALL += mcasp_early_chime_am62px-sk_wkup-r5fss0-0_freertos_ti-arm-clang_scrub
     BUILD_COMBO_EXAMPLE_SCRUB_ALL += mcspi_loopback_am62px-sk_mcu-r5fss0-0_nortos_ti-arm-clang_scrub
     BUILD_COMBO_EXAMPLE_SCRUB_ALL += mcspi_loopback_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang_scrub
    @@ -2125,6 +2135,9 @@ examples-scrub-private: $(BUILD_COMBO_EXAMPLE_PRIVATE_SCRUB_ALL)
      mcan_loopback_interrupt_am62px-sk_wkup-r5fss0-0_freertos_ti-arm-clang_scrub:
     	$(MAKE) -C examples/drivers/mcan/mcan_loopback_interrupt/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang -f makefile scrub
     
    + mcasp_early_chime_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang_scrub:
    +	$(MAKE) -C examples/drivers/mcasp/mcasp_early_chime/am62px-sk/mcu-r5fss0-0_freertos/ti-arm-clang -f makefile scrub
    +
      mcasp_early_chime_am62px-sk_wkup-r5fss0-0_freertos_ti-arm-clang_scrub:
     	$(MAKE) -C examples/drivers/mcasp/mcasp_early_chime/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang -f makefile scrub
     
    diff --git a/source/drivers/.meta/mcasp/soc/mcasp_am62px.syscfg.js b/source/drivers/.meta/mcasp/soc/mcasp_am62px.syscfg.js
    index e0af812..db4aaaa 100644
    --- a/source/drivers/.meta/mcasp/soc/mcasp_am62px.syscfg.js
    +++ b/source/drivers/.meta/mcasp/soc/mcasp_am62px.syscfg.js
    @@ -12,6 +12,8 @@ const mcasp_config = [
             inputClkFreq                : mcasp_input_clk_freq,
             wkupR5RxIntr                : 0xFFFFFFFF,
             wkupR5TxIntr                : 0xFFFFFFFF,
    +        mcuR5RxIntr                 : 120,
    +        mcuR5TxIntr                 : 121,
             clockIds                    : ["TISCI_DEV_MCASP0"],
             clockFrequencies            : [
                 {
    @@ -35,6 +37,8 @@ const mcasp_config = [
             inputClkFreq                : mcasp_input_clk_freq,
             wkupR5RxIntr                : 0xFFFFFFFF,
             wkupR5TxIntr                : 0xFFFFFFFF,
    +        mcuR5RxIntr                 : 122,
    +        mcuR5TxIntr                 : 123,
             clockIds                    : ["TISCI_DEV_MCASP1"],
             clockFrequencies            : [
                 {
    @@ -58,6 +62,8 @@ const mcasp_config = [
             inputClkFreq                : mcasp_input_clk_freq,
             wkupR5RxIntr                : 0xFFFFFFFF,
             wkupR5TxIntr                : 0xFFFFFFFF,
    +        mcuR5RxIntr                 : 124,
    +        mcuR5TxIntr                 : 125,
             clockIds                    : ["TISCI_DEV_MCASP2"],
             clockFrequencies            : [
                 {
    diff --git a/source/drivers/.meta/mcasp/templates/v1/mcasp_config.c.xdt b/source/drivers/.meta/mcasp/templates/v1/mcasp_config.c.xdt
    index 1d9c6f4..47e9d05 100644
    --- a/source/drivers/.meta/mcasp/templates/v1/mcasp_config.c.xdt
    +++ b/source/drivers/.meta/mcasp/templates/v1/mcasp_config.c.xdt
    @@ -51,6 +51,9 @@ static MCASP_Attrs gMcaspAttrs[CONFIG_MCASP_NUM_INSTANCES] =
             % rxIntNum = config.c7xRxIntr;
             % txEvtNum = config.c7xTxEvent;
             % rxEvtNum = config.c7xRxEvent;
    +    % } else if(cpuName.match(/mcu-r5/)) {
    +        % txIntNum = config.mcuR5TxIntr;
    +        % rxIntNum = config.mcuR5RxIntr;
         % } else if(cpuName.match(/r5/)) {
             % txIntNum = config.wkupR5TxIntr;
             % rxIntNum = config.wkupR5RxIntr;
    diff --git a/source/drivers/.meta/soc/drivers_am62px.syscfg.js b/source/drivers/.meta/soc/drivers_am62px.syscfg.js
    index efa7adf..4a21196 100644
    --- a/source/drivers/.meta/soc/drivers_am62px.syscfg.js
    +++ b/source/drivers/.meta/soc/drivers_am62px.syscfg.js
    @@ -98,6 +98,7 @@ const topModules_mcu = [
         "/drivers/i2c/i2c",
         "/drivers/ipc/ipc",
         "/drivers/mcan/mcan",
    +    "/drivers/mcasp/mcasp",
         "/drivers/mcspi/mcspi",
         "/drivers/rtc/rtc",
         "/drivers/uart/uart",
    diff --git a/source/drivers/makefile.am62px.mcu-r5f.ti-arm-clang b/source/drivers/makefile.am62px.mcu-r5f.ti-arm-clang
    index b5c1f3c..5e49fad 100644
    --- a/source/drivers/makefile.am62px.mcu-r5f.ti-arm-clang
    +++ b/source/drivers/makefile.am62px.mcu-r5f.ti-arm-clang
    @@ -33,6 +33,9 @@ FILES_common := \
         ipc_rpmsg.c \
         ipc_rpmsg_vring.c \
         mcan.c \
    +    mcasp.c \
    +    mcasp_dma.c \
    +    mcasp_soc.c \
         mcspi_v0.c \
         mcspi_dma.c \
         mcspi_dma_udma.c \
    @@ -91,6 +94,9 @@ FILES_PATH_common = \
         ipc_notify/v0/soc/am62px \
         ipc_rpmsg/ \
         mcan/v0 \
    +    mcasp/v1 \
    +    mcasp/v1/dma_priv \
    +    mcasp/v1/soc/am62px \
         mcspi/v0 \
         mcspi/v0/dma \
         mcspi/v0/dma/udma \
    

    I am able to add support for mcasp in mcu_r5. Here are the changes made in the driver in the form of patch. Please try this and let me know. 

    Regards,
    Ritapravo

  • Hi Wei,

    Also, attaching the ccs project for the example - 

    mcasp_early_chime_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang.zip

    Regards,
    Ritapravo

  • Hi Wei, 

    I have split the thread to this one -  RE: AM62P: AM62P: Request for McASP+UDMA (BCDMA) Example running on MCU-R5F Core (mcu-r5fss0-0) in MCU+ SDK 

    I will be answered by DMA expert. 

    Regards,
    Ritapravo