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.

How do you rebuild AM57x PDK for debugging?

I have an issue with the Ethernet PHY I am trying to debug and would like to rebuild the M4 libraries with -g versus -o4 optimization.  Thus is there a simple way to rebuild the PDK without optimization for debugging?  I have no problem rebuilding it in the normal manner, using gmake.  I did edit the config.bld files in each component area to change optimization but they are not being referenced during the normal build process.  I am using pdk_am57xx_1_0_0 on Windows 10.

  • Which SDK is this - Linux or RTOS?
  • RTOS, I am programming the M4 core.
  • Hi Kevin,

    Which driver/API functions are you trying to debug? For Ethernet PHY issue, have you tried to update the following config.bld in
    C:\ti\pdk_am57xx_1_0_0\packages\ti\board\ and C:\ti\pdk_am57xx_1_0_0\packages\ti\transport\ndk\nimu\?


    /* M4LE.ccOpts.prefix  = "-o4 -qq -pdsw255 -DMAKEFILE_BUILD"; */
    M4LE.ccOpts.prefix  = "-g -qq -pdsw255 -DMAKEFILE_BUILD";

    Regards,
    Garrett

  • Yes I changed config.bld as you mentioned but seems config.bld is being ignored or overridden. I can modify the Phy code and the changes are there but optimized with -o4:

    clem4 src/evmAM572x/device/enet_phy.c ...
    if [ ! -d lib/evmAM572x/m4/obj/src/evmAM572x/device ]; then mkdir -p lib/evmAM572x/m4/obj/src/evmAM572x/device ; fi;
    rm -f lib/evmAM572x/m4/obj/src/evmAM572x/device/enet_phy.oem4.dep
    C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armcl -c -o4 -qq -pdsw255 -DMAKEFILE_BUILD --endian=little -mv7M4 --float_support=vfplib --abi=eabi -DSOC_AM572x -Dti_targets_arm_elf_M4 -DMAKEFILE_BUILD -eo.oem4 -ea.sem4 -fr=lib/evmAM572x/m4/obj/src/evmAM572x/device -fs=lib/evmAM572x/m4/obj/src/evmAM572x/device -ppa -ppd=lib/evmAM572x/m4/obj/src/evmAM572x/device/enet_phy.oem4.dep -I. -IC:/ti/xdctools_3_31_02_38_core/packages -IC:/ti/bios_6_42_02_29/packages -I/ti/PDK_AM~2/packages/ -I/ti/PDK_AM~2/packages//ti/csl -I/home/gtbldadm/processor-sdk-rtos-daisy-build/build-CORTEX_1/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/share/ti/ti-ndk-tree/packages -I/ti/PDK_AM~2/packages/ -I/ti/PDK_AM~2/packages//ti/csl -I/ti/PDK_AM~2/packages//ti/board -IC:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/include -I/ti/PDK_AM~2/packages//ti/board/src/evmAM572x/include -fc src/evmAM572x/device/enet_phy.c
    archiving lib/evmAM572x/m4/obj/src/evmAM572x/device/enet_phy.oem4 into lib/evmAM572x/m4/ti.board.aem4 ...
    if [ ! -d ./lib/evmAM572x/m4 ]; then mkdir -p ./lib/evmAM572x/m4 ; fi;
    C:/ti/ccsv6/tools/compiler/ti-cgt-arm_5.2.5/bin/armar rq lib/evmAM572x/m4/ti.board.aem4 lib/evmAM572x/m4/obj/src/evmAM572x/device/enet_phy.oem4

    From config.bld in: C:\ti\pdk_am57xx_1_0_0\packages\ti\board and C:\ti\pdk_am57xx_1_0_0\packages\ti\transport\ndk\nimu

    /* M4 ELF compiler configuration for Little Endian Mode. */
    var M4LE = xdc.useModule('ti.targets.arm.elf.M4');
    M4LE.rootDir = m4ToolsBaseDir;
    //M4LE.ccOpts.prefix = "-o4 -qq -pdsw255 -DMAKEFILE_BUILD"
    M4LE.ccOpts.prefix = "-g -qq -pdsw255 -DMAKEFILE_BUILD"

    /* C66 ELF compiler configuration for Little Endian Mode. */
    var C66LE = xdc.useModule('ti.targets.elf.C66');
    C66LE.rootDir = c66ToolsBaseDir;
    // C66LE.ccOpts.prefix = "-mo -o3 -q -k -eo.o";
    C66LE.ccOpts.prefix = "-mo -g -q -k -eo.o";


    Running 'gmake all' in C:\ti\pdk_am57xx_1_0_0\packages and only builds what I change, as it should (did a clean and full rebuild once). Have a feeling there is a different config.bld referenced at a higher level and lower level are ignored or config.bld is used by a different build tool?
  • Kevin,

    You probably already figure out that you need to modify the .mk files below for the Phy and NIMU:

    C:\ti\pdk_am57xx_1_0_0\packages\ti\board\build\idkAM571x\m4:ti.board.aem4.mk (if it's idkAM571x)
    C:\ti\pdk_am57xx_1_0_0\packages\ti\transport\ndk\nimu\build\m4: ti.transport.ndk.nimu.aem4.mk

    Yes, config.bld is for xdc rather than gmake build.


    Regards, Garrett

  • Yes, I found it, thank you.