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 25 Jun 2014 09:30 AM by  Adam Ford
Serial connection and boarding of applications
 7 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Jean-Paul De Lemos
New Member
New Member
Posts:15


--
24 Jun 2014 04:09 AM

    Hi all,

    I got a few problems with my DM37xx 2.4-2 BSP release.

    I use the DM3730 Torpedo + Wireless SOM, and I don't understand how to board my own applications on the SD Card.

    I also don't know how to configure a serial connection with the board. When I plus the serial cable, there is no changes in the /dev directory.

    Can you help me to solve these problems please?

    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    24 Jun 2014 10:27 AM
    Do you have the BSP User Guide? In section 5, there is a "Hello World" example and part of the example discusses how to create and deploy the project to the root file system. Section 2.7 of the document references a tool used to make a bootable SD card. Once built, the file should appear on the SD card.

    The serial connection between the computer and the baseboard should use the null-modem cable provided in the kit. If you don't have a DB9 serial port on your computer, you will need a USB->serial adapter. From Windows, you can use Tera Term or something similar to open a serial connection to the board. 115,200 8N1 with no flow control. When you power up the baseboard, the data will start streaming.

    Hopefully that will help point you to a few places to get started.
    -adam
    Jean-Paul De Lemos
    New Member
    New Member
    Posts:15


    --
    25 Jun 2014 02:04 AM

    Adam,

     Yes, I have the BSP User Guide, but the "Hello World" example is build automaticaly. I want to deploy a hand made project on the board and I don't know the method to do that.

     

    On the serial link, my goal is to connect the board to a measuring device. I already succeed to connect the board to my computer.

     

    Thank you for the time you take to help me.

    Jean-Paul

    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    25 Jun 2014 08:12 AM
    • Accepted Answer
    I think I understand what you want...

    ------LOADING YOUR PROJECT INTO ROOTFS-------

    There are a few ways to load your project onto the board. If you want to add your project to the list of available projects to install on the rootfs, you'll need to create a spec file for it. if you are using the VirtualBox Ubuntu image that is is provided, you can go to ~/logic/Logic_BSPs/Linux_3.0/REL-ltib-DM3730-2.4-2/dist/lfs-5.1 In that directory you'll see a list of subdirectories for each of the available projects. In here you can create a new directory for your project.

    cd ~/logic/Logic_BSPs/Linux_3.0/REL-ltib-DM3730-2.4-2/dist/lfs-5.1
    mkdir my_project
    cd my_project

    You will also need to create a spec file which contains the build and prep instructions. I recommend copying the helloworld.spec file as a starting point, then modiftying it to meet your project needs.

    cp ../helloworld/helloworld.spec my_project.spec

    --- SEND YOUR PROJECT OVER ETHERNET TO BOARD --------

    An alternative that I like better is to copy the file over via scp to the board.

    On the board you will need to connect it to live ethernet jack. Once logged into the board, you can type ifup eth0 and it will request an IP address.

    Once you have established a network connection, you can scp the compiled project directly to your board without having to rebuild the entire rootfs.

    logic@logic-VirtualBox:~$ scp my_project root@192.168.1.100:.

    (replace the ip address with whatever ip address is returned when you enter the ifup eth0 command)

    it will prompt your for the root password for the board.

    From there you should see your project file.


    ----------- SERIAL PORT----------------

    For the serial port, you will need to use one of the ribbon cables that has a DB9 serial port on one side and a socket on the other. Notice the red cable references pin 1. Connect one of them to UARTB or UARTC.

    This is the port that the boards' linux installation will recognize. If you want to change the baud rate to 115200 for UARTB, type

    DM-37x# stty 115200 < /dev/ttyO2

    If you are using UARTC, then change /dev/ttyO2 to /dev/ttyO1

    The devices shown in /dev represent the serial port itself, not the presence of the cable. This means it will always appear in /dev regardless of whether or not the cable is connected.

    From here you should be able to send text to the serial port.

    DM-37x# echo "This is a test message" > /dev/ttyO2


    See Section 4.18 UART of the Linux BSP for details. Note the ttyO <---is a letter not a number

    Hopefully that helps get you going.

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


    --
    25 Jun 2014 09:11 AM
    Thank you Adam,

    I managed to establish serial communication with my sensor and to send a project via Ethernet.

    I just have one last problem :
    My executable file is transferred but I can not run it. I also tried to transfer the source code but I can not compile on the board.

    Do you have any idea how could I do it?
    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    25 Jun 2014 09:16 AM
    The source code must be compiled on the host PC using the cross-compiler.

    If your makefile is calling gcc, change it call the cross-compiler, arm-none-linux-gnueabi-gcc


    arm-none-linux-gnueabi-gcc that is distributed with the virtual machine image for the BSP should know how to compile against the correct Kernel.

    -adam

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


    --
    25 Jun 2014 09:29 AM
    Thank you for all.
    It works perfectly.
    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    25 Jun 2014 09:30 AM
    I am glad I could help. :-)


    -adam
    You are not authorized to post a reply.