Welcome! Log In Create A New Profile

Advanced

Problem building dc42 firmware in Eclipse

Posted by colsenfoto 
Problem building dc42 firmware in Eclipse
July 02, 2014 05:17AM
I'm trying to build your firmware, @dc42, in Eclipse under Windows - to look into adding multi-extruder support (merge from RepRap 0.78).

I think most of the problems have to do with library-paths

I get the following error:
'class Serial_' has no member named 'canWrite' Platform.cpp /RepRapFirmware line 1696 C/C++ Problem

When I try to open the declaration for "SerialUSB" (by pressing F3), I get two possible implementations. One is located in the project (ArduinoCorePatches) and contains the "canWrite" method. The other is located in "...../arduino/core/USB/..." and dos not contain the method.

How do I tell Eclipse to use the patched version (CDC.h and CDC.cpp)?

Thank you.

Best regards,

Carsten
Re: Problem building dc42 firmware in Eclipse
July 02, 2014 05:37AM
I think the purpose of the ArduinoCorePatches files it to copy them in over the existing ones to get the required functionality.
Re: Problem building dc42 firmware in Eclipse
July 02, 2014 06:52AM
Quote
jstck
I think the purpose of the ArduinoCorePatches files it to copy them in over the existing ones to get the required functionality.

That's correct. Those files are based on Arduino 1.54 so you may need to change them if you are using a more recent Arduino core.

Another change you need to make is to change the C and C++ compiler optimization setting from -Os to -O3 (or you could use -O2 if you want to use a little less program space).

I'm hoping to start (and maybe finish) merging RRP's 0.78 test version into my fork at the weekend.



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: Problem building dc42 firmware in Eclipse
July 02, 2014 07:00AM
Thanks, both of you.

I'm using the latest Arduino 1.5.6, I think. Maybe that's causing my problems.

I get three other errors from the combiner:

./Network.cpp.o: In function `Network::Init()':
C:\EclipseWorkspace\RepRapFirmware\Release/../Network.cpp:322: warning: undefined reference to `RepRapNetworkSetMACAddress'
./network/ethernet_sam.c.o: In function `establish_ethernet_link':
C:\EclipseWorkspace\RepRapFirmware\Release/../network/ethernet_sam.c:208: warning: undefined reference to `ethernet_establish_link'
./network/ethernet_sam.c.o: In function `init_ethernet':
C:\EclipseWorkspace\RepRapFirmware\Release/../network/ethernet_sam.c:200: warning: undefined reference to `ethernet_hardware_init'


The .bin file is produced, but I would not expect it to work....

@dc42, if you plan to include the multi-extruder functionality in your weekend merge-project, I think I will wait for you. Let me know.

Best regards,

Carsten
Re: Problem building dc42 firmware in Eclipse
July 03, 2014 03:56AM
Those 3 references are all in the libraries, either EMAC or lwip. My fork includes all the libraries in the repository whereas RRP's has them in a separate repo. You may need to adjust the project settings to build the libraries from the correct location.



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: Problem building dc42 firmware in Eclipse
July 03, 2014 04:28AM
Thanks, @dc42.

They are not defined in any of the source-files (including libraries) I have on my hard-disk, so I guess I will have have a look at the libraries in your repository as soon as I get the time.

Best regards,

Carsten
Re: Problem building dc42 firmware in Eclipse
August 10, 2014 07:15PM
Linking my original questions on this thread Web Interface support for Ipad/Safari about the build environment, to this solution for unresolved code.

Quote
dc42
Quote
jstck
I think the purpose of the ArduinoCorePatches files it to copy them in over the existing ones to get the required functionality.

That's correct. Those files are based on Arduino 1.54 so you may need to change them if you are using a more recent Arduino core.

Another change you need to make is to change the C and C++ compiler optimization setting from -Os to -O3 (or you could use -O2 if you want to use a little less program space).

I'm hoping to start (and maybe finish) merging RRP's 0.78 test version into my fork at the weekend.

I now have DC's code compiling, for anyone else following in this threads footsteps, there are a few comments to make.

Once a clean project has been setup and the code copied in to the area, a good guide is here Setting up Eclipse for Arduino Due to allow for compilation and upload of RepRap Firmware on the Duet, you need to do as DC comments, the code in the ArduinoCorePatches directories needs to be copied to the Arduino directory, this proved interesting on a Windows 7 machine as this directory is empty when viewed by the windows browser, but clearly has content when looked at through the project manager of eclipse.

It seems that there are soft links setup inside eclipse to point to the relevant directories in the Arduino (1.5.6 ) directory structure. So you need to copy the patch files to that area. Then everything should cleanly compile. Also, changing the -O option sorts out the optimization and gives you differing code sizes as expected.
Sorry, only registered users may post in this forum.

Click here to login