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
//-------------------------------------------------------------------------------------------------------------------
How to set app_usb_aud_xk_216_mc to Debug mode
-
- Member++
- Posts: 16
- Joined: Mon Apr 09, 2018 10:46 am
-
Verified
- XCore Legend
- Posts: 1156
- Joined: Thu May 27, 2010 10:08 am
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..
What are you trying to achieve exactly? Perhaps there's a better way..
Engineer at XMOS
-
- Member++
- Posts: 16
- Joined: Mon Apr 09, 2018 10:46 am
-o3 just show(tracking) asm code,
not source code(.c or .xc),
so...
not source code(.c or .xc),
so...
-
Verified
- XCore Legend
- Posts: 1156
- Joined: Thu May 27, 2010 10:08 am
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.
Engineer at XMOS
-
- XCore Expert
- Posts: 580
- Joined: Thu Nov 26, 2015 11:47 pm
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