Page 1 of 1

How to set app_usb_aud_xk_216_mc to Debug mode

Posted: Mon May 14, 2018 8:04 am
by afaf
How to set app_usb_aud_xk_216_mc to Debug mode:
I deleted -O3 in the Makefile as follows,and get Build Error (3 items), why? and How to do?

//-------------------------------------------------------------------------------------------------------------------
#BUILD_FLAGS = -DFLASH_MAX_UPGRADE_SIZE=64*1024 -fcomment-asm -Xmapper --map -Xmapper MAPFILE -Wall-O3 -report -lquadflash -fsubword-select -save-temps -g -fxscope -DXSCOPE -DSDA_HIGH=2 -DSCL_HIGH=1 -DXUD_SERIES_SUPPORT=4 -march=xs2a -DUSB_TILE=tile[1] -DADAT_TX_USE_SHARED_BUFF=1 -DQUAD_SPI_FLASH=1

BUILD_FLAGS = -DFLASH_MAX_UPGRADE_SIZE = 64 * 1024 -fcomment -asm -Xmapper -map -Xmapper MAPFILE -Wall -report -lquadflash -fsubword-select -save-temps -g -fxscope -DXSCOPE -DSDA_HIGH = 2 -DSCL_HIGH = 1 -DXUD_SERIES_SUPPORT = 4 -march = xs2a -DUSB_TILE = tile [1] -DADAT_TX_USE_SHARED_BUFF = 1 -DQUAD_SPI_FLASH = 1

//-------------------------------------------------------------------------------------------------------------------
Build Error (3 items):
Description Resource Path Location Type
Undefined reference 'XUD_SetReady_InPtr' (possible inline definition without external definition) app_usb_aud_xk_216_mc C/C++ problem
Undefined reference 'XUD_SetReady_OutPtr' (possible inline definition without external definition) app_usb_aud_xk_216_mc C/C++ problem
Undefined reference 'XUD_SetReady_In' (possible inline definition without external definition) app_usb_aud_xk_216_mc C/C++ problem
//-------------------------------------------------------------------------------------------------------------------

Re: How to set app_usb_aud_xk_216_mc to Debug mode

Posted: Mon May 14, 2018 9:02 am
by infiniteimprobability
What do you mean by debug mode? -g switches on debug info which you have already. Removing -O3 just removes optimisation.
What are you trying to achieve exactly? Perhaps there's a better way..

Re: How to set app_usb_aud_xk_216_mc to Debug mode

Posted: Tue May 15, 2018 12:47 pm
by afaf
-o3 just show(tracking) asm code,
not source code(.c or .xc),
so...

Re: How to set app_usb_aud_xk_216_mc to Debug mode

Posted: Tue May 15, 2018 5:04 pm
by infiniteimprobability
xobjdump -S is your friend if you want to look at the asm offline or just use xgdb / optionally with eclipse (xtimecomposer) if you want to debug in mixed asm and source.

Re: How to set app_usb_aud_xk_216_mc to Debug mode

Posted: Sun Feb 17, 2019 11:51 am
by akp
Sorry this is old. At -O0 it will not work as is (I don't think) due to the "undefined reference" error. At -O1 you can set -finline-functions and it might compile. For mine with xud_cdc I added the specific optimization on the file that called the offending functions so it would compile

Code: Select all

XCC_FLAGS     = -O0 -save-temps -g -report -fxscope -DXUD_SERIES_SUPPORT=XUD_X200_SERIES -g -DUSB_TILE=tile[1] -mno-dual-issue
XCC_FLAGS_xud_cdc.xc = $(XCC_FLAGS) -O1 -finline-functions