Setting Up Eclipse For the new Firmware
-
@jml my importing procedure is:
- copy files unzipped into the workspace
- open eclipse, say file - import - general/existing projects into workspace - next
- select root directory: select the workspace
- select all project - finish
-
I will do it that way next time i create a new workspace. For now, I will just import DuetWiFiSocketServer. Here is how it went.
When I import DuetWiFiSocketServer, and right click it, and go to Properties, C/C++ Build, Settings, the path there is:
C:\Users\David\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\binI assume this should be changed (I'm on a Mac), but not sure to what. I put it as /usr/local/bin/ not sure if thats correct. I was able to select the checkbox for DuetWiFiSocketServer in the settings for RepRapFirmware by the way.
I checked /Users/John/Library/Arduino15/packages , but the only folder in there is a folder called "arduino"
The error I get when building RRF (after building coreng and freertos) is:
In file included from ../src/Networking/ESP8266WiFi/WiFiInterface.cpp:9:0:
../src/Networking/ESP8266WiFi/WiFiInterface.h:128:22: error: 'NumWiFiTcpSockets' was not declared in this scope
WiFiSocket *sockets[NumWiFiTcpSockets];Not sure if I am making progress now. Time to go to sleep.
-
@jml well, my help is limited, as I have no Mac.
Path names should be ok as you wrote.
The documentatio is bit limited for the Mac, you should check the Windows documentation also, as there is some important information found like the reference into about MessageFormats.h
Dream well of Eclipse
and tomorrow you can restart with new ideas.
-
@jml I saw the solution for your coreDelay problem:
in Eclipse you have to set the build target. The default is Duet085. When you build with this, the error coreDelay appears.
Please set the target to Duet2_RTOS, then this error does not appear when you build: -
@jml some of your make errors may be this cause:
I used MessageFormats.h according to step 5a of documentation directly. I had error messages and found forum message
https://reprap.org/forum/read.php?416,818300
so I used dev version, worked good after this change. -
@jml I made an error and want you to avoid it: I had a lot of compilation errors. Now I found out that I used CoreNG-master. It is necessary to use CoreNG-2-dev (branch v2-dev) instead.
Rename unzipped CoreNG-2-dev to CoreNG before importing.Before compiling, the following settings are necessary: in properties - C/C++ Build - Settings
- Build Variables - GccPath must be on the new GNU Tools path for 2018q2
- in Environment with PATH must include the path to the make tool
Before I set the values, I choose Configuration - All configurations in the drop box above.
Then set Build configurations - Set Active - SAM4E8E_RTOS.
I used make from
https://gnu-mcu-eclipse.github.io/https://gnu-mcu-eclipse.github.io/
They have a Mac version also.This compiled NodeNG without errors.
-
@jml ok, now RepRapFirmware compiled correcly also (at last!).
I created a file MessageFormats.h in the src folder and copied the content of the Wifi-dev into it.
Crosssetting, Path and Gccpath set.
Duet2_RTOS as target set.
Clean Project
Build ProjectIt is not necessary to set any Build dependencies as I wrote earlier. The projects are connected by their project names (that's the reason why they need to be renamed).
I was not able to compile DuetWifiSocketServer yet. I get a lot of Arduino.h not found and such errors.
-
@joergs5 said in Setting Up Eclipse For the new Firmware:
I was not able to compile DuetWifiSocketServer yet. I get a lot of Arduino.h not found and such errors.
You don't need to compile that project, unless you want to build new WiFi firmware. But RepRapFirmware uses one include file from it (MessageFormats.h), so you need to import the project into your workspace, or at least that one file.
-
@joergs5 For the coreDelay errors, yes that was my error. I neglected to set active to Duet2_RTOS.
But the current problem is still the "'NumWiFiTcpSockets' was not declared in this scope" problem.
I will try again using the "dev" and "v2-dev" of DuetWiFiSocketServer and CoreNG.
-
@jml said in Setting Up Eclipse For the new Firmware:
But the current problem is still the "'NumWiFiTcpSockets' was not declared in this scope" problem.
That symbol is defined in file MessageFormats.h, in project DuetWiFiSocketServer.
-
It seems to have compiled with no errors! The fix was using the "dev" and "v2-dev" of DuetWiFiSocketServer and CoreNG respectively. I will tomorrow actually test it on the Duet2 and the previous Duet board to make sure it runs properly.
Thanks for all the help everyone!
-
@dc42 I know, I wanted to have it complete. Still searching where Arduino.h reference is in the code (in respect to "You don't need to compile that project" for DuetWifiSocketServer)
-
RRF compiles in 7 seconds. I remember it used to be 19 seconds when I was on version 1.20. Is this normal?
-
@jml If parts are already built, it does not recompile. This may be the reason.
-
@dc42 ( not relevant for @jml)
DuetWifiSocketServer compiling, I found your discussion
https://forum.duet3d.com/topic/4984/cant-build-duetwifiserver
I will try this approach the next days. -
@joergs5 are we supposed to be building DuetWiFiSocketserver? I was looking at the forum in your link and I'm wondering why eBerlin is building DuetWifiSocketServer, and why there is discussion about LwipESP8266 ... was that just the older way of doing things?
If I try to build DuetWiFiSocketserver, I get these errors
/bin/sh: xtensa-lx106-elf-g++: command not found
make: *** [src/Misc.o] Error 127
make: *** [src/HSPI.o] Error 127
make: *** [src/SocketServer.o] Error 127
make: *** [src/Listener.o] Error 127
make: *** [src/Connection.o] Error 127 -
@jml This project is firmware which is uploaded to the WiFi module on the Duet ESP8266 based (like an ESP-12 module). You don't need to compile or change it to be able to change RepRapFirmware or a fork of it that you can make. The only part you need is this one .h file, but from the dev branch.
The Lwip and ESP8266 projects are projects which are needed by this WiFi project (you mentioned them in one of the first comments). In The forum blog I mentioned was an older project which was replaced by the DuetWifi project.
Your errors are path errors, you need to change the paths the same way as in the other projects, changing to the new GNU classes, adding your make path. But it's more complicated because of the other projects needed.
The xtensa files are (in windows) in the users\username... directory, you must change the information in the project, if your username is not David
The files are created, when you install Arduino 1.8.5
But as I said, you don't need it now. BUT - if you're interested to compile because you're interested like me, we can discuss here how to compile.
-
@joergs5 Thanks for the explanation. I'll stick to just compiling the others for now
Hopefully what I have done will work when I put it on the Duet2 tomorrow.
-
I have just synced the master, dev and v2-dev branches of RepRapFirmware and CoreNG with each other, so all 3 branches are now up to date with release 2.01/1.22 of RRF.
-
@dc42 Thanks. Finally I can also compile everything out of the box (except for binary path). But I had to create a Pull Request that fixes three includes that are not found in case-sensitive file-systems otherwise.