Setting Up Eclipse For the new Firmware
-
@jml I understand, this is totally ok, I do it the same way.
-
@jml
your question for DuetWiFi..: you should copy the DuetWiFi... files into the newest workspace you use, import it without the option to move the files (they are already in your new workspace), then it will show up in the build properties list and you can click it. Maybe you have to restart/rebuild all Eclipse, if it is not in the list.
this is not needed, and from DuetWifi you only need one .h file. See below -
That is exactly what I think I have been doing. Perhaps my importing is not right.
Option#1: This is what I would normally do. I would right click in the Navigator and select Import. Then I would select General > Existing Projects, and I'd select CoreNG and it would import. Then I would repeat for FreeRTOS and RepRapFirmware.
Option#2: File > Open Projects From File System. Select only CoreNG, FreeRTOS, and RepRapFirmware (and not selecting the socketserver one).
Using both options above, I still only get CoreNG and FreeRTOS in the project references for RepRapFirmware. The only way I can get the socket server one there is if I import it as a project, but then that causes a bunch of other errors.
I right click CoreNG to set active to SAM4E. For RRF I set active to Duet2_RTOS. This part should be fine I think.
-
@joergs5
I had problems updating the list of dependencies. Fastest way to resolve it, copy all necessary projects into a new workspace, then after setting the new workspace import them in one step (without file move), then it will all show up in the list.
this is not needed, see below -
@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