1 2 Previous Next 17 Replies Latest reply on Jul 14, 2011 5:24 AM by ananda_26

    Debug firmware without DVK board?

    tom.lokas

      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

        • 1. Re: Debug firmware without DVK board?
          ananda_26

          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

          • 2. Re: Debug firmware without DVK board?
            tom.lokas

            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?

            • 3. Re: Debug firmware without DVK board?
              ananda_26

              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

              • 4. Re: Debug firmware without DVK board?
                tom.lokas

                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

                   
                • 5. Re: Debug firmware without DVK board?
                  ananda_26

                  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

                  • 6. Re: Debug firmware without DVK board?
                    tom.lokas

                    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

                    • 7. Re: Debug firmware without DVK board?
                      tom.lokas

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

                      • 8. Re: Debug firmware without DVK board?
                        ananda_26

                        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

                        • 9. Re: Debug firmware without DVK board?
                          tom.lokas

                          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.

                          • 10. Re: Debug firmware without DVK board?
                            ananda_26

                            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

                            • 11. Re: Debug firmware without DVK board?
                              tom.lokas

                              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

                              • 12. Re: Debug firmware without DVK board?
                                ananda_26

                                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

                                • 13. Re: Debug firmware without DVK board?
                                  tom.lokas

                                  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

                                  • 14. Re: Debug firmware without DVK board?
                                    ananda_26

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

                                       

                                    Regards,

                                       

                                    Anand

                                    1 2 Previous Next