Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Debug firmware without DVK board?

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Debug firmware without DVK board?
Moderator:
RSKV

Post Reply
Follow this topic



Debug firmware without DVK board?

lokas posted on 27 Jun 2011 2:48 AM PST
Senior Member
15 Forum Posts

Hi

 

Is it possible to debug a firmware without the DVK board? because in all the datasheet  which explain how to debug one (AN42499 and AN58009) I must use the developement board.

 

Thank you




Re: Debug firmware without DVK board?

aasi posted on 27 Jun 2011 03:10 AM PST
Cypress Employee
1090 Forum Posts

Our app notes would demonstrate debugging based on DVK board since that is the platform we use. You can debug with custom boards as well provided you've the serial port connectors on the board.

Regards,

Anand



Re: Debug firmware without DVK board?

lokas posted on 27 Jun 2011 03:15 AM PST
Senior Member
15 Forum Posts

You mean that I have to have a serial port connection on my board?

Because I don't so I try to use a serial-USB cable connecting the serial port to my computer and the USB connection to my board (to the FX2LP)...

Can it work?



Re: Debug firmware without DVK board?

aasi posted on 27 Jun 2011 04:13 AM PST
Cypress Employee
1090 Forum Posts

The serial to USB converters I've seen are for USB connector connected to PC and serial port connected to FX2LP. You are describing it the other way around. Please clarify. If you've a specific serial-USB setup in hand please let me know the make (site link) of it so that I can check out what it is all about.

If you do not have a serial port connector on the board already,

you can use vendor commands for sending the debug parameters you're looking for.

or you can implement another interface which is a Virtual COM port and then send debug messages over that interface to hyperterminal.

Regards,

Anand



Re: Debug firmware without DVK board?

lokas posted on 27 Jun 2011 04:39 AM PST
Senior Member
15 Forum Posts

Indeed I described the other way around but I built it myself so there is no site link.

About the virtual COM you suggest I could use, is not when there is no port COM on the computer? Because I have one, the problem is not on the side of the computer but on the side of my board because I have just one connector on my board : a mini usb one.

And I don't see what you are talkimg about using  vendor commands for sending the debug parameters.... Is there documents or datasheet which explain it

 

Regards




Re: Debug firmware without DVK board?

aasi posted on 27 Jun 2011 05:49 AM PST
Cypress Employee
1090 Forum Posts

http://www.cypress.com/?rID=34485 shows how to implement vendor requests. You can use this to obtain values of variables and stuff.

Virtual COM port is the USB port behaving like a COM port device (VIRTUAL) i.e. USB packets are sent in a format which the native windows virtual com port driver understands and converts the packet to a format as if it was got from a COM port device. So the Windows driver will poll the device and print values in hyperterminal based on packet received. http://www.cypress.com/?rID=40248 would be of interest to you in this case.

Regards,

Anand



Re: Debug firmware without DVK board?

lokas posted on 08 Jul 2011 06:31 AM PST
Senior Member
15 Forum Posts

Hi again

 

I have another question : my design don't  include an external EEPROM, I have just the internal RAM so I am mot sure what kind of technique I should use to download my firmware into the FX2LP and then test it...

 

thank you



Re: Debug firmware without DVK board?

lokas posted on 08 Jul 2011 06:56 AM PST
Senior Member
15 Forum Posts

sorry

 

I can download my firmware without EEPROM  by vendor command (what I did) but then I don't know how to test it because I am not sure it worked.

The Vendor Command Testing I found need an EEPROM....

 



Re: Debug firmware without DVK board?

aasi posted on 08 Jul 2011 08:29 AM PST
Cypress Employee
1090 Forum Posts

One of the vendor command demonstrates how to send EEPROM data using vendor command in that app note.

In your case you can send data that you need to analyze the issue using the vendor commands (instead of the EEPROM data). This is what i meant. This gives you way to debug your issues

Regards,

Anand



Re: Debug firmware without DVK board?

lokas posted on 12 Jul 2011 03:31 AM PST
Senior Member
15 Forum Posts

Indeed in the AN45471 the Vendor Command Test example use the IIC file programming method so it use EEPROM.

But I used the HEX File method  to dowmload my firmware so the Vendor command test is not adapted to my method.



Re: Debug firmware without DVK board?

aasi posted on 12 Jul 2011 03:56 AM PST
Cypress Employee
1090 Forum Posts

Lokas,

How the firmware is loaded does not matter. How the firmware handles the vendor command is the principle behind using vendor commands to debug firmware.

Implement a vendor command in your firmware which will send the values that you want to observe. Then use CyConsole to send the vendor command and get these values.

Regards,

Anand



Re: Debug firmware without DVK board?

lokas posted on 13 Jul 2011 05:14 AM PST
Senior Member
15 Forum Posts

Ok

Then I have two questions ;

Then following the app note I think I manage to write bytes throught Vendor Request (for example C2 A0 B1 C2 D3 E4 F5 06 )
but then when I try to read them I have CD CD CD CD CD CD CD CD..

Second question :

I always thought it was in the firmware that you configure the FX2LP ( in the TD_Init fonction) into working in GPIF/Slave FIFO mode , Asynchrone/Synchrone.. but in the vend_ax.c neither I  try to configure or not it doest not change anything



Re: Debug firmware without DVK board?

aasi posted on 13 Jul 2011 05:19 AM PST
Cypress Employee
1090 Forum Posts

1) Please post your code here. I would like to take a look at why you are receiving CD CD .... (I've seen CD CD ... being sent when the memory area is not accessible).

2) Vend_ax does not use GPIF/Slave FIFO. It works in port I/O mode. That is why you don't see it there. Where and how GPIF/Slave FIFO is initialized is based on one's own wish. There is no restriction on where it should be initialized.

Regards,

Anand



Re: Debug firmware without DVK board?

lokas posted on 13 Jul 2011 06:49 AM PST
Senior Member
15 Forum Posts

The code is attached to this post (just the vend_ax.c )

 

Then if I try to to initialize the FX2LP int the TD_Init fonction of the vend_ax.c will it work?

 

Regards



Re: Debug firmware without DVK board?

aasi posted on 13 Jul 2011 07:59 AM PST
Cypress Employee
1090 Forum Posts

Yep. It should. I'll look at your code and get back to you soon.

Regards,

Anand



Re: Debug firmware without DVK board?

aasi posted on 14 Jul 2011 10:22 PM PST
Cypress Employee
1090 Forum Posts

Hi,

I didn't notice any change in the vendor command code so I assume you're just trying to communicate with the EEPROM. Are you using the DVK or a custom board? What is the EEPROM size/part number and what logic level have you bound the address pins of the EEPROM.

Regards,

Anand



Re: Debug firmware without DVK board?

lokas posted on 14 Jul 2011 01:56 AM PST
Senior Member
15 Forum Posts

I am using a custom board but I don't have EEPROM on my board so the problem  come from it but my question is how to test my firmware if I don't have an EEPROM?

I am not able to read data so I am not able to verify  that it work.

 



Re: Debug firmware without DVK board?

aasi posted on 14 Jul 2011 03:24 AM PST
Cypress Employee
1090 Forum Posts

Lokas,

Following is the approach I'm talking about,

Say you know your code is getting stuck at  a particular function. You want to find which line of code is causing the issue. You have a counter which you increment after each line of code.

Then you implement a vendor command in the firmware in which you send this counter variable as the data. So to find out where it is getting stuck now you can send vendor command from PC and then find out where it is stuck and why.

I don't understand why you are trying to read from EEPROM in a custom board without EEPROM.

Regards,

Anand






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20