![Ronetix PEEDI User Manual Download Page 98](http://html1.mh-extra.com/html/ronetix/peedi/peedi_user-manual_1485040098.webp)
Using PEEDI
The TCP port to connect to, is the value specified for the COREn_DCC_PORT parameter in the
target configuration file.
You can use these GNU GCC compatible, simple C functions in your target code to communicate
via the DCC:
#define DCC_TX_BUSY 2
#define DCC_RX_READY 1
unsigned int dcc_recv_char( void )
{
unsigned int cc, status;
do __asm__ volatile ( "mrc p14,0, %0, c0,
c0\n" : "=r" (status));
while ( !(status & DCC_RX_READY) );
__asm__( "mrc p14,0, %0, c1,
c0\n" : "=r" (cc));
return cc;
}
void dcc_send_char( unsigned int cc )
{
unsigned int status;
do __asm__ volatile ( "mrc p14,0, %0, c0,
c0\n" : "=r" (status));
while ( status & DCC_TX_BUSY );
__asm__( "mcr p14,0, %0, c1,
c0\n" : : "r" (cc));
}
void dcc_send_string( const char* ss )
{
while ( *ss ) dcc_send_char( *ss++ );
}
Keep in mind that these are blocking functions.
3.12 Working with gdb
Since Firmware version v16.x.x sending of target descriptions to gdb via qXfer:features:read packet
is supported and mandatory. PEEDI supports only GDB versions which implement this feature.
GDB versions older then v6.8 don’t implement it and are not supported by PEEDI.
To be able to debug an application with gdb the application must be compiled using the ’-g -O0’
options to enable debugging and disable optimizing.
When your application is built and ready to be debugged, start gdb:
PEEDI User’s Manual
98