Debug firmware without DVK board?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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

0 Likes
17 Replies
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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?

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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

   
0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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....

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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

   

Regards,

   

Anand

0 Likes
Anonymous
Not applicable

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

0 Likes
Anonymous
Not applicable

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.

0 Likes
Anonymous
Not applicable

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

0 Likes