How to debug from flash on XEF232

If you have a simple question and just want an answer.
Sanjeev
Member++
Posts: 16
Joined: Thu Jan 19, 2017 8:34 am

How to debug from flash on XEF232

Post by Sanjeev »

Hello,

We have designed a custom board using XEF232. I am able to download the program through XTAG and debug and get the desired output. All working fine!

When I flash the same code, I am not getting the desired output. Need suggestions like, what could be the possibility of not working the same code through flash and is there a way to debug using flash? If a printf statements are put, where to find the printf o/p? Not able to see on the console?

Thanks,
Sanjeev


User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am

Post by mon2 »

Hi Sanjeev.

Use of printf can be blocking so please review the following article and proper use:

https://www.xmos.com/developer/debug-pr ... ion=X1093A
User avatar
akp
XCore Expert
Posts: 579
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

No, you won't be able to see printf output on the console running from flash. Are you using the xscope i/o or jtag i/o to do the debug output? And you should be using debug_printf(), or (even better) printstr, printint, etc. Those are probably faster than regular old printf. Is it doing anything when you run from flash? What I've found is if it runs OK with xscope i/o it should run fine from flash.
Sanjeev
Member++
Posts: 16
Joined: Thu Jan 19, 2017 8:34 am

Post by Sanjeev »

Thanks AKP and Mon2 for your the quick reply..
With JTAG I was able to use printf from my application code and is o/pting to the console and is working. But these printf/printstrln are not throwing anything on console when flashed the same executable.

Will configuring the xscope I/O throws printstrln messages in flash? In such case, can you guide me on how to configure it?

Any guess, like why the application code is working using XTAG and not when flashed? what could be the possible reasons? is it timing issue? XN configuration issue? Please throw some pointers..