Shop OBEX P1 Docs P2 Docs Learn Events
ParallaxWX ESP8266 / RaspberryPi / Debian / Esp-open-sdk / SimpleIDE / Openspin / Proploader / DEVEL — Parallax Forums

ParallaxWX ESP8266 / RaspberryPi / Debian / Esp-open-sdk / SimpleIDE / Openspin / Proploader / DEVEL

Clock LoopClock Loop Posts: 2,069
edited 2020-09-10 06:29 in Accessories
SO LETS NOT HAVE ANYONE CONFUSED HERE.

USE THIS ENTIRE THREAD AND ALL ITS CONTENTS AT YOUR OWN RISK, IT IS NOT PARALLAX,
I AM NOT ASSOCIATED WITH THEM, EVERYTHING IN THIS THREAD IS OFFICIALLY UNOFFICIAL.

YOU HAVE BEEN WARNED.


UNOFFICIAL. UNOFFICIAL. UNOFFICIAL. UNOFFICIAL. UNOFFICIAL. UNOFFICIAL. UNOFFICIAL.

This thread is to contain the info related to compiling the ParallaxWX(Parallax-ESP) / Proploader / Openspin / QT5 / SimpleIDE code on a RaspberryPi3 / DEBIAN systems.

This whole thread is a WORK IN PROGRESS If you know better ways to do things, or issues to note, etc, please, make a reply.

Some steps need to be adjusted for pi/debian... Adjust the, make OS=linux, CROSS=win32, CROSS=rpi, OS=raspberrypi ... where necessary. Ask if you need help.
The first step is to get a raspberrypi 3 and install raspbian. ---> https://www.raspberrypi.org/documentation/installation/installing-images/README.md
Run all the updates.

OR
Install a debian system, the official release works with this also. You don't need the testing, like I have.
INFO ON INSTALLING DEBIAN!!!!!!!!!!!!
> NEAR END OF THIS THREAD. https://forums.parallax.com/discussion/comment/1455510/#Comment_1455510

I HIGHLY suggest you run all your GITS from the same folder, then the paths in this instruction will work, otherwise you are on your OWN.
Make a folder, and run all GITS in that main folder. Run the compiling of each GIT in this instruction from their respective git folders, that are inside the main folder.
This main folder is where some compiles will dump folders that other compilers will be looking for.


WHEN you run your "makes", try adding a -j3.
make -j3
This tells make to run multiple jobs. Change the number to one less than the number of cores your system has.
On the latest quad core Pi, I will use
make -j3
I have not tried multi job in this thread on all makes so be aware it could be problematic.

CONTENTS of this thread:

Warning: ---> This page.

Pi/Debian-COMPILE of ESP-OPEN-SDK and Parallax-ESP ---> https://forums.parallax.com/discussion/comment/1452980/#Comment_1452980

Pi/Debian-MOD/INFO ABOUT THE Parallax WX ESP8266 WiFi Module and its FIRMWARE ----> https://forums.parallax.com/discussion/comment/1453063/#Comment_1453063

Pi/Debian-HOW TO MOD A NON-PARALLAX ESP TO RUN Parallax-ESP code ---> https://forums.parallax.com/discussion/comment/1453091/#Comment_1453091

Pi/Debian-HOW TO UPLOAD PARALLAX ESP CODE TO AN ESP https://forums.parallax.com/discussion/comment/1453097/#Comment_1453097

Pi/Debian-COMPILE OPENSPIN ---> https://forums.parallax.com/discussion/comment/1453107/#Comment_1453107

Pi/Debian-COMPILE PROPLOADER ---> https://forums.parallax.com/discussion/comment/1453109/#Comment_1453109

Pi/Debian-HOW TO VIEW YOUR PROPELLER DEBUG SERIAL OUTPUT OVER WIFI! ---> https://forums.parallax.com/discussion/comment/1453119/#Comment_1453119

NotPiTested/Debian-COMPILE OF PROPGCCv4 ---> https://forums.parallax.com/discussion/comment/1455136/#Comment_1455136

NotPiTested/Debian-COMPILE OF QT5.11 ---> https://forums.parallax.com/discussion/comment/1455388/#Comment_1455388

NotPiTested/Debian-COMPILE OF SIMPLE-IDE ---> https://forums.parallax.com/discussion/comment/1455458/#Comment_1455458

ABOUT DEBIAN LINUX ---> https://forums.parallax.com/discussion/comment/1455510/#Comment_1455510

PRECOMPILED release folder and .OTA file for updating YOUR esp8266 board with the parallax firmware. --->http://forums.parallax.com/discussion/comment/1505488/#Comment_1505488

Warning:
In 2007 a problem in wpa2 was found that makes hacking a wifi device possible if within range of the wifi signal.
Be aware of what you are doing with your esp, and this new vunerability.
The Esp code that parallax uses is from esp_open_sdk, and it gets updates but I do not know how it relates to this problem.
If the esp_open_sdk uses the esspressif version 2.0 then it is vunerable.
The latest available from esspressif is 3.0 but if esp_open_sdk dosen't integrate it, then ParallaxEsp code dosen't.
https://github.com/espressif/ESP8266_NONOS_SDK
PLEASE NOTE v2 has known security issues..  https://hackaday.com/2017/10/16/oh-great-wpa2-is-broken/
Files involved in the instructions to follow show up on virus/malware scanners either because;
1. they are.
2. they are files that have methods malware uses to do the deed.
Please review the following possible threats to the data that you will be downloading in this instruction, if you follow all of it.
Know what you are downloading before you do.
However I hope they are false hits because one of them is inside the simpleide package, which came from the compile of it, from remotely downloaded PARALLAX file located here:
 https://github.com/parallaxinc/propsideworkspace/ Workspace
the offending file is a .js file and its location on the git is shown in the image.
Its located here: If you click the link github will show you the file in their editor.
https://github.com/parallaxinc/Simple-Libraries/blob/master/Learn/Simple%20Libraries/Display/liboledc/html
If you find and click on the jquery.js file you can inspect it and read it to see if it contains something.
I do not know what is making the file offend a scanner, but I also don't see why the file is needed.
Actually all the files triggered by virus scanners are usually not even needed.
But some ARE like the mingw and other true compilers.
But no one NEEDS jquery.js, its a fancy addon, probably for searching html documentation, and even then no not need, make them use CTRL-F
The other files came from similar sources downloaded.  
I may go thru the build make files to find these sources and point them out here to make verification and integration more trusty.
toolhits.png
On the subject of IOT, and internet connected things.
A NOTE ABOUT INTERNET SECURITY.
ITS NOT. TEACH THIS EVERYWHERE.
serveimage?url=https%3A%2F%2Fimgc.allpostersimages.com%2Fimg%2Fprint%2Fu-g-F59CJT9UHKZ.jpg%3Fw%3D309%26amp%3Bh%3D450&sp=eea98d46c9187db6e2d6488d4065e833
If you choose to partake in the web of wide, know that it is truly wide, international.
To be smart, a smart person has two things that many other people do not.
Two wireless routers.  One is on the internet and one is not.
ALL devices that you own SHOULD be on the one without internet.
And anything that stays connected to the internet should be turned off when not in use.
If it must be on the internet all the time, then this is why you have two, for those devices.
Unless you are a tube junkie, you don't need connection all times, but most do this....... why.
Ideally you get devices that can use the no-internet wifi.
WE must force this upon makers to make all LOCAL based devices...
IOT-local.   They don't want that.  But it must be so.
This means your tv will buffer the data upon request, and then jack out.
So make your devices all work on a wifi that has NO INTERNET!!!  Its the safest next to a wired lan with no net.
1366 x 219 - 59K
«13

Comments

  • Clock LoopClock Loop Posts: 2,069
    edited 2021-03-24 14:52
    ESP OPEN SDK AND Parallax-ESP
    Onto the compile of esp.
    WHY, you might ask, would anyone want to do this.
    Simply, if you want to customize the wx8266 server files that are normally served with the parallax esp code.
    Also you get the updated code for the wifi server, instead of the factory code.
    To change the looks of your wx8266 webserver and webserver code, you need to be able to re-compile the Parallax-ESP code, from what I understand.
    All the commands and steps, plus the terminal outputs/inputs will be documented here to help others accomplish the successful compilation of the Parallax-ESP code located here:
    https://github.com/parallaxinc/Parallax-ESP

    A vunerability was discovered in 2007 that lets any hacker manipulate wpa2 device if within wifi range of your esp device or any other wpa2 device that dosen't have updated software.
    Be aware of what you are doing with your esp, and this new vunerability.
    The Esp code that parallax uses is from esp_open_sdk, and it gets updates but I do not know how it relates to this problem.
    If the esp_open_sdk uses the esspressif version 2.0 then it is vunerable.
    The latest available from esspressif is 3.0 but if esp_open_sdk dosen't integrate it, then ParallaxEsp code dosen't.
    https://github.com/espressif/ESP8266_NONOS_SDK
    PLEASE NOTE v2 has known security issues..  https://hackaday.com/2017/10/16/oh-great-wpa2-is-broken/
    


    When you go WIFI, make sure you know that you are leaving an electronic way in depending on what you connect to your wifi.

    Your system will need internet access to download all the files it needs.

    Install the files needed to run esp-open-sdk.
    sudo apt-get install make unrar-free autoconf automake libtool gcc g++ gperf \
        flex bison texinfo gawk ncurses-dev libexpat-dev python-dev python python-serial \
        sed git unzip bash help2man wget bzip2 libtool-bin
    
    Get the esp-open-sdk files.
    git clone --recursive https://github.com/pfalcon/esp-open-sdk.git
    
    Build the esp-open-sdk. This will take hours to finish.
    cd esp-open-sdk
    :~/esp-open-sdk $ make -j3
    Makefile:184: warning: overriding recipe for target 'ESP8266_NONOS_SDK-2.1.0-18-g61248df/.dir'
    Makefile:179: warning: ignoring old recipe for target 'ESP8266_NONOS_SDK-2.1.0-18-g61248df/.dir'
    make -C crosstool-NG -f ../Makefile _ct-ng
    make[1]: Entering directory '/home/pi/esp-open-sdk/crosstool-NG'
    ../Makefile:184: warning: overriding recipe for target 'ESP8266_NONOS_SDK-2.1.0-18-g61248df/.dir'
    ../Makefile:179: warning: ignoring old recipe for target 'ESP8266_NONOS_SDK-2.1.0-18-g61248df/.dir'
    ./bootstrap
    Running autoconf...
    Done. You may now run:
        ./configure
    ./configure --prefix=`pwd`
    checking build system type... armv7l-unknown-linux-gnueabihf
    checking host system type... armv7l-unknown-linux-gnueabihf
    checking for a BSD-compatible install... /usr/bin/install -c
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for a sed that does not truncate output... /bin/sed
    checking whether sed understands -r -i -e... yes
    checking whether ln -s works... yes
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking how to run the C preprocessor... gcc -E
    checking for ranlib... ranlib
    checking for gobjcopy... no
    checking for objcopy... objcopy
    checking for absolute path to objcopy... /usr/bin/objcopy
    checking for gobjdump... no
    checking for objdump... objdump
    checking for absolute path to objdump... /usr/bin/objdump
    checking for greadelf... no
    checking for readelf... readelf
    checking for absolute path to readelf... /usr/bin/readelf
    checking for gperf... gperf
    checking for absolute path to gperf... /usr/bin/gperf
    checking for bison... bison
    checking for flex... flex
    checking for makeinfo... makeinfo
    checking for cut... cut
    checking for stat... stat
    checking for readlink... readlink
    checking for wget... wget
    checking for tar... tar
    checking for gzip... gzip
    checking for bzip2... bzip2
    checking for help2man... help2man
    checking for gpatch... no
    checking for patch... patch
    checking for absolute path to patch... /usr/bin/patch
    checking for bash >= 3.1... /bin/bash
    checking for GNU awk... /usr/bin/gawk
    checking for GNU make >= 3.80... /usr/bin/make
    checking whether /usr/bin/make sets $(MAKE)... yes
    checking for make 3.81... no
    checking for GNU libtool >= 1.5.26... /usr/bin/libtool
    checking for GNU libtoolize >= 1.5.26... /usr/bin/libtoolize
    checking for GNU automake >= 1.10... /usr/bin/automake
    checking for the type used in gperf declarations... size_t
    checking for xz... xz
    checking for cvs... no
    checking for svn... svn
    checking for inline... inline
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for stdlib.h... (cached) yes
    checking for GNU libc compatible malloc... yes
    checking for stdlib.h... (cached) yes
    checking for GNU libc compatible realloc... yes
    checking for size_t... yes
    checking for working alloca.h... yes
    checking for alloca... yes
    checking libintl.h usability... yes
    checking libintl.h presence... yes
    checking for libintl.h... yes
    checking whether gettext is declared... yes
    checking for library containing bindtextdomain... none required
    checking ncurses/ncurses.h usability... no
    checking ncurses/ncurses.h presence... no
    checking for ncurses/ncurses.h... no
    checking ncurses/curses.h usability... no
    checking ncurses/curses.h presence... no
    checking for ncurses/curses.h... no
    checking ncursesw/curses.h usability... no
    checking ncursesw/curses.h presence... no
    checking for ncursesw/curses.h... no
    checking ncurses.h usability... yes
    checking ncurses.h presence... yes
    checking for ncurses.h... yes
    checking for library containing initscr... -lncurses
    checking for library containing tgetent... none required
    configure: creating ./config.status
    config.status: creating Makefile
    make MAKELEVEL=0
    make: Entering directory '/home/pi/esp-open-sdk/crosstool-NG'
    
    to long for forum.....and so on...
    

    Got a bash missing error?
    checking for bash >= 3.1... no
    configure: error: could not find bash >= 3.1
    

    You likely have it, you just need to edit a file to fix the script to see BASH v5
    /esp-open-sdk/crosstool-NG/configure.ac

    Starting on line 193, just add a bar and a 5---> |5
                         |$EGREP '^GNU bash, version (3\.[1-9]|4|5)')
    

    Once thats done you need to register the paths for the esp-open-sdk.
    At the end of the build this shows...
    export PATH=/home/pi/Desktop/Git/esp-open-sdk/xtensa-lx106-elf/bin/:$PATH
    Espressif ESP8266 SDK is installed, its libraries and headers are merged with the toolchain
    Next, setup the path to the ESP toolchain:
    export XTENSA_TOOLS_ROOT=/CHANGETHISTOYOURPATH/esp-open-sdk/xtensa-lx106-elf/bin/
    
    For the default raspbian install with this instruction its:
    export XTENSA_TOOLS_ROOT=/home/pi/esp-open-sdk/xtensa-lx106-elf/bin/
    
    (you could also edit the make file in the parallax-esp folder with the proper paths.., but im not sure if that will work if you don't have it in the environment path also)
    Using the toolchain
    Once you complete build process as described above, the toolchain (with the Xtensa HAL library) will be available in the xtensa-lx106-elf/ subdirectory. Add xtensa-lx106-elf/bin/ subdirectory to your PATH environment variable to execute xtensa-lx106-elf-gcc and other tools. At the end of build process, the exact command to set PATH correctly for your case will be output. You may want to save it, as you'll need the PATH set correctly each time you compile for Xtensa/ESP.
    ESP8266 SDK will be installed in sdk/. If you chose the non-standalone SDK, run the compiler with the corresponding include and lib dir flags:

    $ xtensa-lx106-elf-gcc -I$(THISDIR)/sdk/include -L$(THISDIR)/sdk/lib
    The extra -I and -L flags are not needed when using the standalone SDK.

    Subdirectory examples/ contains some example application(s) which can be built with esp-open-sdk. If you are interested in real-world, full-fledged, advanced example of a project built using esp-open-sdk, check https://github.com/micropython/micropython/tree/master/ports/esp8266.

    SEPT 4th UPDATE, the REPO has been fixed to use ESP8266_NONOS_SDK

    ************ This process is in the progress of being changed, updating soon!*******************


    Clone the Parallax-Esp repo.
    git clone --recursive https://github.com/parallaxinc/Parallax-ESP.git
    

    Also clone the esptool repo so you can flash the parallax module and ANY OTHER ESP with the PROPTOOL.
    git clone --recursive https://github.com/espressif/esptool
    

    Check out the submodules of Parallax-ESP:
    cd Parallax-Esp
    git submodule init
    git submodule update
    



    Build the firmware (from the Parallax-ESP directory):
    Be sure you run this prior to making the Parallax-Esp.
    export XTENSA_TOOLS_ROOT=/CHANGETHISTOYOURPATH/esp-open-sdk/xtensa-lx106-elf/bin/
    
    If you don't, you will get this error:
    make[1]: Entering directory '/Parallax-ESP/libesphttpd'
    CC espfs/espfs.c
    make[1]: xtensa-lx106-elf-gcc: Command not found
    make[1]: *** [Makefile:220: build/espfs/espfs.o] Error 127
    make[1]: Leaving directory '/Parallax-ESP/libesphttpd'
    make: *** [Makefile:243: libesphttpd] Error 2
    
    You will need to run the export command every time you start a new terminal or your pc, before building Parallax-Esp.

    Build Parallax-Esp
    :~/Parallax-ESP$ make
    

    If everything worked, you will see this:
    :~/Parallax-ESP$ make
    make[1]: Entering directory '/Parallax-ESP/libesphttpd'
    CC espfs/espfs.c
    CC espfs/heatshrink_decoder.c
    CC core/httpd-nonos.c
    CC core/httpd-freertos.c
    CC core/sha1.c
    CC core/httpdespfs.c
    CC core/auth.c
    CC core/base64.c
    CC core/httpd.c
    CC util/cgiwebsocket.c
    CC util/cgiflash.c
    CC util/captdns.c
    CC util/cgiwifi.c
    AR libesphttpd.a
    make[2]: Entering directory '/Parallax-ESP/libesphttpd/espfs/mkespfsimage'
    cc -I../../lib/heatshrink -I../../include -I.. -std=gnu99 -DESPFS_HEATSHRINK   -c -o main.o main.c
    cc -I../../lib/heatshrink -I../../include -I.. -std=gnu99 -DESPFS_HEATSHRINK   -c -o heatshrink_encoder.o heatshrink_encoder.c
    cc -o mkespfsimage main.o heatshrink_encoder.o
    make[2]: Leaving directory '/Parallax-ESP/libesphttpd/espfs/mkespfsimage'
    websocket/index.html (51%, heatshrink)
    logo.png (100%, none)
    settings.html (28%, heatshrink)
    w3.css (30%, heatshrink)
    style.css (40%, heatshrink)
    log.html (57%, heatshrink)
    update-ffs.html (46%, heatshrink)
    ui.js (43%, heatshrink)
    favicon.ico (78%, heatshrink)
    wifi/wifi.html (41%, heatshrink)
    wifi/style.css (94%, heatshrink)
    wifi/140medley.min.js (74%, heatshrink)
    wifi/icons.png (100%, none)
    wifi/connecting.html (52%, heatshrink)
    index.html (58%, heatshrink)
    newpage.html (59%, heatshrink)
    console.js (40%, heatshrink)
    flash/140medley.min.js (74%, heatshrink)
    flash/index.html (50%, heatshrink)
    make[1]: Leaving directory '/Parallax-ESP/libesphttpd'
    CC parallax/sscp-settings.c
    CC parallax/cgiprop.c
    CC parallax/sscp.c
    CC parallax/sscp-fs.c
    CC parallax/user_main.c
    CC parallax/discovery.c
    CC parallax/roffs.c
    CC parallax/sscp-udp.c
    CC parallax/sscp-tcp.c
    CC parallax/sscp-wifi.c
    CC parallax/sscp-ws.c
    CC parallax/sscp-cmds.c
    CC parallax/sscp-http.c
    CC parallax/httpdroffs.c
    CC parallax/proploader.c
    CC esp-link-stuff/crc16.c
    CC esp-link-stuff/log.c
    CC esp-link-stuff/uart.c
    CC esp-link-stuff/config.c
    CC esp-link-stuff/gpio-helpers.c
    CC esp-link-stuff/task.c
    CC esp-link-stuff/status.c
    CC esp-link-stuff/serbridge.c
    AR build/httpd_app.a
    LD build/httpd.user1.out
    LD build/httpd.user2.out
    APPGEN build/httpd.user1.bin
    1991339963
    1991339964
    ** build/httpd.user1.bin  uses 324164 bytes of available
    APPGEN build/httpd.user2.bin
    -2025449837
    2025449836
    ** build/httpd.user2.bin  uses 324164 bytes of available
    make -C libesphttpd/mkupgimg/
    make[1]: Entering directory '/Parallax-ESP/libesphttpd/mkupgimg'
    cc -o mkupgimg mkupgimg.c
    make[1]: Leaving directory '/Parallax-ESP/libesphttpd/mkupgimg'
    Header: 40 bytes, user1: 324164 bytes, user2: 324164 bytes.
    
  • Clock LoopClock Loop Posts: 2,069
    edited 2020-09-04 17:54
    MOD/INFO ABOUT THE Parallax WX ESP8266 WiFi Module and its FIRMWARE
    When you purchase a WX8266 device from parallax, https://www.parallax.com/product/32420s the firmware on it, and the firmware they provide on their store pages, is old.
    The HOSTNAME for the Parallax WX ESP8266 WiFi Module ends up as the default name, even if you rename the module in the parallax wifi settings page, the HOSTNAME will not match.
    It will have part of the unique mac address.

    After updating to the latest firmware, the WX wifi interface will show the hostname you set in the wifi configuration page. This will also show in your router.
    Other fixes are also included since 2016 (the last firmware upload to github 2016, parallax 2016, and the factory firmware 2016 are all old)
    You can upload this ota file to your parallax WX device using the firmware page.
    After reboot rename the wx module and reboot again, then the HOSTNAME will display properly.
    You can go to http://yournewname/ if you named your wx device yournewname, the webpage that shows will be the parallax wx configuration pages.
    The biggest change you will notice is that your wx wifi module will now respond to its name, and its name will show as its hostname.
    After updating you will need to rename the module again, and reboot, then the hostname will take and communicate/register with the dns

    Its likely your hostname will NOT work if you are connected to the internet or another network.
    In that situation you will need to use the IP address of the Parallax WX esp8266 device.

    You compiled the file on the second post if you followed along. Its the OTA file.
    You should upload it to your WX device asap.
    = result of compile flash files/.OTA update file.

    /Parallax-ESP/build/httpd.ota


    EXTENDED PARALLAX-ESP INFO!
    You can do alot from the various directories.

    /home/pi/Parallax-ESP/release folder has many scrips that will help you format your serially wired, ESP (hint hint, non-parallax ones)
    They need to be re-written though, I go into that later.

    For ease of use, buy a ParallaxEsp and use the web interface to upload your custom OTA code. (plus you're supporting parallax)
    YES, you can ask for help on how to do this, in a post.

    If you want to customize the DEFAULT programmed html on the ParallaxESP, its all located here:
    /home/pi/Parallax-ESP/html

    Just make sure you don't kill the upload html page(you can hide it, so its exposed only to you with a special file/path)
    ..or you will need to learn how to send an "ota" file to your wx using other methods, like serial.
    If you don't remove it, it will be at http://yourespname/flash/index.html

    Change any of your esp code or html, and then go back to the Parallax-ESP directory and run
    make clean
    
    Then do
    make
    
    Now the ota file has your changed html.
    Upload it to your esp using the ota page.
    http://yourespname/flash/index.html

    You can change the NAME of the esp in the code, instead of using the web interface.
    IF you edit this file---> /home/pi/Parallax-ESP/esp-link-stuff/config.c
    bool ICACHE_FLASH_ATTR configRestoreDefaults(void) {
        os_memcpy(&flashConfig, &flashDefault, sizeof(FlashConfig));
        char chipIdStr[6];
        os_sprintf(chipIdStr, "%06x", system_get_chip_id());
    #ifdef CHIP_IN_MODULE_NAME
        char module_name[32];
        os_strcpy(module_name, "wx-");
        os_strcat(module_name, chipIdStr);
        os_memcpy(&flashConfig.module_name, module_name, os_strlen(module_name) + 1); // include terminating zero
        softap_set_ssid(flashConfig.module_name, os_strlen(flashConfig.module_name));
    #endif
        return true;
    }
    

    Change:
        os_strcpy(module_name, "PUT YOUR MODULE NAME HERE");
        // os_strcat(module_name, chipIdStr);
    

    The // os_strcat(module_name, chipIdStr); serializes your module so it has a unique name based on its mac. Unless you are making a bunch, you don't need this.

    Don't remove the terminating zero next line, I think this is needed for proper code enumeration.
    os_memcpy(&flashConfig.module_name, module_name, os_strlen(module_name) + 1); // include terminating zero
    

    Since you changed code, you need to make the ota file again and re-upload it.
    make clean
    
    Then do
    make
    
    Now the ota file has your changed html and name.
    Upload it to your esp using the ota page.
    http://yourespname/flash/index.html

    Now you can make products with wifi interfaces that also show up on the users wifi with a recognizable name.
    The flash upload page lets you see how you can let your end users upload new "firmware"
    WARNING wrote:
    If you make products or something for someone, make sure they know the ESP devices are not secure, and they can EASILY be hacked
    The upload OTA file pages and other interfaces, TELNET, PUT/GET HTTP REQUESTER are ALLL EXPOSED!
    GET A non-internet WIFI ROUTER!!!!!
    WE NEED A BATTLE HARDENED VERSION OF Parallax-ESP that lets the user turn off every wifi interface they choose, even everything but http(https i wish)
    

    Its possible the propeller firmware would still need a batch file or script to use proploader to upload that .binary file.
    I do not know how or if it could be done on the wx webpage or using some form of html packaged in with the OTA file.
    Mabee? Someone would need to look into that. I think that can be done using the http requester...?>

    If you change your program for your esp and it breaks it, you can recover it using the serial interface and a parallax prop plug.
    Go to my next post.
  • Hello!
    Sounds interesting. But would all of this work with a stock ESP8266 widget other than the dandy thing from Parallax? Remember this great idea was spawned by almost all of us discussing that WiFi enabled gadget not all that long ago.




    And this message is being brought to you all courtesy the efforts of Lando Calrissian Smuggler and con artist. Also grifter and general purpose gambler.
  • Right, the biggest thing this board offers is a regulated power supply and level shifters so it is 5 volt tolerant to work with there other products.

    Also man hours to develop the boot loader code to allow flashing the software over the air.

    Mike
  • Clock LoopClock Loop Posts: 2,069
    edited 2020-09-04 17:56
    But would all of this work with a stock ESP8266 widget other than the dandy thing from Parallax?
    HOW TO MAKE A NON-PARALLAX ESP RUN Parallax-ESP code
    PARALLAX OPEN SOURCE STRIKES AGAIN.
    (this is what originally got me involved with the parallax-esp firmware, the fact that it WORKED on ANY esp8266 board with a 512K flash (no OTA though)
    ANSWER: YES, they went open source with the firmware, THANKS PARALLAX! It ALSO depends on what size memory chip is soldered on with the esp8266.
    David Betz wrote: »
    The WX firmware expects a module with at least 2M of flash. It can run with 1M of flash but the flash filesystem size is quite restricted. It can also run with 512K of flash but will no longer support OTA firmware updates and will also have a restricted flash filesystem size.

    The parallax esp8266 device comes with 16 Mbits (4MB) of SPI flash. (written in the module guide)

    TO FLASH AN ESP TO ParallaxWx, keep reading, or if you have the proper flash size, skip to my next post.

    YES, most likely it all works on a stock esp8266 (you will need to connect the esp8266 serially at first to upload the parallax OTA webpage.
    (just make sure you backup the original memory contents, or desolder/replace the original)
    I have used the parallax esp firmware on a sparkfun esp8266 board which I replaced the stock memory chip with the largest soic memory chip available at the time since the cost was the same as a smaller one.
    Replacing a SOIC8 2Mbit flash chip on a sparkfun ESP8266 board, to a SOIC8 128Mbit flash chip
    i wanted to do this to my sparkfun pcb, to get my 2mbit higher, so i just used a 128mbit)
    www.youtube.com/watch?v=A5dYqIJkhGk
    
    SOIC8 128Mbit flash chip
    https://www.digikey.com/product-detail/en/winbond-electronics/W25Q128JVSIM/W25Q128JVSIM-ND/6819721

    YES, I also own a parallax https://www.parallax.com/product/32420s AND a https://www.parallax.com/product/32420d
    I have a sparkfun 8266 board, a few other 8266 boards purchased at microcenter...
    I replaced the flash on them all, and....

    The parallax devices perform better than any other esp8266 device I have purchased thus far.
    Probably due to less interference from a metal lid on the parallax board, plus other circuitry, not to mention the onboard antenna.
    Even though I can get the cheaper 8266 devices for 8$ each, i can't run them in my greenhouse in the mid winter or the mid summer, the extreme heat and cold cause the wifi to drop constantly.
    But the parallax device seems to handle the extreme temp swings better so far.


    If you mod/have a big enough flash on a esp8266 device you will need to upload the parallax firmware if you want to use a ESP to program propellers.
    Its in the Parallax-ESP/releases folder.
    You will need more tools to do that, read my next post.

    If you need help doing it ask here.
    If you don't have linux or a raspberrypi.

    You can find the latest compiled OTA file at the bottom of this thread ,its also listed in the INDEX of this thread, on the VERY FIRST POST up top.

    Or better yet just get a pi, they are cheap as dirt, and can connect to your tv with an hdmi cable.
    You CAN program your ESP with your usb prop tool dongle.
    Go to my next post to do just that.
    IF YOU REALLY WANNA GET DIRTY WITH THE ESP...

    LETS GET DIRTY.
    https://forums.parallax.com/discussion/comment/1340315/#Comment_1340315
  • David BetzDavid Betz Posts: 14,516
    edited 2018-11-12 15:35
    The WX firmware expects a module with at least 2M of flash. It can run with 1M of flash but the flash filesystem size is quite restricted. It can also run with 512K of flash but will no longer support OTA firmware updates and will also have a restricted flash filesystem size.
  • Clock LoopClock Loop Posts: 2,069
    edited 2020-09-05 03:55
    TO RECOVER AN ESP or MAKE YOUR ESP RUN PARALLAX CODE!!!
    David Betz wrote: »
    The WX firmware expects a module with at least 2M of flash. It can run with 1M of flash but the flash filesystem size is quite restricted. It can also run with 512K of flash but will no longer support OTA firmware updates and will also have a restricted flash filesystem size.

    What a guy... right when ya need him for info, THERE HE IS!

    I have bricked a parallax ESP by wiping its flash.
    To recover it you need tools.

    ************ This process is in the progress of being changed, updating soon!*******************


    esptool.py is the programmer tool --> https://github.com/espressif/esptool
    Copy esptool.py into the release folder.
    YOU WILL NEED TO GIVE EXECUTE PERMISSION TO esptool.py

    https://github.com/espressif/esptool)
    Download esptool.py


    I had to copy all the bin file it wants into the release folder also.
    You can find them in /Parallax-Esp/build and /Parallax-Esp/esp_iot_sdk_v2.0.0.p1/bin
    PLEASE NOTE v2 has known security issues..  https://hackaday.com/2017/10/16/oh-great-wpa2-is-broken/
    
    I am looking into what it takes to get the esp to the updated source and use it,,, Might be hard.

    Copy these 4 files to the /Parallax-Esp/release folder.

    /Parallax-Esp/esp_iot_sdk_v2.0.0.p1/bin/boot_v1.7.bin
    /Parallax-Esp/esp_iot_sdk_v2.0.0.p1/bin/blank.bin
    /Parallax-Esp/esp_iot_sdk_v2.0.0.p1/bin/esp_init_data_default_v08.bin

    /Parallax-Esp/build/httpd.user1.bin


    So, I connected my ESP using a Parallax PropPlug like so.

    The PGM (IO0) pin is jumpered to ground. The picture looks like its jumpered to 3.3v, its not.
    ParallaxWxEsp8266.jpeg

    You can find the size of your flash with..
    :~/P-Esp$ ./esptool.py flash_id
    esptool.py v2.6-beta1
    Serial port /dev/ttyUSB0
    Connecting........____
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Features: WiFi
    Crystal is 26MHz
    MAC: xx:xx:xx:xx:xx:xx
    Uploading stub...
    Running stub...
    Stub running...
    Manufacturer: a1
    Device: 4016
    Detected flash size: 4MB
    Hard resetting via RTS pin...
    

    Ok now that you know your flash size, YOU NEED A NEW flash-all.sh file!
    Open /Parallax-ESP/release/flash-all.sh and erase all its contents and paste this in its place:
    After you paste it make sure to change the FLASH_SIZE=4MB if your flash is different.
    # flash the firmware
    # and clear out all settings and the user flash filesystem
    
    PORT=/dev/ttyUSB0
    if [ ! -z $1 ]
    then
      PORT=$1
    fi
    echo Using port $PORT
    
    BAUD=115200
    FLASH_SIZE=4MB          # 16MB, detect, 256KB, 2MB-c1, 8MB, 2MB, 4MB, 512KB, 1MB, 4MB-c1
    FLASH_BLOCK_SIZE=1024
    FLASH_SPEED=80m         # keep,40m,26m,20m,80m
    FLASH_INTERFACE=qio     # keep,qio,qout,dio,dout
    
    BOOT_LOADER=0x000000
    USER1_IMAGE=0x001000
    
    USER_SETTINGS1=0x07E000
    USER_SETTINGS2=0x07F000
    
    if [ $FLASH_SIZE = 1MB ]; then
    WIFI_SETTINGS1=0x0FC000
    WIFI_SETTINGS2=0x0FE000
    WIFI_SETTINGS3=0x0FA000
    elif [ $FLASH_SIZE = 2MB ]; then
    WIFI_SETTINGS1=0x1FC000
    WIFI_SETTINGS2=0x1FE000
    WIFI_SETTINGS3=0x1FA000
    elif [ $FLASH_SIZE = 4MB ]; then
    WIFI_SETTINGS1=0x3FC000
    WIFI_SETTINGS2=0x3FE000
    WIFI_SETTINGS3=0x3FA000
    else
    echo Unsupported flash size $FLASH_SIZE
    exit 1
    fi
    
    #flash filesystem base
    FFS_BASE=0x100000
    
    ./esptool.py \
    --port $PORT \
    --baud $BAUD \
    write_flash \
    --flash_freq $FLASH_SPEED \
    --flash_mode $FLASH_INTERFACE \
    --flash_size $FLASH_SIZE \
    --verify \
    --compress \
    $BOOT_LOADER boot_v1.7.bin \
    $USER1_IMAGE httpd.user1.bin \
    $USER_SETTINGS1 blank.bin \
    $USER_SETTINGS2 blank.bin \
    $WIFI_SETTINGS1 esp_init_data_default_v08.bin \
    $WIFI_SETTINGS2 blank.bin \
    $WIFI_SETTINGS3 blank.bin \
    $FFS_BASE blank.bin
    

    Do not change the baud rate to a faster speed until you have tested your firmware upload and know it works.
    Then you know if you have problems its not because of a faster upload speed.
    Then run:
    $ ./flash-all.sh
    Using port /dev/ttyUSB0
    esptool.py v3.0-dev
    Serial port /dev/ttyUSB0
    Connecting.....
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Features: WiFi
    Crystal is 26MHz
    MAC: xx:xx:xx:xx:xx:xx
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 115200
    Changed.
    Configuring flash size...
    Flash params set to 0x004f
    Compressed 3856 bytes to 2763...
    Wrote 3856 bytes (2763 compressed) at 0x00000000 in 0.0 seconds (effective 965.6 kbit/s)...
    Hash of data verified.
    Compressed 317668 bytes to 239609...
    Wrote 317668 bytes (239609 compressed) at 0x00001000 in 3.8 seconds (effective 668.0 kbit/s)...
    Hash of data verified.
    Compressed 4096 bytes to 26...
    Wrote 4096 bytes (26 compressed) at 0x0007e000 in 0.0 seconds (effective 2045.7 kbit/s)...
    Hash of data verified.
    Compressed 4096 bytes to 26...
    Wrote 4096 bytes (26 compressed) at 0x0007f000 in 0.0 seconds (effective 2048.8 kbit/s)...
    Hash of data verified.
    Compressed 128 bytes to 75...
    Wrote 128 bytes (75 compressed) at 0x003fc000 in 0.0 seconds (effective 64.2 kbit/s)...
    Hash of data verified.
    Compressed 4096 bytes to 26...
    Wrote 4096 bytes (26 compressed) at 0x003fe000 in 0.0 seconds (effective 2031.9 kbit/s)...
    Hash of data verified.
    Compressed 4096 bytes to 26...
    Wrote 4096 bytes (26 compressed) at 0x003fa000 in 0.0 seconds (effective 2056.0 kbit/s)...
    Hash of data verified.
    Compressed 4096 bytes to 26...
    Wrote 4096 bytes (26 compressed) at 0x00100000 in 0.0 seconds (effective 2068.4 kbit/s)...
    Hash of data verified.
    
    Leaving...
    Verifying just-written flash...
    (This option is deprecated, flash contents are now always read back after flashing.)
    Flash params set to 0x004f
    Verifying 0xf10 (3856) bytes @ 0x00000000 in flash against boot_v1.6.bin...
    -- verify OK (digest matched)
    Verifying 0x4d8e4 (317668) bytes @ 0x00001000 in flash against httpd.user1.bin...
    -- verify OK (digest matched)
    Verifying 0x1000 (4096) bytes @ 0x0007e000 in flash against blank.bin...
    -- verify OK (digest matched)
    Verifying 0x1000 (4096) bytes @ 0x0007f000 in flash against blank.bin...
    -- verify OK (digest matched)
    Verifying 0x80 (128) bytes @ 0x003fc000 in flash against esp_init_data_default.bin...
    -- verify OK (digest matched)
    Verifying 0x1000 (4096) bytes @ 0x003fe000 in flash against blank.bin...
    -- verify OK (digest matched)
    Verifying 0x1000 (4096) bytes @ 0x003fa000 in flash against blank.bin...
    -- verify OK (digest matched)
    Verifying 0x1000 (4096) bytes @ 0x00100000 in flash against blank.bin...
    -- verify OK (digest matched)
    Hard resetting via RTS pin...
    

    Thats it your module now runs the ParallaxWX code! THANKS PARALLAX! (buy their products dude! support them)
  • Clock LoopClock Loop Posts: 2,069
    edited 2019-10-16 23:29
    OPENSPIN

    Once you have the parallax-esp , esp8266, side of the programming down,
    you need to be able to program the propeller chip and see its debug serial output in a terminal window.
    So, we need to get proploader.
    But to make that we need openspin.
    If you have it already, we need to update it to the new version.
    If your version is older than 1.00.81 proploader might not compile properly.
    :~ $ openspin
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2018 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.81
    usage: openspin
             [ -h ]                 display this help
             [ -L or -I <path> ]    add a directory to the include path
             [ -o <path> ]          output filename
             [ -b ]                 output binary file format
             [ -e ]                 output eeprom file format
             [ -c ]                 output only DAT sections
             [ -d ]                 dump out doc mode
             [ -t ]                 output just the object file tree
             [ -f ]                 output a list of filenames for use in archiving
             [ -q ]                 quiet mode (suppress banner and non-error text)
             [ -v ]                 verbose output
             [ -p ]                 disable the preprocessor
             [ -a ]                 use alternative preprocessor rules
             [ -D <define> ]        add a define
             [ -M <size> ]          size of eeprom (up to 16777216 bytes)
             [ -s ]                 dump PUB & CON symbol information for top object
             [ -u ]                 enable unused method elimination
             <name.spin>            spin file to compile
    
    
    When we compile it, we can replace the installed copy of openspin, find the installed copy with whereis
    :~ $ whereis openspin
    openspin: /usr/bin/openspin /opt/parallax/bin/openspin
    
    My system shows two different version located on my system, so I will replace all old ones with my new compiled version once its done.
    So get openspin.
    git clone --recursive https://github.com/parallaxinc/OpenSpin
    

    Now make it.
    :~ $ cd OpenSpin/
    :~/OpenSpin $ make
    mkdir -p ./build
    make -C PropellerCompiler CROSS= BUILD=/home/pi/OpenSpin/build/PropellerCompiler all
    make[1]: Entering directory '/home/pi/OpenSpin/PropellerCompiler'
    mkdir -p /home/pi/OpenSpin/build/PropellerCompiler
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/BlockNestStackRoutines.o -c BlockNestStackRoutines.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/CompileDatBlocks.o -c CompileDatBlocks.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/CompileExpression.o -c CompileExpression.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/CompileInstruction.o -c CompileInstruction.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/CompileUtilities.o -c CompileUtilities.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/DistillObjects.o -c DistillObjects.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/Elementizer.o -c Elementizer.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/ErrorStrings.o -c ErrorStrings.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/ExpressionResolver.o -c ExpressionResolver.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/InstructionBlockCompiler.o -c InstructionBlockCompiler.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/StringConstantRoutines.o -c StringConstantRoutines.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/SymbolEngine.o -c SymbolEngine.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/Utilities.o -c Utilities.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/UnusedMethodUtils.o -c UnusedMethodUtils.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/PropellerCompiler.o -c PropellerCompiler.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/CompileSpin.o -c CompileSpin.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/flexbuf.o -c flexbuf.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/preprocess.o -c preprocess.cpp
    preprocess.cpp: In function ‘int do_line(preprocess*)’:
    preprocess.cpp:911:43: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
                 handle_message(pp, &P, "error");
                                               ^
    preprocess.cpp:919:45: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
                 handle_message(pp, &P, "warning");
                                                 ^
    preprocess.cpp:923:42: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
                 handle_message(pp, &P, "info");
                                              ^
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/textconvert.o -c textconvert.cpp
    g++ -Wall -g  -o /home/pi/OpenSpin/build/PropellerCompiler/objectheap.o -c objectheap.cpp
    ar rs /home/pi/OpenSpin/build/PropellerCompiler/libopenspin.a /home/pi/OpenSpin/build/PropellerCompiler/BlockNestStackRoutines.o /home/pi/OpenSpin/build/PropellerCompiler/CompileDatBlocks.o /home/pi/OpenSpin/build/PropellerCompiler/CompileExpression.o /home/pi/OpenSpin/build/PropellerCompiler/CompileInstruction.o /home/pi/OpenSpin/build/PropellerCompiler/CompileUtilities.o /home/pi/OpenSpin/build/PropellerCompiler/DistillObjects.o /home/pi/OpenSpin/build/PropellerCompiler/Elementizer.o /home/pi/OpenSpin/build/PropellerCompiler/ErrorStrings.o /home/pi/OpenSpin/build/PropellerCompiler/ExpressionResolver.o /home/pi/OpenSpin/build/PropellerCompiler/InstructionBlockCompiler.o /home/pi/OpenSpin/build/PropellerCompiler/StringConstantRoutines.o /home/pi/OpenSpin/build/PropellerCompiler/SymbolEngine.o /home/pi/OpenSpin/build/PropellerCompiler/Utilities.o /home/pi/OpenSpin/build/PropellerCompiler/UnusedMethodUtils.o /home/pi/OpenSpin/build/PropellerCompiler/PropellerCompiler.o /home/pi/OpenSpin/build/PropellerCompiler/CompileSpin.o /home/pi/OpenSpin/build/PropellerCompiler/flexbuf.o /home/pi/OpenSpin/build/PropellerCompiler/preprocess.o /home/pi/OpenSpin/build/PropellerCompiler/textconvert.o /home/pi/OpenSpin/build/PropellerCompiler/objectheap.o
    ar: creating /home/pi/OpenSpin/build/PropellerCompiler/libopenspin.a
    make[1]: Leaving directory '/home/pi/OpenSpin/PropellerCompiler'
    g++ -Wall -g  -o build/openspin.o -c SpinSource/openspin.cpp
    g++ -Wall -g  -o build/pathentry.o -c SpinSource/pathentry.cpp
    g++ -o ./build/openspin -Wall -g  ./build/openspin.o ./build/pathentry.o ./build/PropellerCompiler/libopenspin.a
    

    Now make it for the rpi, and win32.

    If you want to make for windows you need this package.

    sudo apt install g++-mingw-w64

    If you want to make for raspberrypi you need this package.

    sudo apt install g++-arm-linux-gnueabihf

    Then for rpi you must run the same package again, I did. And it finds more to install.

    sudo apt install g++-arm-linux-gnueabihf

    Rpi/win32 complie should work in linux now.
    make CROSS=rpi
    make CROSS=win32

    Now lets open the build folder and test the openspin command.
    :~/OpenSpin $ cd build
    :~/OpenSpin/build $ ./openspin
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2018 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.81
    usage: openspin
             [ -h ]                 display this help
             [ -L or -I <path> ]    add a directory to the include path
             [ -o <path> ]          output filename
             [ -b ]                 output binary file format
             [ -e ]                 output eeprom file format
             [ -c ]                 output only DAT sections
             [ -d ]                 dump out doc mode
             [ -t ]                 output just the object file tree
             [ -f ]                 output a list of filenames for use in archiving
             [ -q ]                 quiet mode (suppress banner and non-error text)
             [ -v ]                 verbose output
             [ -p ]                 disable the preprocessor
             [ -a ]                 use alternative preprocessor rules
             [ -D <define> ]        add a define
             [ -M <size> ]          size of eeprom (up to 16777216 bytes)
             [ -s ]                 dump PUB & CON symbol information for top object
             [ -u ]                 enable unused method elimination
             <name.spin>            spin file to compile
    
    Great it works.
    Now I need to copy my build of openspin to replace the already installed versions i found earlier with whereis.
    You should also copy it to all locations that openspin might be, like other programs that use it!
    :~/OpenSpin/build $ sudo cp openspin /usr/bin/
    :~/OpenSpin/build $ sudo cp openspin /opt/parallax/bin/
    
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-12-11 05:20
    PROPLOADER
    Ok now we need to get proploader.
    git clone --recursive https://github.com/parallaxinc/proploader
    
    If you want to make proploader for windows you need this package.
    sudo apt install g++-mingw-w64
    
    If you want to make proploader for raspberrypi you need this package.
    sudo apt install g++-arm-linux-gnueabihf
    
    Then for rpi you must run the same package again, I did. And it finds more to install.
    sudo apt install g++-arm-linux-gnueabihf
    
    Rpi complie should work in linux now.

    Make the proploader program. You need to specify the OS.
    Here I run the raspberrypi one, but later i switch to a linux system, and will need the linux version, so I will just compile all 3 versions.
    The latest version of proploader properly interprets the RCFAST switch, and so SIMPLEIDE needs its RCFAST.CFG file changed if you are using the SPIN COMPILER.
    :~/proploader $ make OS=raspberrypi
    VERSION v1.0-37 (2018-11-12 10:20:10 gc4205c0)
    gcc -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:10 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj tools/split.c -o /home/pi/proploader-raspberrypi-build/bin/split
    cd spin/; openspin -o /home/pi/proploader-raspberrypi-build/obj/IP_Loader.binary IP_Loader.spin
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2018 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.81 Compiled on Nov 12 2018 10:08:52
    Compiling...
    IP_Loader.spin
    Done.
    Program size is 856 bytes
    /home/pi/proploader-raspberrypi-build/bin/split /home/pi/proploader-raspberrypi-build/obj/IP_Loader.binary /home/pi/proploader-raspberrypi-build/obj/IP_Loader.h
    g++ -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:11 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/main.cpp -o /home/pi/proploader-raspberrypi-build/obj/main.o
    g++ -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:13 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/loader.cpp -o /home/pi/proploader-raspberrypi-build/obj/loader.o
    g++ -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:13 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/fastloader.cpp -o /home/pi/proploader-raspberrypi-build/obj/fastloader.o
    g++ -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:14 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/propimage.cpp -o /home/pi/proploader-raspberrypi-build/obj/propimage.o
    g++ -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:14 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/packet.cpp -o /home/pi/proploader-raspberrypi-build/obj/packet.o
    g++ -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:14 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/serialpropconnection.cpp -o /home/pi/proploader-raspberrypi-build/obj/serialpropconnection.o
    g++ -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:15 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/serialloader.cpp -o /home/pi/proploader-raspberrypi-build/obj/serialloader.o
    g++ -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:17 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/wifipropconnection.cpp -o /home/pi/proploader-raspberrypi-build/obj/wifipropconnection.o
    gcc -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:18 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/loadelf.c -o /home/pi/proploader-raspberrypi-build/obj/loadelf.o
    cd spin/; openspin -o /home/pi/proploader-raspberrypi-build/obj/sd_helper.binary sd_helper.spin
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2018 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.81 Compiled on Nov 12 2018 10:08:52
    Compiling...
    sd_helper.spin
    |-packet_driver.spin
    |-fsrw.spin
      |-safe_spi_c3.spin
    Done.
    Program size is 7268 bytes
    gcc -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:19 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj tools/bin2c.c -o /home/pi/proploader-raspberrypi-build/bin/bin2c
    /home/pi/proploader-raspberrypi-build/bin/bin2c /home/pi/proploader-raspberrypi-build/obj/sd_helper.binary /home/pi/proploader-raspberrypi-build/obj/sd_helper.c
    gcc -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:20 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c /home/pi/proploader-raspberrypi-build/obj/sd_helper.c -o /home/pi/proploader-raspberrypi-build/obj/sd_helper.o
    gcc -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:20 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/config.c -o /home/pi/proploader-raspberrypi-build/obj/config.o
    gcc -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:20 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/expr.c -o /home/pi/proploader-raspberrypi-build/obj/expr.o
    gcc -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:21 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/system.c -o /home/pi/proploader-raspberrypi-build/obj/system.o
    g++ -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:21 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/messages.cpp -o /home/pi/proploader-raspberrypi-build/obj/messages.o
    gcc -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:21 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/sock_posix.c -o /home/pi/proploader-raspberrypi-build/obj/sock_posix.o
    gcc -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:21 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/serial_posix.c -o /home/pi/proploader-raspberrypi-build/obj/serial_posix.o
    src/serial_posix.c: In function ‘SerialUseResetMethod’:
    src/serial_posix.c:86:24: warning: passing argument 1 of ‘strtok’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
             token = strtok(method, ",");
                            ^~~~~~
    In file included from src/serial_posix.c:34:0:
    /usr/include/string.h:343:14: note: expected ‘char * restrict’ but argument is of type ‘const char *’
     extern char *strtok (char *__restrict __s, const char *__restrict __delim)
                  ^~~~~~
    gcc -Wall -DVERSION=\""v1.0-37 (2018-11-12 10:20:22 gc4205c0)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/gpio_sysfs.c -o /home/pi/proploader-raspberrypi-build/obj/gpio_sysfs.o
    g++ -o /home/pi/proploader-raspberrypi-build/bin/proploader  /home/pi/proploader-raspberrypi-build/obj/main.o /home/pi/proploader-raspberrypi-build/obj/loader.o /home/pi/proploader-raspberrypi-build/obj/fastloader.o /home/pi/proploader-raspberrypi-build/obj/propimage.o /home/pi/proploader-raspberrypi-build/obj/packet.o /home/pi/proploader-raspberrypi-build/obj/serialpropconnection.o /home/pi/proploader-raspberrypi-build/obj/serialloader.o /home/pi/proploader-raspberrypi-build/obj/wifipropconnection.o /home/pi/proploader-raspberrypi-build/obj/loadelf.o /home/pi/proploader-raspberrypi-build/obj/sd_helper.o /home/pi/proploader-raspberrypi-build/obj/config.o /home/pi/proploader-raspberrypi-build/obj/expr.o /home/pi/proploader-raspberrypi-build/obj/system.o /home/pi/proploader-raspberrypi-build/obj/messages.o /home/pi/proploader-raspberrypi-build/obj/sock_posix.o /home/pi/proploader-raspberrypi-build/obj/serial_posix.o /home/pi/proploader-raspberrypi-build/obj/gpio_sysfs.o  -lstdc++
    openspin -o /home/pi/proploader-raspberrypi-build/blink-fast.binary blink.spin
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2018 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.81 Compiled on Nov 12 2018 10:08:52
    Compiling...
    blink.spin
    Done.
    Program size is 68 bytes
    openspin -DSLOW -o /home/pi/proploader-raspberrypi-build/blink-slow.binary blink.spin
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2018 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.81 Compiled on Nov 12 2018 10:08:52
    Compiling...
    blink.spin
    Done.
    Program size is 68 bytes
    rm /home/pi/proploader-raspberrypi-build/obj/sd_helper.c /home/pi/proploader-raspberrypi-build/bin/bin2c /home/pi/proploader-raspberrypi-build/obj/sd_helper.binary
    
    MAKE SURE YOU RUN ALL 3! if you want to compile SimpleIDE for any of these platforms later.
    Do these two now also.
    make OS=linux
    make CROSS=win32
    
    Test the proploader that you just compiled. (my system is a raspberrypi, so its in the raspberrypi folder)
    :~/proploader $ cd ..
    :~ $ cd proploader-raspberrypi-build/
    :~/proploader-raspberrypi-build $ cd bin
    :~/proploader-raspberrypi-build/bin $ ./proploader
    PropLoader v1.0-37 (2018-11-12 10:20:11 gc4205c0)
    
    usage: ./proploader [options] [<file>]
    
    options:
        -b <type>       select target board and subtype (default is 'default:default')
        -c              display numeric message codes
        -D var=value    define a board configuration variable
        -e              program eeprom (and halt, unless combined with -r)
        -f <file>       write a file to the SD card
        -i <ip-addr>    IP address of the Parallax Wi-Fi module
        -I <path>       add a directory to the include path
        -n <name>       set the name of a Parallax Wi-Fi module
        -p <port>       serial port
        -P              show all serial ports
        -r              run program after downloading (useful with -e)
        -R              reset the Propeller
        -s              do a serial download
        -t              enter terminal mode after the load is complete
        -T              enter pst-compatible terminal mode after the load is complete
        -v              enable verbose debugging output
        -W              show all discovered wifi modules
        -?              display a usage message and exit
    
    file:               binary file to load (.elf or .binary)
    
    Target board type can be either a single identifier like 'propboe' in which case the subtype
    defaults to 'default' or it can be of the form <type>:<subtype> like 'c3:ram'.
    
    Module names should only include the characters A-Z, a-z, 0-9, or '-' and should not begin or
    end with a '-'. They must also be less than 32 characters long.
    
    Variables that can be set with -D are:
      clkfreq clkmode reset baudrate rxpin txpin tvpin
      loader-baud-rate fast-loader-baud-rate program-baud-rate
      sdspi-do sdspi-clk sdspi-di sdspi-cs
      sdspi-clr sdspi-inc sdspi-start sdspi-width spdspi-addr
      sdspi-config1 sdspi-config2
    
    Value expressions for -D can include:
      rcfast rcslow xinput xtal1 xtal2 xtal3 pll1x pll2x pll4x pll8x pll16x k m mhz true false
      an integer or two operands with a binary operator + - * / % & | or unary + or -
      or a parenthesized expression.
    
    Excellent it works, copy it to a location that lets you use it from anywhere.
    You should also copy it to all locations that proploader might be, like other programs that use it!
    :~/proploader-raspberrypi-build/bin $ sudo cp proploader /usr/bin/
    :~/proploader-raspberrypi-build/bin $ sudo cp proploader /opt/parallax/bin/
    
    Now you use openspin to make the binary that proploader needs.
    :~/openspin yourfile.spin
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2018 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.81 Compiled on Nov 10 2018 23:30:52
    Compiling...
    yourfile.spin
    |-jm_1-wire.spin
    |-FullDuplexSerialPlus.spin
    |-jm_24xx256.spin
      |-jm_i2c.spin
    |-PWM_32_v4.spin
    Done.
    Program size is 12656 bytes
    
    Then we can upload the binary file that openspin compiled to our propeller chip connected to the wx8266 board.
    $ proploader -i NameOfYourESP8266 -e -R -r yourfile.binary -c -v
    001-Opening file 'yourfile.binary'
    000-From 123.123.123.123 got: { "name": "NameOfYourESP8266", "description": "", "reset pin": "13", "rx pullup": "disabled", "mac address": "de:ad:be:ef:0c:24" }
    000-Delivering second-stage loader
    002-Downloading file to port 123.123.123.123
    009-12656 bytes sent                  
    003-Verifying RAM
    004-Programming EEPROM
    000-Sending readyToLaunch packet
    000-Sending launchNow packet
    005-Download successful!
    

    You can also rename your esp using proploader.
    proploader -n YOURNEWNAME
    

    Don't mix up -n and -i They are also.. CASE SENSITIVE!
  • Clock LoopClock Loop Posts: 2,069
    edited 2020-08-29 07:25
    HOW TO VIEW YOUR PROPELLER DEBUG SERIAL OUTPUT OVER WIFI!
    If you install putty.
    sudo apt-get install putty
    
    You can view the serial output from your propeller over the wireless network on port 23. We all know this as our debug output.
    putty -telnet youresp8266name
    
    If you format your propeller debug output with ansi commands, you can get a fancy debug output in putty.
    telnet%20port%2023%20with%20putty%20and%20ansi%20control%20codes.jpg

    The attached ZIP file includes the .SPIN file and the .SIDE file (for use with SimpleIDE)
    ''*******************************************
    ''*  Telnet Wireless WX Ansi Command  Demo  *
    ''*  Author: Clock Loop @ parallax forums   *           
    ''*******************************************
    
    CON  
    
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
      
              
    CON
    
      Tx             = 30   'serial out to wx device
      Rx             = 31   'serial in from wx device
    
    OBJ
    
      Term          : "FullDuplexSerial" 
    
    Pub Port23Display | Years, Dayz, Hour, Mnit
    
        Years := 13
        Dayz  := 6
        Hour  := 3
        Mnit  := 45
    
    
      
        term.start(Rx, Tx, %0000, 115_200)                                    '1cog start telnet terminal
    
        waitcnt(80_000_000 + cnt)  
        
        term.str(string(27))    'Set command mode                                                     
        term.str(string("[2J"))                                               'Clear telnet screen
    
    
        term.str(string(27))    'Set command mode 
        term.str(string("[1;1f"))  'Set Position
          
        term.str(string(27))    'Set command mode
        term.str(string("[0m")) 'Turn off character attributes
    
                                 
        '--------------SOME ANSI COMMAND CODE INFO---------
            'term.str(string(27))  'Set command mode          
            'term.str(string("[2J")) 'clear screen
                      
            'term.str(string(27))    'Set command mode
            'term.str(string("[0m")) 'Turn off character attributes
            'term.str(string("[1m")) 'Turn bold mode on
            'term.str(string("[2m")) 'Turn low intensity mode on
            'term.str(string("[4m")) 'Turn underline mode on
            'term.str(string("[5m")) 'Turn blinking mode on
            'term.str(string("[7m")) 'Turn reverse video on    
            'term.str(string("[8m")) 'Turn invisible text mode on
         
            'term.str(string("#3"))  'Double-height letters, top half 
            { 
            Esc#3   Double-height letters, top half         DECDHL
            Esc#4   Double-height letters, bottom half      DECDHL
            Esc#5   Single width, single height letters     DECSWL
            Esc#6   Double width, single height letters     DECDWL
            }
            
                  
      
    Repeat
    
            
            term.str(string(27))    'Set command mode 
            term.str(string("[1;1f"))  'Set Position
    
            waitcnt(80_000_000 + cnt) 
            
            term.str(string(27))    'Set command mode 
            term.str(string("[5;5f"))  'Set Position 
    
            term.str(string(27))  'Set command mode 
            term.str(string("[31m")) 'Red color text  
            
            term.str(string("UpTime   : "))
    
            term.dec(Years)       
            term.str(string(":Years  "))
            term.dec(Dayz)       
            term.str(string(":Days   "))
            term.dec(Hour)       
            term.str(string(":Hours   "))
                    
            term.dec(Mnit)       
            term.str(string(":Min   "))
    
    
    
    
    Dat
    {{
    
      Terms of Use: MIT License
    
      Permission is hereby granted, free of charge, to any person obtaining a copy of this
      software and associated documentation files (the "Software"), to deal in the Software
      without restriction, including without limitation the rights to use, copy, modify,
      merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
      permit persons to whom the Software is furnished to do so, subject to the following
      conditions:
    
      The above copyright notice and this permission notice shall be included in all copies
      or substantial portions of the Software.
    
      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
      INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
      PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
      HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
      CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
      OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
    
    }}
    
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-12-02 11:07
    Its probably me, but I would like to point out that I could not get the propeller to properly reset or program when I used the default GPIO12 (RES) pin.
    I had to switch to the CTS pin and connect my props reset line to it for proploader to be able to reset and program.
    I am not sure if I fried the reset GPIO12 pin or my code is doing something. I have another parallax wx esp8266 module that I will do some bench testing with later.
    I also had to change the default reset pin to cts in the parallax wx configure webpage.
    So if you have issues with getting your proploader to reset or download to your prop, try using the CTS GPIO13 as your props reset pin instead.
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-12-06 20:09
    The parallax esp/firmware does not do well if you try to use the telnet port on your parallax wx8266 wifi device, while downloading a program to the propeller.
    Understandable, but some may find this happen if they forget to close the putty telnet connection to their wx wifi before trying to program the prop connected to it.
    If you run telnet and try to program it does this.
    :~/ $ proploader -i wxwifidevice -e -R -r file.binary -c -v
    001-Opening file 'file.binary'
    000-From 123.123.123.123 got: { "name": "wxwifidevice", "description": "", "reset pin": "13", "rx pullup": "disabled", "mac address": "de:ad:be:ef:de:ad" }
    000-Delivering second-stage loader
    002-Downloading file to port 123.123.123.123
    009-12728 bytes sent                  
    003-Verifying RAM
    004-Programming EEPROM
    000-transmitPacket -978944 failed: wrong tag 41b71efb - expected 79e2a9e3
    000-transmitPacket -978944 failed - retrying
    000-transmitPacket -978944 failed: wrong tag 41b71efb - expected 7545e146
    000-transmitPacket -978944 failed - retrying
    000-transmitPacket -978944 failed: wrong tag 41b71efb - expected 515f007c
    000-transmitPacket -978944 failed - retrying
    000-transmitPacket -978944 failed - timeout
    102-ERROR: Download failed
    

    Stop the telnet activity by closing putty first, and then download works fine.
  • This happens because the current firmware allows multiple Telnet connections to the WX module. This was inherited from the code I started with and I didn't change it. It may be to handle the case where the Telnet connection is dropped but the WX module thinks it is still active. If you couldn't make a second connection you wouldn't be able to connect again. I've never tried to see if this is really a problem though. If we disable multiple Telnet connections then the putty connection would fail if a download was in progress or a download would fail if there was an active putty connection. Would that be better?
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-12-02 11:05
    David Betz wrote: »
    If we disable multiple Telnet connections then the putty connection would fail if a download was in progress or a download would fail if there was an active putty connection. Would that be better?

    I actually do not know. Its probably fine the way it is.
    The user should stop the other data streams before uploading a program to the connected prop.
    I was just stating it, so others would know that if they tried to use putty to view their debug data from the propeller and then simultaneously upload a program to that prop, it will likely error.
    Multiple tries will probably result in a successful download, I was able to get one to go.
    I don't mind that I must stop the putty stream, or accept that it drops..
    I think in all cases priority should be to proploader and it duties when it comes to the code on the ESP.
    Is it possible to sever all in-progress connections, when the esp knows it needs to upload a new program to the propeller??
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-12-08 03:09
    COMPILE OF PropGCCv4
    ALERT TO CONTINUE PAST THIS POINT; YOU PROBABLY NEED A PC!!!!!!!!!!!!!
    Im working on the raspberrypi version.

    I was going to include a how to on compling simple ide so a spin editor was available, in this thread too...
    BUT, the process on the raspberrypi took too long, and so I ran it on a 4ghz pc and all the work required to get the compile to work was nuts.
    However DavidZemon fixed it, and made a docker for the propgcc part. :sweat_smile:
    The following procedure was done on a PC debian buster 4.18.0-2-amd64.
    First get propgcc...And since this is NOT on the PI, it will require a different way to build propgcc.
    (the pi has a gcc version that works with the current source, shown in a post above, but on a new linux pc build, the gcc is 7 or 8, and the gcc code errors with it.
    So the propgcc needs to be built with docker.
    And for simpleide you need GCC v4!!!!!!!!!
    DO NOT CHOOSE 6.


    PLEASE NOTE, QT5.11 will probably BREAK parts of SimpleIDE. IF you want it to work how it was released, you need Qt5.4.
    I did not try 5.4, I just use SimpleIDE with its "issues" and hope i can or someone can fix the problems.

    One problem identified so far is the input box for spin compiler options dosen't work.
    You can try the SimpleIDE end result by downloading the linux installer.
    https://forums.parallax.com/discussion/comment/1456431/#Comment_1456431

    Onward? HO!

    If you want to skip the docker, @DavidZemon made a CI server with the needed files.
    Make a folder named propgcc-parent inside the directory you are making your gits.

    http://david.zemon.name:8111/project.html?projectId=PropGCC&tab=projectOverview
    Download the 3 versions of GCCv4 for the 3 platforms into the propgcc-parent folder.
    Extract each into these names folders.
    propgcc-parent/propgcc-linux-bin
    propgcc-parent/propgcc-win32-bin
    propgcc-parent/propgcc-rpi-bin

    Simply extract each package, one at a time, into propgcc-parent, and then rename each parallax folder to match as I show above.
    ...
    IF you extract all packages first, and then rename, you will have problems, you need to rename the parallax folder immediately after each extract.

    IF you did the above proper then you do not need to do anything in the quotes.
    We will follow the procedure in this thread. https://forums.parallax.com/discussion/168418/building-propgcc-with-docker
    Its typed out here too. (thanks david)
    Get docker:
    sudo apt install docker.io
    
    Give your user permission to run docker.
    sudo usermod -a -G docker $USER
    
    You can use an applet to manage docker too, its not needed here, just eye candy.
    https://cinnamon-spices.linuxmint.com/applets/view/294
    DavidZemon wrote: »
    System Requirements
    Docker
    Git
    Setup (Written for Linux, tweak for Windows where necessary)
    Start by cloning PropGCC and entering the Docker container
    > mkdir propgcc-parent
    > cd propgcc-parent
    > git clone --recursive https://github.com/dbetz/propeller-gcc.git
    > docker pull davidzemon/propgccbuilder
    > docker run -it -u $(id -u):$(id -g) -v `pwd`:`pwd` -w `pwd` davidzemon/propgccbuilder
    

    Note that the "-u $(id -u):$(id -g)" is probably not necessary for Windows users. Excluding that argument on Linux will yield a bunch of files owned by root and that'd just be a pain wouldn't it?

    At this point, you are now inside the Docker container and should be able to follow the instructions in the README. The important part about doing this in a Docker container is that all system requirements have already been installed, namely: a version of GCC that doesn't throw any errors when building GCC 4.x, MinGW, ARMv6 toolchain, texinfo.

    Building PropGCC for Linux
    The following assumes you are in the Docker container as configured above
    > cd propeller-gcc/gcc
    > ./contrib/download_prerequisites
    > cd ..
    > make GCCDIR=gcc4 -j3
    > make GCCDIR=gcc4 INSTALL=`pwd`/../propgcc-linux-bin install
    > exit
    
    ("-j4" can be changed for your rig, but serves as a good default)
    At this point, you'll be dropped to your host command prompt and PropGCC with GCCv4 for 64-bit Linux will have been installed to propgcc-parent/propgcc-linux-bin. You can then move that wherever necessary on your host box.

    Cross-Compiling PropGCC
    Note for cross-compiling PropGCC, you MUST have already compiled (or downloaded) PropGCC for Linux (even if your host computer is Windows, the Docker image is always Linux and therefore you must have compiled PropGCC for Linux). The Linux version of PropGCC must also be based off of the same version of GCC as you are wanting to cross-compile. If you now want to build PropGCC with GCCv4 for Windows, then you must first build/download PropGCC with GCCv4 for Linux. If you want to build PropGCC with GCCv4 for Raspberry Pi, then you must first build/download PropGCC with GCCv4 for Linux.

    So, let's assume you want to build PropGCC with GCCv4 for Windows and you've already built PropGCC with GCCv4 or Linux, as described above. We're starting at your host command prompt in the propgcc-parent directory, not from within the Docker container:
    > docker run -it -u $(id -u):$(id -g) -v `pwd`:`pwd` -v `pwd`/propgcc-linux-bin:/opt/parallax:ro -w `pwd`  davidzemon/propgccbuilder
    > cd propeller-gcc
    > make GCCDIR=gcc4 CROSS=win32 -j3
    > make GCCDIR=gcc4 CROSS=win32 INSTALL=`pwd`/../propgcc-win32-bin install
    > exit
    
    Voila! In propgcc-parent/propgcc-win32-bin, you now have Windows binaries for PropGCC built with the latest GCC 4.
    Result:
    Build complete.
    I have no name!@42:/home/pi/Desktop/Git/propgcc-parent/propeller-gcc$ make GCCDIR=gcc4 CROSS=win32 INSTALL=`pwd`/../propgcc-win32-bin install
    Makefile:56: BUILD directory is /home/pi/Desktop/Git/propgcc-parent/propeller-gcc-win32-build
    Makefile:60: PREFIX is /home/pi/Desktop/Git/propgcc-parent/propeller-gcc-win32-build/target
    Makefile:64: INSTALL directory is /home/pi/Desktop/Git/propgcc-parent/propeller-gcc/../propgcc-win32-bin
    Makefile:101: OS msys detected.
    Makefile:127: PropGCC version is propellergcc-alpha_v1_9_0_.
    Makefile:131: BugURL is http://code.google.com/p/propgcc/issues.
    Installing to /home/pi/Desktop/Git/propgcc-parent/propeller-gcc/../propgcc-win32-bin
    
    Some notes on cross-compiling:
    The key here is the extra argument to Docker: "-v `pwd`/propgcc-linux-bin:/opt/parallax:ro". This has four parts:
    "-v" is short for "--volume", and it says that a directory on your host computer should be available in the Docker container
    The value is then split into three parts with the colons:
    "`pwd`/propgcc-linux-bin" means that the folder on our host computer which is going to be available in Docker is the PropGCC binaries. This is the ONLY configurable part. You can change this part of the argument to whatever you need, based on wherever you have installed/downloaded/compiled PropGCC.
    "/opt/parallax" is the target directory in the Docker container. One of the steps to creating the Docker image was adding "/opt/parallax/bin" to $PATH, which is why things "just work" with this arg.
    "ro" means read only. Not entirely necessary, but a good safety measure that prevents accidental mucking around with your working PropGCC binaries.
    You can cross complie for the raspberry pi now, so you can also make a compile of simpleide for the pi.
    So do this if you want to be able to compile for the pi.
    So, let's assume you want to build PropGCC with GCCv4 for RaspberryPi and you've already built PropGCC with GCCv4 for Linux, as described above. We're starting at your host command prompt in the propgcc-parent directory, not from within the Docker container:
    > docker run -it -u $(id -u):$(id -g) -v `pwd`:`pwd` -v `pwd`/propgcc-linux-bin:/opt/parallax:ro -w `pwd`  davidzemon/propgccbuilder
    > cd propeller-gcc
    > make GCCDIR=gcc4 CROSS=rpi -j3
    > make GCCDIR=gcc4 CROSS=rpi INSTALL=`pwd`/../propgcc-rpi-bin install
    > exit
    

    Voila! In propgcc-parent/propgcc-rpi-bin, you now have RaspberryPi binaries for PropGCC built with the latest GCC 4.
    Result:
    Build complete.
    I have no name!@42:/home/pi/Desktop/Git/propgcc-parent/propeller-gcc$ make GCCDIR=gcc4 CROSS=rpi INSTALL=`pwd`/../propgcc-rpi-bin install
    Makefile:56: BUILD directory is /home/pi/Desktop/Git/propgcc-parent/propeller-gcc-rpi-build
    Makefile:60: PREFIX is /home/pi/Desktop/Git/propgcc-parent/propeller-gcc-rpi-build/target
    Makefile:64: INSTALL directory is /home/pi/Desktop/Git/propgcc-parent/propeller-gcc/../propgcc-rpi-bin
    Makefile:101: OS linux detected.
    Makefile:127: PropGCC version is propellergcc-alpha_v1_9_0_.
    Makefile:131: BugURL is http://code.google.com/p/propgcc/issues.
    Installing to /home/pi/Desktop/Git/propgcc-parent/propeller-gcc/../propgcc-rpi-bin
    
    YOU MUST CHOOSE GCC4 OR SIMPLEIDE WILL FAIL.
    VERIFIED SUCCESS TO THIS POINT IN DEBIAN EXPERIMENTAL


    Do not use V6 for simplieIDE.
    If you want to build GCCv6
    Building PropGCC with GCCv6 is almost identical of course:
    > cd propeller-gcc/gcc
    > ./contrib/download_prerequisites
    > cd ..
    > make GCCDIR=gcc -j3
    > make GCCDIR=gcc INSTALL=`pwd`/../propgcc6-linux-bin install
    > ex
    
    Result:
    Build complete.
    I have no name!@42:/home/pi/Desktop/Git/propgcc-parent/propeller-gcc$ make GCCDIR=gcc INSTALL=`pwd`/../propgcc-linux-bin install
    Makefile:56: BUILD directory is /home/pi/Desktop/Git/propgcc-parent/propeller-gcc-build
    Makefile:60: PREFIX is /home/pi/Desktop/Git/propgcc-parent/propeller-gcc-build/target
    Makefile:64: INSTALL directory is /home/pi/Desktop/Git/propgcc-parent/propeller-gcc/../propgcc-linux-bin
    Makefile:101: OS linux detected.
    Makefile:127: PropGCC version is propellergcc-alpha_v1_9_0_.
    Makefile:131: BugURL is http://code.google.com/p/propgcc/issues.
    Installing to /home/pi/Desktop/Git/propgcc-parent/propeller-gcc/../propgcc-linux-bin
    
    All QT and SimpleIDE on next post...
    4240 x 1440 - 3M
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-12-08 02:10
    COMPILE OF QT5.11

    PLEASE NOTE, QT5.11 will probably BREAK parts of SimpleIDE. IF you want it to work how it was released, you need Qt5.4.
    I did not try 5.4, I just use SimpleIDE with its "issues" and hope i can or someone can fix the problems.

    One problem identified so far is the input box for spin compiler options dosen't work.
    You can try the SimpleIDE v1.1.2 compile end result of this thread, by downloading the linux installer.
    https://forums.parallax.com/discussion/comment/1456431/#Comment_1456431

    QT5 wants openGL so here I talk about nvidia drivers and cuda, if you have a different brand, you can ask for help in a post.
    Go here to see how to install or reinstall video card drivers --> https://forums.parallax.com/discussion/comment/1455510/#Comment_1455510

    TAKE NOTE, EVEN THE QT5 SOURCE SAYS: DELETE THE SOURCE FILES IF YOU MESS UP THE BUILD,
    RE-EXTRACT IT ALL, and run it from the beginning AGAIN!.


    I did this myself, and mucked with it for longer than I needed, because I just didn't delete the whole source, and re-extract it from NEW.
    And what do you know, it finished the ./configure preoperly.

    So if you fail either the configure, or the make, just delete the whole source, and start over, its not worth trying to "clean" it...
    Unless you really know what you're are doing, just do that.
    HECK try that with ANY source that fails.... ALWAYS...

    ON TO QT5!
    >https://prognotes.net/2016/11/install-qt-5-development-tools-linux/
    sudo apt-get install qtcreator
    
    sudo apt-get install qtdeclarative5-dev
    
    sudo apt-get install g++
    

    ONCE YOU GET THIS FAR, ITS POSSIBLE THE INSTALLS you have done so far will cause opengl desktop to break for qt5.
    For most this is caused by a broken simlink or path that was installed with your video card drivers when you first installed them.
    I highly suggest you reinstall your video card drivers again, RIGHT NOW.
    If you run into errors because it says you must remove another package or install with that method... read the quote area below.
    So in Synaptic Package Manager which is installed with debian, search for all items labeled nvidia, or whoever your video card maker is.
    Remove them, unless they are required by other packages that are debian OS related or any programs you need.
    Then REINSTALL YOUR VIDEO CARD DRIVERS AGAIN.
    I had a package break my simlink to a file that is needed, which the nvidia installer made.
    Once I reinstalled the latest video card driver package for my system right before the compile qt5 step, QT5 detected opengl.
    I did the package hunt thinking it was yet another package needed, but in fact, I needed to remove a package that was taking place of my video card makers official path, symlink, or driver. But again, make sure you do searches in synaptic package manager for anything that has your video card makers name in it.
    Be very meticulous and strict on WHAT packages are allowed when it comes to your hardware makers, specifically your video card maker.
    When you mark items to remove in package manager, you can see what packaged will be removed with it because they depend on it.
    If you see that something removes lots of packages as a result of its removal, that package probably isn't the one that is causing the symlink issue.
    The cinnamon desktop, x11, etc, all need some packages that have your gpu maker name in it, so if you see that cinnamon, or some part is removed by removing the package you suspect, then don't remove that package, its probably not it.

    Now Get QT5 SOURCE!!! (cause the qt creator sets your tools up, but the source will give you DOG powers.
    ---->https://download.qt.io/archive/qt/5.11/5.11.2/single/qt-everywhere-src-5.11.2.tar.xz.mirrorlist
    Download it and extract it to any folder you want.
    Open that folder and do this:

    If you run just ./configure, it will configure the qt so it installs everything, which takes hours or more, when you run make.
    ./configure
    

    Want the slimmed down version?
    The README says this:
    Open the directory you extracted the qt-everywhere-src-5.11.2 file to and run this command if you want the opensource license.
    ./configure -prefix $PWD/qtbase -opensource -nomake tests
    

    If either worked, you should have this when its configure is done:
    https://forums.parallax.com/discussion/download/124442/qt5.11Good.txt

    If that finished....
    Lets actually make it. Now do this before you go to bed, because it might just be going all night long.
    I have 6 cores, so I will let 5 do the work, if I use the 6th my desktop will freeze for a few hours. choose a number that is at least 1 less than the number of REAL cores you have(no hyperthread cores dont count) change "-j 5" to your cores minus 1.
    make -j5
    

    The ending lines for the make, dont say anything usefull to indicate the build finished.
    So...If the make looks like it finished good... no messages at the end about failure.
    INSTALL IT!!!
    sudo make install -j3
    

    The install copies tons of files...
    Ends fairly simple...
    The ending looks like this:
    make[2]: Leaving directory '/home/pi/Desktop/Git/qt5/qt-everywhere-src-5.11.2/qttranslations/translations'
    make[1]: Leaving directory '/home/pi/Desktop/Git/qt5/qt-everywhere-src-5.11.2/qttranslations'
    cd qtdoc/ && ( test -e Makefile || /home/pi/Desktop/Git/qt5/qt-everywhere-src-5.11.2/qtbase/bin/qmake -o Makefile /home/pi/Desktop/Git/qt5/qt-everywhere-src-5.11.2/qtdoc/qtdoc.pro ) && make -f Makefile install
    make[1]: Entering directory '/home/pi/Desktop/Git/qt5/qt-everywhere-src-5.11.2/qtdoc'
    /home/pi/Desktop/Git/qt5/qt-everywhere-src-5.11.2/qtbase/bin/qmake -o Makefile qtdoc.pro
    cd doc/ && ( test -e Makefile || /home/pi/Desktop/Git/qt5/qt-everywhere-src-5.11.2/qtbase/bin/qmake -o Makefile /home/pi/Desktop/Git/qt5/qt-everywhere-src-5.11.2/qtdoc/doc/doc.pro ) && make -f Makefile install
    make[2]: Entering directory '/home/pi/Desktop/Git/qt5/qt-everywhere-src-5.11.2/qtdoc/doc'
    /home/pi/Desktop/Git/qt5/qt-everywhere-src-5.11.2/qtbase/bin/qmake -o Makefile doc.pro
    make[2]: Nothing to be done for 'install'.
    make[2]: Leaving directory '/home/pi/Desktop/Git/qt5/qt-everywhere-src-5.11.2/qtdoc/doc'
    make[1]: Leaving directory '/home/pi/Desktop/Git/qt5/qt-everywhere-src-5.11.2/qtdoc'
    

    Replace Default Qt version paths in:

    /usr/lib/x86_64-linux-gnu/qtchooser/default.conf

    or in newer releases
    /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf:

    Inside default.conf
    /usr/local/Qt-5.11.2/bin
    /usr/local/Qt-5.11.2/lib
    

    OH AND COPY THE NEW QMAKE!!! OVER THE OLD ONE!!!!
    sudo cp /usr/local/Qt-5.11.2/bin/qmake /usr/bin/qmake
    

    If you do not copy the new qmake over then you will see this.
    :~/SimpleIDE$ ./plinrelease.sh
    /usr/bin/qmake
    The qmake program must be Qt5.4 or higher vintage.
    Please adjust PATH to include a Qt5 build if necessary.
    Please install Qt5.4 from here if you don't have it already:
    download.qt.io./official_releases/qt/5.4/5.4.2
    

    Test your build of QT ----> Step 6. Install and test the new version
    https://www.ics.com/blog/how-compile-qt-source-code-linux#

    The paths shown in this link above are for an older version of QT, so adjust the path when you do your testing if you are reading that link.
    I adjusted the notes here to be correct for us.
    -->(/usr/local/Qt-5.11.2) Thats where mine is! (NOTE THIS) (heh, thus the point of these forum posts, YOUR NOTES, print it!
    The default install location is /usr/local/Qt-5.11.2, which is reasonable and allows you to have multiple Qt versions installed without conflicts. You may want to use another location. If so, you can specify it using the -prefix command line option to configure. You may also want to add the binary directory /usr/local/Qt-5.11.2/bin) to your search path so that you can run commands like qmake and assistant without always specifying the full path.

    As a quick sanity test we can try launching Qt Designer and confirm that it comes up:

    % /usr/local/Qt-5.11.2/bin/designer

    We haven't yet built the documentation, which will be available from Qt Assistant. We can build and install it as follows:

    % make docs
    % sudo make install_docs

    As a test, we can now launch Qt Assistant:

    % /usr/local/Qt-5.11.2/bin/assistant

    The first time it is launched it will take a few seconds to index the help files for searching.
    We're done! Your new Qt install is ready to use. At this point you may wish to do some more testing, such as confirming that you can run some QML code using the qmlscene program. If you use the Qt Creator IDE, you should configure it to add the new Qt version and try building some of your own code or one of the Qt examples to verify that it works.
    HUZAAAAAAH!!!!
    (wipes forehead.....)

    So now go to the next post for the simpleIDE install and linking of all the tools to compile
    SIMPLE-IDE!!! finally..
    .........................................................................................................
    MORE INFO ABOUT QT5 ENVIRONMENT.
    qtchooser -print-env
    
    The file /usr/lib/x86_64-linux-gnu/qtchooser/default.conf 
    is a symlink to the one in 
    /usr/share/qtchooser/default.conf
    
    Proper path to qt default config: /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf
    
    Qtchooser will look at the default.conf, 
    You can create a symlink 
    ln -s /usr/lib/x86_64-linux-gnu/qtchooser/qt5.conf /usr/lib/x86_64-linux-gnu/qtchooser/default.conf
    

    Skip the rest of this post until you reach "Then get SimpleIDE" in the next post.
    ONLY continue this stuff if you can't get QT5 to run.
    The rest of this post is to help you get more packages....if you need them...
    BUT.......If you still cannot run configure...
    Or if the make fails...
    Here is a complete list of packages I installed.
    https://forums.parallax.com/discussion/download/124638/Package List.txt
    Thats the best I can do until I redo the build from scratch and verify points.
    I will continue to refine and verify the process to this point once I feel like formatting yet-again.
    If either configure above fails, try the package madness below....
    I now have no way to verify the proper steps to get me to where i am now.
    Other than formatting again and starting the process over again to find if the above is only needed or below also.

    IF YOUR BUILD OF QT5 SUCCEEDED DO NOT DO THE ITEMS INSIDE THE WORK ZONE QUOTES!!!!!!!!!!
    YOU HAVE BEEN WARNED!!!!!!
    __________________________________EDIT MODE PAST THIS POINT___________________________________________
    WORK IN PROGRESS FROM HERE ON!!!!!!
    STILL NOT WORKING PAST THIS POINT.
    OK, QT5 instructions to build it from source and get it working .. HERE:
    https://www.ics.com/blog/how-compile-qt-source-code-linux#
    They say here is your dep list...
    sudo apt-get install bison build-essential flex gperf  libasound2-dev libatkmm-1.6-dev libbz2-dev libcap-dev libcups2-dev libdrm-dev libegl1-mesa-dev 
    libfontconfig1-dev libfreetype6-dev libgcrypt11-dev libglu1-mesa-dev libicu-dev libnss3-dev libpci-dev libpulse-dev libssl-dev libudev-dev libx11-dev 
    libx11-xcb-dev libxcb-composite0 libxcb-composite0-dev libxcb-cursor-dev libxcb-cursor0 libxcb-damage0 libxcb-damage0-dev libxcb-dpms0 
    libxcb-dpms0-dev libxcb-dri2-0 libxcb-dri2-0-dev libxcb-dri3-0 libxcb-dri3-dev libxcb-ewmh-dev libxcb-ewmh2 libxcb-glx0 libxcb-glx0-dev libxcb-icccm4 
    libxcb-icccm4-dev libxcb-image0 libxcb-image0-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-present-dev libxcb-present0 libxcb-randr0 libxcb-randr0-dev
     libxcb-record0 libxcb-record0-dev libxcb-render-util0 libxcb-render-util0-dev libxcb-render0 libxcb-render0-dev libxcb-res0 libxcb-res0-dev libxcb-screensaver0
     libxcb-screensaver0-dev libxcb-shape0 libxcb-shape0-dev libxcb-shm0 libxcb-shm0-dev libxcb-sync-dev libxcb-sync0-dev libxcb-sync1  libxcb-util0-dev 
      libxcb-xf86dri0 libxcb-xf86dri0-dev libxcb-xfixes0 libxcb-xfixes0-dev libxcb-xinerama0 libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xkb1  libxcb-xtest0 
    libxcb-xtest0-dev libxcb-xv0 libxcb-xv0-dev libxcb-xvmc0 libxcb-xvmc0-dev libxcb1 libxcb1-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxext-dev 
    libxfixes-dev libxi-dev libxrandr-dev libxrender-dev libxslt-dev libxss-dev libxtst-dev perl python ruby
    
    These below are not found. So I took them out of the above list.
    ibgstreamer-plugins-base0.10-dev  libgstreamer0.10-dev libxcb-util-dev libxcb-util1 libxcb-xevie0 libxcb-xevie0-dev libxcb-xprint0 libxcb-xprint0-dev
    
    So if you have issues, find the ones I couldnt find?
    I just skipped them.
    WORK ZONE REDUCE SPEED!!!!
    LETS get the files needed for QT5
    THESE are the deps i installed before i found my saved link above...
    So if you still can't get qt5 to go, try these.
    sudo apt-get install build-dep qt5-default build-essential libgl1-mesa-dev libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev 
    libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev 
    libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libqt5opengl5-dev
    
    FINES FOR SPEEDING IN WORK ZONE DOUBLE....

    WORK IN PROGRESS !!!!!!__________________________________________________________________________________________________________________________________
    Work zone ended, please drive safely.

    Continue onto simple ide.
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-12-11 05:23
    COMPILE OF SIMPLE-IDE
    Get SimpleIDE
    git clone --recursive https://github.com/parallaxinc/SimpleIDE
    
    A change in proploader's handing of the -rcfast switch made simpleide not work.
    The board file for the SPIN compiler in SIMPLEIDE is defaulted to the rcfast.brd file in simpleide.
    The user cannot change this setting, at least I cannot, it is dimmed out.
    I would suggest simpleIDE use a cfg file as its default that matches the propeller manuals instructions of a 5mhz crystal.
    actitityboard.cfg will work for this use.
    Users can copy contents of actitityboard.cfg over the contents of rcfast.brd
    Both are located: /opt/parallax/propeller-load.
    

    HERE ARE THE FOLDERS YOU HAVE SO FAR!!!!!
    esp-open-sdk
    = after compile use it by:
    export XTENSA_TOOLS_ROOT=/home/pi/esp-open-sdk/xtensa-lx106-elf/bin/
    

    parallax-esp
    = result of compile flash files/.OTA update file. /home/pi/Parallax-ESP/build/httpd.ota READ -->/home/pi/Parallax-ESP/release/release-notes.txt

    openspin
    = result of compile /home/pi/OpenSpin/build/openspin

    proploader
    = result of compile /home/pi/proploader-linux-build/bin/proploader
    These folders are created by building proploader.
    proploader-linux-build
    proploader-win32-build
    proploader-rpi-build

    propgcc-parent
    = This was made during the docker step.

    The docker uses these build folders.
    propgcc-parent/propeller-gcc-build
    propgcc-parent/propeller-gcc-win32-build
    propgcc-parent/propeller-gcc-rpi-build

    The docker output creates these build folders, these will be used by QT5.
    propgcc-parent/propgcc-linux-bin
    propgcc-parent/propgcc-win32-bin
    propgcc-parent/propgcc-rpi-bin

    QT55
    = result of make/install and package installs...
    /usr/local/Qt-5.11.2/bin/assistant
    /usr/local/Qt-5.11.2/bin/designer
    /usr/local/Qt-5.11.2/bin
    QT5 install location: /usr/local/Qt-5.11.2

    simpleide (we haven't compiled this yet)

    Now if you open the SimpleIDE folder
    cd SimpleIDE
    

    Edit the plinrelease.sh file.

    Change the following to match below.
    PROPGCC=../propgcc-parent/propgcc-linux-bin
    WXLOADER=../proploader-linux-build/bin/proploader
    

    YOU ALSO NEED TO FIND THIS AND CHANGE IT.
    You need to add a * after {PROPGCC}
    And you also need to add a /parallax after {VERSION}
    Like so:
    rm -rf parallax
    cp -r ${PROPGCC}* ${VERSION}/parallax
    if test $? != 0; then
       echo "copy ${PROPGCC}* failed."
       exit 1
    fi
    

    Heres the original from the the plinrelease.sh file which messes everything up.
    rm -rf parallax
    cp -r ${PROPGCC} ${VERSION}
    if test $? != 0; then
       echo "copy ${PROPGCC} failed."
       exit 1
    fi
    

    You must have internet for this to work.
    Onto simple ide!
    = result of SUDO ./plinrelease.sh IS?????????????????????

    SIMPLEIDE compiled.
    Output:
    You must run this as root.
    :~/SimpleIDE$ sudo ./plinrelease.sh
    /usr/bin/qmake
    Binary file /usr/bin/qmake matches
    SimpleIDE Workspace not found. Adding:
    Cloning into 'Workspace'...
    remote: Enumerating objects: 129, done.
    remote: Counting objects: 100% (129/129), done.
    remote: Compressing objects: 100% (72/72), done.
    remote: Total 14832 (delta 69), reused 89 (delta 47), pack-reused 14703
    Receiving objects: 100% (14832/14832), 8.56 MiB | 13.67 MiB/s, done.
    Resolving deltas: 100% (10154/10154), done.
    .......omitted for forum........
    Copy files ...
    Git and copy workspace ...
    Already up to date.
    Make tarball ...
    All done. 
    

    The tarball is located here:
    /SimpleIDE/SimpleIDE-1-1-2.x86_64.yourpcname-linux.tar.bz2

    The program install is located here:
    /SimpleIDE/SimpleIDE-1-1-2
    setup.sh
    install.txt

    I will now install it for myself!
    >:/SimpleIDE-1-1-2$ ls
    bin  demos  INSTALL.txt  license  parallax  propgcc-linux-bin  setup.sh  translations
    
    >:/SimpleIDE-1-1-2$ ./setup.sh
    ./setup.sh for: /home/pi
    This script must be run as root
    try: sudo ./setup.sh
    
    >:/SimpleIDE-1-1-2$ sudo ./setup.sh install
    ./setup.sh for: /home/pi
    Installing Propeller GCC
    Installing SimpleIDE
    >:/SimpleIDE-1-1-2$ 
    
    Good luck!

    If you do all that, the Parallax WX ESP8266 WiFi Module will show up in simple ide as the programmer port, SWEET. (if its connected to your wifi)
    It works for me, my Parallax WX wireless device shows in the port that you choose for programming in SimpleIDE.

    The proploader program tries to talk to the parallax WX, so add the program proploader which uses port 32420, to your firewall.
    (i did need to reset my firewall, because I messed with it once, and it started to block the port that simpleide, proploader, and the parallaxWX devices use to communicate.)
    A change in proploader's handing of the -rcfast switch made simpleide not work.
    The board file for the SPIN compiler in SIMPLEIDE is defaulted to the rcfast.brd file in simpleide.
    The user cannot change this setting, at least I cannot, it is dimmed out.
    I would suggest simpleIDE use a cfg file as its default that matches the propeller manuals instructions of a 5mhz crystal.
    actitityboard.cfg will work for this use.
    Users can copy contents of actitityboard.cfg over the contents of rcfast.brd
    Both are located: /opt/parallax/propeller-load.
    

    sideV1112.png
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-12-07 14:30
    ABOUT DEBIAN LINUX
    The screen shot shows the in-progress rpi cross compile with gcc6 in docker on linux 64bit. Pegged 5, i7cores @ 4ghz for a bit there....
    https://forums.parallax.com/discussion/download/124435/4GHZ-DEV.png
    YOU DO NOT NEED A SUPER PC, it just makes things MUCH faster.

    DEBIAN RELEASE(as of the date of this post)....

    Google this info--->if you can't get the dvd install to boot (you must turn off over 4gig on 64-bit enable/disable in bios)

    Buy an external solid state drive, and unplug your working windows/whatever system hard drive, if you want to try debian.
    Don't wreck your old OS, you may need it to get more info about the debian install.

    At dvd install I had to edit the graphical install menu option by pressing E.
    Your modern video card may work without doing any menu editing. Try without at first.
    If your system hangs at boot after install or stops during the regular booting process.
    If it never makes it to lightdm, or the login graphical menu, try typing ALL of the following.

    I added this line because i have nvidia 1080's.
    Change the line that starts with
    linux      /install.amd/vmlinuz
    
    Make it look like this:
    linux      /install.amd/vmlinuz nomodeset nouveau.blacklist=1 acpi=0 acpi_osi=linux video=1280x1024-24@60 video=VGA-1:1280x1024-24@60
    
    And the menu says press F10 to run the edited menu. This is not persistent. If you mess up the install you will need to do this again.

    Then I installed cinnamon.

    VIDEO driver install after dvd install must be launched by going to init3, (command line system access).
    Do this by pressing E when the debian boot menu shows (do this the first time the boot menu shows after ejecting the install dvd)
    Then you need to find the linux line again and find the RO in that line... put a 3 after the ro. so it looks like ro 3
    And the menu says press F10 to run the edited menu. Your system should boot to the command line now.
    You might want to login as root for the video driver install.
    Here you need to install your video card drivers, you will need to get them from your card maker and follow their linux install instructions.
    NVIDIA and others... video card drivers...
    >You might need to install additional files, i did for the nvidia driver install.
    apt install gcc make
    
    I needed headers.
    apt install linux-headers-4.
    
    Try to find something that lets you install the header that matches your kernel, its ok to install many.
    Then I am able to install my nvidia drivers.
    I put my drivers on a usb flash storage.
    Command line access to usb is not automagic.
    To get access to my usb device i must make a folder and mount it there.
    mkdir /media/usb-1
    mount /dev/sdb1 /media/usb-1
    cd /media/usb-1
    
    I do---VIDEODRIVERS= ./NVIDIA-Linux-x86_64-415.18.run
    *********NOTE I installed https://developer.nvidia.com/cuda-toolkit To make sure my OpenGL/CUDA works....
    If you have nvidia, do that! Or see if your card maker has OPENGL/CUDA developer toolkits!
    You can google search for both these run files and you will find them.
    Then I do---CUDA= ./cuda_10.0.130_410.48_linux.run (DO NOT INSTALL THE VIDEO DRIVERS FROM THIS, but do everything else, YES, even if it says that its unsupported)
    They work together!

    Both screens work in mosaic mode, with sli on. Do not turn on multi-gpu or xinerama...
    Here is my xorg.conf it allows dual monitor with sli. the key is turn off xinerama in the xorg and turn on BaseMosaic in the xorg, then turn mosaic mode on in the nvidia driver settings.
    If you have Option "Coolbits" "28" like i also have, then you can set the overclock and fan speed of the gpus.
    # nvidia-settings: X configuration file generated by nvidia-settings
    # nvidia-settings:  version 415.13
    
    Section "ServerLayout"
    
        Identifier     "Layout0"
        Screen      0  "Screen0" 0 0
        Screen      1  "Screen1" RightOf "Screen0"
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Mouse0" "CorePointer"
        Option         "Xinerama" "0"
    EndSection
    
    Section "Files"
    EndSection
    
    Section "InputDevice"
    
        # generated from default
        Identifier     "Mouse0"
        Driver         "mouse"
        Option         "Protocol" "auto"
        Option         "Device" "/dev/psaux"
        Option         "Emulate3Buttons" "no"
        Option         "ZAxisMapping" "4 5"
    EndSection
    
    Section "InputDevice"
    
        # generated from default
        Identifier     "Keyboard0"
        Driver         "kbd"
    EndSection
    
    Section "Monitor"
        Identifier     "Monitor0"
        VendorName     "Asus"
        ModelName      "Ancor"
        HorizSync       30.0 - 210.0
        VertRefresh     30.0 - 150.0
        Option         "DPMS"
    EndSection
    
    Section "Monitor"
        Identifier     "Monitor1"
        VendorName     "Viewsonic"
        ModelName      "ViewSonic"
        HorizSync       0.0 - 0.0
        VertRefresh     0.0
    EndSection
    
    Section "Device"
        Identifier     "Device0"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BoardName      "GeForce GTX 1080"
        BusID          "PCI:3:0:0"
        Option         "Coolbits" "28"
    EndSection
    
    Section "Device"
        Identifier     "Device1"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BoardName      "GeForce GTX 1080"
        BusID          "PCI:2:0:0"
        Option         "Coolbits" "28"
    EndSection
    
    Section "Screen"
        Identifier     "Screen0"
        Device         "Device0"
        Monitor        "Monitor0"
        DefaultDepth    24
        Option         "Stereo" "0"
        Option         "nvidiaXineramaInfoOrder" "DFP-6"
        Option         "metamodes" "2560x1440_120 +0+0"
        Option         "SLI" "on"
        Option         "MultiGPU" "off"
        Option         "BaseMosaic" "on"
        SubSection     "Display"
            Depth       24
        EndSubSection
    EndSection
    
    Section "Screen"
        Identifier     "Screen1"
        Device         "Device1"
        Monitor        "Monitor1"
        DefaultDepth    24
        Option         "Stereo" "0"
        Option         "metamodes" "1680x1050_120 +0+0 {AllowGSYNC=Off}"
        Option         "SLI" "on"
        Option         "MultiGPU" "off"
        Option         "BaseMosaic" "on"
        SubSection     "Display"
            Depth       24
        EndSubSection
    EndSection
    
    



    I call this system:THE CARBON TA-XOR

    RAW HARDWARE!!!!
    SYSTEM SPECS: 
    Build price: $4,200$ Build-Date: Feb-4-2017 
    Processor: i7-6850k 3.6GHz@OC4.0GHz (40*100MHz) Broadwell 1.199v 
    Motherboard: MSI-X99-GODLIKE-GAMING-CARBON 
    Northbridge: Intel-Broadwell-E 
    Southbridge: Intel-X99
    Memory: 32768MB Quad Channel DDR4-XMP2.0 3200mhz 4 of these installed. 
    2xGPU: Dual SLI'd-MsiSeaHawkEkGTX1080 CoreClock:1683MHz Bus:PCIx16Gen3 Memory:8192MB-GDDR5X
    PowerSupply: EvgaSuperNOVA1300G2 
    Storage: SamsungSSD-850PRO-256GB 
    Display: ROG-PG278Q 27inches
    OS:  LINUX BRAH!!!   DEBIAN!   4.18.02-AMD64  - LightDM w CINNAMON
    Cooling: CPU=CoolerMasterHyper212 
    2xGPU=SwifTech Watercooling for GTX1080MsiSeaHawkEk 
    Case: Thermaltake-Core-P5-OpenFrame
    
    --->its a STEAM ENGINE FO SHO! C?
    This railroad render/game was run on this system also. (7 steam engines? i can't remember how many are in the video.)

  • Good to know.

    But how does that help someone who's not running a Debian based distribution? (Well normally this guy runs Windows.)

    I remember I believe I was running Slackware64 14.1 (or 14.0) and I tracked down most or even all of the sources for first trying to build PropGCC and seeing it do an epic fall over. Oh and also the same was for Simple IDE and at that point, I put the matter to rest.
    ----
    And this message is sponsored by the Tatooine Jawa Union. We collect your junk no questions asked.
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-12-05 00:29
    MODERATORS, FEEL FREE TO EDIT THIS THREAD AS NEEDED,.... AND THE ABOVE INFO TO KEEP IT CORRECT AND UP TO DATE AS INSTRUCTIONS FOR THE COMPILE OF THESE PROGRAMS.
    I WILL TRY TO MOVE EACH PROGRAM TO ITS OWN INDIVIDUAL POST AND REFINE THE INFORMATION.

    IF YOU ARE A USER WHO CAN HELP ADD OR CORRECT OR MAKE INFO BETTER, please pm me or make a reply here.

    You might need curl so go get it.
    git clone https://github.com/curl/curl.git
    

    And git-lfs
    git clone https://github.com/git-lfs/git-lfs
    

    Since you are gitttting so much.
    Automate gits of large user collections.
    git clone https://github.com/josegonzalez/python-github-backup
    

    Yea, tools need tools need tools neeed tools need the first tool. oh no. A tool loop. Is that just a tool belt?
    PIP via PyPI
    sudo apt install python-pip
    

    Using desktop icons to reset/connect to the prop using proploader and also have putty connect by icon...
    Paste this into an empty file on the desktop.
    Name it putyourwxnamehere.desktop and make it executable and readable.
    [Desktop Entry]
    Version=1.0
    Name=ConnectPuttyToWx
    Exec=putty -telnet putyourwxnamehere
    Icon=/usr/share/pixmaps/xscreensaver.svg
    Terminal=false
    MimeType=application/x-pyromod+zip;
    Type=Application
    Categories=Programming;
    Comment=Debug to Wx
    Keywords=Debug;Wx;Esp8266
    Comment[en_US.UTF-8]=putyourwxnamehere
    Name[en_US]=PutYourWxNameHere
    

    Name it resetprop.desktop and make it executable and readable.
    You can reset or even program your prop by double clicking a desktop icon.
    [Desktop Entry]
    Version=1.0
    Name=ResetYourProp
    Exec=proploader -i putyourwxnamehere -R
    Icon=/usr/share/pixmaps/xscreensaver.svg
    Terminal=false
    MimeType=application/x-pyromod+zip;
    Type=Application
    Categories=Programming;
    Comment=ResetYourProp
    Keywords=Reset;Propeller; putyourwxnamehere
    Comment[en_US.UTF-8]=putyourwxnamehere
    Name[en_US]=PutYourWxNameHere
    

    If you really wanna be the top linux guru, WHILE making your isp mad, mirror the entire debain repo.
    But only do this if you want a local copy of a repo, and you know why you are doing this, this will take hundreds of gigabytes on your hard drive.

    get aptly
    sudo apt install aptly
    

    Set up the distribution and if you want the debs and sources.
    Change amd64 if you have 32bit, and change "sid" to the release you want. And rename the mirror from "sid-debian-main" to what you want.
    Remove -with-sources -with-udebs if you want just the regular repo.
    If you want to verify signatures you need to look for the aptly help and follow that, and remove -ignore-signatures
    aptly -with-sources -with-udebs -ignore-signatures -architectures="amd64" mirror create sid-debian-main http://ftp.us.debian.org/debian/ sid main
    

    Now gather the files, my mirror with my settings is 170gig.
    Again, change the ignoresignatures if you want, and the name needs to match the name you chose above.
    aptly -ignore-signatures mirror update sid-debian-main
    

    The indexing deamon in linux takes a whole cpu for hours if you have lots of files like the aptly program makes.
    SO, if you want to stop the indexer until reboot or until you start it again.
    the indexer shows in your cpu list as "tracker-store"
    tracker daemon -t
    
    This will tell your file indexers to stop safely.
    You can start them back up also.
    tracker daemon -s
    

    I benchmark and game on this system, so I also set my GOVERNOR to performance.
    sudo apt install cpufrequtils
    
    check your current slow clocks...
    cpufreq-info
    
    Lets make them run at max speed 24/7. BURN THE CARBON!

    Then make a file here if it dosen't already exist.
    sudo nano /etc/default/cpufrequtils
    
    And then put this into it.
    GOVERNOR="performance"
    
    save the file and reboot.
    You can check the freqency rates of your cores here:
    cpufreq-info
    
    My frame rates and benchmark scores are all higher by a noticeable amount, the governor just dosen't do well if you are wanting performance.

    You can view your system settings and performance on your desktop with Conky.
    sudo apt install conky-all
    

    You will want to manage conky with a manager, text entry is hard if you don't know this program.
    You need to compile it.
    Git conky manager 2
    git clone --recursive https://github.com/zcot/conky-manager2
    

    Install conky2 build dependencies
    sudo apt install build-essential git valac libgee-0.8-dev libgtk-3-dev libjson-glib-dev p7zip-full imagemagick
    
    :~$ cd conky-manager2/
    
    :~$ make
    
    :~$ sudo make install
    
    Conky manager is under accessories.
    Try the different configs out, you will need to tweak them and search the net for examples on cool looking setups.
    A second monitor is nice here, put all the info on the second monitor like so:
    4240 x 1440 - 6M
  • I think you missed my point.
    This laptop does run Linux sometimes. It runs Slackware64-14.2 Linux and I'm in the middle of setting things up for a refresh for that installation.

    Besides did anyone else reading this thread try out the instructions on a different workspace and distribution either then a Debian based one?

    --
    And this message is being sponsored by the big cat union which is running all of Africa.
  • But how does that help someone who's not running a Debian based distribution?

    Get vmware and make a virtual linux box inside your linux box. Or better yet someone (I? can make a docker for it all?
    There just isn't enough support to make it easy.
    Besides did anyone else reading this thread try out the instructions on a different workspace and distribution either then a Debian based one?

    Oh. I can't help you there. If the docker method is of help I might look into that, after I am done here..
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-12-02 11:59
    WAIT I can use GDebi to inspect the older simpleide and see what it installs there...
    So I inspected the OLD SimpleIDE package with GDebi Package Installer
    And I came up with this...
    PROPGCC=../propgcc-parent/propgcc-linux-bin
    WXLOADER=../proploader-linux-build/bin/proploader

    About the default simple ide install.
    The simple ide binary is
    /opt/simpleide/bin

    The simpleidev112 installer creates simpleide with its config pointed to these paths.
    My install shows this default config.
    GCC FOLDERS:
    GCC Compiler       = ./parallax/bin/propeller-elf-gcc
    Library Folder       = /home/pi/Documents/SimpleIDE/Learn/Simple Libraries/
    Workspace Folder = /home/pi/Documents/SimpleIDE/
    
    SPIN FOLDERS:
    Spin Compiler      = ./parallax/bin/
    Library Folder       = ./parallax/spin/
    Workspace Folder = /home/pi/Documents/SimpleIDE/
    
    GENERAL:
    Loader Folder       = ./parallax/propeller-load/
    
    side1.pngside2.pngside3.png
    496 x 367 - 29K
    497 x 371 - 24K
    503 x 368 - 28K
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-12-02 12:01
    IF you don't run as root, it wont make the ctags file.
    sudo ./plinrelease.sh

    So far my problem is the ctags file gets made INTO a parallax/bin FILE instead of copied into the parallax/bin folder.

    /SimpleIDE-1-1-2/parallax/bin =1.3megabyte file WRONG~!!!! should be a folder?
    cp -f ${CTAGS}/ctags ${VERSION}/parallax/bin
    if test $? != 0; then
       echo "copy ${CTAGS}/ctags failed."
       exit 1
    ls -alRF ${VERSION}/bin
    fi
    

    I edited the plinrelease.sh file and forced it to make the bin folder before doing any copies.
    mkdir ${VERSION}/parallax/bin
    
    cp -f ${CTAGS}/ctags ${VERSION}/parallax/bin
    if test $? != 0; then
       echo "copy ${CTAGS}/ctags failed."
       exit 1
    ls -alRF ${VERSION}/bin
    fi
    

    So now the /SimpleIDE/SimpleIDE-1-1-2/parallax/bin
    Is an actual FOLDER showing two files inside it.
    SimpleIDE-User-Guide.pdf
    ctags

    There is something else wrong here.
  • cp sourceFILE targetDIRNAME
    
    If the direcory is missing, the targed is read as path of a file. Always append a "/" to copy commands like the above:
    cp sourceFILE targetDIRNAME/
    
    Will fail if the directory is missing instead of creating a file instead.
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-12-02 12:04
    yeti wrote: »
    cp sourceFILE targetDIRNAME
    
    If the direcory is missing, the targed is read as path of a file. Always append a "/" to copy commands like the above:
    cp sourceFILE targetDIRNAME/
    
    Will fail if the directory is missing instead of creating a file instead.

    I am seeing that all through out this plinrelease.sh file. lol.

    Like here, it copies the progcc folder not the contents of the folder and it wants it in the subfolder parallax, so i had to add
    {PROPGCC}/* it was {PROPGCC}/parallax

    When I looked at the simpleIDE installer for an older version, it indeed wants the CONTENTS of the folder copied into the SimpleIDE-1-1-2/parallax folder, not the folder too.
    rm -rf parallax
    cp -r ${PROPGCC}/* ${VERSION}/parallax
    if test $? != 0; then
       echo "copy ${PROPGCC}/* failed."
       exit 1
    fi
    

    The readme is absent on linux building. It has a section, but its empty.
    ONWARD, FIX IT, i say to myself.. well here goes nuthin.

    Turns out the copy of files was not including the parallax folder due to being compiled from the docker but not copied into a folder "parallax".

    Thats IT. Now it works.
    Time to go back and edit EVERYTHING.. lol (at least from simple ide and on.)

    The install worked flawlessly. IT DIDNT EVEN ASK FOR FILE LOCATIONS!!!!! (yes i deleted my old install first)
    The problem was this. Inside the plinrelease.sh file.
    rm -rf parallax
    cp -r ${PROPGCC}* ${VERSION}/parallax
    if test $? != 0; then
       echo "copy ${PROPGCC}* failed."
       exit 1
    fi
    

    Heres the original from the the plinrelease.sh file.
    rm -rf parallax
    cp -r ${PROPGCC} ${VERSION}
    if test $? != 0; then
       echo "copy ${PROPGCC}* failed."
       exit 1
    fi
    

    Heres an attached plinrelease.sh file that will work with the instruction above.
    I have edited the entire instruction to include this information.
    #!/bin/sh
    #
    # This script is intended for making production linux SimpleIDE packages
    # and uses an install methodology deemed appropriate by Parallax.
    #
    # If you want to use the old packaging methodology, run linrelease.sh
    #
    # This packager does not include any dynamic support libraries as it is
    # assumed that linux users will be able to find the necessary pieces.
    #
    # To use this release script:
    #
    # 1) QtSDK Desktop qmake must be in your PATH
    # 2) workspace must exist in spinside folder ala:
    #   hg clone https://jsdenson@code.google.com/p/propsideworkspace/ workspace
    # 
    #
    NAME=SimpleIDE
    PKG=${NAME}.zip
    PROPGCC=../propgcc-parent/propgcc-linux-bin
    WXLOADER=../proploader-linux-build/bin/proploader
    BUILD=build
    SETUP="setup.sh"
    SIDE="simpleide.sh"
    SETUPSH="./release/linux/${SETUP}"
    SIDERSH="./release/linux/${SIDE}"
    
    #
    # we provide SimpleIDE, PropellerGCC, ctags, qt libs, spin source, and workspace in this packager
    #
    CTAGS="./ctags-5.8"
    LIBAUDIO="/usr/lib/libaudio.so.2"
    LIBAUDIO2="/usr/lib/x86_64-linux-gnu/libaudio.so.2"
    SPINLIB="./spin"
    
    which qmake
    if [ $? -ne 0 ]
    then
        echo "Qt must be installed. Please install Qt5.4 from here:"
        echo "download.qt.io./official_releases/qt/5.4/5.4.2"
        exit 1
    fi
    
    QMAKE=`which qmake`
    QT5QMAKE=`echo ${QMAKE} | grep -i 'Qt5'`
    grep -i 'Qt5' ${QMAKE}
    if test $? != 0 ; then
        echo "The qmake program must be Qt5.4 or higher vintage."
        echo "Please adjust PATH to include a Qt5 build if necessary."
        echo "Please install Qt5.4 from here if you don't have it already:"
        echo "download.qt.io./official_releases/qt/5.4/5.4.2"
        exit 1
    fi
    
    CLEAN=$1
    
    if [ ! -e ./Workspace ]
    then
        echo "SimpleIDE Workspace not found. Adding:"
        git clone https://github.com/parallaxinc/propsideworkspace/ Workspace
        if [ $? -ne 0 ]
        then
            echo "SimpleIDE Workspace git failed. Add it with this command:"
            echo "git clone https://github.com/parallaxinc/propsideworkspace/ Workspace"
            exit 1
        fi
        cd Workspace
        git checkout SimpleIDE-WX-Updates
        if [ $? -ne 0 ]
        then
            echo "SimpleIDE Workspace checkout SimpleIDE-WX-Updates failed. Giving up."
            exit 1
        fi
        cd ..
    fi
    
    UARCH=`arch`
    UNAME=`uname -n`
    if [ `uname -s` = "msys" ]; then
        JOBS=
    else
        ISARM=`echo ${UARCH} | grep -i "arm"`
        if [ x${ISARM} != "x" ]; then
            JOBS=-j2
        else
            JOBS=-j6
        fi
    fi
    
    #
    # remove package
    #
    if [ -e ${PKG} ]; then
       rm -rf ${PKG}
    fi
    
    mkdir -p ${BUILD}
    
    #
    # build SimpleIDE for release
    #
    #cp -r ./propside/* ${BUILD}
    
    DIR=`pwd`
    XFILES=`find propside/*`
    for XF in $XFILES ; do
        BF=`echo $XF | sed 's/propside\//build\//g'`
        if [ ! -e $BF ] ; then
          echo $DIR/$BF
          ln -s $DIR/$XF ${BUILD}
        fi
        if [ $? -ne 0 ] ; then
          exit 1
        fi
    done
    
    cd ${BUILD}
    
    qmake -config ${BUILD}
    if test $? != 0; then
        echo "qmake config failed."
        exit 1
    fi
    
    if [ x$CLEAN != xnoclean ]; then
        make clean
    fi
    make ${JOBS}
    
    if test $? != 0; then
       echo "make failed."
       exit 1
    fi
    cd ${DIR}
    
    
    # extract version from propside.pro
    #
    SEDCMD=`sed -n 's/VERSION=.*$/&/p' ${BUILD}/propside.pro | cut -d"=" -f3`
    VERSION=`echo ${SEDCMD}`
    VERSION=`echo ${VERSION} | sed 's/ /-/g'`
    VERSION=`echo ${VERSION} | sed 's/\r//g'`
    VERSION="${NAME}-${VERSION}"
    echo "Creating Version ${VERSION}"
    
    # create package direcotry
    #
    rm -rf ${VERSION}
    mkdir -p ${VERSION}
    if test $? != 0; then
       echo "mkdir ${VERSION} failed."
       exit 1
    fi
    
    cp -r ./release/template/* ${VERSION}
    
    cp -r ${BUILD}/${NAME} ${VERSION}/bin
    if test $? != 0; then
       echo "copy ${NAME} failed."
       exit 1
    fi
    
    cp ${SETUPSH} ${VERSION}
    cp ${SIDERSH} ${VERSION}/bin
    
    chmod u+x ${VERSION}/${SETUP}
    chmod 755 ${VERSION}/bin/${SIDE}
    
    ls ${VERSION}
    
    cp -r ${BUILD}/translations ${VERSION}
    if test $? != 0; then
       echo "copy translations failed."
       exit 1
    fi
    
    MYLDD=`ldd ${BUILD}/${NAME} | grep libQt | awk '{print $3}'`
    LIBS=`echo $MYLDD`
    
    cp -f ${LIBS} ${VERSION}/bin
    if test $? != 0; then
       echo "copy ${LIBS} failed."
       exit 1
    fi
    
    MYLDD=`ldd ${BUILD}/${NAME} | grep libQt | awk '{print $3}'`
    LIBS=`echo $MYLDD`
    
    cp -f ${LIBS} ${VERSION}/bin
    if test $? != 0; then
       echo "copy ${LIBS} failed."
       exit 1
    fi
    
    AULDD=`ldd ${BUILD}/${NAME} | grep libaudio | awk '{print $3}'`
    LIBAUDIO=`echo $AULDD`
    
    if [ ${LIBAUDIO}X != X ]; then
       cp -f ${LIBAUDIO} ${VERSION}/bin
       if test $? != 0; then
          if test $? != 0; then
             echo "Can't find libaudio...."
          fi
       fi
    fi
    
    #
    # Quazip no longer needed
    #
    #MYLDD=`ldd ${BUILD}/${NAME} | grep quazip | awk '{print $3}'`
    #QUAZIP=`echo $MYLDD`
    #
    #cp ${QUAZIP} ${VERSION}/bin
    #if test $? != 0; then
    #   echo "copy ${QUAZIP} failed."
    #   exit 1
    #fi
    
    export PATH=$PROPGCC/bin:$PATH
    
    if [ ! -e $WXLOADER ] ; then
        echo "proploader not found. Adding:"
        git clone https://github.com/dbetz/proploader/ ../proploader
        pushd `pwd`
        cd ../proploader
        export OS=linux
        make
        popd
        unset OS
    fi
    
    cp ${WXLOADER} ${VERSION}/bin
    if [ ! -e $WXLOADER ] ; then
       echo "${WXLOADER} is missing. Build it?"
       exit 1
    fi
    
    if test $? != 0; then
       echo "COPY ${WXLOADER} failed."
       exit 1
    fi
    
    cd ${CTAGS}
    ./configure > /dev/null
    if test $? != 0; then
       echo "configure ${CTAGS} failed."
       exit 1
    fi
    echo "Make ${CTAGS}"
    make
    if test $? != 0; then
       echo "make ${CTAGS} failed."
       exit 1
    fi
    cd ..
    
    echo "Copy files ..."
    
    cp -f ${CTAGS}/ctags ${VERSION}/bin
    if test $? != 0; then
       echo "copy ${CTAGS}/ctags failed."
       exit 1
    ls -alRF ${VERSION}/bin
    fi
    
    rm -rf parallax
    cp -r ${PROPGCC}* ${VERSION}/parallax
    if test $? != 0; then
       echo "copy ${PROPGCC}* failed."
       exit 1
    fi
    
    cp -rf ${SPINLIB} ${VERSION}/parallax
    if test $? != 0; then
       echo "copy ${SPINLIB} failed."
       exit 1
    fi
    
    cp -f ${CTAGS}/ctags ${VERSION}/parallax/bin
    if test $? != 0; then
       echo "copy ${CTAGS}/ctags failed."
       exit 1
    ls -alRF ${VERSION}/bin
    fi
    
    cp ./SimpleIDE-User-Guide.pdf ${VERSION}/parallax/bin
    if test $? != 0; then
       echo "copy User Guide failed."
       exit 1
    fi
    
    cp -r ./propside-demos/ ${VERSION}/demos
    if test $? != 0; then
       echo "copy propside-demos failed."
       exit 1
    fi
    
    echo "Git and copy workspace ..."
    
    rm -rf ${VERSION}/parallax/Workspace
    cd Workspace
    git fetch
    if test $? != 0; then
       echo "workspace pull failed."
       exit 1
    fi
    git pull
    if test $? != 0; then
       echo "workspace update failed."
       exit 1
    fi
    cd ..
    cp -r ./Workspace/ ${VERSION}/parallax
    if test $? != 0; then
       echo "copy workspace failed."
       exit 1
    fi
    rm -rf ${VERSION}/parallax/Workspace/.hg
    if test $? != 0; then
       echo "remove workspace .hg tracking failed."
       exit 1
    fi
    
    # pack-up a bzip tarball for distribution
    if [ x$CLEAN != xnoclean ]; then
        echo "Make tarball ..."
        tar -cjf ${VERSION}.${UARCH}.${UNAME}-linux.tar.bz2 ${VERSION}
    fi
    
    echo "All done."
    
    exit 0
    


    INSTALL VERIFIED.

    COMPLETE.

    1714 x 951 - 741K
    1703 x 937 - 740K
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-12-02 20:53
    Now that I cooked it all, who wants a slice?
    A slice of buggz? It has em, because qt5.11 dosen't like qt5.4 code.
    One bug so far is the spin compiler won't accept any switches that are put in the box.
    When I open the code in qt, it shows the various warnings I saw during the simpleide compile.

    These are not warnings, they are errors.
    So they basically need to be fixed one by one.
    I think I saw like 10 or 15.

    I uploaded it to WeTransfer anyway because it lets you upload spin programs to the propellerWX wifi device on linux.

    Its automagically deleted in 7 days, GET IT WHILE ITS HOT.

    https://we.tl/t-PP7ibg27Qi
    /SimpleIDE$ md5sum SimpleIDE-1-1-2.x86_64.linux.tar.bz2 
    83fa59989456ada2850205bcc7c30bf7  SimpleIDE-1-1-2.x86_64.linux.tar.bz2
    

    Give it a run!
    Perhaps someone brave can verify that it installs SimpleIDE properly on their linux system?
    And let me know here if it works?
    It works for me, my Parallax WX wireless device shows in the port you choose for your programming.
    The proploader program tries to talk to it, so add the program proploader which uses port 32420, to your firewall.
    (i did need to reset my firewall, because I messed with it once, and it started to block the port that simpleide, proploader, and the parallaxWX devices use to communicate.)

    I am not sure if GCCv4 WAS really required, but I chose it because of an error I saw in a test.
    Should I recompile with GCCv6? Or does it really need v4?
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-12-02 14:43
    Why can't I input openspin OPTIONS!!!!!!!!!!!!!

    I can't get simpleIDE to take my option of -h does it only accept certain things?
    it accepts NOTHING for SPIN.

    I CAN get the c compilers to take it, when I type "hello" in one of the c compiler options box, it shows in the output with error.
    But not for the spin compiler.
    I can write a novel in the options box and it will ignore it, and not show it.

    If that can be made to work(is this a problem with simpleIDEv1-1-2?, or did my compile fail?....)
    Then the -2 "option" for Prop2 switch will work if you replace openspin with--> (fastspin renamed to openspin)
    nooption.png
  • Clock LoopClock Loop Posts: 2,069
    edited 2018-12-02 17:44
    Ok, I do not know simpleIDE at all, and have minimal experience with c or c++..

    But...
    Take a look at this.. is why the spin compiler doesn't do anything with switches.

    isithere.png

    Anyone agree? And how to fix it?
    More guessing on my part...

    Unused parameter "option" is not "unused" on the buildc.cpp file.
    (and the c compiler does take the compiler options in the program and work..)

    lets see.. compre the buildc.cpp file and the buildspin.cpp file... hmm..
    1621 x 332 - 102K
  • Clock Loop wrote: »
    Why can't I input openspin OPTIONS!!!!!!!!!!!!!

    I can't get simpleIDE to take my option of -h does it only accept certain things?
    it accepts NOTHING for SPIN.

    Then the -2 "option" for Prop2 switch will work if you replace openspin with--> (fastspin renamed to openspin)

    Not sure what's up with that, as I've been able to use fastspin and at least it's trying to compile my .spin project to P2 (it fails on waitpeq & waitpne, which I expected!). I've inserted '-2' into the Spin Compiler Options field, as you can see in this image.

    SPin2Compile.png

    Notice that I point the Spin Compiler field in the Properties to a copy of fastspin (I keep all my propeller tools in the /opt/parallax/bin/ directory for ease of updating them, quickly, in one place). No need to rename openspin to fastspin. That way it's easy to switch between them!

    dgately
    2383 x 1305 - 445K
Sign In or Register to comment.