Compiling/Building PanelDue Firmware



  • I'm trying to build the panel due firmware. When I Set Active to Release-7.0, it builds.

    But it does not build when I Set Active to Release-v3-7.0! I get this error near the end of the build process. Notice how some of the slashes are backwards.

    Other info: I'm using a Mac and I've installed cc-arm-none-eabi-6-2017-q2-update

    Generating binary
    arm-none-eabi-objcopy -O binary "/Users/John/Documents/Software/Screen/PanelDue/Release-v3-7.0/PanelDue-v3-7.0.elf" "/Users/John/Documents/Software/Screen/PanelDue/Release-v3-7.0/PanelDue-v3-7.0-nologo.bin" & copy /B /Y "/Users/John/Documents/Software/Screen/PanelDue\Release-v3-7.0\PanelDue-v3-7.0-nologo.bin"+"/Users/John/Documents/Software/Screen/PanelDue\SplashScreens\SplashScreen-Escher3D-800x480.bin" "/Users/John/Documents/Software/Screen/PanelDue\Release-v3-7.0\PanelDue-v3-7.0.bin"
    /bin/sh: copy: command not found



  • In Settings > C/C++ Build, I changed "Builder Type" to Internal Builder. And now it has built. Testing now.



  • Yeah, It's hard coded for Windows paths and the Windows "copy" command. This step is the final step that adds the logo to the bin file. If you don't need the logo, you can just load the *-nologo.bin file to the panel.

    If you want to keep the logo, you can change it to *nix paths and the "cat" command by replacing "& copy" and everything after with...

    && cat "${BuildArtifactFileBaseName}-nologo.bin" "../SplashScreens/SplashScreen-Escher3D-800x480.bin" > "${BuildArtifactFileBaseName}.bin"
    

    You do this by going to Project, Settings, C++ Build, Settings, then select the configuration you wish to build, click the "Build Steps" tab and update the
    "Post build steps" "Command".



  • @gtj0 I tested my build, and the screen is yellow tinted, upside down, and mirrored from what it should be. What is going on?

    I'll use it with no logo for now. The only bin file generated is PanelDue-v3-7.0-nologo.bin, so that is what I loaded onto the panel using the instructions here:
    https://miscsolutions.wordpress.com/paneldue/



  • That's odd. You may want to go to settings and do a "Clear settings" and see if that fixes it. Are you using the latest version (1.21.3)? If you load the pre-built -nologo.bin file, it works OK?



  • The latest pre-built nologo.bin file worked great - I got it to display a custom logo too. But I need some custom buttons, so thats what I'm editing the paneldue firmware.

    Where do I "clear settings" ? Is that the same as "Clean Project" ?

    I think I'm using the latest version, let me try to find that out.



  • @jml Yes I was using the latest version



  • The pre-built was Panel Due firmware version 1.21.3(13b1) as shown in the "setup" screen on the paneldue. I just uploaded it to the paneldue again and it works fine.

    When I upload the bin file that I build in eclipse, the firmware version shown on the setup screen on the paneldue is the exact same number.

    For some reason, the color blue is just not being rendered, thats why it appears yellow tinted. And its upside-down and backwards.



  • Oops, I've been using the wrong bin entirely, I should be using and building PanelDue-5.0i-7.0i.bin instead of the V3 version! That should fix it... will update soon.



  • @gtj0 Yep that was the problem, I was using the wrong bin. Loading a built bin now works.

    If I want to add my own logo during the build process, I should do what you mentioned above. I'm not sure what you mean though. I get an ignored error: make[1]: [post-build] Error 1 (ignored)

    	arm-none-eabi-objcopy -O binary "${ProjDirPath}/${ConfigName}/${BuildArtifactFileBaseName}.elf" "${ProjDirPath}/${ConfigName}/${BuildArtifactFileBaseName}-nologo.bin" & copy /B /Y "${ProjDirPath}\\${ConfigName}\\${BuildArtifactFileBaseName}-nologo.bin"+"${ProjDirPath}\SplashScreens\SplashScreen-Duet3D-800x480.bin" "${ProjDirPath}\\${ConfigName}\\${BuildArtifactFileBaseName}.bin"
    

    with

    	arm-none-eabi-objcopy -O binary "${ProjDirPath}/${ConfigName}/${BuildArtifactFileBaseName}.elf" "${ProjDirPath}/${ConfigName}/${BuildArtifactFileBaseName}-nologo.bin" arm-none-eabi-objcopy -O binary "${ProjDirPath}/${ConfigName}/${BuildArtifactFileBaseName}.elf" "${ProjDirPath}/${ConfigName}/${BuildArtifactFileBaseName}-nologo.bin" && cat "${BuildArtifactFileBaseName}-nologo.bin" "../SplashScreens/SplashScreen-Escher3D-800x480.bin" > "${BuildArtifactFileBaseName}.bin"
    

    But it gives that error at the end.



  • @jml said in Compiling/Building PanelDue Firmware:

    @gtj0 Yep that was the problem, I was using the wrong bin. Loading a built bin now works.

    	arm-none-eabi-objcopy -O binary "${ProjDirPath}/${ConfigName}/${BuildArtifactFileBaseName}.elf" "${ProjDirPath}/${ConfigName}/${BuildArtifactFileBaseName}-nologo.bin" arm-none-eabi-objcopy -O binary "${ProjDirPath}/${ConfigName}/${BuildArtifactFileBaseName}.elf" "${ProjDirPath}/${ConfigName}/${BuildArtifactFileBaseName}-nologo.bin" && cat "${BuildArtifactFileBaseName}-nologo.bin" "../SplashScreens/SplashScreen-Escher3D-800x480.bin" > "${BuildArtifactFileBaseName}.bin"
    

    But it gives that error at the end.

    You've got a duplicated arm-none-eabi-objcopy command in there.

    There should be one arm-none-eabi-objcopy command to take the .elf file and produce the -nologo.bin file then the "&&" and "cat" commands to concatenate the -nologo.bin file and the splash screen file into the .bin file.

    Make sure you switch back to the external builder as well.

    Like so:

    arm-none-eabi-objcopy -O binary "${ProjDirPath}/${ConfigName}/${BuildArtifactFileBaseName}.elf" "${ProjDirPath}/${ConfigName}/${BuildArtifactFileBaseName}-nologo.bin" && cat "${BuildArtifactFileBaseName}-nologo.bin" "../SplashScreens/SplashScreen-Escher3D-800x480.bin" > "${BuildArtifactFileBaseName}.bin"
    

    Since that command is actually run in the Release-* directories, you can shorten it as follows...

    arm-none-eabi-objcopy -O binary "${BuildArtifactFileBaseName}.elf" "${BuildArtifactFileBaseName}-nologo.bin" && cat "${BuildArtifactFileBaseName}-nologo.bin" "../SplashScreens/SplashScreen-Escher3D-800x480.bin" > "${BuildArtifactFileBaseName}.bin"
    

    If you're going to use your own logo, you'll need to compress it with the
    bmp2c program in the Tools directory. Unfortunately, this is a Windows-only tool and won't build under Mac or Linux.



  • @gtj0 Thanks for the advice, I'm able to use the bmp2c program and the other instructions for adding my own logo to the compiled bin program. Its a nice feature! Would be nice if it could load faster, and I would customize the firmware to display it for a shorter amount of time, but these are minor issues.


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.