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.

AM2632: Configuring EDMA for QSPI and UART

Part Number: AM2632


Tool/software:

I have a project where I have QSPI and a UART trying to use the DMA.  The QSPI was configured and working first.  I then went and configured one of the UARTS to use EDMA.  Note, the UART was working in Interrupt mode when I did this.  Executing a simple Tx test, the DMA never completes and nothing gets transmitted.  If I set the DMA type to Blocking, the UART_write() call never returns.  If I set the mode to Callback, the callback routine never gets called.  I'm thinking I'm missing something in the syscfg configuration, but I have tried a few things with no luck.  I've pasted the contents of my syscfg below.  In addition here is the code snippet I'm using to test the EDMA. 

I have built and run the uart_echo_dma_am263x-cc_r5fss0-0_freertos_ti-arm-clang project and that works- at least the first transmit makes it out the port.  The serial port is configured the same in each project.  The code snippet is cut/paste from the sample app.  The only difference is the DMA. 

Thanks for your help.

#define APP_UART_BUFSIZE              (200U)
#define APP_UART_RECEIVE_BUFSIZE      (8U)

uint8_t gUartBuffer[APP_UART_BUFSIZE] __attribute__((aligned(CacheP_CACHELINE_ALIGNMENT)));
uint8_t gUartReceiveBuffer[APP_UART_RECEIVE_BUFSIZE] __attribute__((aligned(CacheP_CACHELINE_ALIGNMENT)));

void app_main(void *args)
{
    /* Open drivers to open the UART driver for console */
    Drivers_open();
    Board_driversOpen();


    while (1)
    {
        int32_t          transferOK;
        UART_Transaction trans;

        UART_Transaction_init(&trans);
       /* Send entry string */
         trans.buf   = &gUartBuffer[0U];
         strncpy(trans.buf,"This is uart echo test DMA blocking mode\r\nReceives 8 characters then echo's back. Please input..\r\n", APP_UART_BUFSIZE);
         trans.count = strlen(trans.buf);
         CacheP_wb((void *)trans.buf, trans.count, CacheP_TYPE_ALL);
         transferOK = UART_write(gUartHandle[LOG_UART], &trans);
         //APP_UART_ASSERT_ON_FAILURE(transferOK, trans);
         vTaskDelay(1000);

    }

}

******************SysCfg is below

/**
 * 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 "AM263x_beta" --part "AM263x" --package "ZCZ" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM263x@10.01.00"
 * @v2CliArgs --device "AM2632-Q1" --package "NFBGA (ZCZ)" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM263x@10.01.00"
 * @versions {"tool":"1.22.0+3893"}
 */

/**
 * Import the modules used in this configuration.
 */
const flash           = scripting.addModule("/board/flash/flash", {}, false);
const flash1          = flash.addInstance();
const adc             = scripting.addModule("/drivers/adc/adc", {}, false);
const adc1            = adc.addInstance();
const adc2            = adc.addInstance();
const ecap            = scripting.addModule("/drivers/ecap/ecap", {}, false);
const ecap1           = ecap.addInstance();
const ecap2           = ecap.addInstance();
const ecap3           = ecap.addInstance();
const ecap4           = ecap.addInstance();
const ecap5           = ecap.addInstance();
const ecap6           = ecap.addInstance();
const ecap7           = ecap.addInstance();
const ecap8           = ecap.addInstance();
const ecap9           = ecap.addInstance();
const edma            = scripting.addModule("/drivers/edma/edma", {}, false);
const edma1           = edma.addInstance();
const epwm            = scripting.addModule("/drivers/epwm/epwm", {}, false);
const epwm1           = epwm.addInstance();
const epwm2           = epwm.addInstance();
const epwm3           = epwm.addInstance();
const epwm4           = epwm.addInstance();
const epwm5           = epwm.addInstance();
const epwm6           = epwm.addInstance();
const epwm7           = epwm.addInstance();
const epwm8           = epwm.addInstance();
const epwm9           = epwm.addInstance();
const epwm10          = epwm.addInstance();
const epwm11          = epwm.addInstance();
const gpio            = scripting.addModule("/drivers/gpio/gpio", {}, false);
const gpio1           = gpio.addInstance();
const gpio2           = gpio.addInstance();
const gpio3           = gpio.addInstance();
const gpio4           = gpio.addInstance();
const gpio5           = gpio.addInstance();
const gpio6           = gpio.addInstance();
const gpio7           = gpio.addInstance();
const gpio8           = gpio.addInstance();
const gpio9           = gpio.addInstance();
const gpio10          = gpio.addInstance();
const gpio11          = gpio.addInstance();
const gpio12          = gpio.addInstance();
const gpio13          = gpio.addInstance();
const gpio14          = gpio.addInstance();
const gpio15          = gpio.addInstance();
const gpio16          = gpio.addInstance();
const gpio17          = gpio.addInstance();
const gpio18          = gpio.addInstance();
const gpio19          = gpio.addInstance();
const gpio20          = gpio.addInstance();
const gpio21          = gpio.addInstance();
const gpio22          = gpio.addInstance();
const gpio23          = gpio.addInstance();
const gpio24          = gpio.addInstance();
const gpio25          = gpio.addInstance();
const gpio26          = gpio.addInstance();
const gpio27          = gpio.addInstance();
const gpio28          = gpio.addInstance();
const gpio29          = gpio.addInstance();
const gpio30          = gpio.addInstance();
const gpio31          = gpio.addInstance();
const gpio32          = gpio.addInstance();
const gpio33          = gpio.addInstance();
const gpio34          = gpio.addInstance();
const gpio35          = gpio.addInstance();
const gpio36          = gpio.addInstance();
const gpio37          = gpio.addInstance();
const gpio38          = gpio.addInstance();
const gpio39          = gpio.addInstance();
const gpio40          = gpio.addInstance();
const gpio41          = gpio.addInstance();
const gpio42          = gpio.addInstance();
const gpio43          = gpio.addInstance();
const gpio44          = gpio.addInstance();
const gpio45          = gpio.addInstance();
const gpio46          = gpio.addInstance();
const gpio47          = gpio.addInstance();
const gpio48          = gpio.addInstance();
const gpio49          = gpio.addInstance();
const gpio50          = gpio.addInstance();
const gpio51          = gpio.addInstance();
const gpio52          = gpio.addInstance();
const gpio53          = gpio.addInstance();
const gpio54          = gpio.addInstance();
const gpio55          = gpio.addInstance();
const gpio56          = gpio.addInstance();
const gpio57          = gpio.addInstance();
const gpio58          = gpio.addInstance();
const gpio59          = gpio.addInstance();
const gpio60          = gpio.addInstance();
const gpio61          = gpio.addInstance();
const gpio62          = gpio.addInstance();
const gpio63          = gpio.addInstance();
const mcan            = scripting.addModule("/drivers/mcan/mcan", {}, false);
const mcan1           = mcan.addInstance();
const mcan2           = mcan.addInstance();
const mcan3           = mcan.addInstance();
const mcspi           = scripting.addModule("/drivers/mcspi/mcspi", {}, false);
const mcspi1          = mcspi.addInstance();
const mcspi2          = mcspi.addInstance();
const mcspi3          = mcspi.addInstance();
const uart            = scripting.addModule("/drivers/uart/uart", {}, false);
const uart1           = uart.addInstance();
const uart2           = uart.addInstance();
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 timer           = scripting.addModule("/kernel/dpl/timer", {}, false);
const timer1          = timer.addInstance();
const default_linker  = scripting.addModule("/memory_configurator/default_linker", {}, false);
const default_linker1 = default_linker.addInstance();
const general         = scripting.addModule("/memory_configurator/general", {}, false);
const general1        = general.addInstance();
const region          = scripting.addModule("/memory_configurator/region", {}, false);
const region1         = region.addInstance();
const section         = scripting.addModule("/memory_configurator/section", {}, false);
const section1        = section.addInstance();
const section2        = section.addInstance();
const section3        = section.addInstance();
const section4        = section.addInstance();
const section5        = section.addInstance();
const section6        = section.addInstance();
const section7        = section.addInstance();
const section8        = section.addInstance();
const section9        = section.addInstance();
const section10       = section.addInstance();
const section11       = section.addInstance();
const section12       = section.addInstance();
const gpio_int_xbar   = scripting.addModule("/xbar/gpio_int_xbar/gpio_int_xbar", {}, false);
const gpio_int_xbar1  = gpio_int_xbar.addInstance();
const input_xbar      = scripting.addModule("/xbar/input_xbar/input_xbar", {}, false);
const input_xbar1     = input_xbar.addInstance();
const input_xbar2     = input_xbar.addInstance();
const input_xbar3     = input_xbar.addInstance();
const input_xbar4     = input_xbar.addInstance();
const input_xbar5     = input_xbar.addInstance();
const input_xbar6     = input_xbar.addInstance();
const input_xbar7     = input_xbar.addInstance();
const input_xbar8     = input_xbar.addInstance();
const input_xbar9     = input_xbar.addInstance();
const input_xbar10    = input_xbar.addInstance();
const input_xbar11    = input_xbar.addInstance();
const int_xbar        = scripting.addModule("/xbar/int_xbar/int_xbar", {}, false);
const int_xbar1       = int_xbar.addInstance();
const int_xbar2       = int_xbar.addInstance();
const int_xbar3       = int_xbar.addInstance();
const int_xbar4       = int_xbar.addInstance();
const int_xbar5       = int_xbar.addInstance();
const int_xbar6       = int_xbar.addInstance();
const int_xbar7       = int_xbar.addInstance();
const int_xbar8       = int_xbar.addInstance();
const int_xbar9       = int_xbar.addInstance();
const int_xbar10      = int_xbar.addInstance();

/**
 * Write custom configuration values to the imported modules.
 */
flash1.$name                        = "CONFIG_FLASH0";
flash1.device                       = "CUSTOM_FLASH";
flash1.fname                        = "BMS_FLASH";
flash1.flashSize                    = 8388608;
flash1.flashManfId                  = "0x9d";
flash1.flashDeviceId                = "0x6017";
flash1.flashQeType                  = "2";
flash1.enable4BAddr                 = true;
flash1.resetType                    = "0x30";
flash1.flashDeviceBusyTimeout       = 20000000;
flash1.flashPageProgTimeout         = 200;
flash1.fourByteEnableSeq            = "0x80";
flash1.peripheralDriver.$name       = "CONFIG_QSPI0";
flash1.peripheralDriver.child.$name = "drivers_qspi_v0_qspi_v0_template0";

adc1.$name                          = "VSUPPLIES";
adc1.adcClockPrescaler              = "ADC_CLK_DIV_8_0";
adc1.soc2Channel                    = "ADC_CH_ADCIN1";
adc1.soc3Channel                    = "ADC_CH_ADCIN1";
adc1.soc4Channel                    = "ADC_CH_ADCIN2";
adc1.soc5Channel                    = "ADC_CH_ADCIN2";
adc1.soc6Channel                    = "ADC_CH_ADCIN3";
adc1.soc7Channel                    = "ADC_CH_ADCIN3";
adc1.soc8Channel                    = "ADC_CH_ADCIN4";
adc1.soc9Channel                    = "ADC_CH_ADCIN4";
adc1.soc10Channel                   = "ADC_CH_ADCIN5";
adc1.soc11Channel                   = "ADC_CH_ADCIN5";
adc1.soc12Channel                   = "ADC_CH_CAL0";
adc1.soc13Channel                   = "ADC_CH_CAL0";
adc1.soc11SampleWindow              = 512;
adc1.soc0SampleWindow               = 512;
adc1.soc1SampleWindow               = 512;
adc1.soc2SampleWindow               = 512;
adc1.soc3SampleWindow               = 512;
adc1.soc4SampleWindow               = 512;
adc1.soc5SampleWindow               = 512;
adc1.soc6SampleWindow               = 512;
adc1.soc7SampleWindow               = 512;
adc1.soc8SampleWindow               = 512;
adc1.soc9SampleWindow               = 512;
adc1.soc10SampleWindow              = 512;
adc1.soc12SampleWindow              = 512;
adc1.soc13SampleWindow              = 512;
adc1.enableInterrupt1               = true;
adc1.interrupt1SOCSource            = "ADC_SOC_NUMBER13";
adc1.socHighPriorityMode            = "ADC_PRI_ALL_HIPRI";
adc1.enableConverter                = true;
adc1.enableInterrupt1ContinuousMode = true;
adc1.burstSize                      = 16;
adc1.burstTrigger                   = "ADC_TRIGGER_EPWM28_SOCA";
adc1.soc0Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc1.soc1Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc1.soc13Trigger                   = "ADC_TRIGGER_EPWM28_SOCA";
adc1.soc2Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc1.soc3Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc1.soc4Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc1.soc5Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc1.soc6Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc1.soc7Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc1.soc8Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc1.soc9Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc1.soc10Trigger                   = "ADC_TRIGGER_EPWM28_SOCA";
adc1.soc11Trigger                   = "ADC_TRIGGER_EPWM28_SOCA";
adc1.soc12Trigger                   = "ADC_TRIGGER_EPWM28_SOCA";
adc1.ppb1SOCNumber                  = "ADC_SOC_NUMBER1";
adc1.ppb1EventEnable                = ["ADC_EVT_TRIPHI","ADC_EVT_TRIPLO"];
adc1.ppb1HighTripLimit              = 4000;
adc1.ppb1LowTripLimit               = 10;
adc1.ppb1EventInterruptEnable       = ["ADC_EVT_TRIPHI","ADC_EVT_TRIPLO"];
adc1.ADC.$assign                    = "ADC3";
adc1.ADC.AIN0.$assign               = "ADC3_AIN0";
adc1.ADC.AIN1.$assign               = "ADC3_AIN1";
adc1.ADC.AIN2.$assign               = "ADC3_AIN2";
adc1.ADC.AIN3.$assign               = "ADC3_AIN3";
adc1.ADC.AIN4.$assign               = "ADC3_AIN4";
adc1.ADC.AIN5.$assign               = "ADC3_AIN5";

adc2.$name                          = "SENSORS";
adc2.adcClockPrescaler              = "ADC_CLK_DIV_8_0";
adc2.soc2Channel                    = "ADC_CH_ADCIN1";
adc2.soc3Channel                    = "ADC_CH_ADCIN1";
adc2.soc4Channel                    = "ADC_CH_ADCIN2";
adc2.soc5Channel                    = "ADC_CH_ADCIN2";
adc2.soc6Channel                    = "ADC_CH_ADCIN3";
adc2.soc7Channel                    = "ADC_CH_ADCIN3";
adc2.soc8Channel                    = "ADC_CH_ADCIN4";
adc2.soc9Channel                    = "ADC_CH_ADCIN4";
adc2.soc10Channel                   = "ADC_CH_ADCIN5";
adc2.soc11Channel                   = "ADC_CH_ADCIN5";
adc2.soc12Channel                   = "ADC_CH_CAL0";
adc2.soc13Channel                   = "ADC_CH_CAL0";
adc2.interrupt1SOCSource            = "ADC_SOC_NUMBER13";
adc2.soc0SampleWindow               = 512;
adc2.soc1SampleWindow               = 512;
adc2.soc2SampleWindow               = 512;
adc2.soc3SampleWindow               = 512;
adc2.soc4SampleWindow               = 512;
adc2.soc5SampleWindow               = 512;
adc2.soc6SampleWindow               = 512;
adc2.soc7SampleWindow               = 512;
adc2.soc8SampleWindow               = 512;
adc2.soc9SampleWindow               = 512;
adc2.soc10SampleWindow              = 512;
adc2.soc11SampleWindow              = 512;
adc2.soc12SampleWindow              = 512;
adc2.soc13SampleWindow              = 512;
adc2.socHighPriorityMode            = "ADC_PRI_ALL_HIPRI";
adc2.enableInterrupt1               = true;
adc2.soc13Trigger                   = "ADC_TRIGGER_EPWM28_SOCA";
adc2.soc12Trigger                   = "ADC_TRIGGER_EPWM28_SOCA";
adc2.enableConverter                = true;
adc2.soc1Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc2.soc2Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc2.soc3Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc2.soc4Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc2.soc5Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc2.soc6Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc2.soc7Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc2.soc8Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc2.soc9Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc2.soc10Trigger                   = "ADC_TRIGGER_EPWM28_SOCA";
adc2.soc11Trigger                   = "ADC_TRIGGER_EPWM28_SOCA";
adc2.soc0Trigger                    = "ADC_TRIGGER_EPWM28_SOCA";
adc2.enableInterrupt1ContinuousMode = true;
adc2.ppb1EventEnable                = ["ADC_EVT_TRIPHI","ADC_EVT_TRIPLO"];
adc2.ppb1EventInterruptEnable       = ["ADC_EVT_TRIPHI","ADC_EVT_TRIPLO"];
adc2.ppb1HighTripLimit              = 4000;
adc2.ppb1LowTripLimit               = 100;
adc2.ppb1SOCNumber                  = "ADC_SOC_NUMBER11";
adc2.ADC.$assign                    = "ADC4";
adc2.ADC.AIN0.$assign               = "ADC4_AIN0";
adc2.ADC.AIN1.$assign               = "ADC4_AIN1";
adc2.ADC.AIN2.$assign               = "ADC4_AIN2";
adc2.ADC.AIN3.$assign               = "ADC4_AIN3";
adc2.ADC.AIN4.$assign               = "ADC4_AIN4";
adc2.ADC.AIN5.$assign               = "ADC4_AIN5";

ecap1.$name                  = "HVILS_01_02";
ecap1.eventStop              = "ECAP_EVENT_4";
ecap1.ecapInput              = "ECAP_INPUT_INPUTXBAR0";
ecap1.eventTwoPolarity       = "ECAP_EVNT_FALLING_EDGE";
ecap1.eventFourPolarity      = "ECAP_EVNT_FALLING_EDGE";
ecap1.captureMode            = "ECAP_ONE_SHOT_CAPTURE_MODE";
ecap1.interruptSourceCapture = ["ECAP_ISR_SOURCE_CAPTURE_EVENT_4","ECAP_ISR_SOURCE_COUNTER_OVERFLOW"];

ecap2.ecapBase               = "CSL_CONTROLSS_ECAP1_U_BASE";
ecap2.eventStop              = "ECAP_EVENT_4";
ecap2.eventTwoPolarity       = "ECAP_EVNT_FALLING_EDGE";
ecap2.eventFourPolarity      = "ECAP_EVNT_FALLING_EDGE";
ecap2.captureMode            = "ECAP_ONE_SHOT_CAPTURE_MODE";
ecap2.interruptSourceCapture = ["ECAP_ISR_SOURCE_CAPTURE_EVENT_4","ECAP_ISR_SOURCE_COUNTER_OVERFLOW"];
ecap2.ecapInput              = "ECAP_INPUT_INPUTXBAR2";
ecap2.$name                  = "HVILS_03_09";

ecap3.ecapBase               = "CSL_CONTROLSS_ECAP2_U_BASE";
ecap3.$name                  = "HVILS_05_06";
ecap3.eventTwoPolarity       = "ECAP_EVNT_FALLING_EDGE";
ecap3.eventFourPolarity      = "ECAP_EVNT_FALLING_EDGE";
ecap3.eventStop              = "ECAP_EVENT_4";
ecap3.captureMode            = "ECAP_ONE_SHOT_CAPTURE_MODE";
ecap3.interruptSourceCapture = ["ECAP_ISR_SOURCE_CAPTURE_EVENT_4","ECAP_ISR_SOURCE_COUNTER_OVERFLOW"];
ecap3.ecapInput              = "ECAP_INPUT_INPUTXBAR4";

ecap4.ecapBase               = "CSL_CONTROLSS_ECAP3_U_BASE";
ecap4.$name                  = "HVILS_07_08";
ecap4.eventStop              = "ECAP_EVENT_4";
ecap4.eventTwoPolarity       = "ECAP_EVNT_FALLING_EDGE";
ecap4.eventFourPolarity      = "ECAP_EVNT_FALLING_EDGE";
ecap4.enableInterrupt        = true;
ecap4.interruptSourceCapture = ["ECAP_ISR_SOURCE_CAPTURE_EVENT_4","ECAP_ISR_SOURCE_COUNTER_OVERFLOW"];
ecap4.captureMode            = "ECAP_ONE_SHOT_CAPTURE_MODE";
ecap4.ecapInput              = "ECAP_INPUT_INPUTXBAR6";

ecap5.ecapBase               = "CSL_CONTROLSS_ECAP4_U_BASE";
ecap5.captureMode            = "ECAP_ONE_SHOT_CAPTURE_MODE";
ecap5.eventStop              = "ECAP_EVENT_4";
ecap5.eventTwoPolarity       = "ECAP_EVNT_FALLING_EDGE";
ecap5.eventFourPolarity      = "ECAP_EVNT_FALLING_EDGE";
ecap5.enableInterrupt        = true;
ecap5.interruptSourceCapture = ["ECAP_ISR_SOURCE_CAPTURE_EVENT_4","ECAP_ISR_SOURCE_COUNTER_OVERFLOW"];
ecap5.$name                  = "HVILS_04_10";
ecap5.ecapInput              = "ECAP_INPUT_INPUTXBAR3";

ecap6.ecapBase               = "CSL_CONTROLSS_ECAP5_U_BASE";
ecap6.$name                  = "CRASH_MONITOR";
ecap6.eventStop              = "ECAP_EVENT_4";
ecap6.ecapInput              = "ECAP_INPUT_INPUTXBAR10";
ecap6.resetCounters          = true;
ecap6.interruptSourceCapture = ["ECAP_ISR_SOURCE_CAPTURE_EVENT_4"];
ecap6.enableLoadCounter      = true;
ecap6.loadCounter            = true;
ecap6.counterResetOnEvent    = ["ECAP_EVENT_1","ECAP_EVENT_2","ECAP_EVENT_3","ECAP_EVENT_4"];
ecap6.eventTwoPolarity       = "ECAP_EVNT_FALLING_EDGE";
ecap6.eventFourPolarity      = "ECAP_EVNT_FALLING_EDGE";

ecap7.$name    = "CONFIG_ECAP6";
ecap7.ecapBase = "CSL_CONTROLSS_ECAP6_U_BASE";

ecap8.$name    = "CONFIG_ECAP7";
ecap8.ecapBase = "CSL_CONTROLSS_ECAP7_U_BASE";

ecap9.$name    = "CONFIG_ECAP8";
ecap9.ecapBase = "CSL_CONTROLSS_ECAP8_U_BASE";

epwm1.$name          = "CD_01";
epwm1.EPWM.$assign   = "EPWM0";
epwm1.EPWM.A.$assign = "EPWM0_A";
epwm1.EPWM.B.$used   = false;

epwm2.$name          = "CD_02";
epwm2.EPWM.$assign   = "EPWM1";
epwm2.EPWM.A.$assign = "EPWM1_A";
epwm2.EPWM.B.$used   = false;

epwm3.$name          = "CD_03";
epwm3.EPWM.$assign   = "EPWM2";
epwm3.EPWM.A.$assign = "EPWM2_A";
epwm3.EPWM.B.$used   = false;

epwm4.$name          = "CD_04";
epwm4.EPWM.$assign   = "EPWM3";
epwm4.EPWM.A.$assign = "EPWM3_A";
epwm4.EPWM.B.$used   = false;

epwm5.$name          = "CD_05";
epwm5.EPWM.$assign   = "EPWM4";
epwm5.EPWM.A.$assign = "EPWM4_A";
epwm5.EPWM.B.$used   = false;

epwm6.$name          = "CD_06";
epwm6.EPWM.$assign   = "EPWM5";
epwm6.EPWM.A.$assign = "EPWM5_A";
epwm6.EPWM.B.$used   = false;

epwm7.$name          = "HVILD_01";
epwm7.EPWM.$assign   = "EPWM8";
epwm7.EPWM.A.$assign = "EPWM8_A";
epwm7.EPWM.B.$used   = false;

epwm8.$name          = "HVILD_02";
epwm8.EPWM.$assign   = "EPWM9";
epwm8.EPWM.A.$assign = "EPWM9_A";
epwm8.EPWM.B.$used   = false;

epwm9.$name                                             = "VSUPPLIES_PWM";
epwm9.epwmEventTrigger_EPWM_SOC_A_triggerEnable         = true;
epwm9.epwmEventTrigger_EPWM_SOC_A_triggerSource         = "EPWM_SOC_TBCTR_U_CMPA";
epwm9.epwmGroup                                         = "EPWM_GROUP3";
epwm9.epwmEventTrigger_EPWM_SOC_A_triggerEventPrescalar = "1";
epwm9.epwmTimebase_emulationMode                        = "EPWM_EMULATION_FREE_RUN";
epwm9.epwmTimebase_clockDiv                             = "EPWM_CLOCK_DIVIDER_128";
epwm9.epwmTimebase_period                               = 5199;
epwm9.epwmCounterCompare_cmpA                           = 2600;
epwm9.epwmEventTrigger_enableInterrupt                  = true;
epwm9.epwmEventTrigger_interruptSource                  = "EPWM_INT_TBCTR_U_CMPA";
epwm9.EPWM.$assign                                      = "EPWM29";
epwm9.EPWM.A.$used                                      = false;
epwm9.EPWM.B.$used                                      = false;

epwm10.$name                                     = "SENSOR_PWM";
epwm10.epwmGroup                                 = "EPWM_GROUP3";
epwm10.epwmEventTrigger_EPWM_SOC_A_triggerEnable = true;
epwm10.epwmEventTrigger_EPWM_SOC_A_triggerSource = "EPWM_SOC_TBCTR_U_CMPA";
epwm10.EPWM.$assign                              = "EPWM30";
epwm10.EPWM.A.$used                              = false;
epwm10.EPWM.B.$used                              = false;

epwm11.$name                                             = "ADC_PWM";
epwm11.epwmTimebase_clockDiv                             = "EPWM_CLOCK_DIVIDER_128";
epwm11.epwmTimebase_period                               = 5199;
epwm11.epwmCounterCompare_cmpA                           = 2600;
epwm11.epwmEventTrigger_enableInterrupt                  = true;
epwm11.epwmEventTrigger_interruptSource                  = "EPWM_INT_TBCTR_U_CMPA";
epwm11.epwmEventTrigger_EPWM_SOC_A_triggerEnable         = true;
epwm11.epwmEventTrigger_EPWM_SOC_A_triggerSource         = "EPWM_SOC_TBCTR_U_CMPA";
epwm11.epwmEventTrigger_EPWM_SOC_A_triggerEventPrescalar = "1";
epwm11.EPWM.$assign                                      = "EPWM28";
epwm11.EPWM.A.$used                                      = false;
epwm11.EPWM.B.$used                                      = false;

gpio1.$name          = "CAUXS_01";
gpio1.pu_pd          = "pd";
gpio1.GPIO_n.$assign = "PR0_MDIO_MDIO";

gpio2.$name          = "CAUXS_02";
gpio2.pu_pd          = "pd";
gpio2.GPIO_n.$assign = "RGMII1_RXC";

gpio3.$name          = "CAUXS_03";
gpio3.pu_pd          = "pd";
gpio3.GPIO_n.$assign = "RGMII1_RX_CTL";

gpio4.$name          = "CAUXS_04";
gpio4.pu_pd          = "pd";
gpio4.GPIO_n.$assign = "RGMII1_RD0";

gpio5.$name          = "CAUXS_05";
gpio5.pu_pd          = "pd";
gpio5.GPIO_n.$assign = "RGMII1_RD1";

gpio6.$name          = "CAUXS_06";
gpio6.pu_pd          = "pd";
gpio6.GPIO_n.$assign = "RGMII1_RD2";

gpio7.$name          = "CAUXS_07";
gpio7.pu_pd          = "pd";
gpio7.GPIO_n.$assign = "RGMII1_RD3";

gpio8.$name          = "CAUXS_08";
gpio8.pu_pd          = "pd";
gpio8.GPIO_n.$assign = "RGMII1_TXC";

gpio9.$name          = "CAUXS_09";
gpio9.pu_pd          = "pd";
gpio9.GPIO_n.$assign = "RGMII1_TX_CTL";

gpio10.$name          = "CAUXS_10";
gpio10.pu_pd          = "pd";
gpio10.GPIO_n.$assign = "RGMII1_TD0";

gpio11.$name          = "CE_03";
gpio11.pinDir         = "OUTPUT";
gpio11.GPIO_n.$assign = "RGMII1_TD3";

gpio12.$name          = "CE_04";
gpio12.pinDir         = "OUTPUT";
gpio12.GPIO_n.$assign = "MDIO_MDIO";

gpio13.$name          = "CE_05";
gpio13.pinDir         = "OUTPUT";
gpio13.GPIO_n.$assign = "EPWM6_A";

gpio14.$name          = "CE_06";
gpio14.pinDir         = "OUTPUT";
gpio14.GPIO_n.$assign = "EPWM6_B";

gpio15.$name          = "CAUXD_01";
gpio15.pinDir         = "OUTPUT";
gpio15.GPIO_n.$assign = "MDIO_MDC";

gpio16.$name          = "CAUXD_02";
gpio16.pinDir         = "OUTPUT";
gpio16.GPIO_n.$assign = "EPWM0_B";

gpio17.$name          = "CAUXD_03";
gpio17.pinDir         = "OUTPUT";
gpio17.GPIO_n.$assign = "EPWM1_B";

gpio18.$name          = "CAUXD_04";
gpio18.pinDir         = "OUTPUT";
gpio18.GPIO_n.$assign = "EPWM2_B";

gpio19.$name          = "CAUXD_05";
gpio19.pinDir         = "OUTPUT";
gpio19.GPIO_n.$assign = "EPWM3_B";

gpio20.$name          = "CAUXD_06";
gpio20.pinDir         = "OUTPUT";
gpio20.GPIO_n.$assign = "EPWM4_B";

gpio21.pinDir         = "OUTPUT";
gpio21.$name          = "HS_CD_EN";
gpio21.GPIO_n.$assign = "EPWM7_A";

gpio22.$name          = "HS_CD_FLT";
gpio22.GPIO_n.$assign = "EPWM7_B";

gpio23.$name          = "BDUI_REV0";
gpio23.pu_pd          = "pu";
gpio23.GPIO_n.$assign = "EPWM8_B";

gpio24.$name          = "BDUI_REV1";
gpio24.pu_pd          = "pu";
gpio24.GPIO_n.$assign = "EPWM9_B";

gpio25.pinDir         = "OUTPUT";
gpio25.$name          = "HS_CD_SNS";
gpio25.GPIO_n.$assign = "EPWM10_A";

gpio26.$name          = "BDUI_REV2";
gpio26.pu_pd          = "pu";
gpio26.GPIO_n.$assign = "EPWM10_B";

gpio27.$name          = "HVILS_01_GPIO94";
gpio27.GPIO_n.$assign = "PR0_PRU0_GPIO1";

gpio28.$name          = "HVILS_02_GPIO95";
gpio28.GPIO_n.$assign = "PR0_PRU0_GPIO2";

gpio29.$name          = "HVILS_03_GPIO96";
gpio29.GPIO_n.$assign = "PR0_PRU0_GPIO3";

gpio30.$name          = "HVILS_04_GPIO92";
gpio30.GPIO_n.$assign = "PR0_PRU0_GPIO4";

gpio31.$name          = "HVILS_05_GPIO87";
gpio31.GPIO_n.$assign = "PR0_PRU0_GPIO5";

gpio32.$name          = "HVILS_06_GPIO91";
gpio32.GPIO_n.$assign = "PR0_PRU0_GPIO6";

gpio33.$name          = "HVILS_07_GPIO90";
gpio33.GPIO_n.$assign = "PR0_PRU0_GPIO8";

gpio34.$name          = "HVILS_08_GPIO88";
gpio34.GPIO_n.$assign = "PR0_PRU0_GPIO9";

gpio35.$name          = "HVILS_09_GPIO89";
gpio35.GPIO_n.$assign = "PR0_PRU0_GPIO10";

gpio36.$name          = "HVILS_10_GPIO99";
gpio36.GPIO_n.$assign = "PR0_PRU0_GPIO11";

gpio37.pu_pd          = "pu";
gpio37.$name          = "CRASH_IN_GPIO93";
gpio37.GPIO_n.$assign = "PR0_PRU0_GPIO0";

gpio38.$name          = "PMIC_CSn";
gpio38.pinDir         = "OUTPUT";
gpio38.defaultValue   = "1";
gpio38.pu_pd          = "pu";
gpio38.GPIO_n.$assign = "EQEP0_B";

gpio39.$name          = "EEPROM_CSn";
gpio39.pinDir         = "OUTPUT";
gpio39.defaultValue   = "1";
gpio39.pu_pd          = "pu";
gpio39.GPIO_n.$assign = "EPWM12_A";

gpio40.$name          = "PYRO_CSn";
gpio40.pinDir         = "OUTPUT";
gpio40.defaultValue   = "1";
gpio40.pu_pd          = "pu";
gpio40.GPIO_n.$assign = "SPI1_CS0";

gpio41.$name          = "PRESSURE_CSn";
gpio41.pinDir         = "OUTPUT";
gpio41.pu_pd          = "pu";
gpio41.defaultValue   = "1";
gpio41.GPIO_n.$assign = "LIN1_RXD";

gpio42.$name          = "PD_01";
gpio42.pinDir         = "OUTPUT";
gpio42.pu_pd          = "pd";
gpio42.GPIO_n.$assign = "PR0_PRU1_GPIO15";

gpio43.$name          = "PD_02";
gpio43.pinDir         = "OUTPUT";
gpio43.pu_pd          = "pd";
gpio43.GPIO_n.$assign = "EPWM11_A";

gpio44.$name          = "PDD_FLT";
gpio44.pu_pd          = "pu";
gpio44.enableIntr     = true;
gpio44.trigType       = "FALL_EDGE";
gpio44.GPIO_n.$assign = "PR0_MDIO_MDC";

gpio45.$name          = "HB_LED";
gpio45.pinDir         = "OUTPUT";
gpio45.pu_pd          = "pu";
gpio45.GPIO_n.$assign = "I2C0_SDA";

gpio46.$name          = "FAULT_LED";
gpio46.pinDir         = "OUTPUT";
gpio46.defaultValue   = "1";
gpio46.pu_pd          = "pu";
gpio46.GPIO_n.$assign = "I2C0_SCL";

gpio47.$name          = "BDU_12V_EN";
gpio47.pinDir         = "OUTPUT";
gpio47.GPIO_n.$assign = "PR0_PRU1_GPIO12";

gpio48.$name          = "BDU_5V_EN";
gpio48.pinDir         = "OUTPUT";
gpio48.GPIO_n.$assign = "PR0_PRU1_GPIO19";

gpio49.$name          = "BDU_3V_EN";
gpio49.pinDir         = "OUTPUT";
gpio49.GPIO_n.$assign = "PR0_PRU1_GPIO18";

gpio50.$name          = "CAN_HIL_EN";
gpio50.pinDir         = "OUTPUT";
gpio50.GPIO_n.$assign = "UART0_CTSn";

gpio51.$name          = "CAN_HIL_FAULT";
gpio51.GPIO_n.$assign = "PR0_PRU1_GPIO16";

gpio52.$name          = "CAN_HIL_STB";
gpio52.pinDir         = "OUTPUT";
gpio52.GPIO_n.$assign = "SPI0_D1";

gpio53.$name          = "CAN_INT_EN";
gpio53.pinDir         = "OUTPUT";
gpio53.GPIO_n.$assign = "PR0_PRU1_GPIO11";

gpio54.$name          = "CAN_INT_FAULT";
gpio54.GPIO_n.$assign = "SPI0_CS0";

gpio55.$name          = "CAN_INT_STB";
gpio55.pinDir         = "OUTPUT";
gpio55.GPIO_n.$assign = "PR0_PRU1_GPIO10";

gpio56.$name          = "CAN_VEH_EN";
gpio56.pinDir         = "OUTPUT";
gpio56.GPIO_n.$assign = "PR0_PRU1_GPIO9";

gpio57.$name          = "CAN_VEH_FAULT";
gpio57.GPIO_n.$assign = "QSPI_CSn1";

gpio58.$name          = "CAN_VEH_STB";
gpio58.pinDir         = "OUTPUT";
gpio58.GPIO_n.$assign = "PR0_PRU1_GPIO8";

gpio59.$name          = "SLEEP_DONE";
gpio59.pinDir         = "OUTPUT";
gpio59.GPIO_n.$assign = "EPWM13_A";

gpio60.$name          = "AC_DET_IN";
gpio60.pu_pd          = "pu";
gpio60.GPIO_n.$assign = "PR0_PRU1_GPIO2";

gpio61.$name          = "BMSC_REV0";
gpio61.GPIO_n.$assign = "UART0_RTSn";

gpio62.$name          = "BMSC_REV1";
gpio62.GPIO_n.$assign = "I2C1_SDA";

gpio63.$name          = "BMSC_REV2";
gpio63.GPIO_n.$assign = "I2C1_SCL";

mcan1.$name           = "CAN_HIL";
mcan1.MCAN.$assign    = "MCAN1";
mcan1.MCAN.RX.$assign = "MCAN1_RX";
mcan1.MCAN.TX.$assign = "MCAN1_TX";

mcan2.$name           = "CAN_VEH1";
mcan2.MCAN.$assign    = "MCAN0";
mcan2.MCAN.RX.$assign = "MCAN0_RX";
mcan2.MCAN.TX.$assign = "MCAN0_TX";

mcan3.$name           = "CAN_INT";
mcan3.MCAN.$assign    = "MCAN2";
mcan3.MCAN.RX.$assign = "MCAN2_RX";
mcan3.MCAN.TX.$assign = "MCAN2_TX";

const mcan_v1_template  = scripting.addModule("/drivers/mcan/v1/mcan_v1_template", {}, false);
const mcan_v1_template1 = mcan_v1_template.addInstance({}, false);
mcan_v1_template1.$name = "drivers_mcan_v1_mcan_v1_template0";
mcan1.child             = mcan_v1_template1;
mcan2.child             = mcan_v1_template1;
mcan3.child             = mcan_v1_template1;

mcspi1.$name                   = "PMIC_EEPROM_SPI";
mcspi1.pinMode                 = 3;
mcspi1.SPI.$assign             = "SPI4";
mcspi1.SPI.CLK.$assign         = "EQEP0_A";
mcspi1.SPI.D0.$assign          = "EQEP0_STROBE";
mcspi1.SPI.D1.$assign          = "EQEP0_INDEX";
mcspi1.mcspiChannel[0].$name   = "CONFIG_MCSPI_CH0";
mcspi1.mcspiChannel[0].bitRate = 4000000;
mcspi1.child.$name             = "drivers_mcspi_v1_mcspi_v1_template0";

mcspi2.$name                       = "PYRO_SPI";
mcspi2.advanced                    = true;
mcspi2.pinMode                     = 3;
mcspi2.SPI.$assign                 = "SPI1";
mcspi2.SPI.CLK.$assign             = "SPI1_CLK";
mcspi2.SPI.D0.$assign              = "SPI1_D0";
mcspi2.SPI.D1.$assign              = "SPI1_D1";
mcspi2.mcspiChannel[0].$name       = "CONFIG_MCSPI_CH2";
mcspi2.mcspiChannel[0].frameFormat = "POL0_PHA1";
mcspi2.mcspiChannel[0].advanced    = true;
mcspi2.mcspiChannel[0].bitRate     = 7000000;
mcspi2.child.$name                 = "drivers_mcspi_v1_mcspi_v1_template2";

mcspi3.$name                       = "H2P_SPI";
mcspi3.pinMode                     = 3;
mcspi3.SPI.$assign                 = "SPI2";
mcspi3.SPI.CLK.$assign             = "LIN1_TXD";
mcspi3.SPI.D0.$assign              = "LIN2_RXD";
mcspi3.SPI.D1.$assign              = "LIN2_TXD";
mcspi3.mcspiChannel[0].$name       = "CONFIG_MCSPI_CH1";
mcspi3.mcspiChannel[0].advanced    = true;
mcspi3.mcspiChannel[0].frameFormat = "POL0_PHA1";
mcspi3.child.$name                 = "drivers_mcspi_v1_mcspi_v1_template1";

const soc_ctrl_adc    = scripting.addModule("/drivers/soc_ctrl/v0/subModules/soc_ctrl_adc", {}, false);
const soc_ctrl_adc1   = soc_ctrl_adc.addInstance({}, false);
soc_ctrl_adc1.$name   = "soc_ctrl_adc0";
adc.ADCreferences     = soc_ctrl_adc1;
const soc_ctrl        = scripting.addModule("/drivers/soc_ctrl/soc_ctrl", {}, false);
soc_ctrl.soc_ctrl_adc = soc_ctrl_adc1;

const soc_ctrl_cmpss    = scripting.addModule("/drivers/soc_ctrl/v0/subModules/soc_ctrl_cmpss", {}, false);
const soc_ctrl_cmpss1   = soc_ctrl_cmpss.addInstance({}, false);
soc_ctrl_cmpss1.$name   = "soc_ctrl_cmpss0";
soc_ctrl.soc_ctrl_cmpss = soc_ctrl_cmpss1;

const soc_ctrl_epwm    = scripting.addModule("/drivers/soc_ctrl/v0/subModules/soc_ctrl_epwm", {}, false);
const soc_ctrl_epwm1   = soc_ctrl_epwm.addInstance({}, false);
soc_ctrl_epwm1.$name   = "soc_ctrl_epwm0";
soc_ctrl.soc_ctrl_epwm = soc_ctrl_epwm1;
epwm.epwmTbClkSync     = soc_ctrl_epwm1;

const soc_ctrl_sdfm    = scripting.addModule("/drivers/soc_ctrl/v0/subModules/soc_ctrl_sdfm", {}, false);
const soc_ctrl_sdfm1   = soc_ctrl_sdfm.addInstance({}, false);
soc_ctrl_sdfm1.$name   = "soc_ctrl_sdfm0";
soc_ctrl.soc_ctrl_sdfm = soc_ctrl_sdfm1;

uart1.writeCallbackFxn          = "appUart1TxCallback";
uart1.readCallbackFxn           = "appUart1RxCallback";
uart1.$name                     = "LOG_UART";
uart1.intrEnable                = "DMA";
uart1.UART.$assign              = "UART1";
uart1.UART.RXD.$assign          = "UART1_RXD";
uart1.UART.TXD.$assign          = "UART1_TXD";
uart1.child.$name               = "drivers_uart_v2_uart_v2_template1";
uart1.uartRxConfigXbar.$name    = "CONFIG_DMA_TRIG_XBAR0";
uart1.uartRxConfigXbar.instance = "DMA_TRIG_XBAR_EDMA_MODULE_1";
uart1.uartTxConfigXbar.$name    = "CONFIG_DMA_TRIG_XBAR1";
uart1.uartTxConfigXbar.instance = "DMA_TRIG_XBAR_EDMA_MODULE_2";

edma1.$name                        = "CONFIG_EDMA0";
mcspi1.edmaDriver                  = edma1;
mcspi2.edmaDriver                  = edma1;
mcspi3.edmaDriver                  = edma1;
flash1.peripheralDriver.edmaConfig = edma1;
uart1.edmaDriver                   = edma1;
edma1.regionId                     = 1;
edma1.queNum                       = 1;
edma1.edmaRmDmaCh[0].$name         = "CONFIG_EDMA_RM0";
edma1.edmaRmQdmaCh[0].$name        = "CONFIG_EDMA_RM1";
edma1.edmaRmTcc[0].$name           = "CONFIG_EDMA_RM2";
edma1.edmaRmParam[0].$name         = "CONFIG_EDMA_RM3";

uart2.$name            = "AFE_UART";
uart2.rxTrigLvl        = "1";
uart2.txTrigLvl        = "1";
uart2.readMode         = "CALLBACK";
uart2.writeMode        = "CALLBACK";
uart2.readCallbackFxn  = "appUart2RxCallback";
uart2.writeCallbackFxn = "appUart2TxCallback";
uart2.baudRate         = 1000000;
uart2.inputClkFreq     = 96000000;
uart2.UART.$assign     = "UART2";
uart2.UART.RXD.$assign = "MMC_DAT0";
uart2.UART.TXD.$assign = "MMC_DAT2";
uart2.child.$name      = "drivers_uart_v2_uart_v2_template2";

debug_log.enableUartLog            = true;
debug_log.enableSharedMemLog       = true;
debug_log.enableSharedMemLogReader = true;
debug_log.uartLog.rxTrigLvl        = "1";
debug_log.uartLog.readMode         = "CALLBACK";
debug_log.uartLog.readCallbackFxn  = "appUart0RxCallback";
debug_log.uartLog.writeMode        = "CALLBACK";
debug_log.uartLog.writeCallbackFxn = "appUart0TxCallback";
debug_log.uartLog.txTrigLvl        = "1";
debug_log.uartLog.$name            = "CONSOLE_UART_JTAG_USB";
debug_log.uartLog.UART.$assign     = "UART0";
debug_log.uartLog.UART.RXD.$assign = "UART0_RXD";
debug_log.uartLog.UART.TXD.$assign = "UART0_TXD";
debug_log.uartLog.child.$name      = "drivers_uart_v2_uart_v2_template0";

mpu_armv71.$name             = "CONFIG_MPU_REGION0";
mpu_armv71.size              = 31;
mpu_armv71.attributes        = "Device";
mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
mpu_armv71.allowExecute      = false;

mpu_armv72.$name             = "CONFIG_MPU_REGION1";
mpu_armv72.size              = 15;
mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";

mpu_armv73.$name             = "CONFIG_MPU_REGION2";
mpu_armv73.baseAddr          = 0x80000;
mpu_armv73.size              = 15;
mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";

mpu_armv74.$name             = "CONFIG_MPU_REGION3";
mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
mpu_armv74.baseAddr          = 0x70000000;
mpu_armv74.size              = 21;

timer1.$name         = "AFE_BREAK_SIGNAL_TIMER";
timer1.timerCallback = "afeBreakSignalISR";
timer1.RTI.$assign   = "RTI1";

default_linker1.$name = "memory_configurator_default_linker0";

general1.$name        = "CONFIG_GENERAL0";
general1.linker.$name = "TIARMCLANG0";

region1.$name                                = "MEMORY_REGION_CONFIGURATION0";
region1.memory_region.create(11);
region1.memory_region[0].type                = "TCMA";
region1.memory_region[0].$name               = "R5F_VECS";
region1.memory_region[0].size                = 0x40;
region1.memory_region[0].auto                = false;
region1.memory_region[1].type                = "TCMA";
region1.memory_region[1].$name               = "R5F_TCMA";
region1.memory_region[1].size                = 0x7FC0;
region1.memory_region[2].type                = "TCMB";
region1.memory_region[2].size                = 0x8000;
region1.memory_region[2].$name               = "R5F_TCMB";
region1.memory_region[3].$name               = "SBL";
region1.memory_region[3].auto                = false;
region1.memory_region[3].size                = 0x40000;
region1.memory_region[4].$name               = "OCRAM";
region1.memory_region[4].auto                = false;
region1.memory_region[4].manualStartAddress  = 0x70040000;
region1.memory_region[4].size                = 0x100000;
region1.memory_region[5].type                = "FLASH";
region1.memory_region[5].auto                = false;
region1.memory_region[5].size                = 0x80000;
region1.memory_region[5].$name               = "FLASH";
region1.memory_region[6].$name               = "USER_SHM_MEM";
region1.memory_region[6].auto                = false;
region1.memory_region[6].size                = 0x4000;
region1.memory_region[6].isShared            = true;
region1.memory_region[6].shared_cores        = ["r5fss0-1","r5fss1-0","r5fss1-1"];
region1.memory_region[6].manualStartAddress  = 0x701D0000;
region1.memory_region[7].$name               = "LOG_SHM_MEM";
region1.memory_region[7].auto                = false;
region1.memory_region[7].size                = 0x4000;
region1.memory_region[7].isShared            = true;
region1.memory_region[7].shared_cores        = ["r5fss0-1","r5fss1-0","r5fss1-1"];
region1.memory_region[7].manualStartAddress  = 0x701D4000;
region1.memory_region[8].type                = "CUSTOM";
region1.memory_region[8].$name               = "RTOS_NORTOS_IPC_SHM_MEM";
region1.memory_region[8].auto                = false;
region1.memory_region[8].manualStartAddress  = 0x72000000;
region1.memory_region[8].size                = 0x3E80;
region1.memory_region[8].isShared            = true;
region1.memory_region[8].shared_cores        = ["r5fss0-1","r5fss1-0","r5fss1-1"];
region1.memory_region[9].type                = "CUSTOM";
region1.memory_region[9].$name               = "MAILBOX_HSM";
region1.memory_region[9].auto                = false;
region1.memory_region[9].manualStartAddress  = 0x44000000;
region1.memory_region[9].size                = 0x3CE;
region1.memory_region[9].isShared            = true;
region1.memory_region[9].shared_cores        = ["r5fss0-1","r5fss1-0","r5fss1-1"];
region1.memory_region[10].type               = "CUSTOM";
region1.memory_region[10].$name              = "MAILBOX_R5F";
region1.memory_region[10].auto               = false;
region1.memory_region[10].manualStartAddress = 0x44000400;
region1.memory_region[10].size               = 0x3CE;
region1.memory_region[10].isShared           = true;
region1.memory_region[10].shared_cores       = ["r5fss0-1","r5fss1-0","r5fss1-1"];

section1.load_memory                  = "R5F_VECS";
section1.group                        = false;
section1.$name                        = "Vector Table";
section1.output_section.create(1);
section1.output_section[0].$name      = ".vectors";
section1.output_section[0].palignment = true;

section2.load_memory                  = "OCRAM";
section2.$name                        = "Text Segments";
section2.output_section.create(5);
section2.output_section[0].$name      = ".text.hwi";
section2.output_section[0].palignment = true;
section2.output_section[1].$name      = ".text.cache";
section2.output_section[1].palignment = true;
section2.output_section[2].$name      = ".text.mpu";
section2.output_section[2].palignment = true;
section2.output_section[3].$name      = ".text.boot";
section2.output_section[3].palignment = true;
section2.output_section[4].$name      = ".text:abort";
section2.output_section[4].palignment = true;

section3.load_memory                  = "OCRAM";
section3.$name                        = "Code and Read-Only Data";
section3.output_section.create(2);
section3.output_section[0].$name      = ".text";
section3.output_section[0].palignment = true;
section3.output_section[1].$name      = ".rodata";
section3.output_section[1].palignment = true;

section4.load_memory                  = "OCRAM";
section4.$name                        = "Data Segment";
section4.output_section.create(1);
section4.output_section[0].$name      = ".data";
section4.output_section[0].palignment = true;

section5.load_memory                             = "OCRAM";
section5.$name                                   = "Memory Segments";
section5.output_section.create(3);
section5.output_section[0].$name                 = ".bss";
section5.output_section[0].output_sections_start = "__BSS_START";
section5.output_section[0].output_sections_end   = "__BSS_END";
section5.output_section[0].palignment            = true;
section5.output_section[1].$name                 = ".sysmem";
section5.output_section[1].palignment            = true;
section5.output_section[2].$name                 = ".stack";
section5.output_section[2].palignment            = true;

section6.load_memory                              = "OCRAM";
section6.$name                                    = "Stack Segments";
section6.output_section.create(5);
section6.output_section[0].$name                  = ".irqstack";
section6.output_section[0].output_sections_start  = "__IRQ_STACK_START";
section6.output_section[0].output_sections_end    = "__IRQ_STACK_END";
section6.output_section[0].input_section.create(1);
section6.output_section[0].input_section[0].$name = ". = . + __IRQ_STACK_SIZE;";
section6.output_section[1].$name                  = ".fiqstack";
section6.output_section[1].output_sections_start  = "__FIQ_STACK_START";
section6.output_section[1].output_sections_end    = "__FIQ_STACK_END";
section6.output_section[1].input_section.create(1);
section6.output_section[1].input_section[0].$name = ". = . + __FIQ_STACK_SIZE;";
section6.output_section[2].$name                  = ".svcstack";
section6.output_section[2].output_sections_start  = "__SVC_STACK_START";
section6.output_section[2].output_sections_end    = "__SVC_STACK_END";
section6.output_section[2].input_section.create(1);
section6.output_section[2].input_section[0].$name = ". = . + __SVC_STACK_SIZE;";
section6.output_section[3].$name                  = ".abortstack";
section6.output_section[3].output_sections_start  = "__ABORT_STACK_START";
section6.output_section[3].output_sections_end    = "__ABORT_STACK_END";
section6.output_section[3].input_section.create(1);
section6.output_section[3].input_section[0].$name = ". = . + __ABORT_STACK_SIZE;";
section6.output_section[4].$name                  = ".undefinedstack";
section6.output_section[4].output_sections_start  = "__UNDEFINED_STACK_START";
section6.output_section[4].output_sections_end    = "__UNDEFINED_STACK_END";
section6.output_section[4].input_section.create(1);
section6.output_section[4].input_section[0].$name = ". = . + __UNDEFINED_STACK_SIZE;";

section7.load_memory                  = "OCRAM";
section7.$name                        = "Initialization and Exception Handling";
section7.output_section.create(3);
section7.output_section[0].$name      = ".ARM.exidx";
section7.output_section[0].palignment = true;
section7.output_section[1].$name      = ".init_array";
section7.output_section[1].palignment = true;
section7.output_section[2].$name      = ".fini_array";
section7.output_section[2].palignment = true;

section8.load_memory                 = "USER_SHM_MEM";
section8.type                        = "NOLOAD";
section8.$name                       = "User Shared Memory";
section8.group                       = false;
section8.output_section.create(1);
section8.output_section[0].$name     = ".bss.user_shared_mem";
section8.output_section[0].alignment = 0;

section9.load_memory                 = "LOG_SHM_MEM";
section9.$name                       = "Log Shared Memory";
section9.group                       = false;
section9.type                        = "NOLOAD";
section9.output_section.create(1);
section9.output_section[0].$name     = ".bss.log_shared_mem";
section9.output_section[0].alignment = 0;

section10.load_memory                 = "RTOS_NORTOS_IPC_SHM_MEM";
section10.type                        = "NOLOAD";
section10.$name                       = "IPC Shared Memory";
section10.group                       = false;
section10.output_section.create(1);
section10.output_section[0].$name     = ".bss.ipc_vring_mem";
section10.output_section[0].alignment = 0;

section11.load_memory                 = "MAILBOX_HSM";
section11.type                        = "NOLOAD";
section11.$name                       = "SIPC HSM Queue Memory";
section11.group                       = false;
section11.output_section.create(1);
section11.output_section[0].$name     = ".bss.sipc_hsm_queue_mem";
section11.output_section[0].alignment = 0;

section12.load_memory                 = "MAILBOX_R5F";
section12.$name                       = "SIPC R5F Queue Memory";
section12.group                       = false;
section12.type                        = "NOLOAD";
section12.output_section.create(1);
section12.output_section[0].alignment = 0;
section12.output_section[0].$name     = ".bss.sipc_secure_host_queue_mem";

gpio_int_xbar1.instance   = "GPIO_INT_XBAR_VIM_MODULE0_0";
gpio_int_xbar1.$name      = "PDD_FLT_INT_XBAR";
gpio_int_xbar1.xbarOutput = "GPIO_INT_XBAR_GPIO_MUX_86";

input_xbar1.$name      = "HVILS_01_XBAR";
input_xbar1.xbarOutput = "GPIO94";

input_xbar2.instance   = "INPUT_XBAR_1";
input_xbar2.$name      = "HVILS_02_XBAR";
input_xbar2.xbarOutput = "GPIO95";

input_xbar3.instance   = "INPUT_XBAR_2";
input_xbar3.$name      = "HVILS_03_XBAR";
input_xbar3.xbarOutput = "GPIO96";

input_xbar4.instance   = "INPUT_XBAR_3";
input_xbar4.$name      = "HVILS_04_XBAR";
input_xbar4.xbarOutput = "GPIO92";

input_xbar5.$name      = "HCILS_05_XBAR";
input_xbar5.instance   = "INPUT_XBAR_4";
input_xbar5.xbarOutput = "GPIO87";

input_xbar6.$name      = "HVILS_06_XBAR";
input_xbar6.instance   = "INPUT_XBAR_5";
input_xbar6.xbarOutput = "GPIO91";

input_xbar7.$name      = "HVILS_07_XBAR";
input_xbar7.instance   = "INPUT_XBAR_6";
input_xbar7.xbarOutput = "GPIO90";

input_xbar8.$name      = "HVILS_08_XBAR";
input_xbar8.instance   = "INPUT_XBAR_7";
input_xbar8.xbarOutput = "GPIO88";

input_xbar9.$name      = "HVILS_09_XBAR";
input_xbar9.instance   = "INPUT_XBAR_8";
input_xbar9.xbarOutput = "GPIO89";

input_xbar10.$name      = "HVILS_10_XBAR";
input_xbar10.instance   = "INPUT_XBAR_9";
input_xbar10.xbarOutput = "GPIO99";

input_xbar11.$name      = "CRASH_IN_XBAR";
input_xbar11.instance   = "INPUT_XBAR_10";
input_xbar11.xbarOutput = "GPIO93";

int_xbar1.instance   = "INT_XBAR_2";
int_xbar1.$name      = "VSUPPLIES_EOC_INTXBAR";
int_xbar1.xbarOutput = ["ADC3_INT1","ADC3_INT2","ADC3_INT3","ADC3_INT4"];

int_xbar2.instance   = "INT_XBAR_3";
int_xbar2.$name      = "VSUPPLIES_EVT_INTXBAR";
int_xbar2.xbarOutput = ["ADC3_EVTINT"];

int_xbar3.$name      = "SENSORS_EOC_INTBAR";
int_xbar3.instance   = "INT_XBAR_4";
int_xbar3.xbarOutput = ["ADC4_INT1","ADC4_INT2","ADC4_INT3","ADC4_INT4"];

int_xbar4.$name      = "SENSORS_EVT_INTXBAR";
int_xbar4.instance   = "INT_XBAR_5";
int_xbar4.xbarOutput = ["ADC4_EVTINT"];

int_xbar5.instance   = "INT_XBAR_6";
int_xbar5.$name      = "HVILS_01_02_INT_XBAR";
int_xbar5.xbarOutput = ["ECAP0_INT"];

int_xbar6.$name      = "HVILS_03_04_INT_XBAR";
int_xbar6.instance   = "INT_XBAR_7";
int_xbar6.xbarOutput = ["ECAP1_INT"];

int_xbar7.$name      = "HVILS_05_06_INT_XBAR";
int_xbar7.xbarOutput = ["ECAP2_INT"];
int_xbar7.instance   = "INT_XBAR_8";

int_xbar8.$name      = "HVILS_07_08_INT_XBAR";
int_xbar8.xbarOutput = ["ECAP3_INT"];
int_xbar8.instance   = "INT_XBAR_9";

int_xbar9.$name      = "HVILS_09_10_INT_XBAR";
int_xbar9.xbarOutput = ["ECAP4_INT"];
int_xbar9.instance   = "INT_XBAR_10";

int_xbar10.$name      = "CRASH_IN_INT_XBAR";
int_xbar10.xbarOutput = ["ECAP5_INT"];
int_xbar10.instance   = "INT_XBAR_11";

/**
 * 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.
 */
flash1.peripheralDriver.QSPI.$suggestSolution           = "QSPI";
flash1.peripheralDriver.QSPI.QSPI_D0.$suggestSolution   = "QSPI_D0";
flash1.peripheralDriver.QSPI.QSPI_D1.$suggestSolution   = "QSPI_D1";
flash1.peripheralDriver.QSPI.QSPI_D2.$suggestSolution   = "QSPI_D2";
flash1.peripheralDriver.QSPI.QSPI_D3.$suggestSolution   = "QSPI_D3";
flash1.peripheralDriver.QSPI.QSPI_CLK.$suggestSolution  = "QSPI_CLK";
flash1.peripheralDriver.QSPI.QSPI_CSn0.$suggestSolution = "QSPI_CSn0";