Sanguino firmware from Linux 64?
January 26, 2015 02:53PM
I've been struggling with this for a while now, and have several conversations in progress with experts, but perhaps I am asking the wrong questions; so I will try another route.

Has anyone successfully created firmware for Sanguinololu 1.3a using linux 64bit OS?

Specifically I use Linux Mint 17-64, but any recent Ubuntu shouldbe equivalent of doable. I used Arduino IDE from the software center, Sanguino-0101r1 from google code, and sprinter from klimet's github. Compiling give this error:

/usr/share/arduino/hardware/sanguino/cores/arduino/HardwareSerial.cpp:132:15: error: attempt to use poisoned "SIG_USART1_RECV"
#elif defined(SIG_USART1_RECV)
^

which makes me think something is WAY wrong, and the "fix" results in firmware that loads, but does not see the endstops, and the x-axis only moves away from the endstop. Something about the pin mapping appears to be wrong. I probably missed something simple, or did something stupid, but I can't see it.

Note: Until I started reloading firmware,my printer was functioning well. No hardware has changed, I just needed to tweek the e-steps in firmware. So I think the everying is fine except the firmware.
Re: Sanguino firmware from Linux 64?
January 26, 2015 06:56PM
I have compiled Sanguino on Ubuntu 14.10 updated fully as of 2015-01-25. I ran in to the exact problem you have. The fix was to comment out the line in question, as well as the one below it.

Here's what my /usr/share/arduino/hardware/sanguino/cores/arduino/HardwareSerial.cpp looks like:
Quote

...
#if defined(USART1_RX_vect)
void serialEvent1() __attribute__((weak));
void serialEvent1() {}
#define serialEvent1_implemented
SIGNAL(USART1_RX_vect)
{
unsigned char c = UDR1;
store_char(c, &rx_buffer1);
}
//#elif defined(SIG_USART1_RECV)
// #error SIG_USART1_RECV

#endif

#if defined(USART2_RX_vect) && defined(UDR2)
...

After I commented out those two lines, #132 and #133, I could compile the Sanguino bootloader just fine. In my case, I was building it for use on my RepRap Gen3 motherboard, as rambled about here.

I guess I should add, for all I know, this doesn't really fix anything. The compile error message went away, obviously. I'm pretty amateur with my printer right now and I'm not using my end-stops.

I hope that's remotely helpful for you.

Edited 3 time(s). Last edit at 01/26/2015 06:58PM by docdawning.
Re: Sanguino firmware from Linux 64?
January 27, 2015 04:56AM
Quote
docdawning
After I commented out those two lines, #132 and #133, I could compile the Sanguino bootloader just fine. In my case, I was building it for use on my RepRap Gen3 motherboard, as rambled about here

Nice fix. Just please don't confuse bootloader and firmware. Two entirely independent pieces of software on the same controller. Bootloaders usually come readily compiled as .hex file and never need changing as long as they work at all. What you built was the firmware.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Sanguino firmware from Linux 64?
January 27, 2015 05:41PM
Hi! Thanks for the responses. I tried as suggested, it does make the message go away, and allows compilation of the firmware, same as editing Arduino.h in /usr/share/arduino/hardware/sanguino/cores/arduino adding...

#define __AVR_LIBC_DEPRECATED_ENABLE__ 1

Unfortunately, it does not make the endstops work.

Does anyone know exactly what was depricated here with SIG_USART1_RECV? Would it affect the pin mappings for ATMEGA644P?
Re: Sanguino firmware from Linux 64?
January 28, 2015 06:00AM
Quote
prof braino
Unfortunately, it does not make the endstops work.

Endstops are a matter of firmware configuration, not of the Arduino library. M119 reports their status.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Sanguino firmware from Linux 64?
February 17, 2015 01:36PM
Follow up: I finally fixed these issues. The root cause appear to be installing the Arduino IDE 1.0.6 from the software center. This method installs to /usr/share/arduino and this causes the issue. The solution was to download the arduino IDE archive (to ~/Downloads in my home directory) extract (Extract Here works, as long as it ends up somewhere under my home directory), and use the Arduino IDE directly from the extracted directory, with no actual "install" step. As far as I can tell, the extract method means I have group and user priveledges for everything, while the software center install method ends up with root having control of something. I did not investigate this further as I am not a developer.

Also, the "fix" listed in posts 1 and 2 of this thread were a red herring, they require edit of things that should not be touched, and indicate that something else is wrong (and did not get me working).

Finally, the endstop issue was caused by the fuses getting set incorrectly when I burned the bootloader. The root cause for that is errors in the Sanguino-0101r1 from google code; the boards.txt file sanguino1.3a section has incorrect fuse settings.
Sorry, only registered users may post in this forum.

Click here to login