compiling paneldue firmware



  • I seen the previous topic about this but did not find answer so creating new one

    Java: 13.0.1

    Eclipse IDE for C/C++ Developers
    Version: 2019-09 R (4.13.0)
    Build id: 20190917-1200

    gcc-arm-none-eabi-9-2019-q4-major-win32

    project does compile but:

    01:29:08 Build Finished. 0 errors, 73986 warnings. (took 22s.452ms)
    

    there's ton of:

    this use of "defined" may not be portable [-Wexpansion-to-defined]
       58 | #if (SAM3S || SAM4S || SAM4E)
    

    and some "regular" warnings like:

    ../src/UserInterface.cpp:1151:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
     1151 |    if (oldStatus != PrinterStatus::paused && oldStatus != PrinterStatus::resuming)
          |    ^~
    ../src/UserInterface.cpp:1157:3: note: here
     1157 |   case PrinterStatus::paused:
          |   ^~~~
    ../src/UserInterface.cpp:1172:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
     1172 |    nameField->SetValue(machineName.c_str());  // if we are on the print tab then it may still be set to the file that was being printed
          |    ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
    ../src/UserInterface.cpp:1174:3: note: here
     1174 |   case PrinterStatus::configuring:
          |   ^~~~
    

    I don't mind warning (I'll easily add expansion-to-defined) but I just wanna be sure I set up the ENV properly and that I can trust this now 🙂

    thanks

    p.s. I know build.md advises oxygen but I was not able to make oxygen work properly with java 13.0.1 and I already have 20190917-1200 running



  • 01:50:12 Build Finished. 0 errors, 34 warnings. (took 4s.53ms)
    

    after I added -Wno-expansion-to-defined to gcc and g++ options

    what's left is

    [-Wformat-truncation=]
    [-Wimplicit-fallthrough=]
    

    Those I guess are better left turned on 🙂


  • administrators

    I use Eclipse 2019-09 and GNU Tools ARM Embedded 8-2019-q3-update. I don't see those warning messages. Looks like you are using a later version of gcc.



  • hi i have same setup as you and same warnings. when i flash the firmware everything is ok



  • @dc42 said in compiling paneldue firmware:

    I use Eclipse 2019-09 and GNU Tools ARM Embedded 8-2019-q3-update. I don't see those warning messages. Looks like you are using a later version of gcc.

    Interesting, I understood this is added to gcc7 so if you are using 8 it should be there too ..

    anyhow looks like the setup is working, now to do something with it 😄


  • administrators

    A correction: for PanelDue i was using an older version of Eclipse and compiler 6 2017-q2-update. Looks like I didn't update the compiler for PanelDue when i updated it for RRF.

    I've just updated it, and now I am getting those warnings too. I will look into it.

    EDIT: most of those warnings are coming from ASF. We don't get those warnings when compiling CoreNG, which also uses ASF. So I suspect that updating to later ASF files will fix them. I don't have time to do this right now.


  • administrators

    It turns out that PanelDue has "Extra warnings" checked in the C++ compiler settings as well as "All warnings". Turning off "Extra warnings" removes almost all those warnings.



  • that makes more sense, as it seems to be added to gcc7 😄


Log in to reply