Notifiche
Cancella tutti

Compiling MK3 Firmware  

  RSS
john.n13
(@john-n13)
Estimable Member
Compiling MK3 Firmware

I'm in process of evaluating my new printer's performance and behavior, also reading the various threads on these topics - "tired and indignant" , "1st layer problems", "new firmware with LA enabled ...", and others.

I've printed lots of test cubes, thin walled box sections, etc., and been experiencing the same disappointments and concerns voiced in the other threads. I didn't post photos as (a) I don't see much point in "more of the same" and (b) capturing the defects in the parts is hard (but not so much for those of the tips of fingers and thumbs ...) so I need to work on my photography skills, too.

I have been trying the various pre-compiled firmware that Brigandier's made available (thanks for that), but so far have not found anything significantly better for results than 3.1.3 that my printer came with. I'm still working on the many settings options in s3d to understand their effects.

Now to the issue with which I feel I'm really struggling - getting firmware from github and compiling it. I may be fine, but I'm not sure and I do not want to brick my printer. Available instructions are sparse and not all those commenting on the topic seem to be in concert. The results of my trials don't seem to match others' reported experience, so I'm checking in.

I have downloaded zip files of the MK3 branch, also the 3 versions of the Arduino IDE - 1.6.8, 1.6.13 and 1.8.5. While I note that there is a view that one does not have to move files around in the github download, I have tried it both ways (with and without) and I don't detect a difference in outcome, but I cannot be sure.

I did delete the Arduino LiquidCrystal file before launching the .exe, loading the Firmware.ino file, compiling and exporting the firmware. With all 3 Arduino versions, the required board selection seemed to be "mega". Only 1.6.8 completed and generated hex files - 1.6.13 and 1.8.5 errored out.

The files generated were "Firmware.ino.mega.hex" and "Firmware.ino.with-bootloader.mega.hex" (there was another hex file - Firmware.ino.rambo.hex - that was part of the firmware load from github). I know I don't need a bootloader - so is it the correct outcome for me to take Firmware.ino.mega.hex, give it my preferred identifier name and upload it to the printer, or did I screw up and what I have is not the correct result? If the latter, what did I do wrong and what should I be seeing?

Also, is failure of compile attempts with 1.6.13 and 1.8.5 expected? I think I've seen two people report using the former successfully, raising a doubt in my mind about the procedure I have been following.

Lots of questions here, but I'd like to check in with the experts and get this process squared away once and for all. Thanks in advance for your comments.

Postato : 04/04/2018 10:21 pm
Brigandier
(@brigandier)
Reputable Member
Re: Compiling MK3 Firmware

Most of the 3.2.0 alpha builds are kinda so so. They have some experimental / debug features regarding stepper timings that can adjust the moire a bit, new stepper methods altogether, etc, but they are still heavily alpha builds and come with new problems due to that.

I am at work at the moment so only checking in from time to time; however, if you want to save yourself some trouble please find 3.1.3 with Linear Advance enabled attached to this post. Linear Advance is likely the best option you can enable to improve your print quality right now, and both sdcard/Octoprint users alike seem to be having good luck with LA enabled on this version of the firmware.

I would still try to get that compile process going though. You'll learn a crap load about your MK3. 😉

My MK3 Parts: [Bowden] [New Shoes] [TPU Micro Springs]

Postato : 04/04/2018 10:46 pm
john.n13
(@john-n13)
Estimable Member
Topic starter answered:
Re: Compiling MK3 Firmware


Most of the 3.2.0 alpha builds are kinda so so. They have some experimental / debug features regarding stepper timings that can adjust the moire a bit, new stepper methods altogether, etc, but they are still heavily alpha builds and come with new problems due to that.

I am at work at the moment so only checking in from time to time; however, if you want to save yourself some trouble please find 3.1.3 with Linear Advance enabled attached to this post. Linear Advance is likely the best option you can enable to improve your print quality right now, and both sdcard/Octoprint users alike seem to be having good luck with LA enabled on this version of the firmware.

I would still try to get that compile process going though. You'll learn a crap load about your MK3. 😉

Thanks, your 3.1.3 LA Enabled is on my list for a "retry" - it was my first firmware load attempt and I didn't get it right (wrong COM port) and didn't comprehend the significance of the message until I later saw that from a good load!

Yes, I'm intent on getting to understand the compile process and the underpinnings of the firmware, so I'm really hopeful of feedback to my questions on my experiences so far...

And then there's G-code to get a handle on, too.

Postato : 04/04/2018 10:58 pm
stahlfabrik
(@stahlfabrik)
Honorable Member
Re: Compiling MK3 Firmware

a) use Arduino 1.8.5 - it works perfectly well for compiling the firmware.
b) I would not recommend loading the latest commit from GitHub but the commit that points to the latest STABLE version of the firmware.
c) for THAT stable version I can assure you that you do not have to move anything around - all I did is renaming that LCD library that you have mentioned that came bundled with the IDE.
d) make sure you are on the correct GitHub branch - MK3

For me it does NOT generate two hex files (with or without boot loader). Instead it overwrites the hex file that is present in the repository and you can even upload that directly from within Arduino - did you install the EINSY board via the board manager URL?

Postato : 05/04/2018 5:54 pm
Brigandier
(@brigandier)
Reputable Member
Re: Compiling MK3 Firmware


a) use Arduino 1.8.5 - it works perfectly well for compiling the firmware.
b) I would not recommend loading the latest commit from GitHub but the commit that points to the latest STABLE version of the firmware.
c) for THAT stable version I can assure you that you do not have to move anything around - all I did is renaming that LCD library that you have mentioned that came bundled with the IDE.
d) make sure you are on the correct GitHub branch - MK3

For me it does NOT generate two hex files (with or without boot loader). Instead it overwrites the hex file that is present in the repository and you can even upload that directly from within Arduino - did you install the EINSY board via the board manager URL?

On the highlight above, just to clarify for anyone who isn't aware, instead of trying to hunt down the particular commit you can instead check out the appropriate tag, which is likely v3.1.3 at the moment.

My MK3 Parts: [Bowden] [New Shoes] [TPU Micro Springs]

Postato : 05/04/2018 6:09 pm
Kwaad2
(@kwaad2)
Honorable Member
Re: Compiling MK3 Firmware


a) use Arduino 1.8.5 - it works perfectly well for compiling the firmware.
b) I would not recommend loading the latest commit from GitHub but the commit that points to the latest STABLE version of the firmware.
c) for THAT stable version I can assure you that you do not have to move anything around - all I did is renaming that LCD library that you have mentioned that came bundled with the IDE.
d) make sure you are on the correct GitHub branch - MK3

For me it does NOT generate two hex files (with or without boot loader). Instead it overwrites the hex file that is present in the repository and you can even upload that directly from within Arduino - did you install the EINSY board via the board manager URL?

A) I'm using 1.6.13, which is DOCUMENTED to be the most recent supported version 1.6.x family on the prusa firmware. (Nothing wrong with using a newer version, but it COULD cause compling errors. (which apparently it dont... for now)

B) By "Stable" do you mean 3.1.3? Cause like... other than to learn compiling... That's really old... And I'm not 100% sure if they had added it YET, (they have now) that if you compile your own firmware you get an annoying nag screen, saying you are running custom firmware, every time you connect with a Pi, or restart the printer.

C) With the most recent commit on April 4th, I can confirm it compiles without needing to move any files once Arduino is configured.

D) Yeah, I agree 100% with this. Don't put the new 3.1.4RC1 on your Mk3... it's for a Mk2.5... 😉

EDIT: There is a 3.2 Alpha release 8 days ago... Although in any defense... Alpha is NEVER stable. 😉

Hi, I'm Sean. I used to work on CNC machines.
I try to not make mistakes, but the decision is YOURS.
Please feel free to donate to my filament/maintance fund.

Postato : 05/04/2018 6:19 pm
john.n13
(@john-n13)
Estimable Member
Topic starter answered:
Re: Compiling MK3 Firmware


a) use Arduino 1.8.5 - it works perfectly well for compiling the firmware.
b) I would not recommend loading the latest commit from GitHub but the commit that points to the latest STABLE version of the firmware.
c) for THAT stable version I can assure you that you do not have to move anything around - all I did is renaming that LCD library that you have mentioned that came bundled with the IDE.
d) make sure you are on the correct GitHub branch - MK3

For me it does NOT generate two hex files (with or without boot loader). Instead it overwrites the hex file that is present in the repository and you can even upload that directly from within Arduino - did you install the EINSY board via the board manager URL?

Thanks. I'll try 1.8.5 again now that I have a better handle on the overall landscape. And I was on MK3!

Postato : 05/04/2018 6:47 pm
john.n13
(@john-n13)
Estimable Member
Topic starter answered:
Re: Compiling MK3 Firmware



a) use Arduino 1.8.5 - it works perfectly well for compiling the firmware.
b) I would not recommend loading the latest commit from GitHub but the commit that points to the latest STABLE version of the firmware.
c) for THAT stable version I can assure you that you do not have to move anything around - all I did is renaming that LCD library that you have mentioned that came bundled with the IDE.
d) make sure you are on the correct GitHub branch - MK3

For me it does NOT generate two hex files (with or without boot loader). Instead it overwrites the hex file that is present in the repository and you can even upload that directly from within Arduino - did you install the EINSY board via the board manager URL?

A) I'm using 1.6.13, which is DOCUMENTED to be the most recent supported version 1.6.x family on the prusa firmware. (Nothing wrong with using a newer version, but it COULD cause compling errors. (which apparently it dont... for now)

B) By "Stable" do you mean 3.1.3? Cause like... other than to learn compiling... That's really old... And I'm not 100% sure if they had added it YET, (they have now) that if you compile your own firmware you get an annoying nag screen, saying you are running custom firmware, every time you connect with a Pi, or restart the printer.

C) With the most recent commit on April 4th, I can confirm it compiles without needing to move any files once Arduino is configured.

D) Yeah, I agree 100% with this. Don't put the new 3.1.4RC1 on your Mk3... it's for a Mk2.5... 😉

EDIT: There is a 3.2 Alpha release 8 days ago... Although in any defense... Alpha is NEVER stable. 😉

Thanks, your comments all noted. I'll give 1.6.13 another spin.

Postato : 05/04/2018 6:50 pm
stahlfabrik
(@stahlfabrik)
Honorable Member
Re: Compiling MK3 Firmware

Just use the latest Arduino. No need to use an older version.
Where is it documented it has to be 1.6.? And how OLD is that document? 🙂

Postato : 05/04/2018 10:15 pm
john.n13
(@john-n13)
Estimable Member
Topic starter answered:
Re: Compiling MK3 Firmware


Just use the latest Arduino. No need to use an older version.
Where is it documented it has to be 1.6.? And how OLD is that document? 🙂

I'm giving the "all" a try since I had selective failures to compile (though I was trying with the latest commit). Now I am going to use the 3.1.3 file for each of the arduino versions from 1.6.3 to get a sense for what I should be looking at/for.

Postato : 05/04/2018 10:46 pm
Julien
(@julien-2)
Utenti
Re: Compiling MK3 Firmware

Hi, I'm having issues as well compiling the MK3 firmware.
I was able to do it about a month ago, I don't understand what broke.
Maybe that I updated OSX to High Sierra?
I tried to:
- delete Arduino and its preferences Library/Arduino15 and reinstall
- reclone the firmware

When using Arduino 1.6.8 I have this error:
failed MSpanList_Insert 0x30b000 0xe003c8198c2e 0x0
fatal error: MSpanList_Insert
...
Error compiling for board RAMBo.

When using Arduino 1.6.12 or 1.8.5 I have this error:
sketch/Marlin_main.cpp: In function 'gcode_M45.constprop':
Marlin_main.cpp:2414: error: unrecognizable insn:
}
^
...
lto-wrapper: /Users/juliendodokal/Library/Arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc returned 1 exit status
/Users/juliendodokal/Library/Arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/../lib/gcc/avr/4.9.2/../../../../avr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
exit status 1
unrecognizable insn:

I did copy the hardware and library folders in Arduino, added the RAMBo additional board in prefs then downloaded and selected it.

Am I missing something? I'm starting to go crazy!

Postato : 10/04/2018 11:54 am
Julien
(@julien-2)
Utenti
Re: Compiling MK3 Firmware

OK, I was able to find the commit that broke my compilation:
https://github.com/prusa3d/Prusa-Firmware/commit/67e90b576a3563907cf9ea5f557646ace19c6939

Haha! You devil commit!

Well I still don't understand the exact issue but was able to pinpoint to this change:
-//#define DBG(args...) printf_P(args)
-#define DBG(args...)
+#define DBG(args...) printf_P(args)
+//#define DBG(args...)

Up until this commit no issue to compile (Arduino 1.6.12 or 1.8.5), but since this change, it fails.
I was even able to compile (and flash :P) the up-to-date MK3 branch by reverting these 2 lines.

Should I open a ticket?

Postato : 10/04/2018 2:08 pm
Martin Stoufer
(@martin-stoufer)
Estimable Member
Re: Compiling MK3 Firmware

That is crazy wrong! I can confirm that Arduino compiles fine w/this revert in place (and quite quickly too!) I'm using 1.6.12 and I guess the initial code was correct and this fix was a workaround?

Postato : 13/04/2018 7:23 am
Julien
(@julien-2)
Utenti
Re: Compiling MK3 Firmware

I opened a ticket there:
https://github.com/prusa3d/Prusa-Firmware/issues/614

Postato : 13/04/2018 10:30 am
RetireeJay
(@retireejay)
Reputable Member
Re: Compiling MK3 Firmware

I tried compiling using Arduino 1.8.5, but got the "internal compiler error: in extract_insn, at recog.c:2202" that they mention in the README file on Github. So I installed Arduino 1.6.8 as instructed, and the firmware compiles OK.

Postato : 02/05/2018 9:49 pm
Peter in Katy
(@peter-in-katy)
Estimable Member
Re: Compiling MK3 Firmware

Before I do something stupid, my Export compiled binary is 637k.
Is that right? The Prusa firmware is a little over 800k.

As seen here,

Postato : 31/07/2018 1:38 am
Condividi: