Hello,
I have a Fez Domino with a rs232 shield.
when I run the program in debug mode everything runs ok, but if I run it without the debug, all msgs from the GC go to Com1.
If I disable the GC messages (Debug.EnableGCMessages(false)), I´m not able to send msgs to Com1.
When you say “debug mode” I mean I have the VS running.
The debug interface is USB.
No I do not have a jumper in the mode pin; by the way what is reason for that pin.
No I do not call Configuration.DebugInterface.Set. How can I do it and what’s for ?
I´m using the usb cable connect to my PC and I can degug with no problems.
With VS running I see all the ‘Debug.GC(true)’ comming to my screen and the application runs ok; if I disconnect the usb cable and power on the domino (there are no pins in the mode pads) all the msgs comming out from the 'Debug.GC(true) action appears in the rx pin and then are sent to my external devices (I do not want of course).
I tried with several Domino and I noticed the problem only appens if I do a reset; in the case of a power off /on the program runs well.
I also have a Fez connect shield attached.
Hardware: Fez Domino + Fez connect + RS232 Shield from CuteGigi.(Com1; 38400)
I´m using VS 2010 Pro edition.
GHI SDK is the last vesion
The following DLLs are used:
One question : even with Debug.EnableGCMessages(false) theGC runs when I do Debug.GC(true) in the application ?
Asking because the application crash even in debug when I disable the msgs …
Thanks
I spent some time to look through this. I did my tests on a Panda and am sure that debug messages will appear only if the MODE pin is set.
My test code (from the wiki):
SerialPort UART = new SerialPort("COM1", 115200);
int counter = 0;
UART.Open();
while (true)
{
// create a string
string counter_string = "Count: " + counter.ToString() +
"\r\n";
// convert the string to bytes
byte[] buffer = Encoding.UTF8.GetBytes(counter_string);
// send the bytes on the serial port
UART.Write(buffer, 0, buffer.Length);
// increment the counter;
counter++;
//wait...
Thread.Sleep(100);
}
If I have my interface set to Serial (COM1) I can see debug messages on reset.
@ General - are these the messages that you are seeing ?
Hi,
Yes some kind of …
All the GC msgs generated by the Debug.Gc(true), goes to the Com1 (Rx pin). It happens only if I have the isb cable disconnected; if it is connected I received them in the screen; I´m debuging useing usb port.
Anyway I found other strange begavior on my Domino I´m investigating; I do not know yet if it is a problem with my code (too big) … Thanks