7 Replies Latest reply on Oct 17, 2011 4:30 PM by nazila.salimi

    Start a project in Eclipse

    nazila.salimi

      Hi,

         

      What are the steps to start a new firmware in Eclipse from scratch? Do I need to install sourcery G++ in order to build my firmware codes on the Eclipse?

         

      Thanks,

         

      Nazila

        • 1. Re: Start a project in Eclipse
          anand.srinivasan.asokan

          Please look at chapter 9 of FX3 programmers Manual.

             

          Regards,

             

          Anand

          • 2. Re: Start a project in Eclipse
            nazila.salimi

            Hi,

               

            I already looked at it but it only explain how to import the already written projects. My problem now with the new project is the <cyu3... .h> files are not recognized by the compiler! Even though I already added the FX3 SDK library (FX3 SDK/firmware/u3p_firmware/inc).

               

            Thanks,

               

            Nazila

            • 3. Re: Start a project in Eclipse
              nazila.salimi

              I think I found what the problem was! I added the path to the Cypress library files to the project's "includes" but not to the file's "includes" which is very weird, I expect that when I add the path to the project, automatically the files inside that project see the path!

                 

              Anyway, now the project can compile.

              • 4. Re: Start a project in Eclipse
                nazila.salimi

                I started a new project and only add new files from the already compiled folder of cypress: BulkLoopAuto. I encounter the same problem: cyfxbulklpauto.c does not recognize the cyfxbulklpauto.h and even after I add explicitly the path of the own project (where both of these files exist), the project compiles but there is no elf file generated.

                • 5. Re: Start a project in Eclipse
                  nazila.salimi

                  Another error that I get is

                     

                  Cannot find builtin/gnu.mk

                     

                  Has anyone create a project (NOT importing already built projects from the firmware folder). I think I am missing some settings, ...

                     

                  Anyone can help?

                  • 6. Re: Start a project in Eclipse
                    laim.maskey

                    Hi,

                       

                    I have used an existing project, USBBulkLoopAuto as a template for a new project. I've outlined the steps below

                    Go to the firmware/basic_examples folder and make a new folder with your project name, for example my_proj.

                       

                    Open the cyfxbulklpauto folder and copy all the files into the my_proj folder - do not copy the debug folder if there is one.

                       

                    You will then need to rename three source files. Rename cyfxbulklpauto.c to my_proj.c,  cyfxbulklpauto.h to my_proj.h and cyfxbulklpdscr.c to my_projdscr.c

                       

                    With a text editor open my_proj.c and change the include reference #include <cyfxbulklpauto.h> to #include <my_proj.h> Repeat this with my_projdscr.c file.

                       

                    Open the file called .project and replace the project description name from USBBulkLoopAuto to my_proj.  Also search and replace BulkLoopAuto with my_proj.

                       

                    Open the .cproject file and using search and replace, replace BulkLoopAuto with my_proj

                    Open Eclipse and import this project as described in the FX3 Programming manual. Once imported you can then edit the source code and add files to suit your requirements.

                       

                    Hope this helps.

                       

                    Sodafarl
                     

                    • 7. Re: Start a project in Eclipse
                      nazila.salimi

                      Thanks, It is working now!