Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 03 Jul 2014 07:38 AM by  Jean-Paul De Lemos
How to run a server created with Node js
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Jean-Paul De Lemos
New Member
New Member
Posts:15


--
02 Jul 2014 03:15 AM

    Hi,

     I have a small problem.

    I need to launch a webserver on my DM3730 Torpedo + Wireless SOM board booting with a SD card on Linux and I don't know how to proceed.

    My webserver is created with node.js.

    Do you know a way to cross-compile it or to install node.js on my board?

     

    Jean-paul

    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    02 Jul 2014 12:49 PM
    • Accepted Answer
    Jean-Paul,

    The image you will need will have to be YAFFS boot image. The default RAMDISK isn’t large enough. See 2.5.5.1 Example: Create YAFFS Root Filesystem Image in the User Guide (http://support.logicpd.co...alid=0&EntryId=1392)

    Once booted, make sure you have the networking properly setup on your board. The instructions to setup the network are in the linux user guide. (http://support.logicpd.co...alid=0&EntryId=1392)

    Record your IP address for later.

    If you need wireless, check out 4.5, it explains how to setup the Wired Networking, and in section 4.12 and 4.13 it explains how to setup the Wireless Networking based on either Linux 2.6x kernel or a 3.x Kernel.

    Once you have networking setup, you can begin the setup procedure for your web server.


    We don’t officially endorse Node.JS, but I can help you with the basics, however should any issues with Node.JS arise, you may have to contact them for additional support.

    Having stated that, the cross-compiling tools you’ll need to are all start with the prefix arm-none-linux-gnueabi-

    On the Host Linux machine (ie. The virtual machine image we have available http://support.logicpd.co...talid=0&EntryId=858)

    You’ll need to download the source files from them and extract all the files. Now, enter the directory you just extracted.

    Set the environmental variables that node.js needs to know in order to cross-compile

    $ export AR=arm-none-linux-gnueabi-ar
    $ export CC=arm- none -linux-gnueabi-gcc
    $ export CXX=arm- none -linux-gnueabi-g++
    $ export LINK=arm- none -linux-gnueabi-g++

    Now configure the build process to build for an arm processor running linux.
    $ ./configure --without-snapshot --dest-cpu=arm --dest-os=linux

    From here you can build
    $make

    Install to a local directory

    $make install DESTDIR=~/node-arm

    Go into the directory

    $cd ~/node-arm

    To transfer the files to the board you will need the IP address of the board from earlier.

    $scp –r usr/ root@192.168.1.1:/ (replace the IP address shown in this example the actual IP address of the board)

    It should be installed.

    As we don’t officially endorse that product, we cannot help you with the setup of node.js, but I was able to test it with a ‘hello world’ example on my board, and I was able to see it work using a web brower. Any Node.js questions will have to be directed elsewhere.

    Hopefully that will help you.

    -adam
    Jean-Paul De Lemos
    New Member
    New Member
    Posts:15


    --
    03 Jul 2014 07:38 AM
    Thank you adam,

    I succeed to install Node.js on my board with the help of your advices.

    Jean-paul
    You are not authorized to post a reply.