Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

F&C on ARM / Raspberry PI

Hi all,

I was just chatting to 'Deomid R' through the main site and he said there is some experimental support for flashing Smart.js scripts on the command line in Linux and on ARM / Raspberry PI.

I was hoping to use Smart.JS with the following hardware:

https://shop.pimoroni.com/products/esp8266-phat

Please let me know if you have any more details.

Comments

  • rojerrojer Dublin, Ireland
    it just so happens that i've been working on getting FNC-cli to work on RPi
    pushed a couple fixes and updated build instructions

    note: you'll need at least raspbian jessie (wheezy is too old) and you'll have to build your own Qt, for some reason Qt 5.3 that comes with jessie doesn't work. so, follow these instructions: https://github.com/cesanta/fnc#building-static-binaries

    when you have the binary, it can be used to flash firmware as follows:

    # time src/FNC-cli -p esp8266 --port /dev/ttyUSB0 --flash-baud-rate=2000000 --flash smartjs-esp8266-last.zip 
    Connecting to ROM...
    Running flasher...
    Setting flash params to 0x240
    Checking existing contents...
    Checksumming 2512 @ 0x0...
    Checksumming 4096 @ 0x1000...
    Checksumming 491536 @ 0x11000...
    Checksumming 131072 @ 0xe0000...
    Erasing 4096 @ 0x0...
    Writing 4096 @ 0x0...
    Erasing 495616 @ 0x11000...
    Writing 495616 @ 0x11000...
    Erasing 131072 @ 0xe0000...
    Writing 131072 @ 0xe0000...
    Verifying image at 0x0...
    Verifying image at 0x1000...
    Verifying image at 0x11000...
    Verifying image at 0xe0000...
    Flashing successful, rebooting...

    All done!
    Success.

    real    0m13.204s

  • Thanks. I have a feeling this make take some time to build. I'm using the single core PI-Zero with 512mb/ram. the -j 4 parameters will not work, so I'll remove them from the command lines.

    After flashing the ESP chip with the smartjs firmware, how do I upload or evaluate some JavaScript for instance the HTTP client?
  • SergeySergey Dublin, Ireland
    At the moment, the easiest way is to configure ESP to use local WiFi network, and mount ESP module as a WebDAV disk.
    See https://www.cesanta.com/developer/smartjs#_using_webdav
  • alexellis2alexellis2 London
    edited February 2016
    I ran into a failure during the configure stage. 

    ~/qt-everywhere-opensource-src-5.5.1 $ ./configure -make 'libs tools' -static -prefix /opt/qt5 -opensource -confirm-license -skip qt3d -skip qtcanvas3d -skip qtdoc -skip qtlocation -skip qtscript -skip qtmultimedia -skip qtsensors -skip qtwebengine -skip qtwebkit -skip qtwebkit-examples -no-gui
    + cd qtbase
    + /home/pi/qt-everywhere-opensource-src-5.5.1/qtbase/configure -top-level -make libs tools -static -prefix /opt/qt5 -opensource -confirm-license -skip qt3d -skip qtcanvas3d -skip qtdoc -skip qtlocation -skip qtscript -skip qtmultimedia -skip qtsensors -skip qtwebengine -skip qtwebkit -skip qtwebkit-examples -no-gui

    This is the Qt Open Source Edition.

    You are licensed to use this software under the terms of
    the Lesser GNU General Public License (LGPL) versions 2.1.
    You are also licensed to use this software under the terms of
    the GNU Lesser General Public License (LGPL) versions 3.

    You have already accepted the terms of the Open Source license.





    Creating qmake...
    ........................................................................................Done.
    Running configuration tests...
    The test for linking against libxcb and support libraries failed!
     You might need to install dependency packages, or pass -qt-xcb.
     See src/plugins/platforms/xcb/README.


    And:

    sudo apt-get install libx11-xcb1 libx11-xcb-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    libx11-xcb-dev is already the newest version.
    libx11-xcb-dev set to manually installed.
    libx11-xcb1 is already the newest version.
    libx11-xcb1 set to manually installed.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

  • rojerrojer Dublin, Ireland
    try changing prefix to /home/pi/qt5 
    i think the problem is that /opt/qt5 does not exist and cannot be created by user pi (i was building as root)
Sign In or Register to comment.