This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/PROCESSOR-SDK-AM437X: QSPI flash writer build issue

Part Number: PROCESSOR-SDK-AM437X
Other Parts Discussed in Thread: MATHLIB,

Tool/software: TI-RTOS

Hi,

I´ve got errors when compiling qspi_app_flash_writer example.

I´ve opened a command prompt window at 'c:\ti\pdk_am437x_1_0_10\packages', run 'pdksetupenv.bat', changed dir to 'ti\starterware' and run 'gmake qspi_app_flash_writer' and got the following:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

c:\ti\pdk_am437x_1_0_10\packages>pdksetupenv
**************************************************************************
Environment Configuration:
    LIMIT_SOCS                : am437x
    LIMIT_BOARDS              : evmAM437x idkAM437x skAM437x
    PDK_INSTALL_PATH          : /ti/PDK_AM~1/packages
    IMGLIB_INSTALL_PATH       : C:/ti/imglib_c66x_3_1_1_0
    DSPLIB_INSTALL_PATH       : C:/ti/dsplib_c66x_3_4_0_0
    MATHLIB_INSTALL_PATH      : C:/ti/mathlib_c66x_3_1_1_0
    XDC_INSTALL_PATH          : C:/ti/xdctools_3_50_03_33_core

c:\ti\pdk_am437x_1_0_10\packages>cd ti\starterware

c:\ti\pdk_am437x_1_0_10\packages\ti\starterware>gmake qspi_app_flash_writer
gmake -C c:/ti/pdk_am437x_1_0_10/packages/ti/starterware/examples/qspi/flash_writer
gmake[1]: Entering directory `c:/ti/pdk_am437x_1_0_10/packages/ti/starterware/examples/qspi/flash_writer'
/mkdir -p c:/ti/pdk_am437x_1_0_10/packages/ti/starterware/binary/qspi_app_flash_writer/obj/am43xx-evm/a9host/debug/gcc
process_begin: CreateProcess(NULL, /mkdir -p c:/ti/pdk_am437x_1_0_10/packages/ti/starterware/binary/qspi_app_flash_writer/obj/am43xx-evm/a9host/debug/gcc, ...) failed.
make (e=2): The system cannot find the file specified.
gmake[1]: *** [c:/ti/pdk_am437x_1_0_10/packages/ti/starterware/binary/qspi_app_flash_writer/obj/am43xx-evm/a9host/debug/gcc] Error 2
gmake[1]: Leaving directory `c:/ti/pdk_am437x_1_0_10/packages/ti/starterware/examples/qspi/flash_writer'
gmake: *** [qspi_app_flash_writer] Error 2

I am using 'ti-processor-sdk-rtos-am437x-evm-04.03.00.05-Windows-x86' on a Windows 7. I´ve never had problems to build qspi_app_flash_writer example with version 04.00.00.04 on the same machine.

regards,

Marcio.

  • Part Number: PROCESSOR-SDK-AM437X

    Tool/software: TI-RTOS

    Hi,

    I´ve opened a command prompt window at 'c:\ti\pdk_am437x_1_0_10\packages', run 'pdksetupenv.bat' and then run 'gmake LIMIT_BOARDS="skAM437x" LIMIT_SOCS="am437x"', but the build stops with the following error:

    gmake -C ./ti/starterware vpfe_app_capture_display PROFILE=debug PLATFORM=am43xx-evm -s KW_BUILD=no
    # Making am43xx-evm:a9host:debug:example_utils...
    # Making am43xx-evm:a9host:debug:board...
    # Making am43xx-evm:a9host:debug:utils...
    # Making am43xx-evm:a9host:debug:soc...
    # Making am43xx-evm:a9host:debug:dal...
    # Making am43xx-evm:a9host:debug:device...
    # Compiling am43xx-evm:a9host:debug:vpfe_app_capture_display: ../vpfe_app.c
    # Compiling am43xx-evm:a9host:debug:vpfe_app_capture_display: capture_display_app_main.c
    # Linking into c:/ti/pdk_am437x_1_0_10/packages/ti/starterware/binary/vpfe_app_capture_display/bin/am43xx-evm/gcc/vpfe_app_capture_display_a9host_debug.out...
    #
    c:/ti/pdk_am437x_1_0_10/packages/ti/starterware/binary/device/lib/am43xx-evm/a9/ debug/gcc\libdevice.a(camera_device.o): In function `CAMERADeviceInit':
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\device/camera_device.c:276: undefined reference to `I2CUTILSINITPARAMS_DEFAULT'
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\device/camera_device.c:276: undefined reference to `I2CUTILSINITPARAMS_DEFAULT'
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\device/camera_device.c:278: undefined reference to `I2CUtilsInit'
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\device/camera_device.c:278: undefined reference to `I2CUtilsInit'
    c:/ti/pdk_am437x_1_0_10/packages/ti/starterware/binary/device/lib/am43xx-evm/a9/debug/gcc\libdevice.a(camera_device.o): In function `CAMERARead':
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\device/camera_device.c:426: undefined reference to `I2CUtilsRead'
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\device/camera_device.c:426: undefined reference to `I2CUtilsRead'
    c:/ti/pdk_am437x_1_0_10/packages/ti/starterware/binary/device/lib/am43xx-evm/a9/debug/gcc\libdevice.a(camera_device.o): In function `CAMERAWrite':
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\device/camera_device.c:456: undefined reference to `I2CUtilsWrite'
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\device/camera_device.c:456: undefined reference to `I2CUtilsWrite'
    collect2.exe: error: ld returned 1 exit status
    gmake[2]: *** [c:/ti/pdk_am437x_1_0_10/packages/ti/starterware/binary/vpfe_app_capture_display/bin/am43xx-evm/gcc/vpfe_app_capture_display_a9host_debug.out] Error 1
    gmake[1]: *** [vpfe_app_capture_display] Error 2
    gmake: *** [starterware_apps] Error 2


    I am using 'ti-processor-sdk-rtos-am437x-evm-04.03.00.05-Windows-x86' under Windows 7.

    regards,
    Marcio.

  • Marcio,

    This is a known issue for this release and has been indicated in the Release Notes under PRSDK-3856:
    software-dl.ti.com/.../Release_Specific.html

    The SDK migrated from using global environment setup using pdksetupenv.bat to using build\Rules.make file in this release. This seems to have broken the build for individual components when invoked from the starterware folder. The workaround is to use top level make file at pdk_am437x_x_x_xx\packages level and invoke starterware build using :

    cd pdk_am437x_x_x_xx\packages
    gmake starterware_apps

    Hope this resolves your issue.

    Regards,
    Rahul
  • Hi Rahul,

    Unfortunately 'gmake starterware_apps' did not work.

    The build stops with the same error pointed out in this thread e2e.ti.com/.../687964

    regards,
    Marcio.
  • Marcio,

    I recommend that you only open one E2E post for related issues so they can be addressed together.

    I have tried this using the Processor sDK RTOS 4.3 release for AM335x and had no issues building it from the top level.  I also checked to confirm that the regression tests were able to build this for the AM437x . Can you please indicate if by any chance you had cleaned your environment or modified any of the build files?

    I am installing the AM437x version to check this out on my windows machine and will get back to you with the logs. The error that you are reporting shouldn`t occur if utils have been build as those symbols are part of the starterware utils library.

    In the meantime, there are couple of other things that you can try :

    Shorter debug step: Update  Line 201-210 as follows to prevent vpfe app, display and capture apps from building and retry the build.

    #$(MAKE) -C ./ti/starterware vpfe_app_capture_display PROFILE=debug PLATFORM=$(STARTERWARE_PLATFORM) -s KW_BUILD=no
    #$(MAKE) -C ./ti/starterware vpfe_app_capture_display PROFILE=release PLATFORM=$(STARTERWARE_PLATFORM) -s KW_BUILD=no
    #$(MAKE) -C ./ti/starterware cap_tsc_app PROFILE=debug PLATFORM=$(STARTERWARE_PLATFORM) -s KW_BUILD=no
    #$(MAKE) -C ./ti/starterware cap_tsc_app PROFILE=release PLATFORM=$(STARTERWARE_PLATFORM) -s KW_BUILD=no
    #$(MAKE) -C ./ti/starterware dss_app_raster PROFILE=debug PLATFORM=$(STARTERWARE_PLATFORM) -s KW_BUILD=no
    #$(MAKE) -C ./ti/starterware dss_app_raster PROFILE=release PLATFORM=$(STARTERWARE_PLATFORM) -s KW_BUILD=no
    $(MAKE) -C ./ti/starterware qspi_app_flash_writer PROFILE=debug PLATFORM=$(STARTERWARE_PLATFORM) -s KW_BUILD=no
    $(MAKE) -C ./ti/starterware qspi_app_flash_writer PROFILE=release PLATFORM=$(STARTERWARE_PLATFORM) -s KW_BUILD=no
    $(MAKE) -C ./ti/starterware qspi_app_read_write PROFILE=debug PLATFORM=$(STARTERWARE_PLATFORM) -s KW_BUILD=no
    $(MAKE) -C ./ti/starterware qspi_app_read_write PROFILE=release PLATFORM=$(STARTERWARE_PLATFORM) -s KW_BUILD=no

    Longer build step:  Invoke the full starterware build

    Use "gmake starterware" instead of "gmake starterware_apps"  

    this will take longer as it will rebuild all starterware libraries, bootloader and apps.

    Regards,

    Rahul

  • Hi Raul,
    I have not modified the build files.

    I have cleaned the environment using gmake clean.


    I´ve modified the following files, mainly to adapt the the sk evm to our board:

    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\board\am43xx\board_am43xx.c
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\board\am43xx\am43xx_evmsk_pinmux_data.c
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\bootloader\src\sbl_main.c
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\bootloader\src\sbl_mmcsd.c
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\bootloader\src\sbl_qspi.c
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\bootloader\src\am43xx\sbl_am43xx_platform.c
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\examples\qspi\flash_writer\flash_writer_app_main.c
    c:\ti\pdk_am437x_1_0_10\packages\ti\board\src\skAM437x\skAM437x.c
    c:\ti\pdk_am437x_1_0_10\packages\ti\board\src\skAM437x\skAM437x_lld_init.c
    c:\ti\pdk_am437x_1_0_10\packages\ti\board\src\skAM437x\skAM437x_pinmux.c
    c:\ti\pdk_am437x_1_0_10\packages\ti\board\src\skAM437x\device\enet_phy.c
    c:\ti\pdk_am437x_1_0_10\packages\ti\board\src\skAM437x\include\board_cfg.h
    c:\ti\pdk_am437x_1_0_10\packages\ti\fs\fatfs\ffconf.h
    c:\ti\pdk_am437x_1_0_10\packages\ti\fs\fatfs\src\diskio.c

    If you meant changes lines 201-210 in 'c:\ti\pdk_am437x_1_0_10\packages\makefile'. They were already like you suggested, that is everything NO.

    regards,
    Marcio

  • Marcio,

    I have installed the AM437x and have verified that the qspi writer builds fine from the top level. I have attached the build log for your reference:

    # C:/ti/AM437x_PRSDK43/pdk_am437x_1_0_10/packages/ti/starterware/binary/qspi_app_read_write/bin/am43xx-evm/gcc/qspi_app_read_write_a9host_debug_ti.bin created.
    #
    gmake -C ./ti/starterware qspi_app_read_write PROFILE=release PLATFORM=am43xx-evm -s KW_BUILD=no
    # Making am43xx-evm:a9host:release:example_utils...
    # Making am43xx-evm:a9host:release:qspi_lib...
    # Making am43xx-evm:a9host:release:board...
    # Making am43xx-evm:a9host:release:utils...
    # Making am43xx-evm:a9host:release:soc...
    # Making am43xx-evm:a9host:release:dal...
    # Making am43xx-evm:a9host:release:device...
    # Compiling am43xx-evm:a9host:release:qspi_app_read_write: ../qspi_app.c
    # Compiling am43xx-evm:a9host:release:qspi_app_read_write: read_write_app_main.c
    # Linking into C:/ti/AM437x_PRSDK43/pdk_am437x_1_0_10/packages/ti/starterware/binary/qspi_app_read_write/bin/am43xx-evm/gcc/qspi_app_read_write_a9host_release.out...
    #
    # C:/ti/AM437x_PRSDK43/pdk_am437x_1_0_10/packages/ti/starterware/binary/qspi_app_read_write/bin/am43xx-evm/gcc/qspi_app_read_write_a9host_release.out created.
    #
    # Generating C:/ti/AM437x_PRSDK43/pdk_am437x_1_0_10/packages/ti/starterware/binary/qspi_app_read_write/bin/am43xx-evm/gcc/qspi_app_read_write_a9host_release.bin...
    # C:/ti/AM437x_PRSDK43/pdk_am437x_1_0_10/packages/ti/starterware/binary/qspi_app_read_write/bin/am43xx-evm/gcc/qspi_app_read_write_a9host_release.bin created.
    #
    # Generating C:/ti/AM437x_PRSDK43/pdk_am437x_1_0_10/packages/ti/starterware/binary/qspi_app_read_write/bin/am43xx-evm/gcc/qspi_app_read_write_a9host_release_ti.bin...
    
    # C:/ti/AM437x_PRSDK43/pdk_am437x_1_0_10/packages/ti/starterware/binary/qspi_app_read_write/bin/am43xx-evm/gcc/qspi_app_read_write_a9host_release_ti.bin created.
    #

    This makes me believe that you might be missing linking to the utils library that brings in the I2C functions which are reported in your build error. 

    Also, if your top level makefile was modified as I recommended then why is the build still building the vpfe and dss examples. The linking error that you reported is coming from the vpfe_app_capture_display and not from the qspi_app_flash_writer. So ensure that you have commented out those apps.

    Regards,

    Rahul

  • Rahul
    I rename the c:\ti folder and installed again CCS and PDK.

    I ran 'gmake' on  'c:\ti\pdk_am437x_1_0_10\packages\' and got no build errors.

    Then I started to replace pdk files by my files, module by module.

    I replaced these files and got no errors again.
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\bootloader\src\sbl_main.c
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\bootloader\src\sbl_mmcsd.c
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\bootloader\src\sbl_qspi.c
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\bootloader\src\am43xx\sbl_am43xx_platform.c
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\examples\qspi\flash_writer\flash_writer_app_main.c

    When I replaced these files, the build error appeared again. The files are attached.
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\board\am43xx\board_am43xx.c
    c:\ti\pdk_am437x_1_0_10\packages\ti\starterware\board\am43xx\am43xx_evmsk_pinmux_data.c

    I moved back the original files taking care of changing the files date to force recompilation, and the build error did NOT desapeard.

    I double checked. It is very weird.

    regards,

    /**
     * \file   board_am43xx.c
     *
     * \brief  This file contains the implementation of board information for
     *         AM43xx based boards.
     *
     * \copyright Copyright (C) 2013-2017 Texas Instruments Incorporated -
     *             http://www.ti.com/
     */
    
    /*
     *  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 Files                                  */
    /* ========================================================================== */
    
    #include "types.h"
    #include "stdlib.h"
    #include "string.h"
    #include "error.h"
    #include "debug.h"
    #include "board.h"
    #include "platform.h"
    #include "device.h"
    #include "chipdb.h"
    #include "board_priv.h"
    #include "console_utils.h"
    #include "i2c_utils.h"
    #include "board_am43xx.h"
    #include "am43xx_gpevm.h"
    #include "am43xx_evmsk.h"
    #include "am43xx_idkevm.h"
    #include "am43xx_eposevm.h"
    #include "am43xx_custom.h"
    
    // MB: 2018-05-07: Changed code to fit CED2
    #define _CED2_
    
    /* ========================================================================== */
    /*                           Macros & Typedefs                                */
    /* ========================================================================== */
    
    /** \brief Size of EEPROM header in bytes on AM43xx. */
    #define BOARD_EEPROM_HEADER_SIZE        (4U)
    /** \brief Size of EEPROM data for board name in bytes on AM43xx. */
    #define BOARD_EEPROM_BOARD_NAME_SIZE    (8U)
    /** \brief Size of EEPROM data for version in bytes on AM43xx. */
    #define BOARD_EEPROM_VERSION_SIZE       (5U)
    /** \brief Size of EEPROM data for serial number in bytes on AM43xx. */
    #define BOARD_EEPROM_SERIAL_NUMBER_SIZE (12U)
    
    /** \brief EEPROM offset containing the board information. */
    #define BOARD_DATA_EEPROM_OFFSET        (0x00)
    
    /**
     * \brief Size to compare for board version for AM43xx. This is to ensure that,
     * for example, 1.1X matches correctly when X may be any value.
     */
    #define BOARD_AM43XX_VERSION_CMP_SIZE   (0x3U) /* String compare size */
    
    /** \brief Timeout value for I2C operations set to 1000 ms. */
    #define BOARD_I2C_TIMEOUT_VAL           (1000U)
    
    
    /* ========================================================================== */
    /*                         Structure Declarations                             */
    /* ========================================================================== */
    
    /** \brief Board EEPROM data structure. */
    typedef struct boardDataEeprom
    {
        uint8_t header[BOARD_EEPROM_HEADER_SIZE];
        /**< EEPROM header. */
        uint8_t boardName[BOARD_EEPROM_BOARD_NAME_SIZE];
        /**< Board name. */
        uint8_t version[BOARD_EEPROM_VERSION_SIZE];
        /**< Board version. Includes board ID information. */
        uint8_t serialNumber[BOARD_EEPROM_SERIAL_NUMBER_SIZE];
        /**< Serial number information. */
    } boardDataEeprom_t;
    
    
    /* ========================================================================== */
    /*                          Function Declarations                             */
    /* ========================================================================== */
    
    /* None */
    
    
    /* ========================================================================== */
    /*                            Global Variables                                */
    /* ========================================================================== */
    
    /** \brief I2C instances data for AM43xx */
    static boardI2cInstData_t gBoardAm43xxI2cInstData[] =
    {
        { /* baseAddr & intNum get filled during initialization using ChipDB. */
            0U,                                 /* instNum */
            0x0U,                               /* baseAddr */
            0U,                                 /* intNum */
            100U                                /* busClkKHz */
        },
        { /* baseAddr & intNum get filled during initialization using ChipDB. */
            1U,                                 /* instNum */
            0x0U,                               /* baseAddr */
            0U,                                 /* intNum */
            100U                                /* busClkKHz */
        }
    };
    
    /** \brief I2C data for AM43xx */
    static boardI2cData_t gBoardAm43xxI2cData =
    {
        (sizeof (gBoardAm43xxI2cInstData) / sizeof (boardI2cInstData_t)),
        /* numInst */
        gBoardAm43xxI2cInstData,
        /* pInstData */
        0U,
        /* probeInstNum */
    };
    
    /** \brief Board module object. */
    static boardCommonObj_t gBoardAm43xxObj =
    {
        BOARD_UNKNOWN,     /* boardId */
        BOARD_REV_UNKNOWN, /* baseBoardRev */
        BOARD_REV_UNKNOWN  /* dcBoardRev */
    };
    
    /** \brief EEPROM data for AM43xx. */
    static boardDataEeprom_t gBoardDataEeprom;
    
    /**
     * \brief   Pointer to EEPROM data for AM43xx. Indicates if EEPROM data has
     *          already been read.
     */
    #ifndef _CED2_
    // MB: 2018-05-07: Changed to the CED2
    static boardDataEeprom_t * gpBoardDataEeprom = NULL;
    
    /* TBD: Kept as global for now to workaround bug in i2cUtils. */
    static uint8_t gEepromOffset[2U] = {
        ((BOARD_DATA_EEPROM_OFFSET >> sizeof (uint8_t)) & 0xFF),
        (BOARD_DATA_EEPROM_OFFSET & 0xFF)
    };
    #endif
    
    /** \brief Contains pointers to the board data for the different boards. */
    static const boardData_t *gpBoardAm43xxData [BOARD_MAX + 1U]= {
        NULL, /* BOARD_UNKNOWN */
        &gBoardAm43xxGpevmData, /* BOARD_GPEVM */
        &gBoardAm43xxEvmskData, /* BOARD_EVMSK */
        NULL, /* BOARD_BEAGLEBONE */
        &gBoardAm43xxIdkevmData, /* BOARD_IDKEVM */
        &gBoardAm43xxEposevmData, /* BOARD_EPOSEVM */
        &gBoardAm43xxCustomData, /* BOARD_CUSTOM */
    };
    
    /* ========================================================================== */
    /*                          Function Definitions                              */
    /* ========================================================================== */
    
    int32_t BoardAm43xxInit(const boardInitParams_t *pInitPrms)
    {
        uint8_t i;
    
        for (i = 0 ; i < gBoardAm43xxI2cData.numInst ; i++)
        {
            gBoardAm43xxI2cData.pInstData[i].baseAddr = CHIPDBBaseAddress(
                CHIPDB_MOD_ID_I2C,
                gBoardAm43xxI2cData.pInstData[i].instNum);
    
            /* TBD: Comment interrupt number for now till implemented */
            /*
            gBoardAm43xxI2cData.pInstData[i].baseAddr = ChipDBInterruptNum(
                CHIPDB_MOD_ID_I2C,
                gBoardAm43xxI2cData.pInstData[i].instNum,
                intSigType);
            */
        }
    
        /* Setup the board information. */
        gBoardAm43xxObj.boardId      = pInitPrms->boardId;
        gBoardAm43xxObj.baseBoardRev = pInitPrms->baseBoardRev;
        gBoardAm43xxObj.dcBoardRev   = pInitPrms->dcBoardRev;
    
        /* Do any initialization/configuration required for AM43XX boards. */
    
        return (S_PASS);
    }
    
    boardId_t BoardGetIdAm43xx(void)
    {
    #ifdef _CED2_
    // MB: 2018-03-07: Changed to the CED2
    // CED2 does not have a ID Memory. Set the boardId to the Starter Kit, which is acting as CED2.
        boardId_t boardId = BOARD_EVMSK;
    
    #else
        int32_t status = S_PASS;
        boardId_t boardId = BOARD_UNKNOWN;
        const boardI2cData_t * pI2cData;
        boardI2cInstData_t * pInstData;
        i2cUtilsInitParams_t i2cUtilsParams = I2CUTILSINITPARAMS_DEFAULT;
        i2cUtilsTxRxParams_t i2cRxParams;
        uint32_t i2cInstNum;
    
        if ((PLATFORM_ID_ZEBU == PLATFORMGetId()) ||
            (PLATFORM_ID_VIRTIO == PLATFORMGetId()))
        {
            /* Set to a default for Zebu / Virtio platforms. */
            boardId = BOARD_GPEVM;
        }
        else
        {
            /* If board ID is to be auto-detected, initialize I2C and get the board
             * ID.
             */
            if (BOARD_AUTO_DETECT == gBoardAm43xxObj.boardId)
            {
                pI2cData = BoardGetI2cDataAm43xx();
                ASSERT(NULL != pI2cData);
    
                /* Detect board ID */
                i2cInstNum = pI2cData->probeInstNum;
                pInstData = &(pI2cData->pInstData[i2cInstNum]);
    
                i2cUtilsParams.busSpeed = pInstData->busClkKHz;
                status = I2CUtilsInit(i2cInstNum, &i2cUtilsParams);
                if (S_PASS == status)
                {
                    /* Read the Board data from EEPROM */
                    i2cRxParams.slaveAddr = BOARD_EEPROM_I2C_ADDR_0;
                    i2cRxParams.pOffset = gEepromOffset;
                    i2cRxParams.offsetSize = sizeof (gEepromOffset);
                    i2cRxParams.bufLen = sizeof (boardDataEeprom_t);
                    i2cRxParams.pBuffer = (uint8_t *) &gBoardDataEeprom;
                    status = I2CUtilsRead(i2cInstNum,
                                &i2cRxParams,
                                BOARD_I2C_TIMEOUT_VAL);
                    if (S_PASS == status)
                    {
                        /* Set the pointer so that next time the data can be
                         * directly read from the local variable.
                         */
                        gpBoardDataEeprom = &gBoardDataEeprom;
    
                        /* Check if the board is GPEVM */
                        if (strncmp(BOARD_AM43XX_GPEVM_BOARD_NAME,
                                    (char *)gBoardDataEeprom.boardName,
                                    BOARD_EEPROM_BOARD_NAME_SIZE) == 0U)
                        {
                            boardId = BOARD_GPEVM;
                        }
                        /* Check if the board is EVMSK */
                        else if (strncmp(BOARD_AM43XX_EVMSK_BOARD_NAME,
                                         (char *)gBoardDataEeprom.boardName,
                                         BOARD_EEPROM_BOARD_NAME_SIZE) == 0U)
                        {
                            boardId = BOARD_EVMSK;
                        }
                        /* Check if the board is IDKEVM */
                        else if (strncmp(BOARD_AM43XX_IDKEVM_BOARD_NAME,
                                         (char *)gBoardDataEeprom.boardName,
                                         BOARD_EEPROM_BOARD_NAME_SIZE) == 0U)
                        {
                            boardId = BOARD_IDKEVM;
                        }
                        /* Check if the board is EPOSEVM */
                        else if (strncmp(BOARD_AM43XX_EPOSEVM_BOARD_NAME,
                                         (char *)gBoardDataEeprom.boardName,
                                         BOARD_EEPROM_BOARD_NAME_SIZE) == 0U)
                        {
                            boardId = BOARD_EPOSEVM;
                        }
                        /* Check if the board is AM43xHS EVM */
                        else if (strncmp(BOARD_AM43XX_HSEVM_BOARD_NAME,
                                         (char *)gBoardDataEeprom.boardName,
                                         BOARD_EEPROM_BOARD_NAME_SIZE) == 0U)
                        {
                            /* treat HS as GP EVM since we don't handle secure 
                               related stuff in board */
                            boardId = BOARD_GPEVM;
                        }
                        else
                        {
                            /* If the board is not one of these, then the board
                             * ID is returned as BOARD_UNKNOWN.
                             */
                        }
    
                        if (BOARD_UNKNOWN != boardId)
                        {
                            /* Call board initialization function, if any. */
                            if (NULL != gpBoardAm43xxData[boardId]->pFnBoardInit)
                            {
                                status = gpBoardAm43xxData[boardId]->pFnBoardInit();
                            }
                        }
                    }
                }
            }
            else
            {
                /* Return the already detected / overridden board ID */
                boardId = gBoardAm43xxObj.boardId;
            }
        }
    #endif
    
        /* Set the global to the found value. */
        gBoardAm43xxObj.boardId = boardId;
    
        return (boardId);
    }
    
    uint32_t BoardGetBaseBoardRevAm43xx(void)
    {
        boardId_t boardId;
        uint32_t boardRev = BOARD_REV_UNKNOWN;
        const boardData_t * pBoardData = NULL;
        uint8_t i;
    
        /* Check if board revision is to be auto-detected, or overridden. */
        if (BOARD_AUTO_DETECT == gBoardAm43xxObj.baseBoardRev)
        {
            /* Get the board ID. At the end of this, the other data is already
             * read into the local gBoardDataEeprom variable, and hence it does
             * not need to be read from EEPROM again.
             * If the board ID has already been detected or overridden, it is
             * directly returned. Otherwise it is auto-detected.
             */
            boardId = BoardGetIdAm43xx();
    
            if (BOARD_UNKNOWN != boardId)
            {
                pBoardData = gpBoardAm43xxData[boardId];
    
                /* Check for the board revision that matches. */
                for (i = 0U ; (i < pBoardData->numRevStrings) ; i++)
                {
                    /* Check if the board revision matches. */
                    if (strncmp(pBoardData->pRevStringTable[i],
                                (char *)gBoardDataEeprom.version,
                                BOARD_AM43XX_VERSION_CMP_SIZE) == 0U)
                    {
                        boardRev = i;
                        break;
                    }
                }
            }
        }
        else
        {
            /* Return the already detected / overridden board revision */
            boardRev = gBoardAm43xxObj.baseBoardRev;
        }
    
        /* Set the global to the found value. */
        gBoardAm43xxObj.baseBoardRev = boardRev;
    
        return (boardRev);
    }
    
    const char * BoardGetBaseBoardRevNameAm43xx(void)
    {
        uint32_t boardRev;
        const char * pBoardRevStr = NULL;
    
        /* Board ID should have been detected before this API is called. */
        ASSERT (BOARD_UNKNOWN != gBoardAm43xxObj.boardId);
        ASSERT (BOARD_AUTO_DETECT != gBoardAm43xxObj.boardId);
    
        /* If the board revision has already been detected or overridden, it is
         * directly returned. Otherwise it is auto-detected.
         */
        boardRev = BoardGetBaseBoardRevAm43xx();
        ASSERT (boardRev <
                gpBoardAm43xxData[gBoardAm43xxObj.boardId]->numRevStrings);
    
        /* Get the revision string from the board data. */
        pBoardRevStr =
            gpBoardAm43xxData[gBoardAm43xxObj.boardId]->pRevStringTable[boardRev];
    
        return (pBoardRevStr);
    }
    
    uint32_t BoardGetDcRevAm43xx(void)
    {
        uint32_t dcBoardRev = BOARD_REV_UNKNOWN;
    
        /* Check if board revision is to be auto-detected, or overridden. */
        if (BOARD_AUTO_DETECT == gBoardAm43xxObj.dcBoardRev)
        {
            /* To be implemented once support for add-on daughter cards is added. */
            dcBoardRev = BOARD_REV_UNKNOWN;
        }
        else
        {
            /* Return the already detected / overridden board revision */
            dcBoardRev = gBoardAm43xxObj.dcBoardRev;
        }
    
        /* Set the global to the found value. */
        gBoardAm43xxObj.dcBoardRev = dcBoardRev;
    
        return (dcBoardRev);
    }
    
    const char * BoardGetDcRevNameAm43xx(void)
    {
        const char * pBoardDcRevStr = NULL;
        uint32_t dcBoardRev = BOARD_REV_UNKNOWN;
    
        /* Board ID should have been detected before this API is called. */
        ASSERT (BOARD_UNKNOWN != gBoardAm43xxObj.boardId);
        ASSERT (BOARD_AUTO_DETECT != gBoardAm43xxObj.boardId);
    
        /* If the board dc revision has already been detected or overridden, it is
         * directly returned. Otherwise it is auto-detected.
         */
        dcBoardRev = BoardGetDcRevAm43xx();
        ASSERT (dcBoardRev <
                gpBoardAm43xxData[gBoardAm43xxObj.boardId]->numRevStrings);
    
        /* Return the string from board rev string table for now. */
        pBoardDcRevStr =
            gpBoardAm43xxData[gBoardAm43xxObj.boardId]->pRevStringTable[dcBoardRev];
    
        return (pBoardDcRevStr);
    }
    
    const boardI2cData_t * BoardGetI2cDataAm43xx(void)
    {
        return (&gBoardAm43xxI2cData);
    }
    
    const boardData_t *BoardGetDataAm43xx(void)
    {
        boardId_t boardId;
        const boardData_t * pBoardData = NULL;
    
        /* Get the board ID. At the end of this, the other data is already
         * read into the local gBoardDataEeprom variable, and hence it does
         * not need to be read from EEPROM again.
         * If the board ID has already been detected or overridden, it is
         * directly returned. Otherwise it is auto-detected.
         */
        boardId = BoardGetIdAm43xx();
        pBoardData = gpBoardAm43xxData[boardId];
    
        return (pBoardData);
    }
    
    /**
     * Note: This file was auto-generated by TI PinMux on 07/05/2018 at 12:00:00.
     *
     * \file  am43xx_evmsk_pinmux_data.c
     *
     * \brief  This file contains the pin mux configurations for the boards.
     *         These are prepared based on how the peripherals are extended on
     *         the boards.
     *
     * \copyright Copyright (CU) 2018 Texas Instruments Incorporated -
     *             http://www.ti.com/
     */
    
    /**
     *  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.
     *
     */
    
    // MB: 2018-05-07: Changed code to fit CED2
     
    /* ========================================================================== */
    /*                             Include Files                                  */
    /* ========================================================================== */
    #include "types.h"
    #include "pinmux.h"
    #include "am43xx_pinmux.h"
    
    /** Peripheral Pin Configurations */
    
    #ifndef BUILDCFG_MOD_QSPI
    #define BUILDCFG_MOD_QSPI
    #endif /* BUILDCFG_MOD_QSPI */
    
    #ifndef BUILDCFG_MOD_MMCSD
    #define BUILDCFG_MOD_MMCSD
    #endif /* BUILDCFG_MOD_MMCSD */
    
    #ifndef BUILDCFG_MOD_MCSPI
    #define BUILDCFG_MOD_MCSPI
    #endif /* BUILDCFG_MOD_MCSPI */
    
    #ifndef BUILDCFG_MOD_GPIO
    #define BUILDCFG_MOD_GPIO
    #endif /* BUILDCFG_MOD_GPIO */
    
    #ifndef BUILDCFG_MOD_CPSW
    #define BUILDCFG_MOD_CPSW
    #endif /* BUILDCFG_MOD_CPSW */
    
    #ifndef BUILDCFG_MOD_UART
    #define BUILDCFG_MOD_UART
    #endif /* BUILDCFG_MOD_UART */
    
    #ifndef BUILDCFG_MOD_DEBUGSS
    #define BUILDCFG_MOD_DEBUGSS
    #endif /* BUILDCFG_MOD_DEBUGSS */
    
    #ifndef BUILDCFG_MOD_I2C
    #define BUILDCFG_MOD_I2C
    #endif /* BUILDCFG_MOD_I2C */
    
    
    #if defined(BUILDCFG_MOD_QSPI)
    static pinmuxPerCfg_t gQspi0PinCfg[] =
    {
        {
            /* MyQSPI1 -> qspi_clk -> B12 */
            PIN_GPMC_CSN3, 0, \
            ( \
                PIN_MODE(2) | \
                ((PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* MyQSPI1 -> qspi_csn -> A8 */
            PIN_GPMC_CSN0, 0, \
            ( \
                PIN_MODE(3) | \
                ((PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* MyQSPI1 -> qspi_d0 -> A9 */
            PIN_GPMC_ADVN_ALE, 0, \
            ( \
                PIN_MODE(3) | \
                ((PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* MyQSPI1 -> qspi_d1 -> E10 */
            PIN_GPMC_OEN_REN, 0, \
            ( \
                PIN_MODE(3) | \
                ((PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* MyQSPI1 -> qspi_d2 -> D10 */
            PIN_GPMC_WEN, 0, \
            ( \
                PIN_MODE(3) | \
                ((PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* MyQSPI1 -> qspi_d3 -> C10 */
            PIN_GPMC_BE0N_CLE, 0, \
            ( \
                PIN_MODE(3) | \
                ((PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {PINMUX_INVALID_PIN}
    };
    
    static pinmuxModuleCfg_t gQspiPinCfg[] =
    {
        {0, TRUE, gQspi0PinCfg},
        {CHIPDB_INVALID_INSTANCE_NUM}
    };
    #endif /* if defined(BUILDCFG_MOD_QSPI) */
    
    
    #if defined(BUILDCFG_MOD_MMCSD)
    static pinmuxPerCfg_t gMmcsd0PinCfg[] =
    {
        {
            /* MMC0 -> mmc0_clk -> D1 */
            PIN_MMC0_CLK, 0, \
            ( \
                PIN_MODE(0) | \
                ((PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* MMC0 -> mmc0_cmd -> D2 */
            PIN_MMC0_CMD, 0, \
            ( \
                PIN_MODE(0) | \
                ((PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* MMC0 -> mmc0_dat0 -> C1 */
            PIN_MMC0_DAT0, 0, \
            ( \
                PIN_MODE(0) | \
                ((PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* MMC0 -> mmc0_dat1 -> C2 */
            PIN_MMC0_DAT1, 0, \
            ( \
                PIN_MODE(0) | \
                ((PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* MMC0 -> mmc0_dat2 -> B2 */
            PIN_MMC0_DAT2, 0, \
            ( \
                PIN_MODE(0) | \
                ((PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* MMC0 -> mmc0_dat3 -> B1 */
            PIN_MMC0_DAT3, 0, \
            ( \
                PIN_MODE(0) | \
                ((PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
    
        {PINMUX_INVALID_PIN}
    };
    
    static pinmuxModuleCfg_t gMmcsdPinCfg[] =
    {
        {0, TRUE, gMmcsd0PinCfg},
        {CHIPDB_INVALID_INSTANCE_NUM}
    };
    #endif /* if defined(BUILDCFG_MOD_MMCSD) */
    
    
    #if defined(BUILDCFG_MOD_MCSPI)
    static pinmuxPerCfg_t gMcspi2PinCfg[] =
    {
        {
           /* SPI2 -> spi2_sclk -> N20 */
           PIN_SPI2_SCLK, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
    		    (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* SPI2 -> spi2_d0 -> P22 */
           PIN_SPI2_D0, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* SPI2 -> spi2_d1 -> P20 */
           PIN_SPI2_D1, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
    		   
           ) \
        },
        {
           /* SPI2 -> spi2_cs0 -> T23 */
           PIN_SPI2_CS0, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {PINMUX_INVALID_PIN}
    };
    
    static pinmuxPerCfg_t gMcspi4PinCfg[] =
    {
        {
           /* SPI4 -> spi4_sclk -> P25 */
           PIN_SPI4_SCLK, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* SPI4 -> spi4_d0 -> R24 */
           PIN_SPI4_D0, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* SPI4 -> spi4_d1 -> P24 */
           PIN_SPI4_D1, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* SPI4 -> spi4_cs0 -> N25 */
           PIN_SPI4_CS0, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {PINMUX_INVALID_PIN}
    };
    
    static pinmuxModuleCfg_t gMcspiPinCfg[] =
    {
        {2, TRUE, gMcspi2PinCfg},
        {4, TRUE, gMcspi4PinCfg},
        {CHIPDB_INVALID_INSTANCE_NUM}
    };
    #endif /* if defined(BUILDCFG_MOD_MCSPI) */
    
    
    #if defined(BUILDCFG_MOD_GPIO)
    static pinmuxPerCfg_t gGpio4PinCfg[] =
    {
        {
           /* GPIO4 -> gpio4[3] -> AD17 */
           PIN_CAM0_WEN, 3, \
           ( \
               PIN_MODE(7) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* GPIO4 -> gpio4[28] -> AE20 */
           PIN_CAM0_DATA6, 28, \
           ( \
               PIN_MODE(7) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* GPIO4 -> gpio4[29] -> AD20 */
           PIN_CAM0_DATA7, 29, \
           ( \
               PIN_MODE(7) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {PINMUX_INVALID_PIN}
    };
    
    static pinmuxPerCfg_t gGpio5PinCfg[] =
    {
        {
           /* GPIO5 -> gpio5[9] -> F24 -> TP8 */
           PIN_GPIO5_9, 9, \
           ( \
               PIN_MODE(7) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* GPIO5 -> gpio5[12] -> E25 -> Health LED */
           PIN_GPIO5_12, 12, \
           ( \
               PIN_MODE(7) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* GPIO5 -> gpio5[13] -> E24 -> TP3 */
           PIN_GPIO5_13, 13, \
           ( \
               PIN_MODE(7) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* GPIO5 -> gpio5[19] -> AE18 -> TP7/XTAL */
           PIN_CAM0_DATA0, 19, \
           ( \
               PIN_MODE(7) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {PINMUX_INVALID_PIN}
    };
    
    static pinmuxPerCfg_t gGpio0PinCfg[] =
    {
        {
            /* GPIO 0 -> gpio0[6] -> R25 */
    // MB 2018-04-20: SD card detect test.
    // Texas SK original configuration.	
    /*	
            PIN_SPI0_CS1, 6, \
            ( \
                PIN_MODE(7) | \
                ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
    */		
    
           PIN_SPI0_CS1, 6, \
           ( \
               PIN_MODE(7) | \
               ((PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_PULL_UD_DIS & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
    	   
        },
    
        {PINMUX_INVALID_PIN}
    };
    
    static pinmuxPerCfg_t gGpio3PinCfg[] =
    {
        {
           /* GPIO3 -> gpio3[14] -> N24 M0 U8 */
           PIN_MCASP0_ACLKX, 14, \
           ( \
               PIN_MODE(7) | \
              ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* GPIO3 -> gpio3[17] -> M24 M1 U8 */
           PIN_MCASP0_AHCLKR, 17, \
           ( \
               PIN_MODE(7) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* GPIO3 -> gpio3[20] -> M25 M0 U9 */
           PIN_MCASP0_AXR1, 20, \
           ( \
               PIN_MODE(7) | \
              ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* GPIO3 -> gpio3[21] -> L24 M1 U9 */
           PIN_MCASP0_AHCLKX, 21, \
           ( \
               PIN_MODE(7) | \
              ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
    
        {PINMUX_INVALID_PIN}
    };
    
    static pinmuxModuleCfg_t gGpioPinCfg[] =
    {
        {4, TRUE, gGpio4PinCfg},
        {5, TRUE, gGpio5PinCfg},
        {0, TRUE, gGpio0PinCfg},
        {3, TRUE, gGpio3PinCfg},	
        {CHIPDB_INVALID_INSTANCE_NUM}
    };
    #endif /* if defined(BUILDCFG_MOD_GPIO) */
    
    
    #if defined(BUILDCFG_MOD_CPSW)
    static pinmuxPerCfg_t gCpsw0PinCfg[] =
    {
        {
            /* My RGMII 1 -> rgmii1_tctl -> A13 */
            PIN_MII1_TX_EN, 0, \
            ( \
                PIN_MODE(2) | \
                ((PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* My RGMII 1 -> rgmii1_rctl -> A15 */
           PIN_MII1_RX_DV, 0, \
           ( \
               PIN_MODE(2) | \
               ((PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* RGMII1 -> rgmii1_tclk -> D14 */
           PIN_MII1_TX_CLK, 0, \
           ( \
               PIN_MODE(2) | \
                ((PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* RGMII1 -> rgmii1_rclk -> D13 */
           PIN_MII1_RX_CLK, 0, \
           ( \
               PIN_MODE(2) | \
                ((PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* RGMII1 -> rgmii1_td0 -> B15 */
           PIN_MII1_TXD0, 0, \
           ( \
               PIN_MODE(2) | \
                ((PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* RGMII1 -> rgmii1_td1 -> A14 */
           PIN_MII1_TXD1, 0, \
           ( \
               PIN_MODE(2) | \
                ((PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* RGMII1 -> rgmii1_td2 -> C13 */
           PIN_MII1_TXD2, 0, \
           ( \
               PIN_MODE(2) | \
                ((PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* RGMII1 -> rgmii1_td3 -> C16 */
           PIN_MII1_TXD3, 0, \
           ( \
               PIN_MODE(2) | \
                ((PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* RGMII1 -> rgmii1_rd0 -> F17 */
           PIN_MII1_RXD0, 0, \
           ( \
               PIN_MODE(2) | \
                ((PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* RGMII1 -> rgmii1_rd1 -> B16 */
           PIN_MII1_RXD1, 0, \
           ( \
               PIN_MODE(2) | \
                ((PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* RGMII1 -> rgmii1_rd2 -> E16 */
           PIN_MII1_RXD2, 0, \
           ( \
               PIN_MODE(2) | \
                ((PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* My RGMII 1 -> rgmii1_rd3 -> C14 */
            PIN_MII1_RXD3, 0, \
            ( \
                PIN_MODE(2) | \
                ((PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* RGMII2 -> rgmii2_tctl -> C3 */
            PIN_GPMC_A0, 0, \
            ( \
                PIN_MODE(2) | \
                ((PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* RGMII2 -> rgmii2_rctl -> C5 */
            PIN_GPMC_A1, 0, \
            ( \
                PIN_MODE(2) | \
                ((PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* RGMII2 -> rgmii2_tclk -> E8 */
            PIN_GPMC_A6, 0, \
            ( \
                PIN_MODE(2) | \
                ((PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* RGMII2 -> rgmii2_rclk -> F6 */
            PIN_GPMC_A7, 0, \
            ( \
                PIN_MODE(2) | \
                ((PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* RGMII2 -> rgmii2_td0 -> E7 */
            PIN_GPMC_A5, 0, \
            ( \
                PIN_MODE(2) | \
                ((PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* RGMII2 -> rgmii2_td1 -> D7 */
            PIN_GPMC_A4, 0, \
            ( \
                PIN_MODE(2) | \
                ((PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* RGMII2 -> rgmii2_td2 -> A4 */
            PIN_GPMC_A3, 0, \
            ( \
                PIN_MODE(2) | \
                ((PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* RGMII2 -> rgmii2_td3 -> C6 */
            PIN_GPMC_A2, 0, \
            ( \
                PIN_MODE(2) | \
                ((PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* RGMII2 -> rgmii2_rd0 -> D8 */
            PIN_GPMC_A11, 0, \
            ( \
                PIN_MODE(2) | \
                ((PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* RGMII2 -> rgmii2_rd1 -> G8 */
            PIN_GPMC_A10, 0, \
            ( \
                PIN_MODE(2) | \
                ((PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* RGMII2 -> rgmii2_rd2 -> B4 */
            PIN_GPMC_A9, 0, \
            ( \
                PIN_MODE(2) | \
                ((PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* RGMII2 -> rgmii2_rd3 -> F7 */
            PIN_GPMC_A8, 0, \
            ( \
                PIN_MODE(2) | \
                ((PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_PULL_UP_EN & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* My MDIO 1 -> mdio_clk -> B17 */
            PIN_MDIO_CLK, 0, \
            ( \
                PIN_MODE(0) | \
                ((PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {
            /* My MDIO 1 -> mdio_data -> A17 */
            PIN_MDIO_DATA, 0, \
            ( \
                PIN_MODE(0) | \
                ((PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
                (~PIN_PULL_UD_DIS & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
            ) \
        },
        {PINMUX_INVALID_PIN}
    };
    
    static pinmuxModuleCfg_t gCpswPinCfg[] =
    {
        {0, TRUE, gCpsw0PinCfg},
        {CHIPDB_INVALID_INSTANCE_NUM}
    };
    #endif /* if defined(BUILDCFG_MOD_CPSW) */
    
    
    #if defined(BUILDCFG_MOD_UART)
    static pinmuxPerCfg_t gUart0PinCfg[] =
    {
        {
           /* UART0 -> uart0_rxd -> K25 */
           PIN_UART0_RXD, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* UART0 -> uart0_txd -> J24 */
           PIN_UART0_TXD, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* UART0 -> uart0_ctsn -> L25 */
           PIN_UART0_CTSN, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* UART0 -> uart0_rtsn -> J25 */
           PIN_UART0_RTSN, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {PINMUX_INVALID_PIN}
    };
    
    static pinmuxPerCfg_t gUart1PinCfg[] =
    {
        {
           /* UART1 -> uart1_rxd -> K21 */
           PIN_UART1_RXD, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* UART1 -> uart1_txd -> L21 */
           PIN_UART1_TXD, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* UART1 -> uart1_ctsn -> K22 */
           PIN_UART1_CTSN, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* UART1 -> uart1_rtsn -> L22 */
           PIN_UART1_RTSN, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {PINMUX_INVALID_PIN}
    };
    
    static pinmuxPerCfg_t gUart3PinCfg[] =
    {
        {
           /* UART3 -> uart3_rxd -> H25 */
           PIN_UART3_RXD, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* UART3 -> uart3_txd -> H24 */
           PIN_UART3_TXD, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* UART3 -> uart3_ctsn -> H22 */
           PIN_UART3_CTSN, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* UART3 -> uart3_rtsn -> K24 */
           PIN_UART3_RTSN, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {PINMUX_INVALID_PIN}
    };
    
    static pinmuxPerCfg_t gUart2PinCfg[] =
    {
        {
           /* UART2 -> uart2_rxd -> B14 */
           PIN_MII1_CRS, 0, \
           ( \
               PIN_MODE(6) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* UART2 -> uart2_txd -> B13 */
           PIN_MII1_RX_ER, 0, \
           ( \
               PIN_MODE(6) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {PINMUX_INVALID_PIN}
    };
    
    static pinmuxModuleCfg_t gUartPinCfg[] =
    {
        {0, TRUE, gUart0PinCfg},
        {1, TRUE, gUart1PinCfg},
        {3, TRUE, gUart3PinCfg},
        {2, TRUE, gUart2PinCfg},	
        {CHIPDB_INVALID_INSTANCE_NUM}
    };
    #endif /* if defined(BUILDCFG_MOD_UART) */
    
    
    #if defined(BUILDCFG_MOD_DEBUGSS)
    static pinmuxPerCfg_t gDebugss0PinCfg[] =
    {
        {
           /* MyDEBUGSS1 -> TMS -> Y24 */
           PIN_TMS, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_PULL_UD_DIS & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* MyDEBUGSS1 -> TDI -> Y20 */
           PIN_TDI, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* MyDEBUGSS1 -> TDO -> AA24 */
           PIN_TDO, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_RX_ACTIVE & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* MyDEBUGSS1 -> TCK -> AA25 */
           PIN_TCK, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* MyDEBUGSS1 -> nTRST -> Y25 */
           PIN_NTRST, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* MyDEBUGSS1 -> EMU0 -> N23 */
           PIN_EMU0, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* MyDEBUGSS1 -> EMU1 -> T24 */
           PIN_EMU1, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {PINMUX_INVALID_PIN}
    };
    
    static pinmuxModuleCfg_t gDebugssPinCfg[] =
    {
        {0, TRUE, gDebugss0PinCfg},
        {CHIPDB_INVALID_INSTANCE_NUM}
    };
    #endif /* if defined(BUILDCFG_MOD_DEBUGSS) */
    
    
    #if defined(BUILDCFG_MOD_I2C)
    static pinmuxPerCfg_t gI2c0PinCfg[] =
    {
        {
           /* i2C0 -> I2C0_SCL -> Y22 */
           PIN_I2C0_SCL, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {
           /* i2C0 -> I2C0_SDA -> AB24 */
           PIN_I2C0_SDA, 0, \
           ( \
               PIN_MODE(0) | \
               ((PIN_PULL_UD_DIS | PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
               (~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
           ) \
        },
        {PINMUX_INVALID_PIN}
    };
    
    static pinmuxModuleCfg_t gI2cPinCfg[] =
    {
        {0, TRUE, gI2c0PinCfg},
        {CHIPDB_INVALID_INSTANCE_NUM}
    };
    
    #endif /* if defined(BUILDCFG_MOD_I2C) */
    
    /** EVM pin configurations for EVM */
    
    pinmuxBoardCfg_t gEvmskPinmuxData[] =
    {
    #if defined(BUILDCFG_MOD_QSPI)
        {CHIPDB_MOD_ID_QSPI, gQspiPinCfg},
    #endif /* if defined(BUILDCFG_MOD_QSPI) */
    #if defined(BUILDCFG_MOD_MMCSD)
        {CHIPDB_MOD_ID_MMCSD, gMmcsdPinCfg},
    #endif /* if defined(BUILDCFG_MOD_MMCSD) */
    #if defined(BUILDCFG_MOD_MCSPI)
        {CHIPDB_MOD_ID_MCSPI, gMcspiPinCfg},
    #endif /* if defined(BUILDCFG_MOD_MCSPI) */
    #if defined(BUILDCFG_MOD_GPIO)
        {CHIPDB_MOD_ID_GPIO, gGpioPinCfg},
    #endif /* if defined(BUILDCFG_MOD_GPIO) */
    #if defined(BUILDCFG_MOD_CPSW)
        {CHIPDB_MOD_ID_CPSW, gCpswPinCfg},
    #endif /* if defined(BUILDCFG_MOD_CPSW) */
    #if defined(BUILDCFG_MOD_UART)
        {CHIPDB_MOD_ID_UART, gUartPinCfg},
    #endif /* if defined(BUILDCFG_MOD_UART) */
    #if defined(BUILDCFG_MOD_DEBUGSS)
        {CHIPDB_MOD_ID_DEBUGSS, gDebugssPinCfg},
    #endif /* if defined(BUILDCFG_MOD_DEBUGSS) */
    #if defined(BUILDCFG_MOD_I2C)
        {CHIPDB_MOD_ID_I2C, gI2cPinCfg},
    #endif /* if defined(BUILDCFG_MOD_I2C) */
        {CHIPDB_MOD_ID_INVALID}
    };
    

  • Marcio,

    Glad to know that you have a working build setup now. If you install the SDK in any other folder than default "C:\ti", then you need to set the environment variable SDK_INSTALL_PATH before running the setupenv.bat file. Can you confirm if you had setup this environment variable when you installed the SDK in custom location.

    the component paths are always relative to the SDK_INSTALL_PATH so it is a bit surprising that it was able to find the compiler and but only showed the error when linking the binary.

    Regards,
    Rahul
  • The problem has not been solved because it does NOT build with the changes I require.

    I do not have this problem in sdk-rtos-am437x-evm-04.00.00.04, which does build with the same changes.

  • Marcio,

    Sorry, I misunderstood that you had this resolved when you installed it in the new location. Let me replace the files that you provided and try to reproduce this issue. I will get back with a fix.

    Regards,
    Rahul
  • Marcio,

    I was able to reproduce your issue using your files. This seems to be caused because GCC compiler linking step where is only finds symbols in the order of the linked libraries and not in a circular order as you would expect. This has been described here:

    We have run into this issue a couple of times on other projects but never ran into this issue in starterware as far as I can tell. The issue can be fixed by using -Wl,--startgroup <List all the libraries> -Wl,--end-group.

    Please update the rules_a9.mk in the path "pdk_am437x_1_0_10\packages\ti\starterware\build\makerules"

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/rules_5F00_a9.mk

    After you update the rules_a9.mk, you should be able to build the apps without any issues.

    Regards,

    Rahul

  • Thank you very much Rahul.