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.

I2C Package needed by Board?

Other Parts Discussed in Thread: AM5728, SYSBIOS

Please excuse me if this is in the wrong forum, I wasn't sure if this should be here or in Sitara Forum.

Using the AM5728 in a custom design.  Currently working on the GP EVM.  TI-RTOS.

In the examples for the AM5728EVM GP, I see the following in the .cfg file:

/* Load the I2C package  - required by board */
var I2c = xdc.loadPackage('ti.drv.i2c');

 

I am building my project for the DSP core and will not be using the I2C at all.  We will have the ARM running Linux and it will be using the I2C. 

If I remove that from my .cfg file I end up a bunch of missing I2C functions when linking.

Is there a way to remove the need for I2C and not make custom library builds?



  • Hi Christopher,

    A couple of questions...
    - If I understand correctly, you are building examples for C66x target ?
    - Are you using ProcessorSDK and is that where you got the examples from ?

    Best,
    Ashish
  • Yes, C66x.

    For example, suppose I am building the example for GPIO,

    "C:\ti\pdk_am57xx_1_0_1\packages\ti\drv\gpio\example\led_blink\am572x\c66\bios\gpio_test_evmAM572x.cfg"

    It has the I2C package loaded even though it needs no I2C. I think the problem is the "ti.board" package needs I2C in case it needs to talk to the PMIC. However, in our target system, we will have the ARM take care of the I2C and the DSP won't use it at all. So, I want to be able to build the DSP without loading the I2C package. Might mean I need a customized version of ti,board?
  • Hi Christopher,

    Can you share the linker errors you are getting ? Based on which modules are calling I2C APIs, you may need to disable more unused modules.

    Best,
    Ashish
  • **** Build of configuration Debug for project GPIO_LedBlink_evmAM572x_c66xExampleProject ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio/example/led_blink/am572x/c66/bios/gpio_test_evmAM572x.cfg'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_31_02_38_core/xs" --xdcpath="C:/ti/edma3_lld_02_12_01_22/packages;C:/ti/ipc_3_41_00_08/packages;C:/ti/bios_6_45_00_19/packages;C:/ti/pdk_am57xx_1_0_1/packages;C:/ti/ndk_2_24_03_35/packages;C:/ti/uia_2_00_03_43/packages;C:/ti/ccsv6/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C66 -p ti.platforms.evmAM572X -r debug -c "C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_7.4.16" "C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio/example/led_blink/am572x/c66/bios/gpio_test_evmAM572x.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring gpio_test_evmAM572x.xe66 from package/cfg/gpio_test_evmAM572x_pe66.cfg ...
    generating custom ti.sysbios library makefile ...
    Linking with library ti.board:./lib/evmAM572x/c66/ti.board.ae66
    Linking with library ti.drv.spi:./lib/c66/ti.drv.spi.ae66
    Linking with library ti.drv.uart:./lib/c66/ti.drv.uart.ae66
    Linking with library ti.drv.gpio:./lib/am572x/c66/ti.drv.gpio.am572x.ae66
    Linking with library ti.osal:./lib/tirtos/c66/ti.osal.ae66
    Starting build of library sources ...
    making C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio/example/led_blink/am572x/c66/bios/src/sysbios/sysbios.ae66 ...
    gmake[1]: Entering directory `C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio/example/led_blink/am572x/c66/bios/src/sysbios'
    cle66 C:/ti/bios_6_45_00_19/packages/ti/sysbios/BIOS.c ...
    asme66 C:/ti/bios_6_45_00_19/packages/ti/sysbios/family/c64p/Exception_asm.s64P ...
    asme66 C:/ti/bios_6_45_00_19/packages/ti/sysbios/family/c64p/Hwi_asm.s62 ...
    asme66 C:/ti/bios_6_45_00_19/packages/ti/sysbios/family/c64p/Hwi_asm_switch.s62 ...
    asme66 C:/ti/bios_6_45_00_19/packages/ti/sysbios/family/c64p/Hwi_disp_always.s64P ...
    asme66 C:/ti/bios_6_45_00_19/packages/ti/sysbios/family/c62/TaskSupport_asm.s62 ...
    asme66 C:/ti/bios_6_45_00_19/packages/ti/sysbios/timers/dmtimer/Timer_asm.s64P ...
    are66 BIOS.obj c64p_Exception_asm.obj c64p_Hwi_asm.obj c64p_Hwi_asm_switch.obj c64p_Hwi_disp_always.obj c62_TaskSupport_asm.obj dmtimer_Timer_asm.obj ...
    gmake[1]: Leaving directory `C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio/example/led_blink/am572x/c66/bios/src/sysbios'
    Build of libraries done.
    cle66 package/cfg/gpio_test_evmAM572x_pe66.c ...
    'Finished building: C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio/example/led_blink/am572x/c66/bios/gpio_test_evmAM572x.cfg'
    ' '
    'Building file: C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio/example/led_blink/src/am572x/GPIO_evmAM572x_board.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_7.4.16/bin/cl6x" -mv6600 --abi=eabi -g --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_7.4.16/include" --include_path="C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio" --define=SOC_AM572x --define=EVM_AM572X --define=USE_BIOS --define=C66X --define=NSS_GEN2 --diag_wrap=off --diag_suppress=1111 --diag_suppress=827 --diag_suppress=824 --diag_suppress=837 --diag_suppress=1037 --diag_suppress=195 --diag_suppress=77 --diag_suppress=232 --diag_warning=225 --diag_warning=994 --diag_warning=262 --display_error_number --preproc_with_compile --preproc_dependency="GPIO_evmAM572x_board.pp" --cmd_file="configPkg/compiler.opt" "C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio/example/led_blink/src/am572x/GPIO_evmAM572x_board.c"
    'Finished building: C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio/example/led_blink/src/am572x/GPIO_evmAM572x_board.c'
    ' '
    'Building file: C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio/example/led_blink/src/GPIO_log.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_7.4.16/bin/cl6x" -mv6600 --abi=eabi -g --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_7.4.16/include" --include_path="C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio" --define=SOC_AM572x --define=EVM_AM572X --define=USE_BIOS --define=C66X --define=NSS_GEN2 --diag_wrap=off --diag_suppress=1111 --diag_suppress=827 --diag_suppress=824 --diag_suppress=837 --diag_suppress=1037 --diag_suppress=195 --diag_suppress=77 --diag_suppress=232 --diag_warning=225 --diag_warning=994 --diag_warning=262 --display_error_number --preproc_with_compile --preproc_dependency="GPIO_log.pp" --cmd_file="configPkg/compiler.opt" "C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio/example/led_blink/src/GPIO_log.c"
    'Finished building: C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio/example/led_blink/src/GPIO_log.c'
    ' '
    'Building file: C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/uart/soc/am571x/UART_soc.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_7.4.16/bin/cl6x" -mv6600 --abi=eabi -g --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_7.4.16/include" --include_path="C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio" --define=SOC_AM572x --define=EVM_AM572X --define=USE_BIOS --define=C66X --define=NSS_GEN2 --diag_wrap=off --diag_suppress=1111 --diag_suppress=827 --diag_suppress=824 --diag_suppress=837 --diag_suppress=1037 --diag_suppress=195 --diag_suppress=77 --diag_suppress=232 --diag_warning=225 --diag_warning=994 --diag_warning=262 --display_error_number --preproc_with_compile --preproc_dependency="UART_soc.pp" --cmd_file="configPkg/compiler.opt" "C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/uart/soc/am571x/UART_soc.c"
    'Finished building: C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/uart/soc/am571x/UART_soc.c'
    ' '
    'Building file: C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio/example/led_blink/src/main_led_blink.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_7.4.16/bin/cl6x" -mv6600 --abi=eabi -g --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_7.4.16/include" --include_path="C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio" --define=SOC_AM572x --define=EVM_AM572X --define=USE_BIOS --define=C66X --define=NSS_GEN2 --diag_wrap=off --diag_suppress=1111 --diag_suppress=827 --diag_suppress=824 --diag_suppress=837 --diag_suppress=1037 --diag_suppress=195 --diag_suppress=77 --diag_suppress=232 --diag_warning=225 --diag_warning=994 --diag_warning=262 --display_error_number --preproc_with_compile --preproc_dependency="main_led_blink.pp" --cmd_file="configPkg/compiler.opt" "C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio/example/led_blink/src/main_led_blink.c"
    'Finished building: C:/ti/pdk_am57xx_1_0_1/packages/ti/drv/gpio/example/led_blink/src/main_led_blink.c'
    ' '
    'Building target: GPIO_LedBlink_evmAM572x_c66xExampleProject.out'
    'Invoking: C6000 Linker'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_7.4.16/bin/cl6x" -mv6600 --abi=eabi -g --define=SOC_AM572x --define=EVM_AM572X --define=USE_BIOS --define=C66X --define=NSS_GEN2 --diag_wrap=off --diag_suppress=1111 --diag_suppress=827 --diag_suppress=824 --diag_suppress=837 --diag_suppress=1037 --diag_suppress=195 --diag_suppress=77 --diag_suppress=232 --diag_warning=225 --diag_warning=994 --diag_warning=262 --display_error_number -z -m"GPIO_LedBlink_evmAM572x_c66xExampleProject.map" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_7.4.16/lib" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-c6000_7.4.16/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="GPIO_LedBlink_evmAM572x_c66xExampleProject_linkInfo.xml" --rom_model -o "GPIO_LedBlink_evmAM572x_c66xExampleProject.out" "./GPIO_evmAM572x_board.obj" "./GPIO_log.obj" "./UART_soc.obj" "./main_led_blink.obj" -l"configPkg/linker.cmd" -l"libc.a"
    <Linking>

    undefined first referenced
    symbol in file
    --------- ----------------
    I2C_Params_init C:\ti\pdk_am57xx_1_0_1\packages\ti\board\lib\evmAM572x\c66\ti.board.ae66<evmAM572x_lld_init.oe66>
    I2C_close C:\ti\pdk_am57xx_1_0_1\packages\ti\board\lib\evmAM572x\c66\ti.board.ae66<evmAM572x.oe66>
    I2C_init C:\ti\pdk_am57xx_1_0_1\packages\ti\board\lib\evmAM572x\c66\ti.board.ae66<evmAM572x_lld_init.oe66>
    I2C_open C:\ti\pdk_am57xx_1_0_1\packages\ti\board\lib\evmAM572x\c66\ti.board.ae66<evmAM572x_lld_init.oe66>
    I2C_transfer C:\ti\pdk_am57xx_1_0_1\packages\ti\board\lib\evmAM572x\c66\ti.board.ae66<evmAM572x.oe66>
    I2C_v1_FxnTable C:\ti\pdk_am57xx_1_0_1\packages\ti\board\lib\evmAM572x\c66\ti.board.ae66<I2C_soc.oe66>


    >> Compilation failure
    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "GPIO_LedBlink_evmAM572x_c66xExampleProject.out" not built
    gmake: *** [GPIO_LedBlink_evmAM572x_c66xExampleProject.out] Error 1
    gmake: Target `all' not remade because of errors.

    **** Build Finished ****
  • Hi Christopher,

    Since Linux is going to manage PMIC in your setup, can you try modyfying the "evmAM572x.c" board file by removing Board_SetPMICValue() function and also removing the call to it from Board_init() ?

    Best,
    Ashish
  • How do I rebuild the "board" either from CCS or command line. I don't see any readme file or directions on rebuilding the board package.
  • Hi Christopher,

    You can follow the steps here to rebuild the PDK packages:
    processors.wiki.ti.com/.../Processor_SDK_RTOS_Building_The_SDK

    Best,
    Ashish
  • Hi Christopher,

    Do you have any more questions ? If not, can you verify the answer so we can close this thread ?

    Thanks,
    Ashish
  • Sorry, I was on vacation and just got back to this...

    I wanted to build only board so I did this:

    C:\ti\pdk_am57xx_1_0_1\packages>gmake board
    gmake -C ./ti/board all
    gmake[1]: Entering directory `C:/ti/pdk_am57xx_1_0_1/packages/ti/board'
    gmake -f ./build/evmAM572x/c66/ti.board.ae66.mk lib/evmAM572x/c66/ti.board.ae66
    gmake[2]: Entering directory `C:/ti/pdk_am57xx_1_0_1/packages/ti/board'
    ./build/evmAM572x/c66/ti.board.ae66.mk:57: *** multiple target patterns.  Stop.
    gmake[2]: Leaving directory `C:/ti/pdk_am57xx_1_0_1/packages/ti/board'
    gmake[1]: *** [lib/evmAM572x/c66/ti.board.ae66] Error 2
    gmake[1]: Leaving directory `C:/ti/pdk_am57xx_1_0_1/packages/ti/board'
    gmake: *** [board_lib] Error 2

    I traced that error down and made this change to the ti.board.ae66.mk file:

    Change the lines:

        $(PDK_INSTALL_PATH)/ti/drv/i2c/soc/am572x/I2C_soc.c\
        $(PDK_INSTALL_PATH)/ti/drv/uart/soc/am572x/UART_soc.c\
        $(PDK_INSTALL_PATH)/ti/drv/spi/soc/am572x/SPI_soc.c

    To:

        ../ti/drv/i2c/soc/am572x/I2C_soc.c\
        ../ti/drv/uart/soc/am572x/UART_soc.c\
        ../ti/drv/spi/soc/am572x/SPI_soc.c

    Windows does not like the PDK_INSTALL_PATH used because it includes a c: and the : confuses the gmake program.

    I also had to remove the I2C_soc.c line, since that was what I was trying to remove in the first place.  When I made those changes I did get this file to build:

    "C:\ti\pdk_am57xx_1_0_1\packages\ti\board\lib\evmAM572x\c66\ti.board.ae66"

    The compiler then failed when it tried to build the ARM based library, but that is okay for me.

    However, when I then tried to repeat my process to document it for this thread, it failed to compile the UART_soc.c file.  Again, it appears to be a path problem.  However, I commented out all the *_soc.c references and it built fine as the *_soc.c is included in the project definition.

  • Hello Ashish,

    Can you comment on my removing all the *_soc.c lines from the ti.board.ae66.mk file? Seems like they are not really needed there since you include those drivers in the .cfg file if you need them.

    Thanks,

    Chris
  • Hi Chris,

    If you remove the *_soc.c lines from the makefile then they will not be part of the library and I think that could be a problem if you need to use any of the APIs defined in those source files. I am not very familiar with the PDK product so you may want to post this question on the Sitara forum for a more definitive answer.

    Best,
    Ashish