Hi all.
I'm trying to debug MIMXRT685-AUD-EVK board for using customized voip library.
So I added customized voip library(about 920KB) to \devices\MIMXRT685S\xtensa\gdbio\ folder
and some DSP codes to xa-capturer-dmic.c's xa_hw_capturer_read_FIFO().
Debug and run on Xtensa Xplorer IDE, I can see error message on xt-ocd daemon window like below.
<Development Enviroment>
PC: window 10
EVK: MIMXRT685-AUD-EVK
SDK: dsp_xaf_record_hifi4
MCUXpresso v11.5.1
Xtensa OCD Daemon v14.08
Xtensa Xplorer v9.0.18
<Compiled DSP bin Size>
dsp_data_debug.bin: 1153KB
dsp_ncache_debug.bin: 11KB
dsp_text_debug.bin: 130KB
<Error Message: below image>
please let me know if more information is needed or how can I fixed this error.
Best Regards
gnani
Hello Gnani,
XOCD log shows the access to memory location 0x428a0038 failed with a data error resulting in exception to get triggered.
system memory map is included in linker support packages, pls ref to elf32xtensa.x under ldscripts folder
Let's focus on xt-ocd error on this ticket.
If you still have question about memory configuration, pls create another ticket for tracking.
Thanks
Best Regards
Jason Tseng
Hello Jason Tseng,
Thank you for your reply.
Have a nice day!
Best Regards
Gnani
Hello Gnani,
Thanks for the confirmation.
That makes more sense to me.
Do you have source code of customized voip library?
Please try to review the code and see where to cause the error.
Obviously there are some piece of codes in voip lib access invalid address.
Thanks
Best Regards
Jason Tseng
Hello Jason,
I have one more question.
I am debugging "Changing the Memory Map" refer to Xtensa Linker Support Packages(LSPs) Reference Manual (lsp_rm.pdf) document.
I want to expand dram/iram size using "xt-genldscripts"
Please refer to attached memmap.xmm file.
Below is an image when ldscripts are created normally.
Test 1
Modify dram size from 0x10000 to 0x20000 in memmap.xmm file.
Below is an error image
Test 2
Modify iram size from 0x10000 to 0x20000 in memmap.xmm file.
Below is an error image
Question)
Is it possible to change the size of iram and dram?
Please let me know If possibe.
Thank you for your help.
Best Regards
Gnani
Hello Jason,
Thank you for your reply.
Unfortunately I don't have source code of customized voip library.
So I request to my customer to review the code and see where to cause the error.
By the way.. I want to know some more.
1. What is the exact meaning of below log.
(Refer to Memory Configuration, I'm just able to know "epcdbg:2402063c" means iram0_8_seg origin)
==========================================================================
Error: Exception details: exccause:0xd, excvaddr:0x428a0038, epc:0x1cfe24, epcdbg:2402063c
Error: Op 'xtensa_read_memory' failed, will not retry
==========================================================================
- Memory Configuration
Name Origin Length Used Unused
dsp_core_seg 0x00200000 0x00280000 0x0010ee58 0x001711a8
dsp_uncached_seg 0x20060000 0x00010000 0x00002990 0x0000d670
dram0_0_seg 0x24000000 0x00010000 0x0000000c 0x0000fff4
iram0_0_seg 0x24020000 0x00000400 0x0000014c 0x000002b4
iram0_1_seg 0x24020400 0x0000017c 0x0000016c 0x00000010
iram0_2_seg 0x2402057c 0x00000020 0x0000001c 0x00000004
iram0_3_seg 0x2402059c 0x00000020 0x0000000c 0x00000014
iram0_4_seg 0x240205bc 0x00000020 0x0000000c 0x00000014
iram0_5_seg 0x240205dc 0x00000020 0x0000000c 0x00000014
iram0_6_seg 0x240205fc 0x00000020 0x0000000c 0x00000014
iram0_7_seg 0x2402061c 0x00000020 0x00000018 0x00000008
iram0_8_seg 0x2402063c 0x0000f9c4 0x00000008 0x0000f9bc
*default* 0x00000000 0xffffffff
==========================================================================
2. If voip process() use more memory (maybe customer use malloc, memset, memcpy and etc.. ), shouldn't I expand the IRAM or DRAM(exactly I don't know) area? Please let me know if you know how to adjust RAM area?
Thanks
Best Regards
Gnani
Hello Gnani,
After step 3) Run "xt-ocd -c topology.xml" on window command
There is no error and log msg shows "Warning: Warning: DAP Reset request failed! Ignoring."
Then log message stop here.
But after step 5) Typed "record_dmic" and step 6) Result if there is voip process()
Then log message will continuous to show "Warning: Target not under control. No status update performed"
and other other error message.
Is above understanding correct?
Thank
Best Regards
Jason Tseng
Hello Jason,
After step 3) Run "xt-ocd -c topology.xml" on window command
There is no error and log msg shows "Warning: Warning: DAP Reset request failed! Ignoring."
Then log message stop here.
But after step 5) Typed "record_dmic" and step 6) Result: if there is voip process()
Then log message will continuous to show "Warning: Target not under control. No status update performed"
and other other error message.
-> Yes that's right.
-> After run "record_dmic" on serial window, displayed like below
You understand correctly.
Thank you for your help
Best Regards
Gnani
Hello Gnani,
"But modified memmap.xmm file is no effect on motion."
What does that mean "no motion"?
" I can run jlink and xt-ocd on default sram settings and modification sram settings.
But maybe added customized code(voip process part) will occur this error."
Do you mean after modified sram settings, jlink and xt-ocd are still working well???
But after customized voip lib added then you will see the error when run xt-ocd???
Please note: While making the debug connection the tools doesn't refer to the memmap files you modified.
Thanks
Best Regards
Jason Tseng
Hello Jason,
I reply to your asking. Please refet to below
"But modified memmap.xmm file is no effect on motion."
What does that mean "no motion"?
(Please note: While making the debug connection the tools doesn't refer to the memmap files you modified.)
-> No motion means No effect on board operation. I understood referring to your note.
Do you mean after modified sram settings, jlink and xt-ocd are still working well???
-> Yes, That's right if modified sram settings I did was right.
But after customized voip lib added then you will see the error when run xt-ocd???
-> Yes that's right. Error occured step is like below
1) Add customized voip lib and some code to xa_hw_capturer_read_FIFO() of xa_capturer-dmic.c
2) Build dsp_xaf_record_hifi4 example
3) Run "xt-ocd -c topology.xml" on window command
4) Debug on Xtensa Xplorer & Run to AUD-EVK board on Xtensa Xplorer
5) Typed "record_dmic" script on serial command window and run
6) Result
- Error msg occured on xt-ocd window command
if there is voip process() on xa_hw_capturer_read_FIFO() of xa_capturer-dmic.c
- Error msg is not occured on xt-ocd window command
if there is no voip process() on xa_hw_capturer_read_FIFO() of xa_capturer-dmic.c
7) note: voip process() means customized voice filtering processing function
Thank you for your help.
Best Regards
Gnani
Hello Gnani,
Except elf32xtensa.x, memmap.xmm and topology.xml, there is no other modifications, is that correct?
If you revert these modifications the error will not be shown, is that correct?
i.e using default settings you can run jlink and xt-ocd without any issue, is that correct?
BTW, what sdk version you are using?
ps: "SDK: dsp_xaf_record_hifi4" this is sdk example you are using, but I would like to know exact sdk version.
Thanks
Best Regards
Jason Tseng
Hello Jason,
I reply to your asking. Please refer to below.
Except elf32xtensa.x, memmap.xmm and topology.xml, there is no other modifications, is that correct?
-> Yes, that's right. But modified memmap.xmm file is no effect on motion.
If you revert these modifications the error will not be shown, is that correct?
i.e using default settings you can run jlink and xt-ocd without any issue, is that correct?
-> I can run jlink and xt-ocd on default sram settings and modification sram settings.
But maybe added customized code(voip process part) will occur this error.
So I tested sram size modification test.
If these error messages means DRAM error, please let me know how to modify DRAM area.
BTW, what sdk version you are using?
ps: "SDK: dsp_xaf_record_hifi4" this is sdk example you are using, but I would like to know exact sdk version.
-> Release Version: 2.11.1 (SDK_2_11_1_MIMXRT685-AUD-EVK)
-> I am using dsp_xaf_record_hifi4" this is sdk example.
Thank you for your help
Best Regards
Gnani
Hello Gnani,
Do you use Linker support package?
If yes, please also provide it from devices\MIMXRT685S\xtensa\gdbio for reference.
Meanwhile, what modifications you made for memory address?
Please also list the details about your changes and updates related files.
Thanks
Best Regards
Jason Tseng
Hello Jason,
Yes, I use Linker support package.
I attached gdbio zip file.
<Modification>
1. Add Customized voip Library (about 920KB) in gdbio folder
(Customized voip library is my customer's. Please let me know if you need this library.)
2. Modify some part of xa-capturer-dmic.c
3. Set XA_VIT_PRE_PROC to 0
<Debugging History>
I think SRAM size of DSP(HiFi4) is not enough capacity.
So I just modify SRAM size of CM33 from 1.5MB to 0.5MB on MCUXplorer IDE.
Memory region Used Size Region Size %age Used
SRAM: 116780 B 512 KB 22.27%
And I modify elf32xtensa.x file for expand sram size from 2.5MB to 3.5MB (refet to attached zip file)
dsp_xaf_record_hifi4.map
Name Origin Length Used Unused Attributes
dsp_core_seg 0x00100000 0x00380000 0x00129c08 0x002563f8
I can not modify RAM size modification because I don't know how to change DRAM/IRAM size.
Thank you for your help.
Please let me know if you have any questions.
Best Regards
Gnani
Hello Gnani,
Could you provide your config.html and topology.xml for our reference?
Thanks
Best Regards
Jason Tseng
Hello Jason,
I attached two files(config.html and topology.xml) in zip file
topology.xml is in C:\Program Files (x86)\Tensilica\Xtensa OCD Daemon 14.08,
config.html is in SDK_2_11_1_MIMXRT685-AUD-EVK\middleware\fatfs\documents\doc path.
Please let me know if it's not the file you want.
Thanks
Best Regards
Gnani