Shop OBEX P1 Docs P2 Docs Learn Events
Unable to build C wifi examples — Parallax Forums

Unable to build C wifi examples

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
945 x 284 - 225K

Comments

  • Did you copy the libwifi folder (from the downloaded: parallax-esp-2016-11-02-1804-e/Examples/Propeller C/ directory) to your "Simple Libraries" directory?. It appears to be looking inside the Protocol directory. Is that where you copied the libwifi folder to?. You may want to re-check which C Library Folder SimpleIDE's Property (Preference) is set for... Protocol may be one directory too deep! (Just a guess)...

    dgately
  • 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).
    1018 x 253 - 254K
  • Hmm...

    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.
    Project Directory: /home/Downloads/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/
    
    SimpleIDE Version 1.1.0
    /home/Documents/SimpleIDE/Learn/Simple Libraries/
    /home/Documents/SimpleIDE/ Updated on: 2017-02-05

    propeller-elf-gcc -v GCC 4.6.1 (propellergcc_v1_0_0-36-g4c46ecb)
    propeller-elf-gcc -I . -L . -I /home/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools -L /home/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools/cmm/ -I /home/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext -L /home/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext/cmm/ -I /home/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c -L /home/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c/cmm/ -I /home/Downloads/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/libwifi -L /home/Downloads/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/libwifi/cmm/ -I /home/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libfdserial -L /home/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/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
    propeller-load -s Leave a Network.elf
    propeller-elf-objdump -h Leave a Network.elf
    Done. Build Succeeded!
    
  • SimpleIDE properties:
    Auto Include Simple Libraries - Checked
    Library Folder - C:/Users/Tom/Documents/SimpleIDE/Learn/Simple Libraries/
    Memory Model - CMM Main RAM Compact
  • Hi Tom,

    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
  • I had a similar issue last night. I did essentially what Andy said above and it worked for me.
  • Here's the build status using the Build Error Rescue:
    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):
  • edited 2017-02-11 19:35
    Thanks Tom. Yes, these are all helpful data points. Thing is, I don't see anything indicating that your system is doing anything different from mine and Keith's.

    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
    
    Project Directory: C:/Users/alindsay/Documents/SimpleIDE/My Projects/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/
    
    SimpleIDE Version 1.1.0
    C:/Users/alindsay/Documents/SimpleIDE/Learn/Simple Libraries/
    C:/Users/alindsay/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/alindsay/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools 
    -L C:/Users/alindsay/Documents/SimpleIDE/Learn/Simple Libraries/Utility/libsimpletools/cmm/ 
    -I C:/Users/alindsay/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext 
    -L C:/Users/alindsay/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libsimpletext/cmm/ 
    -I C:/Users/alindsay/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c 
    -L C:/Users/alindsay/Documents/SimpleIDE/Learn/Simple Libraries/Protocol/libsimplei2c/cmm/ 
    -I C:/Users/alindsay/Documents/SimpleIDE/My Projects/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/libwifi 
    -L C:/Users/alindsay/Documents/SimpleIDE/My Projects/parallax-esp-2016-11-02-1804-e/Examples/Propeller C/libwifi/cmm/ 
    -I C:/Users/alindsay/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/libfdserial 
    -L C:/Users/alindsay/Documents/SimpleIDE/Learn/Simple Libraries/TextDevices/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
    
    
    propeller-load -s cmm/Leave a Network.elf
    propeller-elf-objdump -h cmm/Leave a Network.elf
    Done. Build Succeeded!
    


    Tom's
    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):
    
  • tjwebertjweber Posts: 20
    edited 2017-02-11 22:44
    I found a few differences:

    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.

  • Ah ha! Good eye, that's probably the culprit. Search Simple Libraries for a TextDevices folder and delete or move somewhere above Simple Libraries. Restart SimpleIDE and retry.
  • Google Diff Checker. Indispensable tool.
  • I think you meant remove "Text Devices". From the status out files above, I think that is what you have on your machine.

    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.

  • I think the problems is that your Simple Libraries are not the latest. Looking into the source of the libsimpletext library that is in your project at /Leave a Network/library/libsimpletext/simpleterm_close.c , I see:
    /**
     * @file SimpleTerm_close.c
     * SimpleTerm close is rarely used.
     *
     * Copyright (c) 2013, Parallax Inc.
     * Written by Steve Denson
     */
    #include "serial.h"
    
    void simpleterm_close()
    {
      extern text_t *dport_ptr;
      if(!dport_ptr)
        return;
    #ifdef SIMPLESERIAL_TERM
      serial_close(dport_ptr);
    #else
      OUTA &= ~(1 << 30);
      DIRA &= ~(1 << 30);
      DIRA &= ~(1 << 31);
    #endif
      dport_ptr = 0;
    }
    

    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:
    #include "serial.h"
    
    extern HUBDATA terminal *dport_ptr;
    
    void simpleterm_close()
    {
      extern text_t *dport_ptr;
      if(!dport_ptr)
        return;
      serial_close(dport_ptr);
      dport_ptr = 0;
    }
    
    terminal *simpleterm_reopen(int rxpin, int txpin, int mode, int baud)
    {
      simpleterm_close();
      dport_ptr = serial_open(rxpin, txpin, mode, baud);
      return dport_ptr;
    }
    

    Are you using the Learn folder from the download at: https://parallax.com/downloads/propeller-c-learn-folder?

    dgately
  • tjwebertjweber Posts: 20
    edited 2017-02-12 03:27
    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.
  • tjweber wrote: »
    It might explain what Andy and I found (see my previous post).
    .

    Duh, I hadn't updated the webpage so did not see the other posts... I hope it all works, now!

    dgately

Sign In or Register to comment.