Open Source, Embedded Systems, Computer Vision, Computational Photography, Self-Improvement
Tuesday, June 25, 2013
Friday, November 2, 2012
Embedded Artists LPC2103
Some resources for using the Embedded Artists LPC2103 educational board.
- Product Description Page http://www.embeddedartists.com/products/education/edu_2103.php
- User manual http://www.zsk.p.lodz.pl/~morawski/SCR&ES/Guides&Schematics/LPC2103_Education_Board_Users_Guide-Rev_B.pdf
- QuickStart Program Development User’s Guide http://www.zsk.p.lodz.pl/~morawski/SCR&ES/Guides&Schematics/QuickStart_Program_Development_Users_Guide-Version_1.0_Rev_A.pdf
- Board Schematics http://www.zsk.p.lodz.pl/~morawski/SCR&ES/Guides&Schematics/edu_lpc2103_baseboardSchematic_v1_1.pdf
- LPC2103 Christmas Tree flyer http://www.zsk.p.lodz.pl/~morawski/SCR&ES/Guides&Schematics/Christmas_Tree_Box_Flyer_v1_2.pdf
- Experiment Expansion Board User's Guide http://www.zsk.p.lodz.pl/~morawski/SCR&ES/Guides&Schematics/Experiment_Expansion_Board_Users_Guide-Rev_A.pdf
- Tutorial on using GPIO and LEDs http://only.mawhrin.net/~alexey/prg/lpc2103/tutorial-GPIO/
Monday, October 29, 2012
Prepare GNUARM compiler toolchain for Windows
Copied verbatim from http://winarm.scienceprog.com/winarm-tools/prepare-gnuarm-compiler-toolchain-for-windows.html
Look at the date. I'll update and modify this posting when/if I get around to it.
Look at the date. I'll update and modify this posting when/if I get around to it.
Prepare GNUARM compiler toolchain for Windows
Submitted by admin on Wed, 11/08/2006 - 11:36
GNUARM is a toolchain for developing ARM microcontroller projects based on open source compiler GCC.

GNUARM works on windows (requires Cygwin), Linux and MacOS. GNUARM doesn't have any GUI, but you can adapt any GUI that supports commands from command line. One of good project is WinARM where you get all tools needed in one package. Thiswill be discussed later.
GNUARM package consists of the GNU binutils, GCC compiler set and debugger (Insight for Windows and Linux, GDB only for MacOS). Newlib is used for the C library. With GNUARM yo uhave ability compile C and C++ programs.
Let's set up toolchain for windows environment. First of all download compiled toolset fromhttp://www.gnuarm.com:
Download the newest GNUARM stabile compilation:
Then start installation:
- Start window:
- Accept license agreement:

- Select folder where do you want GNUARM to be installed. I recommend to select C:/GNUARM:
- Select the components. You can select all of them:
- Chose Start menu folder name:

- Select desktop shortcut to be placed. I highly recommend to check Cygwin DLL:

- And press install..
- Select checkbox in order to create system variable: PATH=c:\gnuarm\bin:
After we have GNUARM installed, download binutils from http://optimize.ath.cx/ARM7/src/utils.zip. Download this archive and unpack all contents to c:\gnuarm\bin folder. Also You can downloadhttp://optimize.ath.cx/ARM7/src/cygncurses-8.dll and put it in c:\gnuarm\bin folder if there is no any. Now we are ready to start building projects.
Lets try some test compilation. Just example download LPC2214 project package fromhttp://optimize.ath.cx/ARM7/src/lpc2214_blink.zip and extract in any folder. In the package you’ll find following files:
- lpc2214.h LPC2214 header. You can also download header files from www.gnuarm.com
- blink.c LED blink example routine.
- boot.s The startup routine which is first executed after the CPU is reset. After it main function is called.
- Makfile makefile
- lpc2214-rom.ld The script file which used by linker. The start address size and the ROM/RAM is described. If there is needed - ROM binary is built.
- setenv.cmd Configuration file, where you have to show path to C:\GNUARM\bin and bin C:\GNUARM\bin\utils
- jtag_flash.exe The tool, which writes the flash by JTAG and executes on demand.
- jtag_stub.exe The JTAG debugger for GDB/Insight.
Because setenv.cmd is used to show path to C: when GCC is installed in different location, you have to edit it. If you left default settings, then don’t edit this file.
Lets try to compile this program. Start DOS console window (Start->Run and type CMD):
Lets try to compile this program. Start DOS console window (Start->Run and type CMD):
Lets compile project to hex file. Leave make file not edited as it is ready for this. So I will have to use commands: make and once again make hex.
That’s it hex is built and placed in project directory. It can be uploaded ARM MCU.
Here is a table with most common make commands:
Command Target (function)
- Make Compiling, linking and forming the elf file;
- Make clean Clearing compiled o, lst, elf, hex and bin files;
- Make hex forming the hex file;
- Make bin forming Bin file;
- Make lst Listing (assembling) file formation;
- Make run Compiling, linking and it writing in to the flash after this execution starts;
- Make debug Compiling, linking and writing in to the flash after building start Insight/GDB.
So if you already have programmer adapter connected, you can flash you ARM microcontroller with only one command - make run.
Saturday, October 13, 2012
Flashing an ARM7 Board with USB-to-Serial Converter
A simple flashing method for UNO32 (data dump via UART0)
This document will show you how to use the UART0 of the UNO32 to perform some simple flashing.
As the UART0 is used for ISP download at NXP chip, UART0 will reserved for those application that don't need two UART and don't need all GPIO.
Setup
At UNO32 development, your development PC will connect to UNO32 via the on-board USB to Serial adapter at most time, to download your code to UNO32. So, the idea is we use this already connected channel to dump some information to help us to debug our program. Below is the block diagram.

The USB connection will form a virtual Serial port at the PC, the actual UART signal is connected to the MCU's ISP port. To perform ISP, there are four signals used.
1) TXD (PC to MCU, for data transfer)
2) RXD (MCU to PC, for data transfer)
3) DTR (PC to MCU, to reset MCU)
4) RTS (PC to MCU, connected to ISP pin)
When programming MCU, the FlashMagic will control the DTR and RTS to make the MCU enter ISP mode. Then use TXD/RXD to transfer data.
If we want to use this Serial port, we need to make the correct state on DTR and RTS. Otherwise, the MCU cannot enter your code correctly.
Basically, any PC serial terminal program that has a function for you to control DTR/RTS can do the job. For myself, I use Termite to do it. So, I just show you how to config Termite here.

At the port config, select the port of the Virtual Serial port created by UNO32. The rest is show above (115200 N81). Then, at the Plug-ins, enable the Status LEDs. This will make Termite display all line status as a LEDs, and you can control RTS/DTR by click their LED.
Click [OK] to leave the port setting, you will connected to UNO32 and see those LEDs. To make the UNO32 not enter ISP, you need to turn off RTS all the time. For DTR, turn it on will reset the MCU. So, I will turn the DTR on, then off once to reset UNO32 to enter my code. When I need to download a new code, click the top-left button to release the Serial port. After download, click it again to get the port.

Here is the procedures
1) Use FlashMagic to download you code.
2) Use Termite get the serial port. Then reset the UNO32 via the DTR LED and test my code.
3) Modify my code and genertate a new HEX.
4) Release port at Termite.
5) Repeat step 1 until my code work.
Reference:
Monday, August 13, 2012
Install SystemC 2.3.0 in Mint 13/Fedora
Thanks to these tips from http://archive.pfb.no/2010/10/13/systemc-ubuntu-1010/ and http://noxim.sourceforge.net/pub/Noxim_User_Guide.pdf.
Begin borrowed material
Step 0: Prepare.
Obviously, you need to have a compiler. Do this step in case you haven't done so.
$ sudo apt-get install build-essential
Step 1: Download.
Next: register, and download from http://www.systemc.org using your Web browser then unpack it....but the tgz file has wrong extension. Do these steps to unpack the file:
$ mv systemc-2.2.0.tgz systemc-2.3.0.tar $ tar xvf systemc-2.3.0.tar
In any case, create a build directory and enter into it for the following steps:
$ cd systemc-2.3.0 $ sudo mkdir /usr/local/systemc $ mkdir objdir $ cd objdir $ export CXX=g++ $ sudo ../configure --prefix=/usr/local/systemc CPPFLAGS=-fpermissive
Step 2: Compile
$ make $ sudo make install $ make check $ cd .. $ rm -rf objdir
The command make check is optional. What is does is to compile SystemC source files to see if the files can run. I strongly suggest that you run it.
Step 3: Tell your compiler where to find SystemC
Since we do not install SystemC with a standard location we need to specifically tell the compiler where to look for the libraries. We do this with an environment variable.
$ export SYSTEMC=/usr/local/systemc/
This, however will disappear on the next login. To permanently add it to your environment, alter ~/.profile or ~/.bash_profile if it exists. For system wide changes, edit /etc/environment. (newline with expression: SYSTEMC_HOME=”/usr/local/systemc/“) To compile a systemC program simply use this expression:
$ g++ -I. -I$SYSTEMC/include -L. -L$SYSTEMC/lib-linux -o OUTFILE INPUT.cpp -lsystemc -lm
End borrowed/adapted material
HOWEVER, version 2.3.0 is not really ready. Any problems...you're on your own, since it's so new. That's why I'm back at 2.2.0.
Saturday, August 11, 2012
PowerPC RAD750 chip at the heart of the Curiosity
http://news.cnet.com/8301-11386_3-57491281-76/slow-but-rugged-curiositys-computer-was-built-for-mars/
More info at BAE Systems.
The RAD6000 computer built by BAE systems runs on PowerPC.
The actual chip.
Subscribe to:
Posts (Atom)