Welcome! Log In Create A New Profile

Advanced

Problem building Duet firmware

Posted by dc42 
Re: Problem building Duet firmware
January 09, 2014 09:34AM
Quote
dc42
Quote
3D-ES
My firmware seems to be running stable now, even if the binary contents is different!

RRP have now updated the libraries in github with the changes they were using. I can now build binaries that match the released ones, save for a few strings near the end which have the build path embedded within them.

I am still getting loads of differences when I compare the two, but I am compiling on Windows 7, so maybe that's the reason.

Paul


RS Ormerod No 436
Re: Problem building Duet firmware
January 09, 2014 09:44AM
I have given up for the day trying to rebuild the code. I have done it in Linux Mint 15, Windows 7 and directly in Arduino 1.5.5. It is like operating a random number generator.

In Linux it moaned about "no rule for clean". And then suddenly that went away, but it ended up with a range of errors.

I eventually got the thing to build without any warnings or errors in Windows 7. Then I rebuilt and ended up with around 7 errors. It just keeps on growing. After several rebuilds it sits at 937 errors and 133 warnings. Now I got 805 errors. It is a moving target, so I must be doing something seriously wrong.

Will try again tomorrow.
Re: Problem building Duet firmware
January 09, 2014 10:33AM
Quote
TMD_RS436
I am still getting loads of differences when I compare the two, but I am compiling on Windows 7, so maybe that's the reason.
Paul

I too am compiling under Windows 7. I see lots of differences, but they are sporadic (i.e. only about 1 or 2 contiguous bytes at a time) up until offset 0002360E, indicating changes in addresses rather than changes in the the code. At that point I see "C:\Users\..." in my build and "/home/..." in the RepRapPro build. I traced it to a couple of uses of __FILE__ in the source code.



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 Duet firmware
January 10, 2014 10:46AM
Quote
victors
I have given up for the day trying to rebuild the code. I have done it in Linux Mint 15, Windows 7 and directly in Arduino 1.5.5. It is like operating a random number generator.

In Linux it moaned about "no rule for clean". And then suddenly that went away, but it ended up with a range of errors.

I eventually got the thing to build without any warnings or errors in Windows 7. Then I rebuilt and ended up with around 7 errors. It just keeps on growing. After several rebuilds it sits at 937 errors and 133 warnings. Now I got 805 errors. It is a moving target, so I must be doing something seriously wrong.

Will try again tomorrow.

Sounds familiar, I have also plowed through lots of strange and seemingly unexplainable messages...
When you manage to configure the random error generator (Eclipse) the messages should stay away.

* You can safely ignore the "no rule for clean" message, it does not cause any problems in my configuration.
* The "Errors" in the "Problems" panel does not always remove old items, right-click "Errors -> Delete" to reset the list.

I have installed the software again in a 32-bit windows XP virtual machine, most errors were due to wrong
settings in the "Properties for RepRapFirmware -> C/C++ General -> Paths and Symbols -> Includes" list.

Both my "GNU C" and "GNU C++" lists contain exactly the same paths:

/RepRapFirmware/arduino/core
/RepRapFirmware/arduino/variant
C:/RepRap/arduino-1.5.4/hardware/arduino/sam/system/libsam/include
/RepRapFirmware/Libraries/EMAC
/RepRapFirmware/Libraries/Lwip
/RepRapFirmware/Libraries/MCP4461
/RepRapFirmware/Libraries/SamNonDuePin
/RepRapFirmware/Libraries/SD_HSMCI
/RepRapFirmware/Libraries/Wire
/RepRapFirmware/network

This time I had to copy the Wire library manually from C:\RepRap\arduino-1.5.4\hardware\arduino\sam\libraries
to C:\RepRap\workspace\RepRapFirmware\Libraries ... I don't understand yet why this is not always needed...

Are you using the 32-bit versions of Eclipse?
Are you using directory paths without spaces?

If you are still stuck, can you paste some specific error messages?


RS-Online Ormerod #263, Kossel mini with Minitronics, Prusa i3 MK2
Re: Problem building Duet firmware
January 23, 2014 05:23PM
Jeees!
My error: ethernet_sam.h: No such file or directory, RESOLVED smiling smiley
I use Win7 x64, eclipse_juno_x86_64, arduino_1.5.5 and arduino pluging 2.2.0.1.
My problem was that I use Arduino Wire library...not work for me.
I try to Hardware provided Libraries, and it works!!!



Janne
Re: Problem building Duet firmware
February 11, 2014 09:32AM
After much humming and hawing, I bit the bullet on Sunday to see if I could get the firmware to compile on MacOS X 10.9 ... I followed 3D_ES's guide [forums.reprap.org] and made it most of the way - then needed to make a couple of mods to get some headers to be included. The main one was to include the sam headers from arduino.15.4 separately(on the mac, these lie within the application itself) : I extracted a copy from within the app (Arduino.app/Contents/Resources/Java/hardware/arduino/sam/system/libsam/include) and pasted it into the /workspace/RepRapFirmware/Libraries folder created in 3D-ES's instructions. I then used the Arduino menu item "Add a library to the selected project" item in Eclipse to select this and the other directories within /workspace/RepRapFirmware/Libraries (see picture below), and compilation succeeded - thanks 3D-ES!!!

A couple of issues though...

1) The firmware I built on the Mac (dc42's 57m - I used his repository rather than Ormerod master) ends up being 157kB on disc rather than 168kB, hopefully just a compiler/linker difference? or am I deluding myself ... (it seems to be working OK so far after a successful upload).
2) I get three errors (no warnings) on running "Build All" -
Description	Resource	Path	Location	Type
make: *** [GCodes.cpp.o] Error 1			 	C/C++ Problem
make: *** [Libraries/Lwip/lwip/src/sam/netif/ethernetif.c.o] Error 1			 	C/C++ Problem

make: *** No rule to make target `clean'.			 	C/C++ Problem

anyone have insight into these please?

Ray

PS the reason I wanted to do this is to try out some other thermistor options for the duet since there aren't any G-Codes for this on the duet, and for customising my spare duet for another robotics application - I've got very little experience in C/C++ and none whatsoever in Eclipse!!
Re: Problem building Duet firmware
February 11, 2014 10:05AM
Ray, what output do you get in the Eclipse console window when you build it? That's where you will find the detailed error messages. I suspect that it was unable to find a library and has linked the binary without it. Amazingly, the Eclipse build system seems to generate binaries even when there are undefined symbols at link time.

Edited 1 time(s). Last edit at 02/11/2014 10:06AM by dc42.



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 Duet firmware
February 11, 2014 10:10AM
Eclipse doesn't seem to clear the output window before compiling...

If it compiles and produces a firmware binary, those errors are probably old!

You can right-click on the errors and click "Delete" to remove those messages,
The LWIP error message should stay away when you compile the firmware again...


RS-Online Ormerod #263, Kossel mini with Minitronics, Prusa i3 MK2
Re: Problem building Duet firmware
February 11, 2014 10:48AM
Thanks Guys - I did the deletion before checking the log, but then re-did build all and got no errors or warnings ( I did get warnings on a build I did earlier having made no changes from the first build, but these have gone away now too!! - those errors were about variables not being initialised in the creator)

Here's the console from building after deleting errors and warnings:

15:18:02 **** Incremental Build of configuration Release for project RepRapFirmware ****
make all 
Building target: RepRapFirmware
Printing size:
"/Users/rayhicks/Desktop/Arduino.app/Contents/Resources/Java/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-size" -A "/Users/rayhicks/Documents/workspace/RepRapFirmware/Release/RepRapFirmware.elf"
/Users/rayhicks/Documents/workspace/RepRapFirmware/Release/RepRapFirmware.elf  :
section              size        addr
.text              158216      524288
.ARM.exidx            520      682504
.relocate            1504   537329664
.bss                37372   537331168
.ARM.attributes        37           0
.comment             4274           0
.debug_line        126098           0
.debug_info        396315           0
.debug_abbrev       60642           0
.debug_aranges      10864           0
.debug_ranges       27008           0
.debug_frame        31796           0
.debug_loc         127567           0
.debug_pubnames     24570           0
.debug_str          72857           0
Total             1079640


Finished building target: RepRapFirmware
 

15:18:03 Build Finished (took 221ms)

The firmware I built from dc42's repository is going strong, an hour into a print, so it does look like it's "one of those things" - I'll need to get a lot more familiar with eclipse and C++ (I did a lot of ooPascal on the mac a while ago, using metrowerks IDE
Re: Problem building Duet firmware
February 11, 2014 10:57AM
I suggest doing a clean and then a build, and checking that there are still no errors reported. The binary size may vary a little because it includes some source file paths in it, but 11K difference sounds too much to me.



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 Duet firmware
February 11, 2014 11:46AM
Thanks dc - I used clean from the project menu and by rightclicking the project for good measure, which resulted in a successful build (.bin still around 160k) with no errors or warnings, but generating two "info" messages:

Description Resource Path Location Type
#pragma message: Testing LWIP_TCP tcp.c /RepRapFirmware/Libraries/Lwip/lwip/src/core line 45 C/C++ Problem
#pragma message: LWIP_TCP is true tcp.c /RepRapFirmware/Libraries/Lwip/lwip/src/core line 49 C/C++ Problem


double-clicking on the file (tpc.c) to investigate further it suddenly spawns 114 errors and 1 warning, all the errors are semantic and all are located in /RepRapFirmware/Libraries/Lwip/lwip/src/core/tpc.c , here's an example:

Description Resource Path Location Type
Symbol 'MEMP_TCP_PCB_LISTEN' could not be resolved tcp.c /RepRapFirmware/Libraries/Lwip/lwip/src/core line 189 Semantic Error


Does this suggest that the wrong compiler is being used? (presumably there may be 10k of missing .bin in the networkingsmiling smiley)

[edit on further checking it looks like none of the symbols are defined in any of my library files eg MEMP_TCP_PCB_LISTEN - NULL is also coming up as unresolved - should this be defined somewhere deeper down?]

Cheers

Ray

Edited 2 time(s). Last edit at 02/11/2014 12:37PM by rayhicks.
Re: Problem building Duet firmware
February 11, 2014 12:07PM
One issue with building the firmware is that one seems to have to use Arduino 1.5.4 otherwise the temperature readings gets screwed up. That was certainly the case for me.

I found this thread in an Arduino forum which probably explains this.

1.5.5 analog problem

There is a patch available for 1.5.5 so I might give that a go.
Re: Problem building Duet firmware
February 11, 2014 12:46PM
Ray, those two warning messages are normal. The "could not be resolved" warnings probably mean that the include paths you have in one of the project files (the .cproject file I think) don't match the ones that the compiler is using (given that your compilation seems to have worked OK) so the Eclipse C++ parser hasn't found all the definitions. It took me a while to get those include paths to match.



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 Duet firmware
February 14, 2014 06:20PM
Quote
bobtidey
One issue with building the firmware is that one seems to have to use Arduino 1.5.4 otherwise the temperature readings gets screwed up. That was certainly the case for me.

I found this thread in an Arduino forum which probably explains this.

1.5.5 analog problem

There is a patch available for 1.5.5 so I might give that a go.

Now had a chance to do this and can confirm that updating the wiring_analog.c in the 1.5.5 library fixes the problem. A 57m like source built in the 1.5.5 environment was then fully functional with temperatures working correctly.

I don't know there are any real benefits but the new analogread is supposed to be faster. It was this that broke the standard version as it wasn't handling channel changes correctly.
Re: Problem building Duet firmware
March 30, 2014 07:54PM
For those who are interested I have written a blog post on how to setup Eclipse to compile and upload the RepRap Firmware under windows:

[blog.think3dprint3d.com]

Thanks alot to 3D-ES who provided the back bone of the guide in a previous post on this topic.

Cheers

Tony

Edited 1 time(s). Last edit at 03/30/2014 07:56PM by T3P3.


DuetWifi.: advanced 3d printing electronics
Re: Problem building Duet firmware
October 21, 2014 05:31AM
The author of the Arduino plugin for Eclipse has added a note to Tony's instructions, regarding setting up Eclipse, here: [blog.think3dprint3d.com]
This may help people struggling to set up Eclipse? Link to comment: [blog.think3dprint3d.com]

Ian
RepRapPro tech support
Sorry, only registered users may post in this forum.

Click here to login