3 Replies Latest reply on Jun 13, 2018 2:17 AM by anks

    USBUART Compile Error

    user_293168294

      I started getting this error when I build my project.

       

      Build error: 'USBUART_MAX_EP' undeclared here (not in a function)

       

      The error is in the USBUART_audio.h file. USBUART_MAX_EP is defined in USBUART.h.  I have not made any changes to to the API files.

        • 1. Re: USBUART Compile Error
          anks

          Is USBUART.h file included in the USBUART_audio.h file?

          • 2. Re: USBUART Compile Error
            user_293168294

            Thanks for your reply.  All of the required libraries are included.

             

            I start out with a working USB UART application and then slowly add in my code, while testing along the way. After a while the compiler starts complaining. Sometimes it is intermittent and sometimes it fails repeatedly. If I hover over USBUART_MAX_EP , the IDE shows the value, so it can find it.  If I hard code the value at the problem statement, the error just moves to another similar error else where in the USBUART API.

             

            One time, as a clean and build was running, I saw that the USB pins were reassigned (to the same ones I had assigned) and it compiled. I changed my my USB pins to "auto assign" and unchecked "lock". It now seems to regularly compile without any changes to the firmware???

             

            I am not sure what is going on, but at least I was able to complete my firmware. I still have another test program that was not fixed by that trick, so it is not a magic bullet.

            • 3. Re: USBUART Compile Error
              anks

              Hello Bart,

               

              Please provide us with your project with the issue.Which creator version are you using