Dual head firmware sources

Discussions about firmware/slicing software, tweaks and settings
Post Reply
scp
Posts: 19
Joined: Mon Dec 30, 2013 1:02 am

Dual head firmware sources

Post by scp » Mon Jan 06, 2014 12:43 am

Dear all,

while waiting for my Felix 3.0 Kit (with dual extruder) I have taken the liberty to have a closer look at the latest dual extruder repetier-based firmware. I have loaded it in Atmel Studio (with VisualMicro and Naggy extensions installed). Naggy is a very useful tool, only sometimes a little bit too picky. It's actually running Clang and pointing out issues that the compilers might not complain about.

I'd like to point your attention to the following issues:

HAL.cpp:

Code: Select all

const uint16_t slow_div_lut[257] PROGMEM = {0,[b]F_CPU/32,F_CPU/64,F_CPU/96,F_CPU/128,F_CPU/160,F_CPU/192,F_CPU/224[/b], ...
The values calculated based on the F_CPU of 16000000UL are too big to be stored in uint16_t; they are changed to:
F_CPU/32: 41248 (instead of 500000)
F_CPU/64: 53392 (instead of 250000)
F_CPU/96: 35594 (instead of 166666)
F_CPU/128: 59464 (instead of 125000)
F_CPU/160: 34364 (instead of 100000)
F_CPU/192: 17797 (instead of 83333)
F_CPU/224: 5892 (instead of 71428)

The other values are ok for that F_CPU.

Extruder.cpp
twice:

Code: Select all

...
        if(act->enablePin > -1)
...
This statement is always true. Not sure if this is really intentional.

SDCard.cpp

Code: Select all

        Printer::moveToReal(Printer::xMin,Printer::yMin+Printer::yLength,Printer::currentPosition[Z_AXIS],Printer::currentPosition[E_AXIS],Printer::maxFeedrate[X_AXIS]);
The value of E_AXIS is 3, which is past the end of the array. There are only three elements in Printer::currentPosition.

I can't determine whether the issues have any adverse effect in the operation of the firmware; I just wanted to give a heads-up. No offense meant... ;)

Regards,
Paul

User avatar
gfeliksdal
Site Admin
Posts: 402
Joined: Sat Feb 25, 2012 10:40 pm
Location: Netherlands
Contact:

Post by gfeliksdal » Mon Jan 06, 2014 2:15 am

Hi Paul,
I'll check this with the repetier firmware developer. Maybe he has some comments on that. Also I've updated the firmware today, has lots of bugfixes. Please check if you can find the same issues...
Kind regards,
Guillaume

User avatar
DDME-Marc
Posts: 71
Joined: Sun Nov 24, 2013 11:04 pm
Location: New Zealand

Post by DDME-Marc » Mon Jan 06, 2014 3:39 am

Hi Guillaume,

Great to see on going releases of Firmware coming out to resolve various bugfixes.

Seeing that a second version of the 0.91 has been released today I proceeded to upload however when attempting to so (using the Arduino interface) it suspends shortly after creating the sketch file and does not complete the transfer to the printer. It continues to suspend during the upload process, especially compared to previous updates (which took about half a minute minute to complete). After approximately ten minutes of no activity I cancelled the process?

For the interim I have successfully re-installed the first release of 0.91.

Please advise if the failed update is stemming from this particular Firmware release or a separate problem at our end.

Cheers,

Marc
Felix 3.0 Dual Head * E3D Titan V6 * Repetier-Host V2.1.3 * Repetier-Firmware 0.92.9 (01/08/17 - Modified) * KISSlicer Pro - 1.6.3 * Arduino 1.8.5 *

scp
Posts: 19
Joined: Mon Dec 30, 2013 1:02 am

Post by scp » Mon Jan 06, 2014 10:10 am

Hi Guillaume,

thank you very much for your quick answer!
gfeliksdal wrote:Also I've updated the firmware today, has lots of bugfixes. Please check if
you can find the same issues...
The issues mentioned are still in the 20140601 version.

However I have switched on the compiler output, too, and have seen some warnings about variables " may be used uninitialized" in Extruder.cpp, SdFat.cpp and ui.cpp.

And in motion.cpp there is another integer overflow

Code: Select all

    while(timeleft < 4500 * MOVE_CACHE_SIZE && maxfirst != linesWritePos)
MOVE_CACHE_SIZE is 16. The variable size of timeleft is ok here (long), but 4500 * MOVE_CACHE_SIZE results in an overflow before being compared. 4500UL can do the job.

Again, I can't determine if any of these have adverse effects.

Best Regards,
Paul

User avatar
gfeliksdal
Site Admin
Posts: 402
Joined: Sat Feb 25, 2012 10:40 pm
Location: Netherlands
Contact:

Post by gfeliksdal » Mon Jan 06, 2014 12:30 pm

@ddme-marc: Did it happen once? or did you try it more times? I've had to update 5 printers here and none showed the issue you describe. So I hope it is a one time thing

@Paul: I'll inform repetier about it, but haven't experienced strange behavior which could be related to this yet. But maybe it could happen in some specific condition.

User avatar
DDME-Marc
Posts: 71
Joined: Sun Nov 24, 2013 11:04 pm
Location: New Zealand

Post by DDME-Marc » Mon Jan 06, 2014 7:55 pm

Hi Guillaume,

With regards to uploading the Firmware yes I tried multiple times, each time resulting with the same suspended transfer error. For a benchmark how long does your Firmware upload take?

In a similar thread ( http://forum.felixprinters.com/viewtopi ... 4536#p4536 ) it would appear Ole sounds to have similar problem.

I am following the same upload process described in the FELIX 2.0, version 3, User Manual (page 27). This process worked fine moving from 0.90 to the first release of 0.91 made available 31/12/13.

I'm not an expert when it comes to Firmware but I take it their is no issue that I am trying to upload the second release of 0.91 Firmware over top off the first release of 0.91 firmware?

Ideas for an alternate approach will be gladly welcomed.

Cheers,

Marc
Felix 3.0 Dual Head * E3D Titan V6 * Repetier-Host V2.1.3 * Repetier-Firmware 0.92.9 (01/08/17 - Modified) * KISSlicer Pro - 1.6.3 * Arduino 1.8.5 *

User avatar
gfeliksdal
Site Admin
Posts: 402
Joined: Sat Feb 25, 2012 10:40 pm
Location: Netherlands
Contact:

Post by gfeliksdal » Mon Jan 06, 2014 10:48 pm

Hi Marc,

I've uploaded new firmware, maybe that fixes your issue. Flashing older firmware doesn't matter. It comletely wipes the memory before flashing.

User avatar
DDME-Marc
Posts: 71
Joined: Sun Nov 24, 2013 11:04 pm
Location: New Zealand

Post by DDME-Marc » Tue Jan 07, 2014 12:13 am

Hi Guillaume,

The latest 0.91 Firmware release (20140107) has uploaded successfully.

Many thanks to you and the Felix crew for the prompt response.

Cheers,

Marc
Felix 3.0 Dual Head * E3D Titan V6 * Repetier-Host V2.1.3 * Repetier-Firmware 0.92.9 (01/08/17 - Modified) * KISSlicer Pro - 1.6.3 * Arduino 1.8.5 *

User avatar
gfeliksdal
Site Admin
Posts: 402
Joined: Sat Feb 25, 2012 10:40 pm
Location: Netherlands
Contact:

Post by gfeliksdal » Tue Jan 07, 2014 8:36 am

I forgot to tell you if you flash the same firmware twice, the eeprom values don't get overwritten. To reset the eeprom values, you should change the EEPROM_MODE parameter in configuration.h to a different number execept 0.

OleJunger
Posts: 7
Joined: Tue Dec 31, 2013 6:10 pm
Location: Reutlingen, Deutschland

Post by OleJunger » Tue Jan 07, 2014 4:45 pm

I don´t know, in my case it will not do it!

Binäre Sketchgröße: 90.218 Bytes (von einem Maximum von 258.048 Bytes)
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

What I have to do for right way?
- I have the right USB port
- the right board (Mega 2560 or Mega ADK)
- changed the number (#define EEPROM_MODE 0)

Is this a driver problem?

Post Reply