Improving Build Instructions



  • Re: Attempt at improving BuildInstructions.md

    Hello everyone,
    I am attempting to compile the firmware for the first time and I am running into some issues. I am hoping that everyone can benefit from my confusion by opening this topic.

    My first issue is with step #5. I am running "which rm" in my command prompt and am getting the "not recognized as an internal or external command" error.

    My second issue is that Eclipse isn't seeing the g++ and gcc paths. I set the environment variable to the ArmGccPath variable in Eclipse and set it as variable type path and directory and both still show that it can't find the compiler.

    Thanks for the help.



  • For reference, here is a part of my path:5d065f8a-3d2b-4c03-a37c-43ecbeb618c9-image.png
    and here is what I am seeing in Eclipse:
    9f884407-fc80-44ef-8027-cf7a6360b463-image.png
    This is my variable that I made in Eclipse:
    391831c9-3bfe-4c3a-b12f-45e9c006420a-image.png



  • Right click the project, click Properties,

    Go to C++ Build -> Environment.

    There should be PATH variable visible here as well, double check that everything is the same as the system path. You should see the 'C:\program files\arm....' and 'C:\program files\GNU...' here as well.

    path.png



  • Hi Zhang, thanks for responding. When I first opened that up, it didn't have anything in it. I set my path to the value you have there and re-copy-pasted the same value into my system path to make sure they are the same. What variable do I make when adding the 'C:\program files\arm....' and 'C:\program files\GNU...' to this list? I am now getting this error when I try to build:
    fef9791b-7447-4521-817f-e072479b2cad-image.png



  • Mine has the following path as well which contains the make.exe

    C:\Program Files\GNU ARM Eclipse\Build Tools\2.6-201507152002\bin

    I think the list is semi-colon delimited (the screenshot I posted had a bit scrubbed for privacy). In the end you want something looking like this:

    PATH: ${ArmGccPath};C:\Program Files\GNU Arm Eclipse\......\bin



  • Ok, thanks for specifying that information. I make the changes that you mentioned and Eclipse is now giving me the following output:
    e9d66b7c-aa47-4a8d-aeb2-517523e2bccd-image.png
    4153cbab-045d-456e-ba9d-2994805652b2-image.png



  • Under the cmake section, I don't have a toolchain file. Not sure if this is an issue or not either.


  • administrators

    It looks like you have somehow lost the tool prefix, because it should be looking for arm-none-eabi-g++ not simply g++.

    c01282e8-7627-4858-891f-cb8b118b8d28-image.png



  • Hi @dc42 I appreciate your help. It is looking like there is something larger that is the matter with my configuration. I don't even have Tool Settings.
    18963b7a-b546-454e-bd90-ea29535f4db6-image.png



  • Okay, so I was looking over the build instructions again and I realized that for some of the repos I installed the master version instead of the specified version. I am now using the specified version of each repo and I am seeing the arm-none-eabi for all the repos except the CANlib and FreeRTOS.
    5e1205ff-3171-499a-9e88-3f6af5be06f7-image.png
    Even with that, I am still getting the path error.



  • Also, with the repos where I am able to find the Tool Settings, it is looking like it is trying to compile and gets build errors. So to my understanding it is interesting that it is saying that it can't find it in path still.



  • Hi everyone, I am not experienced in building large C++ projects and I don't want to be a burden on the forum, does anyone have a good resource on general build advice/troubleshooting that I can look at?



  • Hello everyone,
    I finally was able to compile the firmware! I am noting down what I did here that made it work hopefully to help others with the first build.

    Make sure that:
    You are checking out the correct "tags" of a repo in github. A certain version of the firmware requires certain tags of a repo to be installed. See this for V 3.02: https://github.com/Duet3D/RepRapFirmware/blob/v3.02-dev/BuildInstructions.md ... there is a table listing the tag (not branch) to pull from.

    Also, the order of "make" in path matters. I had Chocolatey installed also and its make was further u on the list in my Path environment variable which overrode the version of make that is being used for this project.

    This forum post has a lot of helpful information and got me the rest of the way.: https://forum.duet3d.com/topic/19980/little-help-to-build-rrf3/3

    Good luck!



  • Also, an easy way to add a project to Eclipse is File -->Open Projects From File System and then select the Firmware directory with all of the downloaded projects into it.

    Also, make sure to read the entire page of instructions, not skipping over anything. For the Duet 3 you don't need to compile the DuetWifiSocketServer project, but you do still need it added into Eclipse.



  • @Garth_42 Im glad if my topic help you because @oliof is great and wonderfull.

    I think I have my solution near...will see

    Can you share your downloaded CoreNG, FreeRTOS, RRFLibraries, duetwifisocket and Reprapfirmware?

    Yo check if my problem is my environnment or files

    Thank you



  • Nevermind finally compiled latest version fine.



  • @seraser glad you finally compiled it! Sorry I didn’t respond in time.


Log in to reply