View previous topic :: View next topic |
Author |
Message |
hermano
Joined: 04 Feb 2008 Posts: 4
|
Posted: Mon Feb 04, 2008 11:12 am Post subject: Turbo STK application debugging |
|
|
Good morning everybody.
Im a new in Turbo STK programming. I'm uising winAVR and turbo-devel as the development tool. I would like to know how to debug a program.
Thanks.
________
STOCKS TO BUY NOW
Last edited by hermano on Thu Feb 24, 2011 7:43 am; edited 1 time in total |
|
Back to top |
|
 |
pz Guest
|
Posted: Sat Feb 09, 2008 8:06 am Post subject: |
|
|
You need to have:
- Turbo Lite 2
- Turbo Programmer 2
- optionaly also debug kernel that shows all ME-SIM communication (not needed but handy, L1 kernel is free, just send us request)
But with every kernel you can include dbsp(), dbc(), dbch(), dbih() calls to print strings or content of variables. These are sent from TL2 to programmer and via USB to PC. With "dbg" utility you can see the output, see what's going on in your application.
There is an example in developer documentation. |
|
Back to top |
|
 |
hermano
Joined: 04 Feb 2008 Posts: 4
|
Posted: Thu Feb 14, 2008 4:45 pm Post subject: |
|
|
Ok. I have Turbo Lite 2 and Turbo Programmer 2 but I don't know how to proceed. Plz help.
________
Miscarriage / Still Birth Forums
Last edited by hermano on Thu Feb 24, 2011 7:44 am; edited 1 time in total |
|
Back to top |
|
 |
pz Guest
|
Posted: Mon Feb 18, 2008 8:06 am Post subject: |
|
|
Use dbs(), dbc(), dbch(), dbih() calls in your code. You have to uncommend #DEBUG in config.h - this makes these macros to work. That means you can have many such debug comments in your code and turn them on/off just by #DEBUG. Load application, plug turbo in to phone+TP2, start "dbg" application and turn on phone. You should see your debug messages.
Have you seen developer documentation? There is example. |
|
Back to top |
|
 |
hermano
Joined: 04 Feb 2008 Posts: 4
|
Posted: Tue Apr 01, 2008 10:16 am Post subject: dbg utility |
|
|
Hi everyone.
I'm trying to use dbg utility, but i still have this message: Cannot Open IO port COM3 <error 2>. Use format \\.\COM#
Can anyone help me?
________
Jacques Swaters
Last edited by hermano on Thu Feb 24, 2011 7:44 am; edited 1 time in total |
|
Back to top |
|
 |
hermano
Joined: 04 Feb 2008 Posts: 4
|
Posted: Thu Apr 03, 2008 11:18 am Post subject: |
|
|
Ok. I have'nt yet fix the problem, but i discovered the reason of this message.
The reason is that i load the application first, using cemu utility (cemu -v -d COM1 --app appfile.trb). But it don't terminate. I have the message.
Initializing device
Device initialized
Entering application mode
So when i launch the dbg utility (in another console) with command
dbg -d COM1, it can't use the COM1 port, because the cemu utility is still using it.
So this is my question: Why the cemu utility don't terminate, and what can i do to use it successfully.
Thanks
________
TWO AND A HALF MEN FORUM
Last edited by hermano on Thu Feb 24, 2011 7:44 am; edited 1 time in total |
|
Back to top |
|
 |
pz Guest
|
Posted: Sat Apr 05, 2008 7:31 am Post subject: |
|
|
hermano wrote: | Ok. I have'nt yet fix the problem, but i discovered the reason of this message.
The reason is that i load the application first, using cemu utility (cemu -v -d COM1 --app appfile.trb). But it don't terminate. I have the message.
Initializing device
Device initialized
Entering application mode
So when i launch the dbg utility (in another console) with command
dbg -d COM1, it can't use the COM1 port, because the cemu utility is still using it.
So this is my question: Why the cemu utility don't terminate, and what can i do to use it successfully.
Thanks |
Do you have TL2+SIM (or TSIM+SIM) in programmer SIM connector? The above looks just like it's either not there or bad contact in prog SIM connector. cemu is waiting for ATR.
The prog SIM connector is quite bad quality, we use it for historical reason. The best way is leave the lock open and either press TL2 SIM shape with finger in there or use cloth peg to keep it in place. |
|
Back to top |
|
 |
|