CW 10.4 and DSC 56F8335

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CW 10.4 and DSC 56F8335

578 Views
v_dave
Contributor IV

8290_8290.jpgCW 10_4 8335.JPG.jpg

Hello All,

 

Working on a project with CW 10.4 and a DSC 56F8335 processor.  I have the latest USB Tap (black plastic box) and my Target PCB is complete and works fine.  On the legacy CW (8.3) I know you need to select 56F834x.cfg in order for the USB Tap to debug an 8335.

 

I have decided my old Win XP laptop needs to be retired so I started my new project on my newer Win 7 laptop and CW 10.4.  I have noticed that in 10.4 on the Debug Configuration there is a drop down choice for the 8335 (see picture above).

 

When I choose this option I the project will not load and I get "Failed to resume target process., CCSProtocolPlugin : CCS: Core not responding" However If I select 56F8345 the project loads fine and runs.

 

The issue I am having is a subtle one and I am not sure if it is a debug config or something different about the Eclipse version of the compiler or just my code.  This project works fine on the legacy CW and it runs as expected.  I tried to import from the Legacy to Eclipse but that did not work so well so I recreated the project from scratch (I have done this to many projects with success).

 

I use strncmp() to match some incoming ASCII data and the issue I am having is this function is not working.  I halt my project at the function and I see the data string I received and the one I am going to compare with all match but the strncmp() returns a non-match.  When I step into the function I see that the data being passed as expected in str1 & str2 but when it is assigned to p1 & p2 - p2 becomes NULL.

 

//My usage of strncmp()

 

if(!strncmp(( char*)cmd, "HELO", 4))

//This is the actual strncmp() function I stepped into


int strncmp(const char * str1, const char * str2, size_t n)

 

#if !defined(__POWERPC__)

 

const unsigned char * p1 = (unsigned char *) str1;

 

const unsigned char * p2 = (unsigned char *) str2; Here is p2 becomes NULL

 

unsigned char c1, c2;

 

while (--n)

 

if ((c1 = *p1++) != (c2 = *p2++))

 

return(c1 - c2);

 

else if (!c1)

 

break;

 

#else

 

const unsigned char * p1 = (unsigned char *) str1 - 1;

 

const unsigned char * p2 = (unsigned char *) str2 - 1;

 

unsigned long c1, c2;

 

while (--n)

 

if ((c1 = *++p1) != (c2 = *++p2))

 

return(c1 - c2);

 

else if (!c1)

 

break;

 

#endif

 

return(0);

 

 

What I am wondering is this an issue of an incorrect debug profile or should I look at some other configuration setting?

 

Thanks,

Dave

Labels (1)
0 Kudos
0 Replies