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.

TMS320DM365: How to use "printk debug" in DVSDK

Guru 10235 points
Part Number: TMS320DM365

Hello, TI Experts,

 

We have an additional question about DVSDK from E2E thread as below.

http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/100/p/638275/2377382#2377382

 

At first, we tried to play/record the audio using aplay/arecord command and gstreamer from this E2E thread advice.

But the result seemed to be same. (The old sample data sound seems to be heard.)

 

So, we will analyze the detail behavior of related files under Dir:sound/soc/davinci/ to insert "printk" statement for debugging.

But we cannot see any additional message about those printk statements.

 

Question:

  Could you tell us how to use "printk debug" in DVSDK including ".config" configuration file?

 

We also share the details as follows;

  - insert printk statement to davinci-evm.c,davinci-i2s.c,davinci-mcasp.c,davinci-pcm.c and davinci-sffsdr.c.

    ex:  printk(KERN_NOTICE "davinci_pcm_dma_request\n");

  - add "#define DEBUG" to those files.

    (Please refer the attached *.c files.)

 

  - configure menuconfig and save to .config file by "make linux_config" command.

    key DEBUG related configuration is as follows; (Please refer attached file.)

     CONFIG_PRINTK=y

     CONFIG_KGDB=y

     CONFIG_SLUB_DEBUG=y

     CONFIG_LIBERTAS_DEBUG=y

     CONFIG_JFFS2_FS_DEBUG=0

     CONFIG_DEBUG_FS=y

     CONFIG_DEBUG_KERNEL=y

     CONFIG_DEBUG_SHIRQ=y

     CONFIG_SCHED_DEBUG=y

     CONFIG_DEBUG_PREEMPT=y

     CONFIG_DEBUG_RT_MUTEXES=y

     CONFIG_DEBUG_PI_LIST=y

     CONFIG_DEBUG_MUTEXES=y

     CONFIG_DEBUG_SPINLOCK_SLEEP=y

     CONFIG_DEBUG_BUGVERBOSE=y

     CONFIG_DEBUG_INFO=y

     CONFIG_DYNAMIC_DEBUG=y

     CONFIG_DEBUG_USER=y

     CONFIG_DEBUG_ERRORS=y

     CONFIG_DEBUG_LL=y

     CONFIG_DEBUG_ICEDCC=y

 

  - build files:

    host> make all | tee make.log

 

  - create SD card:

    host> export DVSDK=/home/usr/ti-dvsdk_dm365-evm_4_02_00_06

    host> sudo ./bin/mksdboot.sh --device /dev/sdb --sdk $DVSDK

 

 - install files to SD card:

    host> sudo make install | tee inst.log

    (Rules.make was also modified "EXEC_DIR=/media/ROOTFS" in advance.)

 

  - copy sample code to SD card

    host> cp ./dmai_2_20_00_15/packages/ti/sdo/dmai/apps/audio_encode1/linux/audio_encode1_dm365.x470MV /media/ROOTFS/home/root/

 

  - run this sample code on the target DM365EVM.

    target> ./audio_encode1_dm365.x470MV -c aaclc_enc -o output.aac -n 100 --soundinput linein --samplerate 16000

 

  But we cannot see any additional message about those printk statements.

  ( We also checked "dmesg" command. but we cannot see any message about those printk statements.)

 

  Are there any missing to use "printk" debug for DVSDK?

  (Do you have any comment about attached files?)

   

  We would appreciate if you tell us the recommended procedure for printk debugging.

 

Best regards,

printk_files.zip