Welcome! Log In Create A New Profile

Advanced

Compiling Source

Posted by ElmoC 
Compiling Source
September 17, 2016 07:05PM
I am trying to compile the Duet firmware and I am having problems getting it to work. I have followed the directions in the BuildInstructions.txt but am not getting it to compile. I am not clear on a couple of the steps.

In step 3, it says to create a new workspace called C:/Eclipse/Firmware. There isn't a new workspace option so I am guessing to create a new project. When doing this, Eclipse wants to know what type of project to make.

Step 6 says to import the CoreNG and RepRapFirmware projects. I selected the "Existing Projects into Workspace" option and set the root directory to C:/Eclipse/Firmware/CoreNG and C:/Eclipse/Firmware/RepRapFirmware. They show up in the workspace.

When I try to build the projects, the build fails. The Project Explorer show both the CoreNG and RepRapFirmware projects. It also shows a project name I used when I created the workspace. When I try building CoreNG from the base of the workspace, it acts like it is doing something, but doesn't report anything. If I run the RepRapFirmware, it reports an error trying to make the .ELF file. If I try building the projects under the one created with the workspace, they both fail with lots of errors.

Where did I mess up?
Re: Compiling Source
September 17, 2016 10:25PM
I spent about 3 hours today getting 1.15c to compile on my windows machine. The errors you're encountering could be different due to different versions in the toolchain, but here's the things I remember doing:

CoreNG:
iota.h and iota.c needed some correction based on gcc version.

RepRapFirmware:
Had to change line 68 in netbios.c to #define NETBIOS_STRCMP(str1, str2) strcasecmp(str1, str2)
Makefile paths were incorrect in linking. Disabled autogenerated makefile, edited the generated file with quotes around paths.

Edited 1 time(s). Last edit at 09/17/2016 10:25PM by Crispy001.
Re: Compiling Source
September 18, 2016 04:52AM
Looks like you are using a more recent version of gcc than I am. Do you know which version it is, and where did you get it from?



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Compiling Source
September 18, 2016 08:40AM
I am using the version in Arduino 1.5.8 as described in the build instructions.
Re: Compiling Source
September 18, 2016 09:04PM
Quote
dc42
Looks like you are using a more recent version of gcc than I am. Do you know which version it is, and where did you get it from?

I'm using gcc/g++ 5.4 via cygwin.

My code in itoa.c looks like this ~line 124:

#if __GNUC__ > 4 || \
    (__GNUC__ == 4 && (__GNUC_MINOR__ > 9 || \
                       (__GNUC_MINOR__ == 9 && \
                        __GNUC_PATCHLEVEL__ > 2)))
extern char* utoa( unsigned value, char *string, int radix )
#else
extern char* utoa( unsigned long value, char *string, int radix )
#endif

And a similar change in itoa.h ~line 34:

#if __GNUC__ > 4 || \
    (__GNUC__ == 4 && (__GNUC_MINOR__ > 9 || \
                       (__GNUC_MINOR__ == 9 && \
                        __GNUC_PATCHLEVEL__ > 2)))
extern char* utoa( unsigned value, char *string, int radix ) ;
#else
#endif
Sorry, only registered users may post in this forum.

Click here to login