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.

AM5716: Linking to PDK binaries after building for debug ...optimization off?

Part Number: AM5716
Other Parts Discussed in Thread: SYSBIOS

My goal is to build the PDK without any optimization for easier debugging.  I was able to (re)build the pdk, which resulted in binaries for each package (and core) in a new 'debug' folder.

Could you tell me how to configure the CCS project to link to the debug binaries instead of from release?

generating custom ti.sysbios library makefile ...
Linking with library ti.drv.mcasp:./lib/am571x/c66/release/ti.drv.mcasp.ae66
Linking with library ti.drv.gpio:./lib/am571x/c66/release/ti.drv.gpio.ae66
Linking with library /home/user/ti/processor_sdk_rtos_am57xx_06_03_02_08/pdk_am57xx_1_0_18/packages/ti/drv/pm/./lib/am571x/c66/release/pm_hal.ae66
Linking with library /home/user/ti/processor_sdk_rtos_am57xx_06_03_02_08/pdk_am57xx_1_0_18/packages/ti/drv/pm/./lib/am571x/c66/release/pm_lib.ae66
Linking with library /home/user/ti/processor_sdk_rtos_am57xx_06_03_02_08/pdk_am57xx_1_0_18/packages/ti/drv/pm/./lib/am571x/c66/release/pm_rtos.ae66

I'm also wondering if building the PDK with the debug option will turn off all optimization?   I would like to single step the code without the confusing jumps (I'm sure it's efficient, but it is also hard to follow).  I used the following to build the PDK:

gmake all_libs LIMIT_SOCS=am571x BUILD_PROFILE=debug

  • If you are building with makefile build system, the BUILD_PROFILE=debug should enable debug build which disables optimization.

    If you are building with CCS, you can change the profile from project configuration to Debug.

    However, in CCS project, the linking path has to be manually configure for each profile to point it to the proper path.

  • Hi Stanley,

    I'm not sure how to change a path for the PDK product.  The project setting does not apply here, I don't think, since CCS is not rebuilding the source.

    I spent some time hunting around in the 'package' folder (for example, for the PM driver ...ti\processor_sdk_rtos_am57xx_06_03_02_08\pdk_am57xx_1_0_18\packages\ti\drv\pm\package) where I found a .java file.  Inside it looked like there was a libProfile Setting I could set in my config:

    /* Load the Power Management (PM) Package */
    var Power = xdc.loadPackage('ti.drv.pm');
    Power.Settings.socType = "am571x";
    Power.Settings.libProfile = "debug";

    That seemed to work, and the project built with the proper directory containing the debug binaries.

    generating custom ti.sysbios library makefile ...
    Linking with library ti.drv.mcasp:./lib/am571x/c66/release/ti.drv.mcasp.ae66
    Linking with library ti.drv.gpio:./lib/am571x/c66/release/ti.drv.gpio.ae66
    Linking with library /home/user/ti/processor_sdk_rtos_am57xx_06_03_02_08/pdk_am57xx_1_0_18/packages/ti/drv/pm/./lib/am571x/c66/debug/pm_hal.ae66
    Linking with library /home/user/ti/processor_sdk_rtos_am57xx_06_03_02_08/pdk_am57xx_1_0_18/packages/ti/drv/pm/./lib/am571x/c66/debug/pm_lib.ae66
    Linking with library /home/user/ti/processor_sdk_rtos_am57xx_06_03_02_08/pdk_am57xx_1_0_18/packages/ti/drv/pm/./lib/am571x/c66/debug/pm_rtos.ae66

    Could you tell me where to find current documentation for the XDC magic that I stumbled on?  Would be nice to have the proper documentation to better understand how this is supposed to work.  It seems that these XDC settings/naming tend to vary across the drivers and RTOS components.

    Thanks, Jason

  • Hi Jason,

    You can actually change the optimization level from the rules_a15.mk at package/ti/build/makerules 

    Remove the optimization from release as well and then do a clean build. Then your release version will also be built without any optimization.

    Regards,
    Parth