Shop OBEX P1 Docs P2 Docs Learn Events
Low cost wifi module ESP8266 - Page 15 — Parallax Forums

Low cost wifi module ESP8266

11213151718

Comments

  • Clock LoopClock Loop Posts: 2,069
    edited 2016-10-28 00:14
    David Betz wrote: »
    Good luck replacing the flash chip. That would probably be beyond my capability.

    Its not hard at all, if you have a very fine flat head screw driver and a fine point solder gun... and some steady hands with decent eyes.
    Or a "helping hands device with magnifying lens"

  • Clock Loop wrote: »
    David Betz wrote: »
    Good luck replacing the flash chip. That would probably be beyond my capability.

    Its not hard at all, if you have a very fine flat head screw driver and a fine point solder gun... and some steady hands with decent eyes.
    Or a "helping hands device with magnifying lens"

    I'm glad it's easy for you. :-)
    BTW, the images produced by the Parallax-ESP project are for 2MB flash systems. You can use them with larger flash chips but they will only use the first 2MB. If you want to use more, you have to install a bootloader configured for your larger chip. The bootloader produced by the Parallax-ESP Makefile is for a 2MB flash.

  • David Betz wrote: »
    You can use them with larger flash chips but they will only use the first 2MB.

    Yea, I figured this was the case, like most cpu's , they must be told to use specific data space.
    Since i was bothering to do the chip swap, I just used the largest chip.
  • Clock LoopClock Loop Posts: 2,069
    edited 2016-10-29 18:06
    First of all, why isn't the Parallax-ESP better documented with forum posts, and how-to's, this thing is AWESOME.

    Questions about Parallax-ESP ( https://github.com/parallaxinc/Parallax-ESP/ ) and PropLoader ( https://github.com/parallaxinc/PropLoader/ ) .....

    Is this the proper place to post questions about them, or should i make a new thread for each.

    Second, I really like Parallax-ESP, a pretty nice way to get an esp8266 into a very useful state:
    Check out the attached images. This Parallax-ESP firmware lets you connect to the esp directly, and re-configure it to connect to YOUR wifi network.
    Then you can upload html files to serve out your own webpage, and do OTA updates.
    NICE!
    One question about the Parallax-ESP, I tried to change the "Module name:" and save plus save to flash, but it never keeps the change, are there rules to the name?

    A thread going into the very minute details of both of these fantastic utilities would be really helpful.

    I tried to get PropLoader going, but am having trouble, nor do I know how it integrates into Parallax-ESP...
    :~/PropLoader $ sudo make OS=raspberrypi
    gcc -Wall -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:89:23: error: ‘SERIAL’ has no member named ‘resetGpioPin’
                     serial->resetGpioPin = atoi(token);
                           ^
    src/serial_posix.c:94:23: error: ‘SERIAL’ has no member named ‘resetGpioLevel’
                     serial->resetGpioLevel = atoi(token);
                           ^
    src/serial_posix.c:99:13: error: ‘propellerResetGpioLevel’ undeclared (first use in this function)
             if (propellerResetGpioLevel)
                 ^
    src/serial_posix.c:99:13: note: each undeclared identifier is reported only once for each function it appears in
    src/serial_posix.c:107:9: warning: implicit declaration of function ‘gpio_export’ [-Wimplicit-function-declaration]
             gpio_export(serial->resetGpioPin);
             ^
    src/serial_posix.c:107:27: error: ‘SERIAL’ has no member named ‘resetGpioPin’
             gpio_export(serial->resetGpioPin);
                               ^
    src/serial_posix.c:108:9: warning: implicit declaration of function ‘gpio_write’ [-Wimplicit-function-declaration]
             gpio_write(serial->resetGpioPin, serial->resetGpioLevel ^ 1);
             ^
    src/serial_posix.c:108:26: error: ‘SERIAL’ has no member named ‘resetGpioPin’
             gpio_write(serial->resetGpioPin, serial->resetGpioLevel ^ 1);
                              ^
    src/serial_posix.c:108:48: error: ‘SERIAL’ has no member named ‘resetGpioLevel’
             gpio_write(serial->resetGpioPin, serial->resetGpioLevel ^ 1);
                                                    ^
    src/serial_posix.c:109:9: warning: implicit declaration of function ‘gpio_direction’ [-Wimplicit-function-declaration]
             gpio_direction(serial->resetGpioPin, 1);
             ^
    src/serial_posix.c:109:30: error: ‘SERIAL’ has no member named ‘resetGpioPin’
             gpio_direction(serial->resetGpioPin, 1);
                                  ^
    src/serial_posix.c: In function ‘OpenSerial’:
    src/serial_posix.c:132:11: error: ‘SERIAL’ has no member named ‘resetGpioPin’
         serial->resetGpioPin = 17;
               ^
    src/serial_posix.c:133:11: error: ‘SERIAL’ has no member named ‘resetGpioLevel’
         serial->resetGpioLevel = 0;
               ^
    src/serial_posix.c: In function ‘SerialGenerateResetSignal’:
    src/serial_posix.c:315:26: error: ‘SERIAL’ has no member named ‘resetGpioPin’
             gpio_write(serial->resetGpioPin, serial->resetGpioLevel);
                              ^
    src/serial_posix.c:315:48: error: ‘SERIAL’ has no member named ‘resetGpioLevel’
             gpio_write(serial->resetGpioPin, serial->resetGpioLevel);
                                                    ^
    src/serial_posix.c:337:26: error: ‘SERIAL’ has no member named ‘resetGpioPin’
             gpio_write(serial->resetGpioPin, serial->resetGpioLevel ^ 1);
                              ^
    src/serial_posix.c:337:48: error: ‘SERIAL’ has no member named ‘resetGpioLevel’
             gpio_write(serial->resetGpioPin, serial->resetGpioLevel ^ 1);
                                                    ^
    Makefile:148: recipe for target '/home/pi/proploader-raspberrypi-build/obj/serial_posix.o' failed
    make: *** [/home/pi/proploader-raspberrypi-build/obj/serial_posix.o] Error 1
    
    913 x 429 - 79K
    913 x 379 - 71K
    911 x 475 - 91K
    910 x 652 - 105K
    910 x 381 - 57K
  • Heater.Heater. Posts: 21,230
    Clockloop,
    First of all, why isn't the Parallax-ESP better documented
    Good question.

    I did not even know there was such a thing until a few days ago reading this thread.
  • Oh I also found this : FUNNY AND AWESOME.
    https://hackaday.io/project/12709-esp8266-mobile-rick-roll-captive-portal

    And got it running on an ESP, talk about HILARIOUS.
    I was not able to get the PlatformIO to work due to code errors, but I WAS able to get ArduinoIDE to load it all.
    The method to get a rick_rolled_esp to load using ArduinoIDE is in the readme.txt file in the attached zip.
    If you need help getting this going on your esp in ArduinoIDE, just ask.
  • Clock Loop wrote: »
    First of all, why isn't the Parallax-ESP better documented with forum posts, and how-to's, this thing is AWESOME.
    Much better documentation will be available soon. Like many of the projects in the Parallax GitHub repository, this is in progress. It's not actually ready for release quite yet.

  • Clock Loop wrote: »
    I tried to get PropLoader going, but am having trouble, nor do I know how it integrates into Parallax-ESP...
    :~/PropLoader $ sudo make OS=raspberrypi
    gcc -Wall -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:89:23: error: ‘SERIAL’ has no member named ‘resetGpioPin’
                     serial->resetGpioPin = atoi(token);
                           ^
    src/serial_posix.c:94:23: error: ‘SERIAL’ has no member named ‘resetGpioLevel’
                     serial->resetGpioLevel = atoi(token);
                           ^
    src/serial_posix.c:99:13: error: ‘propellerResetGpioLevel’ undeclared (first use in this function)
             if (propellerResetGpioLevel)
                 ^
    src/serial_posix.c:99:13: note: each undeclared identifier is reported only once for each function it appears in
    src/serial_posix.c:107:9: warning: implicit declaration of function ‘gpio_export’ [-Wimplicit-function-declaration]
             gpio_export(serial->resetGpioPin);
             ^
    src/serial_posix.c:107:27: error: ‘SERIAL’ has no member named ‘resetGpioPin’
             gpio_export(serial->resetGpioPin);
                               ^
    src/serial_posix.c:108:9: warning: implicit declaration of function ‘gpio_write’ [-Wimplicit-function-declaration]
             gpio_write(serial->resetGpioPin, serial->resetGpioLevel ^ 1);
             ^
    src/serial_posix.c:108:26: error: ‘SERIAL’ has no member named ‘resetGpioPin’
             gpio_write(serial->resetGpioPin, serial->resetGpioLevel ^ 1);
                              ^
    src/serial_posix.c:108:48: error: ‘SERIAL’ has no member named ‘resetGpioLevel’
             gpio_write(serial->resetGpioPin, serial->resetGpioLevel ^ 1);
                                                    ^
    src/serial_posix.c:109:9: warning: implicit declaration of function ‘gpio_direction’ [-Wimplicit-function-declaration]
             gpio_direction(serial->resetGpioPin, 1);
             ^
    src/serial_posix.c:109:30: error: ‘SERIAL’ has no member named ‘resetGpioPin’
             gpio_direction(serial->resetGpioPin, 1);
                                  ^
    src/serial_posix.c: In function ‘OpenSerial’:
    src/serial_posix.c:132:11: error: ‘SERIAL’ has no member named ‘resetGpioPin’
         serial->resetGpioPin = 17;
               ^
    src/serial_posix.c:133:11: error: ‘SERIAL’ has no member named ‘resetGpioLevel’
         serial->resetGpioLevel = 0;
               ^
    src/serial_posix.c: In function ‘SerialGenerateResetSignal’:
    src/serial_posix.c:315:26: error: ‘SERIAL’ has no member named ‘resetGpioPin’
             gpio_write(serial->resetGpioPin, serial->resetGpioLevel);
                              ^
    src/serial_posix.c:315:48: error: ‘SERIAL’ has no member named ‘resetGpioLevel’
             gpio_write(serial->resetGpioPin, serial->resetGpioLevel);
                                                    ^
    src/serial_posix.c:337:26: error: ‘SERIAL’ has no member named ‘resetGpioPin’
             gpio_write(serial->resetGpioPin, serial->resetGpioLevel ^ 1);
                              ^
    src/serial_posix.c:337:48: error: ‘SERIAL’ has no member named ‘resetGpioLevel’
             gpio_write(serial->resetGpioPin, serial->resetGpioLevel ^ 1);
                                                    ^
    Makefile:148: recipe for target '/home/pi/proploader-raspberrypi-build/obj/serial_posix.o' failed
    make: *** [/home/pi/proploader-raspberrypi-build/obj/serial_posix.o] Error 1
    
    Doesn't anyone here ever develop on anything besides a RaspberryPi? PropLoader builds fine under Linux, Mac OS X, and Windows. :-)
    Seriously, I have built for the RaspberryPi before using cross building with the following command:
    make CROSS=rpi
    
    However, this requires the ARM cross compiler tools to be installed. I have them installed on my Linux desktop but the Makefile still isn't working for me. I suspect the I need to update my cross compiler after having updated to Ubuntu 16.04.

    Also, you should never have to use sudo to build PropLoader.

  • FYI, I just installed the ARM cross tools under Ubuntu 16.04 and I am now able to build a RaspberryPi version of proploader using this command:
    make CROSS=rpi
    
    I'm afraid I don't have a RaspberryPi setup so I can't test a native build. If you figure out what's going wrong please let me know and I'll push a fix to the Makefile.
  • Ugh. Never mind what I said about RaspberryPi builds. I have some work to do to fix these. I'll try to get it done in the next few days. Sorry!!
  • I think I have the RaspberryPi build problems resolved and I've pushed the changes to the GitHub. Please let me know if you have further problems.
  • Clock Loop wrote: »
    I tried to get PropLoader going, but am having trouble, nor do I know how it integrates into Parallax-ESP...
    As I mentioned in my previous message, I've fixed the PropLoader build problems on the RaspberryPi. To answer the question of how it relates to Parallax-ESP, the Parallax-ESP firmware includes a Propeller loader that uses a simple HTTP POST request to load tiny Propeller programs up to about 2K. PropLoader uses that loader to load a second-stage loader that uses a telnet link to load a user program. The result is that proploader can load a Propeller that is connected to an ESP8266 as long as one of the ESP GPIO pins is connected to reset on the Propeller.

  • Clock LoopClock Loop Posts: 2,069
    edited 2016-10-30 22:04
    David Betz wrote: »
    Doesn't anyone here ever develop on anything besides a RaspberryPi?
    make CROSS=rpi
    
    However, this requires the ARM cross compiler tools to be installed. I have them installed on my Linux desktop but the Makefile still isn't working for me. I suspect the I need to update my cross compiler after having updated to Ubuntu 16.04.

    Also, you should never have to use sudo to build PropLoader.

    Good to know.
    I develop on the Pi due to the ease of installations, theres lots of support, and I use it in many different places, at home, at work, etc, and they are CHEAP AS HELL, and you get wifi, ethernet, QUAD CORE 1ghz cpu's 1 gig of ram, sd card size of your choice, ease of backing up, and very easy to rebuild the os.

    I have 9 raspberry pi's. 3 p3's, 4 pi2b's, and 1 pi2a. I can have them all do a multitude of different tasks, and if i need to develop yet another tool, i can just take a copy of my latest pi, and mod it for the new tool for the cost of a pi and sd card which is about 45$.
    You just can't make a pc today for 45$, and still keep it so small it can FIT IN YOUR POCKET.
    I can put it on my desk, and not even notice its there....

    I'll give your code changes a go, and get back here to let you know how it went.
    Thanks for your effort!

    BTW, the Parallax-ESP compiled and programmed my ESP with the PI perfectly fine, after the libesphttpd submodule was repaired.
  • Clock Loop wrote: »
    David Betz wrote: »
    Doesn't anyone here ever develop on anything besides a RaspberryPi?
    make CROSS=rpi
    
    However, this requires the ARM cross compiler tools to be installed. I have them installed on my Linux desktop but the Makefile still isn't working for me. I suspect the I need to update my cross compiler after having updated to Ubuntu 16.04.

    Also, you should never have to use sudo to build PropLoader.

    Good to know.
    I develop on the Pi due to the ease of installations, theres lots of support, and I use it in many different places, at home, at work, etc, and they are CHEAP AS HELL, and you get wifi, ethernet, QUAD CORE 1ghz cpu's 1 gig of ram, sd card size of your choice, ease of backing up, and very easy to rebuild the os.

    I have 9 raspberry pi's. 3 p3's, 4 pi2b's, and 1 pi2a. I can have them all do a multitude of different tasks, and if i need to develop yet another tool, i can just take a copy of my latest pi, and mod it for the new tool for the cost of a pi and sd card which is about 45$.
    You just can't make a pc today for 45$, and still keep it so small it can FIT IN YOUR POCKET.
    I can put it on my desk, and not even notice its there....

    I'll give your code changes a go, and get back here to let you know how it went.
    Thanks for your effort!

    BTW, the Parallax-ESP compiled and programmed my ESP with the PI perfectly fine, after the libesphttpd submodule was repaired.
    I have a number of RaspberryPi boards as well including a new RasperryPi 3. I should get at least one setup so I can verify native builds. Anyway, thanks for testing the Propeller-ESP build.

  • Clock LoopClock Loop Posts: 2,069
    edited 2016-10-30 23:43
    I ALWAYS have this error with the file sd_helper.spin, because it has '#ifdef' in it, this being spin, the compiler gets an error due to it containing c.
    pi@Pie:~/PropLoader $ make CROSS=rpi
    VERSION v1.0-5 (2016-10-30 18:22:04 g99b346e)
    gcc -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:04 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj tools/split.c -o /home/pi/proploader-raspberrypi-build/bin/split
    openspin -o /home/pi/proploader-raspberrypi-build/obj/IP_Loader.binary spin/IP_Loader.spin
    
    An open-source compiler for Propeller Spin
    Copyright © 2012-2015 Parallax, Inc.
    
    Compiling spin/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
    arm-linux-gnueabihf-g++ -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:07 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/main.cpp -o /home/pi/proploader-raspberrypi-build/obj/main.o
    src/main.cpp: In function ‘int WriteFileToSDCard(BoardConfig*, PropConnection*, const char*, const char*)’:
    src/main.cpp:609:63: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘size_t {aka unsigned int}’ [-Wformat=]
             printf("%ld bytes remaining             \r", remaining); fflush(stdout);
                                                                   ^
    src/main.cpp:616:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘size_t {aka unsigned int}’ [-Wformat=]
         printf("%ld bytes sent             \n", size);
                                                     ^
    arm-linux-gnueabihf-g++ -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:18 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/loader.cpp -o /home/pi/proploader-raspberrypi-build/obj/loader.o
    arm-linux-gnueabihf-g++ -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:19 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/fastloader.cpp -o /home/pi/proploader-raspberrypi-build/obj/fastloader.o
    arm-linux-gnueabihf-g++ -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:22 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/propimage.cpp -o /home/pi/proploader-raspberrypi-build/obj/propimage.o
    arm-linux-gnueabihf-g++ -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:23 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/packet.cpp -o /home/pi/proploader-raspberrypi-build/obj/packet.o
    arm-linux-gnueabihf-g++ -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:24 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/serialpropconnection.cpp -o /home/pi/proploader-raspberrypi-build/obj/serialpropconnection.o
    arm-linux-gnueabihf-g++ -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:29 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/serialloader.cpp -o /home/pi/proploader-raspberrypi-build/obj/serialloader.o
    arm-linux-gnueabihf-g++ -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:34 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/wifipropconnection.cpp -o /home/pi/proploader-raspberrypi-build/obj/wifipropconnection.o
    arm-linux-gnueabihf-gcc -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:42 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/loadelf.c -o /home/pi/proploader-raspberrypi-build/obj/loadelf.o
    openspin -o /home/pi/proploader-raspberrypi-build/obj/sd_helper.binary spin/sd_helper.spin
    
    An open-source compiler for Propeller Spin
    Copyright © 2012-2015 Parallax, Inc.
    
    Compiling spin/sd_helper.spin
    spin/sd_helper.spin(21:1) : error : Expected a unique object name
    Line:
    #ifdef TV_DEBUG
    Offending Item: #
    Makefile:131: recipe for target '/home/pi/proploader-raspberrypi-build/obj/sd_helper.binary' failed
    make: *** [/home/pi/proploader-raspberrypi-build/obj/sd_helper.binary] Error 1
    

    I was able to install the cross compiler tools by doing this:
    pi@Pie:~ $ git clone --depth=1 git://github.com/raspberrypi/tools.git
    pi@Pie:~ $ sudo nano /home/pi/.bashrc
    

    then i added the line---- export PATH=$PATH:$HOME/pi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin
    to the end of the /home/pi/.bashrc file, and restarted my pi.


    I then verified the cross compiler install.
    pi@Pie:~ $ arm-linux-gnueabihf-gcc --version
    arm-linux-gnueabihf-gcc (Raspbian 4.9.2-10) 4.9.2
    Copyright (C) 2014 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    

    Perhaps i should install the cross compiler using your instructions here, because im still missing propeller-elf-gcc.
    https://github.com/dbetz/propeller-gcc

    Trying that now.

  • You must have an old version of OpenSpin since it now supports #ifdef. I get the warnings when compiling main.cpp as well. I'll try to get them fixed sometime soon but I don't think they'll cause any problems.
  • Clock Loop wrote: »
    I ALWAYS have this error with the file sd_helper.spin, because it has '#ifdef' in it, this being spin, the compiler gets an error due to it containing c.
    pi@Pie:~/PropLoader $ make CROSS=rpi
    VERSION v1.0-5 (2016-10-30 18:22:04 g99b346e)
    gcc -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:04 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj tools/split.c -o /home/pi/proploader-raspberrypi-build/bin/split
    openspin -o /home/pi/proploader-raspberrypi-build/obj/IP_Loader.binary spin/IP_Loader.spin
    
    An open-source compiler for Propeller Spin
    Copyright © 2012-2015 Parallax, Inc.
    
    Compiling spin/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
    arm-linux-gnueabihf-g++ -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:07 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/main.cpp -o /home/pi/proploader-raspberrypi-build/obj/main.o
    src/main.cpp: In function ‘int WriteFileToSDCard(BoardConfig*, PropConnection*, const char*, const char*)’:
    src/main.cpp:609:63: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘size_t {aka unsigned int}’ [-Wformat=]
             printf("%ld bytes remaining             \r", remaining); fflush(stdout);
                                                                   ^
    src/main.cpp:616:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘size_t {aka unsigned int}’ [-Wformat=]
         printf("%ld bytes sent             \n", size);
                                                     ^
    arm-linux-gnueabihf-g++ -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:18 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/loader.cpp -o /home/pi/proploader-raspberrypi-build/obj/loader.o
    arm-linux-gnueabihf-g++ -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:19 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/fastloader.cpp -o /home/pi/proploader-raspberrypi-build/obj/fastloader.o
    arm-linux-gnueabihf-g++ -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:22 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/propimage.cpp -o /home/pi/proploader-raspberrypi-build/obj/propimage.o
    arm-linux-gnueabihf-g++ -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:23 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/packet.cpp -o /home/pi/proploader-raspberrypi-build/obj/packet.o
    arm-linux-gnueabihf-g++ -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:24 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/serialpropconnection.cpp -o /home/pi/proploader-raspberrypi-build/obj/serialpropconnection.o
    arm-linux-gnueabihf-g++ -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:29 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/serialloader.cpp -o /home/pi/proploader-raspberrypi-build/obj/serialloader.o
    arm-linux-gnueabihf-g++ -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:34 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/wifipropconnection.cpp -o /home/pi/proploader-raspberrypi-build/obj/wifipropconnection.o
    arm-linux-gnueabihf-gcc -Wall -DVERSION=\""v1.0-5 (2016-10-30 18:22:42 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/loadelf.c -o /home/pi/proploader-raspberrypi-build/obj/loadelf.o
    openspin -o /home/pi/proploader-raspberrypi-build/obj/sd_helper.binary spin/sd_helper.spin
    
    An open-source compiler for Propeller Spin
    Copyright © 2012-2015 Parallax, Inc.
    
    Compiling spin/sd_helper.spin
    spin/sd_helper.spin(21:1) : error : Expected a unique object name
    Line:
    #ifdef TV_DEBUG
    Offending Item: #
    Makefile:131: recipe for target '/home/pi/proploader-raspberrypi-build/obj/sd_helper.binary' failed
    make: *** [/home/pi/proploader-raspberrypi-build/obj/sd_helper.binary] Error 1
    

    I was able to install the cross compiler tools by doing this:
    pi@Pie:~ $ git clone --depth=1 git://github.com/raspberrypi/tools.git
    pi@Pie:~ $ sudo nano /home/pi/.bashrc
    

    then i added the line---- export PATH=$PATH:$HOME/pi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin
    to the end of the /home/pi/.bashrc file, and restarted my pi.


    I then verified the cross compiler install.
    pi@Pie:~ $ arm-linux-gnueabihf-gcc --version
    arm-linux-gnueabihf-gcc (Raspbian 4.9.2-10) 4.9.2
    Copyright (C) 2014 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    

    Perhaps i should install the cross compiler using your instructions here, because im still missing propeller-elf-gcc.
    https://github.com/dbetz/propeller-gcc

    Trying that now.
    I just noticed that you're trying to cross compile on a RaspberryPi. You don't need to cross compile there. You can just do a native compile:
    make OS=raspberrypi
    

  • Clock LoopClock Loop Posts: 2,069
    edited 2016-10-31 00:54
    My version of openspin comes from the PropellerIDE i think. I have not installed it from anywhere else.
    I can probably git it... https://github.com/parallaxinc/OpenSpin.git
    pi@Pie:~ $ openspin -v
    OpenSpin 0.3.0
    
  • David BetzDavid Betz Posts: 14,511
    edited 2016-10-31 01:02
    Clock Loop wrote: »
    My version of openspin comes from the PropellerIDE i think. I have not installed it from anywhere else.
    I can probably git it... https://github.com/parallaxinc/OpenSpin.git
    pi@Pie:~ $ openspin -v
    OpenSpin 0.3.0
    
    The version on the Parallax GitHub site is the one I'm using. I think the one that comes with PropellerIDE is different for some reason. I would suggest using the Parallax version.

    Here is what I get:
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2015 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.77 Compiled on Oct 20 2016 07:50:10
    
  • Clock LoopClock Loop Posts: 2,069
    edited 2016-10-31 07:07
    ok i compiled openspin, the current parallax git hub version, and placed it in /usr/bin, there was already one there, a size of 114kb, whereas the newly compiled openspin file is 996kb. So I coped over the smaller version with my newly compiled version.

    The new version shows version info with the help now, -v has changed its use to verbose output.
    pi@Pie:~/PropLoader $ openspin
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.80 Compiled on Oct 30 2016 20:08:38
    
    GREAT.

    Now I run make to compile PropLoader.... And it properly compiles the previous spin file that gave errors when it has c code in it, but now I error out due to not having something set up properly with the 'propeller-elf-gcc' file.
    It can't find it.
    pi@Pie:~/PropLoader $ make OS=raspberrypi
    VERSION v1.0-5 (2016-10-31 01:02:46 g99b346e)
    gcc -Wall -DVERSION=\""v1.0-5 (2016-10-31 01:02:46 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj tools/split.c -o /home/pi/proploader-raspberrypi-build/bin/split
    openspin -o /home/pi/proploader-raspberrypi-build/obj/IP_Loader.binary spin/IP_Loader.spin
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.80 Compiled on Oct 30 2016 20:08:38
    Compiling...
    spin/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-5 (2016-10-31 01:02:49 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/main.cpp -o /home/pi/proploader-raspberrypi-build/obj/main.o
    src/main.cpp: In function ‘int WriteFileToSDCard(BoardConfig*, PropConnection*, const char*, const char*)’:
    src/main.cpp:609:63: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘size_t {aka unsigned int}’ [-Wformat=]
             printf("%ld bytes remaining             \r", remaining); fflush(stdout);
                                                                   ^
    src/main.cpp:616:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘size_t {aka unsigned int}’ [-Wformat=]
         printf("%ld bytes sent             \n", size);
                                                     ^
    g++ -Wall -DVERSION=\""v1.0-5 (2016-10-31 01:03:04 g99b346e)"\" -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-5 (2016-10-31 01:03:05 g99b346e)"\" -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-5 (2016-10-31 01:03:08 g99b346e)"\" -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-5 (2016-10-31 01:03:09 g99b346e)"\" -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-5 (2016-10-31 01:03:10 g99b346e)"\" -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-5 (2016-10-31 01:03:15 g99b346e)"\" -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-5 (2016-10-31 01:03:19 g99b346e)"\" -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-5 (2016-10-31 01:03:28 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/loadelf.c -o /home/pi/proploader-raspberrypi-build/obj/loadelf.o
    openspin -o /home/pi/proploader-raspberrypi-build/obj/sd_helper.binary spin/sd_helper.spin
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.80 Compiled on Oct 30 2016 20:08:38
    Compiling...
    spin/sd_helper.spin
    |-packet_driver.spin
    |-fsrw.spin
      |-safe_spi_c3.spin
    Done.
    Program size is 7268 bytes
    gcc -Wall -DVERSION=\""v1.0-5 (2016-10-31 01:03:31 g99b346e)"\" -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-5 (2016-10-31 01:03:33 g99b346e)"\" -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-5 (2016-10-31 01:03:34 g99b346e)"\" -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-5 (2016-10-31 01:03:36 g99b346e)"\" -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-5 (2016-10-31 01:03:37 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/system.c -o /home/pi/proploader-raspberrypi-build/obj/system.o
    gcc -Wall -DVERSION=\""v1.0-5 (2016-10-31 01:03:38 g99b346e)"\" -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-5 (2016-10-31 01:03:40 g99b346e)"\" -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
    gcc -Wall -DVERSION=\""v1.0-5 (2016-10-31 01:03:42 g99b346e)"\" -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/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-2016 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.80 Compiled on Oct 30 2016 20:08:38
    Compiling...
    blink.spin
    Done.
    Program size is 56 bytes
    openspin -DSLOW -o /home/pi/proploader-raspberrypi-build/blink-slow.binary blink.spin
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.80 Compiled on Oct 30 2016 20:08:38
    Compiling...
    blink.spin
    Done.
    Program size is 56 bytes
    propeller-elf-gcc -Os -mlmm -o /home/pi/proploader-raspberrypi-build/toggle.elf toggle.c
    make: propeller-elf-gcc: Command not found
    Makefile:122: recipe for target '/home/pi/proploader-raspberrypi-build/toggle.elf' failed
    make: *** [/home/pi/proploader-raspberrypi-build/toggle.elf] Error 127
    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
    

    I am currently running the instructions for this git..
    https://github.com/dbetz/propeller-gcc
    It takes quite some time. I should have run this on my Pi3, quadcore, 1.2ghz, instead of my single core pi2.
  • Clock LoopClock Loop Posts: 2,069
    edited 2016-10-31 10:12
    Well I ran through the propeller-gcc
    git clone https://github.com/dbetz/propeller-gcc.git
    cd propeller-gcc
    git submodule init
    git submodule update
    cd propeller-gcc/gcc
    ./contrib/download_prerequisites
    make
    sudo make install
    

    At the end it said it failed.

    So I read farther, and did this...
    mkdir ~/rpi
    cd ~/rpi
    git clone git://github.com/raspberrypi/tools.git
    export PATH=$PATH:~/home/pi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/
    cd /home/pi/propeller-gcc
    Make
    

    After all this, my /opt/parallax/bin folder ended up with a bunch of files, including propeller-elf-gcc.... and openspin...

    but...
    propeller-elf-gcc -Os -mlmm -o /home/pi/proploader-raspberrypi-build/toggle.elf toggle.c
    make: propeller-elf-gcc: Command not found
    Makefile:122: recipe for target '/home/pi/proploader-raspberrypi-build/toggle.elf' failed
    make: *** [/home/pi/proploader-raspberrypi-build/toggle.elf] Error 127
    
    pi@Pie:~/PropLoader $ ls /opt/parallax/bin/
    openspin                 propeller-elf-c++      propeller-elf-g++        propeller-elf-gdb     propeller-elf-nm       propeller-elf-readelf  spin2cpp
    propeller-elf-addr2line  propeller-elf-c++filt  propeller-elf-gcc        propeller-elf-gprof   propeller-elf-objcopy  propeller-elf-size
    propeller-elf-ar         propeller-elf-cpp      propeller-elf-gcc-4.6.1  propeller-elf-ld      propeller-elf-objdump  propeller-elf-strings
    propeller-elf-as         propeller-elf-elfedit  propeller-elf-gcov       propeller-elf-ld.bfd  propeller-elf-ranlib   propeller-elf-strip
    

    But if I run this
    pi@Pie:~ $ /opt/parallax/bin/propeller-elf-gcc
    propeller-elf-gcc: fatal error: no input files
    compilation terminated.
    

    But i cannot run this
    pi@Pie:~ $ propeller-elf-gcc
    -bash: propeller-elf-gcc: command not found
    

    I tried doing
    export PATH=$PATH:~/opt/parallax/bin/
    
    But I still cannot run propeller-elf-gcc anywhere.
    Not sure if I am doing something wrong with my path.

    So i got crazy, and modified the PropLoader Makefile ..
    I changed
    $(BUILD)/%.elf:	%.c
    	propeller-elf-gcc -Os -mlmm -o $@ $<
    
    to
    
    $(BUILD)/%.elf:	%.c
    	/opt/parallax/bin/propeller-elf-gcc -Os -mlmm -o $@ $<
    

    It seems to have worked
    pi@Pie:~/PropLoader $ make OS=raspberrypi
    VERSION v1.0-5 (2016-10-31 05:22:20 g99b346e)
    gcc -Wall -DVERSION=\""v1.0-5 (2016-10-31 05:22:20 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj tools/split.c -o /home/pi/proploader-raspberrypi-build/bin/split
    openspin -o /home/pi/proploader-raspberrypi-build/obj/IP_Loader.binary spin/IP_Loader.spin
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.80 Compiled on Oct 30 2016 20:08:38
    Compiling...
    spin/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-5 (2016-10-31 05:22:20 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/main.cpp -o /home/pi/proploader-raspberrypi-build/obj/main.o
    src/main.cpp: In function ‘int WriteFileToSDCard(BoardConfig*, PropConnection*, const char*, const char*)’:
    src/main.cpp:609:63: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘size_t {aka unsigned int}’ [-Wformat=]
             printf("%ld bytes remaining             \r", remaining); fflush(stdout);
                                                                   ^
    src/main.cpp:616:49: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘size_t {aka unsigned int}’ [-Wformat=]
         printf("%ld bytes sent             \n", size);
                                                     ^
    g++ -Wall -DVERSION=\""v1.0-5 (2016-10-31 05:22:23 g99b346e)"\" -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-5 (2016-10-31 05:22:23 g99b346e)"\" -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-5 (2016-10-31 05:22:24 g99b346e)"\" -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-5 (2016-10-31 05:22:24 g99b346e)"\" -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-5 (2016-10-31 05:22:24 g99b346e)"\" -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-5 (2016-10-31 05:22:25 g99b346e)"\" -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-5 (2016-10-31 05:22:25 g99b346e)"\" -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-5 (2016-10-31 05:22:26 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/loadelf.c -o /home/pi/proploader-raspberrypi-build/obj/loadelf.o
    openspin -o /home/pi/proploader-raspberrypi-build/obj/sd_helper.binary spin/sd_helper.spin
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.80 Compiled on Oct 30 2016 20:08:38
    Compiling...
    spin/sd_helper.spin
    |-packet_driver.spin
    |-fsrw.spin
      |-safe_spi_c3.spin
    Done.
    Program size is 7268 bytes
    gcc -Wall -DVERSION=\""v1.0-5 (2016-10-31 05:22:27 g99b346e)"\" -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-5 (2016-10-31 05:22:28 g99b346e)"\" -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-5 (2016-10-31 05:22:28 g99b346e)"\" -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-5 (2016-10-31 05:22:28 g99b346e)"\" -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-5 (2016-10-31 05:22:28 g99b346e)"\" -DLINUX -DRASPBERRY_PI -I/home/pi/proploader-raspberrypi-build/obj -c src/system.c -o /home/pi/proploader-raspberrypi-build/obj/system.o
    gcc -Wall -DVERSION=\""v1.0-5 (2016-10-31 05:22:28 g99b346e)"\" -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-5 (2016-10-31 05:22:29 g99b346e)"\" -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
    gcc -Wall -DVERSION=\""v1.0-5 (2016-10-31 05:22:29 g99b346e)"\" -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/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-2016 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.80 Compiled on Oct 30 2016 20:08:38
    Compiling...
    blink.spin
    Done.
    Program size is 56 bytes
    openspin -DSLOW -o /home/pi/proploader-raspberrypi-build/blink-slow.binary blink.spin
    Propeller Spin/PASM Compiler 'OpenSpin' (c)2012-2016 Parallax Inc. DBA Parallax Semiconductor.
    Version 1.00.80 Compiled on Oct 30 2016 20:08:38
    Compiling...
    blink.spin
    Done.
    Program size is 56 bytes
    /opt/parallax/bin/propeller-elf-gcc -Os -mlmm -o /home/pi/proploader-raspberrypi-build/toggle.elf toggle.c
    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
    

    But now what do i do with the 'proploader-raspberrypi-build' directory and files?
  • Clock Loop wrote: »
    But if I run this
    pi@Pie:~ $ /opt/parallax/bin/propeller-elf-gcc
    propeller-elf-gcc: fatal error: no input files
    compilation terminated.
    

    But i cannot run this
    pi@Pie:~ $ propeller-elf-gcc
    -bash: propeller-elf-gcc: command not found
    

    I tried doing
    export PATH=$PATH:~/opt/parallax/bin/
    
    But I still cannot run propeller-elf-gcc anywhere.
    Not sure if I am doing something wrong with my path.
    You got the path update slightly wrong. Try this:
    export PATH=$PATH:/opt/parallax/bin/
    
  • Clock LoopClock Loop Posts: 2,069
    edited 2016-11-02 03:55
    David Betz wrote: »
    export PATH=$PATH:/opt/parallax/bin/
    
    I knew i formatted that wrong, just couldn't figure it out.
    I tried a few different ways, and some made it so my command prompt would give me a "command not found" no matter what command I typed (good thing I enabled samba network shares so i could change my .bashrc file back to a working state.




    The PropLoader doesn't currently have any info on how to use it, or i couldn't find it, and I am not that good at reading code, so what can I/should I do with the compiled propeller loader?
  • Clock Loop wrote: »
    David Betz wrote: »
    export PATH=$PATH:/opt/parallax/bin/
    
    I knew i formatted that wrong, just couldn't figure it out.
    I tried a few different ways, and some made it so my command prompt would give me a "command not found" no matter what command I typed (good thing I enabled samba network shares so i could change my .bashrc file back to a working state.




    The PropLoader doesn't currently have any info on how to use it, or i couldn't find it, and I am not that good at reading code, so what can I/should I do with the compiled propeller loader?
    Try typing:
    proploader -?
    
    It actually isn't that different from propeller-load except that it doesn't support XMM. One big difference is that it supports wi-fi loading using -i to specify the IP address. To do serial loading you use the normal -p to specify the port or -s if you want it to autodetect a serial port.

    To discover wi-fi modules type this:
    proploader -W
    


  • Clock LoopClock Loop Posts: 2,069
    edited 2016-11-02 15:00
    hmm.. is it possible it compiled wrong?
    pi@Pie:~/proploader-raspberrypi-build/bin $ ls
    created  proploader  split
    pi@Pie:~/proploader-raspberrypi-build/bin $ proploader
    -bash: proploader: command not found
    pi@Pie:~/proploader-raspberrypi-build/bin $ proploader -h
    -bash: proploader: command not found
    pi@Pie:~/proploader-raspberrypi-build/bin $ proploader -?
    -bash: proploader: command not found
    
    pi@Pie:~/proploader-raspberrypi-build/bin $ ls -l
    total 144
    -rw-r--r-- 1 pi pi      0 Nov  2 10:02 created
    -rwxr-xr-x 1 pi pi 132840 Nov  2 10:02 proploader
    -rwxr-xr-x 1 pi pi   9164 Nov  2 10:02 split
    


    Ok, nevermind, i found that i cannot just run the proploader from /proploader-raspberrypi-build/bin/
    I had to copy it into /opt/parallax/bin/
    Then it ran.
    Linux is odd.

    THANKS FOR THE HELP, im gonna move ahead with more testing...
    I'll report back on if I was able to load my propeller code over wifi.
    pi@Pie:~/proploader-raspberrypi-build/bin $ proploader -h
    PropLoader v1.0-5 (2016-11-02 10:02:38 g99b346e)
    
    usage: proploader [options] [<file>]
    
    options:
        -b <type>       select target board and subtype (default is 'default:default')
        -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 baudrate reset rxpin txpin tvpin
      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.
    
  • You'll need to connect GPIO12 to reset on the Propeller as well as DI and DO to pins 31 and 30 to get the loader to work.
  • ElectrodudeElectrodude Posts: 1,621
    edited 2016-11-02 17:25
    @ClockLoop: You can't just run a program in the current directory by only typing its name. You need to use a relative path instead of just the program name. So, to run a program in the current directory (which is called "."), do "./proploader". Plain "proploader" (with no relative path prefix) will run a program that's somewhere in your $PATH - if it's not in a directory in your $PATH (try "echo $PATH" to see what's in your $PATH), it won't find it. If "." is in your $PATH, then it will find things in your current directory, but I wouldn't recommend doing that. This isn't just a Linux thing - it's worked this way in Unix since forever.

    For example, the following should work, even if you "rm /opt/parallax/bin/proploader":
    cd ~/proploader-raspberrypi-build/bin/
    ./proploader -h
    

    Also, if the shell can't find the program without any arguments, it still won't be able to find the program with arguments (i.e. "proploader -h"). The shell doesn't care about arguments when it's trying to find the program.


    Does anyone know how to do @ mentions for people with spaces in their usernames? I googled it and found nothing.
  • David Betz wrote: »
    You'll need to connect GPIO12 to reset on the Propeller as well as DI and DO to pins 31 and 30 to get the loader to work.
    Is there any provision in the board types, etc., for setting the reset pin to another GPIO? The reason I ask is that the Pimoroni Propeller Hat uses GPIO17.

    -Mike

  • pmrobert wrote: »
    David Betz wrote: »
    You'll need to connect GPIO12 to reset on the Propeller as well as DI and DO to pins 31 and 30 to get the loader to work.
    Is there any provision in the board types, etc., for setting the reset pin to another GPIO? The reason I ask is that the Pimoroni Propeller Hat uses GPIO17.

    -Mike
    Not currently but it could be added easily.

  • David Betz wrote: »
    pmrobert wrote: »
    David Betz wrote: »
    You'll need to connect GPIO12 to reset on the Propeller as well as DI and DO to pins 31 and 30 to get the loader to work.
    Is there any provision in the board types, etc., for setting the reset pin to another GPIO? The reason I ask is that the Pimoroni Propeller Hat uses GPIO17.

    -Mike
    Not currently but it could be added easily.
    Sorry, I didn't read this very well. What are you trying to do? The Pimoroni Hat is a board for the RaspberryPi. What does it have to do with the ESP8266 which is what we're talking about here. In any case, there is a command line option in proploader to select the GPIO used for reset for serial downloads on a RaspberryPi. There is currently no board configuration option but it could be added.

Sign In or Register to comment.