How to build the bin file?



  • I want to modify the source code and increase new M code for new function.
    I have refer to the buildinstructions.md, but I can’t build the bin file.
    https://github.com/dc42/RepRapFirmware/blob/v3-dev/BuildInstructions.md.
    I have questions below :

    1. The current source code is on these branches : RepRapFirmware, CoreNG, FreeRTOS, RRFLibraries, DuetWiFiSocketServer. Which branches is necessary if I use Duet3 as a standalone board (No Pi)?
    2. How do I use eclipse IDE tool to build the bin file? Could you have the training video about eclipse for freshman? Thanks.


  • no video but this post may help with cloning the different repositories.

    after step 6.

    @bearer said in Building RRFlibraries 'atomic_uint8_t' does not name a type:

     cd /c/eclipse/firmware
    git clone https://github.com/dc42/CoreNG.git --branch dev
    git clone https://github.com/dc42/CANlib.git
    git clone https://github.com/dc42/RRFLibraries.git --branch dev
    git clone https://github.com/dc42/FreeRTOS.git
    git clone https://github.com/dc42/RepRapFirmware.git --branch v3-dev
    git clone https://github.com/dc42/DuetWiFiSocketServer.git
    

    then proceed and read the instructions carefully especially step 14.

    14 Build CoreNG first, also build FreeRTOS and RRFLibraries if needed. Then clean and build RepRapFirmware (the clean step is needed to make Eclipse notice that the output library files in the other projects have been built).

    and the rest of step 14 on how to set configuration to build for the board of your chosing

    (caveat emptor; the aboce may be stale, but the build instructions should be valid still, just needs careful reading)



  • @bearer I do step 14 and build CoreNG first, then eclipse show error below:111.jpg
    Could you tell me what step I set wrong ? Thanks.


  • administrators

    I think you haven't correctly done step 13 in the build instructions file.



  • @dc42 I have done the step 13 to build variables. The result show below.222.jpg
    Sorry, I can’t find out what wrong 13 step is. So could you tell ? Thanks.


  • administrators

    Confirm that you are using the dev branch of CoreNG? The project settings should look like this:

    2f6e9f7a-8a92-4b3d-b9b3-68ab30892551-image.png



  • @dc42 Confirm that you are using the dev branch of CoreNG?
    => I download the CoreNG-1.19 file, then rename folder CoreNG-1.19 in that folder to CoreNG.
    444.jpg
    But I open the project settings, it show below
    333.jpg
    I don’t modify any setting. Why is my setting different from your setting ?
    Then I follow your setting, but the result is same. It show 3 errors.
    555.jpg



  • @Jimmykc said in How to build the bin file?:

    I download the CoreNG-1.19 file, then rename folder CoreNG-1.19 in that folder to CoreNG.

    thats 3 years old, you need the dev branch and a current version. imho easiest to use git git clone https://github.com/dc42/CoreNG.git --branch dev

    but you could try downloading this https://github.com/dc42/CoreNG/archive/dev.zip



  • @bearer I download the CoreNG-dev, FreeRTOS-master, and RRFLibraries-dev, then I build them. The eclipse show no error and no warning.666.jpg
    777.jpg
    When I increase the RepRapFirmware-3.01-RC9 file to the project, I build them.
    888.jpg
    The eclipse show 32 errors and 2 warnings.
    999.jpg
    I re-check the step 14, but I don’t know what the meaning of “Then clean and build RepRapFirmware (the clean step is needed to make Eclipse notice that the output library files in the other projects have been built)” is.


  • administrators

    @Jimmykc said in How to build the bin file?:

    I don’t know what the meaning of “Then clean and build RepRapFirmware (the clean step is needed to make Eclipse notice that the output library files in the other projects have been built)” is.

    Right click on the project and select Clean form the drop-down menu.



  • @dc42 I refer to your suggestions, but I have a questions.
    22.jpg
    Do I need to import to the file “DuetWiFiSocketServer” if I want to use Duet3 MB6HC and expansion board 3HC as a standalone board. (No Pi) ?


  • administrators

    You don't need DuetWiFiSocketServer to build Duet 3 firmware.

    Latest RRF 3.01-RC source is currently on branch v3.01-dev of RepRapFirmware. The v3 branch is a few commits older.



  • @dc42 I import the v3.01-dev of RepRapFirmware.1.jpg 88.jpg
    I right click on the project and select build configuration -> Set Active -> Duet3_V06_CAN0.
    99.jpg
    I build it, but I fail.
    log.txt


  • administrators

    The versions of the CoreNG and RepRapFirmware projects you are using are slightly mismatched. Try updating both of them.



  • @dc42 I update CoreNG and RepRapFirmware projects. The previous problem has be fixed but show a new error.
    2.jpg
    log2.txt

    I re-build the project again, and the error will not appear.


  • administrators

    You can find crc32appender.exe under the Tools folder of the RepRapFirmware repository. Copy it on to your PC and add it to the PATH.



  • @dc42 I paste the crc32appender.exe on my path.
    3.jpg
    I fixed all problems. Thank you, but I have the last question.
    Is the bin file for main board if I select build configuration -> Set Active -> Duet3_V06?
    Is the bin file for expansion board if I select build configuration -> Set Active -> Duet3_V06_CAN0 ?
    4.jpg
    5.jpg


  • administrators

    The _CAN0 one is just a test configuration so that we can test the second CAN port, which the standard firmware doesn't use. Use the Duet3_V06 configuration.

    To build expansion board firmware, import project Duet3Expansion into your workspace and build that project.



  • @dc42 Now I know how to build the bin file. Thanks you so much.



  • @dc42 this still stands for RRF3.1 ?

    to build firmware version 2.03beta3 and later use version 2018-q4-major

    or you moved to 2020 version maybe?


  • administrators

    For 3.1.1 I used version 9-2019q4-major. But I see that 9-2020-q2-update is now available, so I'll probably switch to that for 3.2.



  • @dc42 nice, I recompiled it on mac, was faster to get everything up and running without messing out working envinronments for other stuff on my main win desktop and compiling is fast enough that the speed of the mac is not that important 😄 .. brew is a nice addon to osx 🙂 .. brew installs (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599] so exactly what you say you are using for 3.1.1 and the issue is only with src/GCodes/GCodeBuffer/ExpressionParser.cpp the conv.Accumulate is called with wrong number of parameters .. probbly ReprapFirmware:v3-dev vs RRFLibraries:dev at point I was doing a clone were out of sync (I see that whole section is new) ... I just needed to do the quick read of the ADC so I removed that whole section and compiled without a problem 😄 .. got data I needed I returned release 3.1.1. 🙂 ..

    I moved to 2020 myself for few projects and so far did not notice any issues


Log in to reply