Unable to build C wifi examples
tjweber
Posts: 20
I'm using the SIP wi-fi module with the Propeller Professional Dev Board. I've just installed SimpleIDE 1.1.0.
When I try to build one of the example programs like "Leave a Network", I'm getting build errors. Here is a screen shot of the Build Status Window:
Does anyone have an idea what I'm doing wrong?
Thanks
When I try to build one of the example programs like "Leave a Network", I'm getting build errors. Here is a screen shot of the Build Status Window:
Does anyone have an idea what I'm doing wrong?
Thanks
Comments
dgately
Thanks for the suggestions.
It turns out there was a libwifi in the Protocol directory. Just to make sure I didn't have a versioning issue. I replaced the libwifi folder as you suggested.
According to the Simple Properties, the GCC Library Folder is set to C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/
I restarted SimpleIDE and rebuilt the "Leave a Network" with similar results. I've attached a copy of the latest Build Status (I does look a bit different).
I'm able to compile the project (see below). So, how are your SimpleIDE properties set? Auto Include Simple Libraries? Library directory?, etc.? Are you building as cmm? Can you use the Project "Zip" menu item and create a zip of the entire project? You can include the project as an attachment. I would like to see if the project as configured on your computer builds on my Mac OS system.
Auto Include Simple Libraries - Checked
Library Folder - C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/
Memory Model - CMM Main RAM Compact
Some of the build status isn't showing in the screen caps. Could you build again, and then use Help -> Build Error Rescue? Then, copy/paste into a post as text.
Just a thought. Try closing SimpleIDE and renaming the ...Documents/SimpleIDE folder. Then, reopen SimpleIDE and let it create a new SimpleIDE folder for you. Make sure it compiles a normal "Hello World" program. Then, unzip the firmware+examples to some folder, like maybe .../Documents/SimpleIDE/My Projects/. Don't worry about copying over the library yet. Just open and run one of the example programs where it is. It should compile since libwifi is a subfolder. After that, try copying the libwifi folder to Simple Libraries as you did before.
Thanks, Andy
Project Directory: C:/Users/Tom/Desktop/20170210/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/
SimpleIDE Version 1.1.0
C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/
C:/Users/Tom/Documents/SimpleIDE/ Updated on: 2017-02-06
propeller-elf-gcc.exe -v GCC 4.6.1 (propellergcc_v1_0_0_2408)
propeller-elf-gcc.exe -I . -L . -I C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools -L C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools/cmm/ -I C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libsimpletext -L C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libsimpletext/cmm/ -I C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c -L C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c/cmm/ -I C:/Users/Tom/Desktop/20170210/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/libwifi -L C:/Users/Tom/Desktop/20170210/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/libwifi/cmm/ -I C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libfdserial -L C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libfdserial/cmm/ -o Leave a Network.elf -Os -mcmm -m32bit-doubles -fno-exceptions -std=c99 Leave a Network.c -lm -lsimpletools -lsimpletext -lsimplei2c -lwifi -lfdserial -lm -lsimpletools -lsimpletext -lsimplei2c -lwifi -lm -lsimpletools -lsimpletext -lsimplei2c -lm -lsimpletools -lsimpletext -lm -lsimpletools -lm
C:/Users/Tom/Desktop/20170210/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/libwifi/cmm/\libwifi.a(simpletermResume.o): In function `_wifi_simpletermResume':
(.text+0x1e): undefined reference to `_simpleterm_reopen'
C:/Users/Tom/Desktop/20170210/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/libwifi/cmm/\libwifi.a(replyStringIn.o): In function `.L9':
(.text+0x47): undefined reference to `_fdserial_rxCount'
collect2: ld returned 1 exit status
Done. Build Failed!
Check source for bad function call or global variable name `_simpleterm_reopen'
C:/Users/Tom/Desktop/20170210/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/libwifi/cmm/\libwifi.a(replyStringIn.o): In function `.L9':
(.text+0x47):
I've rebuilt the SimpleIDE folder and the "Hello Word" builds and runs successfully. I next unzipped the 32420-Parallax-ESP-2016-11-02-1804-e.zip in the My Projects folder. I tried to build "Leave a Network" and I'm getting the same error message. The Build Error Rescue follows. Just for the fun of it, I tried running the "Hello LCD" located in the Learn folder. It complied and executed perfectly. I hope that's a helpful data point.
Project Directory: C:/Users/Tom/Documents/SimpleIDE/My Projects/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/
SimpleIDE Version 1.1.0
C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/
C:/Users/Tom/Documents/SimpleIDE/ Updated on: 2017-02-11
propeller-elf-gcc.exe -v GCC 4.6.1 (propellergcc_v1_0_0_2408)
propeller-elf-gcc.exe -I . -L . -I C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools -L C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools/cmm/ -I C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libsimpletext -L C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libsimpletext/cmm/ -I C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c -L C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c/cmm/ -I C:/Users/Tom/Documents/SimpleIDE/My Projects/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/libwifi -L C:/Users/Tom/Documents/SimpleIDE/My Projects/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/libwifi/cmm/ -I C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libfdserial -L C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/Text Devices/libfdserial/cmm/ -o cmm/Leave a Network.elf -Os -mcmm -m32bit-doubles -fno-exceptions -std=c99 Leave a Network.c -lm -lsimpletools -lsimpletext -lsimplei2c -lwifi -lfdserial -lm -lsimpletools -lsimpletext -lsimplei2c -lwifi -lm -lsimpletools -lsimpletext -lsimplei2c -lm -lsimpletools -lsimpletext -lm -lsimpletools -lm
C:/Users/Tom/Documents/SimpleIDE/My Projects/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/libwifi/cmm/\libwifi.a(simpletermResume.o): In function `_wifi_simpletermResume':
(.text+0x1e): undefined reference to `_simpleterm_reopen'
C:/Users/Tom/Documents/SimpleIDE/My Projects/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/libwifi/cmm/\libwifi.a(replyStringIn.o): In function `.L9':
(.text+0x47): undefined reference to `_fdserial_rxCount
'
collect2: ld returned 1 exit status
Done. Build Failed!
Check source for bad function call or global variable name `_simpleterm_reopen'
C:/Users/Tom/Documents/SimpleIDE/My Projects/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/libwifi/cmm/\libwifi.a(replyStringIn.o): In function `.L9':
(.text+0x47):
Here is a line-by-line comparison with as close to matching situations as I could create. ...but I don't see any reason why your (Tom's) build fails and mine succeeds. Here is the data with some carriage returns for an easier line-by-line comparison. Anybody else see anything?
Mine
Tom's
There are two Text Devices folders in "Simple Libraries" ("Text Devices" and "TextDevices"). My (Tom's) command line uses "TextDevices", Andy's uses "Text Devices". This is in four different lines.
I also used the Window's "Uninstall or change a program" to remove SimpleIDE, renamed by SimpleIDE folder, then did a full install. Unfortunately, it didn't help.
I remove "Text Devices", restarted SimpleIDE, and "Leave a Network", buildd and loads into the Prop.
Andy, thanks for all the help. Parallax support can't be beat!
I can see a lot of sleepless nights now working on wifi enabled projects.
That version appears to be missing the source for function: "simpleterm_reopen".
In the version of libsimpletext (dated 1/18/2017) that is in my /Learn/SimpleLibraries/Text Device/libsimpletext, I do see the "simpleterm_reopen" function in /simpleterm_close.c that is missing in your build error output:
Are you using the Learn folder from the download at: https://parallax.com/downloads/propeller-c-learn-folder?
dgately
I think you're on track. It might explain what Andy and I found (see my previous post).
Some how I had two Simple Library/Text Devices directories ("Text Devices" and "TextDevices"). When I removed "Text Devices" and restarted SimpleIDE, the wi-fi example programs started to build correctly.
Thank you for all your help and support.
Duh, I hadn't updated the webpage so did not see the other posts... I hope it all works, now!
dgately