Hello I am using MCB2130 board, with keil IDE. Can you help me, how can I moniter one array - table[352][299] runtime, with out using JTAG. Rightnow, i am using Phlips LPC2000 ISP Flash uitility, to upload and download hex files. Tanks, in advance - Best regards, Saurabh
...how can I moniter one array - table[352][299] runtime, with out using JTAG... 352 x 299 ? :-o How frequently you want to monitor the array? Do you want to monitor all the values or the values in a particular index?
You gotta send it to USART, and wiew in a terminal like the one by Br@y++. http://www.sosej.cz/software/utility-a-ovladace/utility-a-ovladace-ostatni/terminal-9b/ serial.c
/******************************************************************************* Original of this file is part of the uVision/ARM development tools Copyright KEIL ELEKTRONIK GmbH 2002-2004 SERIAL.C: Low Level Serial Routines w/o interrupts *******************************************************************************/ #include <LPC21xx.H> // LPC21xx definitions #include "serial.h" //--------------------------------------------------------------------------------------------- void Serial_Init (void) { // Initialize Serial Interface PINSEL0 |= 0x00000005; // Enable RxD0 and TxD0 U0LCR = 0x83; // 8 bits, no Parity, 1 Stop bit and enable DLL access U0DLL = 16; // 115200 Baud Rate @ 30MHz VPB Clock // U0DLL = 98; // 19200 Baud Rate @ 30MHz VPB Clock // U0DLL = 195; // 9600 Baud Rate @ 30MHz VPB Clock U0LCR = 0x03; // Disable DLL access U0FCR = 0x07; } //--------------------------------------------------------------------------------------------- int PutChar(int ch){ // Write character to Serial Port if (ch == '\n') { while (!(U0LSR & 0x20)); U0THR = CR; // output CR } while (!(U0LSR & 0x20)); return (U0THR = ch); // 2DO } //--------------------------------------------------------------------------------------------- char GetChar(void){ // Read character from Serial Port while (!GOT_CHAR); // Wait for a char return (U0RBR); } //--------------------------------------------------------------------------------------------- void PutHex(unsigned char h){ // Write Hex Number to Serial Port if ((h>>4)>9) PutChar('A'-10+(h>>4)); else PutChar('0' + (h>>4)); if ((h&0x0f)>9) PutChar('A'-10+(h&0x0f)); else PutChar('0'+(h&0x0f)); } //--------------------------------------------------------------------------------------------- void PutDec32(long int n){ // Write signed long int as dec. number to serial port long int r=1000000000; if (n<0){ PutChar('-'); n*=-1; } while(r){ PutChar((n/r)+'0'); n=n%r; r/=10; } } //--------------------------------------------------------------------------------------------- void PutStr(char *p){ // Write string while (*p) { PutChar (*p++); } }
#define CR 0x0D #define GOT_CHAR (U0LSR & 0x01) void Serial_Init (void); //Initialize Serial Interface int PutChar (int ch); // Write character to Serial Port char GetChar (void); // Read character from Serial Port void PutHex (unsigned char h); // Write unsigned char as hex. number to serial port void PutDec32(long int n); // Write signed long int as dec. number to serial port void PutStr (char *p); // Write null-terminated string to UART