Welcome! Log In Create A New Profile

Advanced

Compiling RepRepPro Firmware

Posted by phedoreanu 
Compiling RepRepPro Firmware
April 02, 2015 09:04AM
Hey guys,

I'm trying to compile the RepRapPro firmware from the official github repo and I get 2 errors:
  1. conflicting declaration of C function 'char* utoa(long unsigned int, char*, int)' itoa.h /RepRapFirmware/arduino/core line 34 C/C++ Problem
  2. Invalid arguments 'Candidates are: void init_ethernet(const unsigned char *, const unsigned char *, const unsigned char *) ' Platform.cpp /RepRapFirmware line 1248 Semantic Error
Software versions:
  • arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150303 (release) [ARM/embedded-4_9-branch revision 221220]
  • Arduino hardware folder from official Arduino GitHub repo
  • Arduino libraries folder from jmgiacalone GitHub repo - as described in the README
  • Eclipse IDE for C/C++ Developers, Version: Luna Service Release 2 (4.4.2) Build id: 20150219-0600
  • Eclipse Arduino support - Arduino Eclipse Extensions 2.4.0.201504010213 from http://www.baeyens.it/eclipse/

Any help would be greatly appreciated smiling smiley

P.S.: I'm doing all of this OS X, but that shouldn't matter, right?
I've also attached some screenshots:

Edited 1 time(s). Last edit at 04/02/2015 09:05AM by phedoreanu.
Attachments:
open | download - Screenshot 2015-04-02 13.38.09.jpg (576.3 KB)
open | download - Screenshot 2015-04-02 13.38.23.jpg (575.8 KB)
Re: Compiling RepRepPro Firmware
April 02, 2015 10:55AM
I don't know much about how the ardino/duet compiling works. So I probably can't help in that regard.

But is there some reason you are trying to compile it yourself, instead of just using a released compiled file? (should be .bin in the release folder of the repository)
Re: Compiling RepRepPro Firmware
April 02, 2015 10:59AM
Yes, of course there is a reason. I want to implement an after print complete auto-shutdown mechanism.

EDIT: I also want to upgrade the Ormerod v2 to an Arduino TRE winking smiley

Edited 2 time(s). Last edit at 04/02/2015 11:14AM by phedoreanu.
Re: Compiling RepRepPro Firmware
April 02, 2015 11:32AM
Quote
phedoreanu
Yes, of course there is a reason. I want to implement an after print complete auto-shutdown mechanism.

You can do that already with my or zpl's firmware fork already (not sure about RRP 1.04) using the M80/M81 ATX power control gcodes and the ATX power output pin on the Duet; although you also need to add a pulldown resistor to the Duet. There is an old thread about doing all that on this forum.

There are some compatibility issues between the Arduino plugin for Eclipse and recent versions of both Eclipse and Arduino. Those may account for your difficulties in building the firmware.


Delta printer calibration calculator, mini IR Z probe, and colour touch screen control panel: [escher3d.com]

Large delta printer, and other 3D printer blog postings: [miscsolutions.wordpress.com]

Disclosure: I have a financial interest in sales of the Panel Due, Mini IR height sensor, and Duet WiFi/Duet Ethernet.
Re: Compiling RepRepPro Firmware
April 02, 2015 11:46AM
Hey dc42, awesome! thanks for the infos regarding the auto-shutdown.

Regarding the firmware compilation I've already tried yours and zpl's, same 2 errors and one more comes up in GCodes.cpp:50 :
  • assigning to an array from an initializer list GCodes.cpp /RepRapFirmware line 50 C/C++ Problem
    gCodeLetters = GCODE_LETTERS;

and in GCodes.h:28 :
  • #define GCODE_LETTERS { 'X', 'Y', 'Z', 'E', 'F' } // The drives and feedrate in a GCode

In the official master this has been replaced with:
  • GCodes.cpp:
    const char axis_letters[AXES] = AXIS_LETTERS;
  • GCodes.h:
    #define AXIS_LETTERS { 'X', 'Y', 'Z' } // The axes in a GCode
    #define FEEDRATE_LETTER 'F'// GCode feedrate
    #define EXTRUDE_LETTER 'E' // GCode extrude

So I'm stuck right now smiling smiley

Edited 2 time(s). Last edit at 04/02/2015 11:48AM by phedoreanu.
Re: Compiling RepRepPro Firmware
April 02, 2015 12:13PM
The active source code to my fork lives in the dev branch, and I think you are using the main branch. Try the dev branch, and make sure your C++ compiler flags include -std=gnu++11.


Delta printer calibration calculator, mini IR Z probe, and colour touch screen control panel: [escher3d.com]

Large delta printer, and other 3D printer blog postings: [miscsolutions.wordpress.com]

Disclosure: I have a financial interest in sales of the Panel Due, Mini IR height sensor, and Duet WiFi/Duet Ethernet.
Re: Compiling RepRepPro Firmware
April 02, 2015 01:21PM
So I've switched to your "dev" brach and added "-std=gnu++11", but now I'm missing DueFlashStorage.h.
Grabbed it off sebnil, but I don't think it's the same one you are using.

Another error I get now is : 'class Stream' has no member named 'canWrite' Platform.cpp /RepRapFirmware line 2349 C/C++ Problem
which I weird because in Stream.h:52 I have: "virtual size_t canWrite() const { return 1; } // DC42 added".

And I thought Java has it bad with dependency management...C++ projects are the same...
Re: Compiling RepRepPro Firmware
April 02, 2015 01:46PM
Try out my fork then, it's easy to compile and comes with build instructions. Check out the appropriate document in the data directory.
Re: Compiling RepRepPro Firmware
April 02, 2015 03:43PM
Quote
phedoreanu
So I've switched to your "dev" brach and added "-std=gnu++11", but now I'm missing DueFlashStorage.h.

It's in the build tree, you probably needed to add it to the include path.

Quote
phedoreanu
Another error I get now is : 'class Stream' has no member named 'canWrite' Platform.cpp /RepRapFirmware line 2349 C/C++ Problem
which I weird because in Stream.h:52 I have: "virtual size_t canWrite() const { return 1; } // DC42 added".

There are several patched Arduino core files in the ArduinoCorePatches folder. They need to be copied on top of the corresponding files in your Arduino installation.

Edited 1 time(s). Last edit at 04/02/2015 03:43PM by dc42.


Delta printer calibration calculator, mini IR Z probe, and colour touch screen control panel: [escher3d.com]

Large delta printer, and other 3D printer blog postings: [miscsolutions.wordpress.com]

Disclosure: I have a financial interest in sales of the Panel Due, Mini IR height sensor, and Duet WiFi/Duet Ethernet.
Re: Compiling RepRepPro Firmware
April 03, 2015 04:55AM
Hi phedoreanu!

I wrote a script that downloads the tools, compiles the source and uploads the binary,
it should work on OSX but I have not tested it recently since I don't own a Macintosh.

See [raw.githubusercontent.com]

- It compiles RepRapPro, dc42 and zombiepantslol's repository.
- It does not use Eclipse so you can use any text editor you like.

Question for dc42 / zpl:

Are you still using Arduino 1.5.4 or is there a better version?

Update: The script does not work on dc42's dev branch, I'll look into it...

Edited 1 time(s). Last edit at 04/03/2015 07:00AM by 3D-ES.


RS-Online Ormerod #263, Kossel mini with Minitronics
Fully automatic make script to build Duet RepRapFirmware without Eclipse on Linux and MacOS
Re: Compiling RepRepPro Firmware
April 03, 2015 05:29AM
Quote
3D-ES
Are you still using Arduino 1.5.4 or is there a better version?

Recent versions of my and zpl's fork need a more recent version, not because of anything in the Arduino core, but because they need the C++11 compiler. I am using 1.5.8. zpl has added a customised Arduino tree to his firmware sources recently, based on 1.6.1 I think. I will also be using that model in the near future.


Delta printer calibration calculator, mini IR Z probe, and colour touch screen control panel: [escher3d.com]

Large delta printer, and other 3D printer blog postings: [miscsolutions.wordpress.com]

Disclosure: I have a financial interest in sales of the Panel Due, Mini IR height sensor, and Duet WiFi/Duet Ethernet.
Re: Compiling RepRepPro Firmware
October 14, 2015 01:59AM
Hi @3D-ES,

Did you ever get around to fixing your script for the current versions of the firmware (in particular @dc42's). After spending two days struggling, and so far failing, to get Eclipse working on the Mac the discovery of your Make script came as a breath of fresh air. Really! Until, of course, I discovered it no longer works with the latest codebase. To me, a Make file seems a much better approach to the problem rather than installing (and then using) the behemoth that is Eclipse not to mention the broken Arduino plugin.

Is there anything I can do to help get this running again? I'm using a Mac but have Linux available too.

Best regards
Andy Bower
Re: Compiling RepRepPro Firmware
October 14, 2015 06:50AM
You may want to check out my Makefile, see [github.com] - you can use it to build either the official RRP firmware or my fork. Just be aware you need to install the required Arduino board before you can use it, please have a look at the Hardware directory on my repo first.
Re: Compiling RepRepPro Firmware
October 14, 2015 01:36PM
Hi @zombiepantslol,

Yes, I am aware of your fork and was looking at it just this morning. I am currently using @dc42's version of the firmware because of the delta 7 factor auto-calibration G32 command that it implements. Correct me if I'm wrong but I don't think your fork has this does it?

The other thing I liked about @3D-ES's Makefile was that it was a "one stop shop" and even downloaded all of the necessary components to make it work (or at least it did when it worked smiling smiley ). I will take a look at your Make though and see if I can figure out if it is possible to get it to run with the dc42 fork.

Thanks for the reply.

Best regards
Re: Compiling RepRepPro Firmware
October 14, 2015 06:59PM
No problem! My firmware fork supports the same auto-calibration feature, because it uses basically the same movement code. I can confirm that it works well on a Fisher delta printer.

I admit my Makefile cannot download the required files, but you only need three components to compile my firmware fork (and RRP's) anyway:

1) The firmware itself
2) Arduino 1.6.5
3) An installed version of my Arduino Duet board package (see Hardware directory)

On Linux, you can also compile & upload a firmware binary in one go by running "make upload" without even pressing the Erase button. I figure it wouldn't be too difficult to get this running on OS X, but you need a tool called "stty" and I don't know if it's available for OS X. Besides, I managed to compile dc42's firmware with that Makefile before, but it needs some slight adjustments to work properly (e.g. the SamNonDuePin library is gone in my fork).
Re: Compiling RepRepPro Firmware
October 14, 2015 08:54PM
Quote
zombiepantslol
On Linux, you can also compile & upload a firmware binary in one go by running "make upload" without even pressing the Erase button

How? I think this should be added to the documentation as this should work with the pre-compiled fimrware, too. This would make life much easier. smiling smiley


Slicer: Simplify3D 4.0; sometimes CraftWare 1.14 or Cura 2.7
Delta with Duet-WiFi, FW: 1.20.1RC2; mini-sensor board by dc42 for auto-leveling
Ormerod common modifications: Mini-sensor board by dc42, aluminum X-arm, 0.4 mm nozzle E3D like, 2nd fan, Z stepper nut M5 x 15, Herringbone gears, Z-axis bearing at top, spring loaded extruder with pneumatic fitting, Y belt axis tensioner
Ormerod 2: FW: 1.19-dc42 on Duet-WiFi. own build, modifications: GT2-belts, silicone heat-bed, different motors and so on. Printed parts: bed support, (PSU holder) and Y-feet.
Ormerod 1: FW: 1.15c-dc42 on 1k Duet-Board. Modifications: Aluminium bed-support, (nearly) all parts reprinted in PLA/ ABS, and so on.
Re: Compiling RepRepPro Firmware
October 15, 2015 03:32AM
@zobiepantslol,

Thank you. Well you've convinced me to take a look.

best regards
Re: Compiling RepRepPro Firmware
October 15, 2015 03:54AM
Quote
Treito
Quote
zombiepantslol
On Linux, you can also compile & upload a firmware binary in one go by running "make upload" without even pressing the Erase button

How? I think this should be added to the documentation as this should work with the pre-compiled fimrware, too. This would make life much easier. smiling smiley

Using my fork you can also send M999 PERASE to erase the firmware. Occasionally it leaves the flash memory locked, then you need to either press the erase button or use bossac -u to unlock it before programming.


Delta printer calibration calculator, mini IR Z probe, and colour touch screen control panel: [escher3d.com]

Large delta printer, and other 3D printer blog postings: [miscsolutions.wordpress.com]

Disclosure: I have a financial interest in sales of the Panel Due, Mini IR height sensor, and Duet WiFi/Duet Ethernet.
Re: Compiling RepRepPro Firmware
October 15, 2015 06:52AM
Many thanks for this answer. The problem is if you close the cover (Ormerod 1 or 2) you cannot reach the erase button any more so as long as I can flash the Duet using a PC only it helps very much.


Slicer: Simplify3D 4.0; sometimes CraftWare 1.14 or Cura 2.7
Delta with Duet-WiFi, FW: 1.20.1RC2; mini-sensor board by dc42 for auto-leveling
Ormerod common modifications: Mini-sensor board by dc42, aluminum X-arm, 0.4 mm nozzle E3D like, 2nd fan, Z stepper nut M5 x 15, Herringbone gears, Z-axis bearing at top, spring loaded extruder with pneumatic fitting, Y belt axis tensioner
Ormerod 2: FW: 1.19-dc42 on Duet-WiFi. own build, modifications: GT2-belts, silicone heat-bed, different motors and so on. Printed parts: bed support, (PSU holder) and Y-feet.
Ormerod 1: FW: 1.15c-dc42 on 1k Duet-Board. Modifications: Aluminium bed-support, (nearly) all parts reprinted in PLA/ ABS, and so on.
Re: Compiling RepRepPro Firmware
October 15, 2015 12:40PM
On the Ormerod 1, you can push a plastic prodder through the holes in the back cover to press the Reset and Erase buttons. I don't know whether the Ormerod 2 encosure has similar access holes. I published some printable button pushers on Thingyverse.


Delta printer calibration calculator, mini IR Z probe, and colour touch screen control panel: [escher3d.com]

Large delta printer, and other 3D printer blog postings: [miscsolutions.wordpress.com]

Disclosure: I have a financial interest in sales of the Panel Due, Mini IR height sensor, and Duet WiFi/Duet Ethernet.
Re: Compiling RepRepPro Firmware
October 16, 2015 07:07AM
Thanks I know this but it was only meant as principle. Using a M command is much easier as the printer is standing on another table and the Duet is assigne to the wall and so on. My Ormerod 2 will not use the original case and I have not finished the design of the case yet.


Slicer: Simplify3D 4.0; sometimes CraftWare 1.14 or Cura 2.7
Delta with Duet-WiFi, FW: 1.20.1RC2; mini-sensor board by dc42 for auto-leveling
Ormerod common modifications: Mini-sensor board by dc42, aluminum X-arm, 0.4 mm nozzle E3D like, 2nd fan, Z stepper nut M5 x 15, Herringbone gears, Z-axis bearing at top, spring loaded extruder with pneumatic fitting, Y belt axis tensioner
Ormerod 2: FW: 1.19-dc42 on Duet-WiFi. own build, modifications: GT2-belts, silicone heat-bed, different motors and so on. Printed parts: bed support, (PSU holder) and Y-feet.
Ormerod 1: FW: 1.15c-dc42 on 1k Duet-Board. Modifications: Aluminium bed-support, (nearly) all parts reprinted in PLA/ ABS, and so on.
Sorry, only registered users may post in this forum.

Click here to login