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 13 Jul 2007 12:49 AM by  arjun.kv@7lf-tech.com
Write Sample Application
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
arjun.kv@7lf-tech.com
New Member
New Member
Posts:


--
11 Jul 2007 11:29 PM
    Hi All,

    We want to build a sample application something like an led flasher. Can somebody tell us how to compile and build the code. Also tell us what tool chain we need to use for i.Mx31 Litekit. And if somebody has done it already please tell us the procedure you followed.

    Thanks
    Arjun
    TimJohns
    New Member
    New Member
    Posts:


    --
    12 Jul 2007 11:35 AM
    For compiling/linking building, I use the CodeSourcery Lite Toolchain http://www.codesourcery.com/gnu_toolchains/arm/ on Windows. Similar GNU cross-compiler environments exist for Linux.

    For debugging, I use a Realview-ICE and the Realview Debugger, which, along with ARM semihosting, this toolchain and the standard libraries that it comes with makes a VERY nice stand-alone environment. The libraries with the CSL tools works with the semihosting to support things like printf, memory allocation, etc. so "Hello World" basically just ran (output to the Realview Debugger). I just had to configure the Realview tools for the memory map.

    The Realview tools are pricy, but for the project I was working on at the time, turned out to be very well worth it. The time I saved easily paid for the tools. There are probably several other tools for debugging, and perhaps some much less expensive, but my previous experience with the ARM stuff was good so I went with them and everything turned out very well.
    arjun.kv@7lf-tech.com
    New Member
    New Member
    Posts:


    --
    13 Jul 2007 12:49 AM
    We wrote a simple c code to flash the GPIO LED's on the board.
    Compiled the code with the arm-none-linux-gnueabi-gcc-4.1.1 compiler.
    Loaded the a.out file as below and we are getting the exception as below.
    On the board we can see that one of the LED's is always on and the other is off.
    We are also getting the same error for any program we are running like just printing hello world.


    losh> load raw 0x800c0010 5056 /tftp/192.168.0.3:led2.out
    loading from /tftp/192.168.0.3:led2.out:
    loading raw binary to 0x800c0010 (ram) len 000013c0:
    ....done
    file loaded
    losh> jump 0x800c0010
    jumping to: 0x800c0010...

    Unhandled Exception:
    exception mode: super
    r00: 00000000 r01: 800543d8 r02: 00005851 r03: 00005088
    r04: 8005cd34 r05: 00000000 r06: 8005cd34 r07: 00000000
    r08: 800342c0 r09: 00000000 r10: 8005c85c r11: 8005c84c
    r12: 8005c838 sp: 8005c838 lr: 000001d3 pc: 800c01c0
    spsr:00000153 cpsr:000001d3
    bt: sp: 8005c784 (stack: 80058cbc - 8005ccbc)
    0: fp:8005c7ac + 40 80000804() called from: 800034dc
    1: fp:8005c7c4 + 20 80003498() called from: 80000b04
    2: fp:8005c7d8 + 16 80000964() called from: 80001560
    3: fp:8005c7ec + 16 80001540() called from: 800006fc
    4: fp:8005c84c + 92 8000c258() called from: 800061c0
    5: fp:8005c8cc + 124 80005edc() called from: 80007024
    6: fp:8005c908 + 56 80006f28() called from: 80005938
    7: fp:8005c92c + 32 80005908() called from: 8002d37c
    8: fp:8005cc5c + 812 8002cf88() called from: 80005b98
    9: fp:8005cc84 + 36 800059dc() called from: 80005e24
    10: fp:8005cca0 + 24 80005cd8() called from: 80003d70
    11: fp:8005ccb8 + 20 80003d44() called from: 80003d44
    (fp:8005ccb8->8005c768, sp:8005ccbc)


    Can somebody tell us where we are going wrong?


    Thanks
    You are not authorized to post a reply.