Lincoln-60 Manual/Getting Started
From Manuals
Steps to Getting Started
Getting started with the Lincoln 60/60E can be done in just 6 steps.
- 1. Run the Preloaded Application
- 2. Install the Lincoln Code Examples
- 3. Choose a Compiler and IDE (Integrated Development Environment)
- 4. Install the Chosen Compiler and IDE
- 5. Compile a Code Example
- 6. Downloading Code Example to the Eagle 50/50E
Running the Preloaded Firmware
The Lincoln 60E and Lincoln 60 come from the factory preloaded with applications. The Lincoln 60E has an Ethernet application called emac_uip that demonstrates a web-based interface. The Lincoln 60 has a micro SD card application called sd_card that demonstrates accessing a micro SD card through a serial command line. The full source code for both applications is provided on the Lincoln Tools Disk. The preloaded applications should be run to test the board after receiving it.
Lincoln 60E emac_uip Application
The Lincoln 60E SBC is shipped with the emac_uip example application that demonstrates a web-based interface using the Ethernet controller and the uIP TCP/IP Stack. DHCP is used to obtain an Ethernet address. Figure 2.1 shows the web page that will first be displayed.
In order to demonstrate this application on an Lincoln 60E without the optional USB Debug Port you will need the following software and equipment:
- 1. A Personal Computer (PC) with a serial port or a USB to serial port adapter
- 2. A DB9 to 2x5 adapter cable
- 3. A null modem cable
- 4. A terminal program such as Putty, HyperTerminal, or TeraTerm
- 5. A web browser
- 6. One Ethernet cable
- 7. One +5V power supply
Please follow these steps to run the emac_uip application on an Lincoln 60E without the optional USB Debug Port:
- 1. Make sure JP1 is set to JCK.
- 2. Connect the Lincoln 60Es COM1 port to the PC by using the 2x5 adapter cable and the null modem cable.
- 3. Connect the Lincoln 60Es Ethernet port to an Ethernet Network.
- 4. Start and set-up the terminal program with the following settings.
- a. Baudrate – 115200
- b. Data Bits – 8
- c. Parity – None
- d. Stop Bits – 1
- e. Flow Control – None
- 5. Apply power to the board.
- 6. The Lincoln 60E will transmit the boards IP address to the terminal
- 7. Open a web browser.
- 8. Type the IP address into the web browsers address bar and the web page in Figure 2.1 should load.
In order to demonstrate the emac_uip application on an Lincoln 60E with the optional USB Debug Port you will need the following software and equipment:
- 1. A Personal Computer (PC) with a USB port
- 2. A terminal program such as Putty, HyperTerminal, or TeraTerm
- 3. A web browser
- 4. One USB A to 1x5 female header (Supplied with Lincoln 60E with USB Debug Port)
- 5. One Ethernet cable
Please follow these steps to run the emac_uip application on an Lincoln 60E with the optional USB Debug Port:
- 1. Make sure JP1 is set to DBG.
- 2. Make sure JP3 and JP4 are set on pins 2 and 3 (FTDI).
- 3. Connect the Lincoln 60Es Ethernet port to an Ethernet Network.
- 4. Connect the Lincoln 60E to the PC by using the USB A to 1x5 female header.
- 5. Wait until the USB drivers have been installed. The USB drivers can be found on the Lincoln Tools Disk.
- 6. Find out what COM port the Lincoln 60E is by looking in Windows Device Manager’s PORTS (COM & LPT). The Lincoln 60Es COM port is the one that says Micromint Virtual COM Port.
- 7. Start and set-up the terminal program for the COM port that the Lincoln 60E is on and with the following settings.
- a. Baudrate – 115200
- b. Data Bits – 8
- c. Parity – None
- d. Stop Bits – 1
- e. Flow Control – None
- 8. Press the Reset button.
- 9. The Lincoln 60E will transmit the boards IP address to the terminal.
- 10. Open a web browser.
- 11. Type the IP address into the web browsers address bar and the web page in Figure 2.1 should load.
Lincoln 60 sd_card Application
The Lincoln 60 SBC is shipped with the sd_card example application from the NXP CMSIS Library. This example application demonstrates reading a file system from a micro SD card. It makes use of FatFs, a FAT file system driver. The application provides a simple command console via the Lincoln 60’s COM1 serial port for issuing commands to view and navigate the file system on the SD card. Figure 2.2 shows what is displayed on a terminal program when the application is run.
In order to demonstrate the sd_card application on an Lincoln 60 without the optional USB Debug Port you will need the following software and equipment:
- 1. A Personal Computer (PC) with a serial port or a USB to serial port adapter
- 2. A DB9 to 2x5 adapter cable
- 3. A null modem cable
- 4. A terminal program such as Putty, HyperTerminal, or TeraTerm
- 5. One micro SD card
- 6. One +5V power supply
Please follow these steps to run the sd_card application on an Lincoln 60 without the optional USB Debug Port:
- 1. Make sure JP1 is set to JCK.
- 2. Connect the Lincoln 60s COM1 port to the PC by using the 2x5 adapter cable and the null modem cable.
- 3. Start and set-up the terminal program with the following settings.
- a. Baudrate – 115200
- b. Data Bits – 8
- c. Parity – None
- d. Stop Bits – 1
- e. Flow Control – None
- 4. Insert the micro SD card into the micro SD socket on the Lincoln 60.
- 5. Apply power to the board.
- 6. Please refer to Figure 2.2 to see what the Lincoln 60 will transmit the terminal.
- 7. Type "?" then press enter for the command list.
In order to demonstrate the sd_card application on an Lincoln 60 with the optional USB Debug Port you will need the following software and equipment:
- 1. A Personal Computer (PC) with a USB port
- 2. A terminal program such as Putty, HyperTerminal, or TeraTerm
- 3. One USB A to 1x5 header cable (Supplied with Lincoln 60E with USB Debug Port)
- 4. One micro SD card
Please follow these steps to run the sd_card application on an Lincoln 60 with the optional USB Debug Port:
- 1. Make sure JP1 is set to JCK.
- 2. Make sure JP3 and JP4 are set on pins 2 and 3 (FTDI).
- 3. Connect the Lincoln 60 to the PC by using the USB A to 1x5 header cable.
- 4. Wait until the USB drivers have been installed. The USB drivers can be found on the Lincoln Tools Disk.
- 5. Find out what COM port the Lincoln 60 is by looking in Windows Device Manager’s PORTS (COM & LPT). The Lincoln 60Es COM port is the one that says Micromint Virtual COM Port.
- 6. Start and set-up the terminal program for the COM port that the Lincoln 60 is on and with the following settings.
- a. Baudrate – 115200
- b. Data Bits – 8
- c. Parity – None
- d. Stop Bits – 1
- e. Flow Control – None
- 7. Press the Reset button.
- 8. Please refer to Figure 2.2 to see what the Lincoln 60 will transmit the terminal.
- 9. Type "?" then press enter for the command list.
Install the Lincoln Code Examples
The Lincoln Code Examples are generated from CMSIS and may be downloaded from the Software Updates section of the Software Updates Updates section of the Lincoln Wiki. After they are downloaded unzip them into a directory of your choice. Descriptions of the examples can be viewed on the Eagle Examples Page.
Choose a Compiler and IDE (Integrated Development Environment)
Choosing a Compiler
The Code Examples currently supports the following C and C++ compilers :
- IAR Embedded Workbench for ARM (ewarm) 5.40
- GNU Toolchain (gcc) for ARM 4.4.1 – CodeSourcery G++ 2010q1
- GNU Toolchain (gcc) for ARM 4.4.3 – devkitARM 30
The IAR EWARM C/C++ compiler generally produces the smallest code sizes for ARM targets and has excellent integrated debugging capabilities versus the GNU Toolchain. If a GNU chain is used then an IDE needs to be chosen.
Choosing an IDE
An IDE installs when the IAR C/C++ Compiler is installed where the GNU tool chains do not install one. Code::Blocks IDE and the Eclipse IDE are the IDEs currently supported by the Code Examples. Debugging is currently not supported in the Code::Blocks IDE. If a debug environment is needed the Eclipse IDE should be use.
Install the Chosen Compiler and IDE
Installing EWARM
The IAR EWARM Kickstart Edition is a 32 KB code-sized limited version of the IAR C/C++ compiler and debugger. It can be downloaded from IAR's website.
After downloading the EWARM-KS-CD click on the application to install the IAR Embedded Workbench for ARM. Select the “Install IAR Embedded Workbench” option from the Applications main menu as shown in Figure 2.4. Follow the instructions in the installation application. We suggest that you use the default directories, and the “Full” installation option.
Installing a GNU Compiler and IDE
The Code Examples currently support two GNU tool chains:
- GNU Toolchain (gcc) for ARM 4.4.1 – EABI CodeSourcery G++ Lite 2010q1
- GNU Toolchain (gcc) for ARM 4.4.3 – devkitARM 30
Installing the Sourcery CodeBench Lite Edition for ARM EABI GNU Compiler
Download the Sourcery G++ Lite 2010q1 for ARM EABI version of Sourcery CodeBench Lite Edition for ARM from Mentor Graphics website. When it is finished downloading click on the application to install it and a screen similar to Figure 2.5 should appear. We suggest that you use the default directories during the installation.
If make is not installed on the computer then perform the following steps:
- 1. Open a command prompt
- 2. Type "cd\program files\codesourcery\sourcery g++ lite\bin"
- 3. Press enter
- 4. Type "copy cs-make.exe make.exe"
- 5. Press enter
Installing the devkitARM GNU Compiler
Installing the devkitARM GNU Compiler can be done in 6 steps.
- 1. Download the devkitARM compiler from the sourceforge website by clickin the following link: http://sourceforge.net/projects/devkitpro/files/devkitARM/
- 2. Create a folder called devkitPro on the C drive.
- 3. Extract the contents into the "C:\devkitPro" folder. It should create a folder called "devkitARM".
- 4. Download the msystools from the sourceforge website by clicking the following link: http://sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/msys-1.0.10/MSYS-1.0.10.exe/download
- 5. Run the msystools installer.
Installing the Eclipse IDE
Eclipse is a Java application and has the potential to be run on a wide variety of hardware and operating systems. Eclipse may install on systems with as little as 64MB of memory, however, we recommend to have 1GB of memory or more.
Follow these steps to install the Eclipse IDE:
- 1. Install the desired GNU ARM Toolchain (EABI CodeSourcery G++ Lite 2010q1 or devkitARM 30).
- 2. Be sure the Java Runtime Environment (JRE) is installed.
- 3. The Eclipse SDK includes the Eclipse Platform is provided as an archive and can be downloaded on the following website: http://www.eclipse.org/cdt/downloads.php
- 4. Extract the Eclipse SDK to its desired directory (commonly ‘C:\Program Files\’).
- 5. Start Eclipse by double clicking on the "eclipse.exe" file where the Eclipse SDK was extracted to.
- 6. Select the workspace directory. "StellarisWare\boards\eagle" for the Eagle and "Lincoln\CMSIS\projects" for the Lincoln.
- 7. Click on the "Help" drop down menu and select "Install new software…".
- 8. Expand "CDT Main Features" and check "Eclipse C/C++ Development Tools"
- 9. Click the "Next" button.
- 10. Copy http://opensource.zylin.com/zylincdt and paste it into the "Work with:" box.
- 11. Click the "Add" button.
- 12. Check "Zylin Embedded CDT".
- 13. Click the "Next" button.
- 14. Copy http://sourceforge.net/projects/gnuarmeclipse/files/Eclipse/updates/ and paste it into the "Work with:" box.
- 15. Click the "Add" button.
- 16. Check "CDT GNU Cross Development Tools".
- 17. Click the "Next" button.
Installing the CodeBlocks IDE
Codeblocks is a cross-platform IDE built around wxWidgets, designed to be extensible and configurable. It can be downloaded from the Codeblocks website by clicking the following link: http://www.codeblocks.org/downloads
Install Codeblocks by clicking on the downloaded executable.
Compile a Code Example
Compiling Applications with EWARM
To load the CMSIS workspace open the IAR IDE then "File>Open>Workspace" and browse to "%USERPROFILE%\Projects\Micromint\Lincoln" and select the "lincoln.eww" file. A screen similar to that in Figure 2.5 should load. Select the Blinky project by clicking on the drop down menu. Be sure to select the board that you are using. In the case of Figure 2.5 the Lincoln 60E was being used. To rebuild the project select the "Make" button on the toolbar. You can also right click on the project name to select "Make" or "Rebuild". This will build a binary (.BIN) image file in the "%USERPROFILE%\Projects\Micromint\Lincoln\CMSIS\projects\blinky\lincoln-all\ewarm\Exe" directory of the project. To load the application on the board please see the Firmware Download Procedures section in this manual. If the build and download is successful, the user LED on the Lincoln SBC will start blinking.
Compiling Applications with the GNU Toolchain
To load the CMSIS workspace in the Eclipse IDE, select the workspace on the "%USERPROFILE%\My Documents\Projects\Micromint\Lincoln\CMSIS\projects" subdirectory when Eclipse IDE starts. You will see a screen similar to that on Figure 2.6. Select the Blinky project by right clicking the project name and selecting "Open Project". The first time the Lincoln BSP is installed the files need to be refreshed. To refresh the files just simply press F5. The default compiler for the Lincoln BSP is Sourcery G++ Lite. If you installed devkitARM instead then the compiler will have to be switched. To change the compiler to devkitARM click on "Window>Preferences>C/C++>Build>Environtment" and add a variable called "COMPILER" with the value set to "devkitARM". This will have to be done on all of the example projects. To build the project select the "build" button on the toolbar. You can also right click on the project name to select "Build" . This will build a binary (.BIN) image file in the "board type\gcc\" directory of the project. For example the binary for the blinky project using the Lincoln 60E is in the "%USERPROFILE%\Projects\Micromint\Lincoln\CMSIS\projects\blinky\lincoln-all\gcc" directory if the Lincoln BSP was installed in the default directory. To load the application on the board please see the Firmware Download Procedures section in this manual. If the build and download is successful, the user LED on the Lincoln SBC will start blinking.
Compiling Applications with the GNU Toolchain from the Command Line
All example programs include a Makefile that allows you to build binary images from the command line using the GNU toolchain. The GNU "make" utility is installed as part of the GNU toolchain on the Lincoln Tools Disk. To build an image using the command line, just change to the project directory and execute "make". To build the image for blinky you would perform the following:
- 1. Open a command prompt.
- 2. Type "cd %USERPROFILE%\Projects\Micromint\Lincoln\CMSIS\projects\blinky".
- 3. Press "Enter".
- 4. Type "make".
- 5. Press "Enter".
Downloading Code Examples to the Eagle 50/50E
There are several options to download firmware to the Lincoln SBC. This section covers firmware downloads using a J-Link debugger or a USB Debugger. The method used to download firmware will depend on what hardware is being used.
Downloading Code Examples using EWARM
To use the J-Link debugger with IAR EWARM, select Projects> Options> Debugger with the project name selected in the workspace. On the "Setup" tab select "J-Link/J-Trace" as the driver and "main" as the location to run to. On the Download tab make sure that "Use flash loader(s) is checked. Click OK to save the settings. Then select the "Download and debug" button on the toolbar and then the "Go" button to execute. To use the USB debugger with IAR EWARM, select Projects> Options> Debugger with the project name selected in the workspace. On the "Setup" tab select "GDB Server" as the driver and "main" as the location to run to. On the Download tab make sure that "Use flash loader(s)" is checked. Click OK to save the settings. Then select the "Download and debug" button on the toolbar and then the "Go" button to execute.
Downloading Code Examples using Flash Magic
The Lincoln 60 and Lincoln 60E can be used with the Flash Magic software to program the board. This software can be downloaded from http://www.flashmagictool.com/. After installing it, select Programs> Flash Magic> Flash Magic from your Windows Start menu. Go to the "Setup" tab to see a screen similar to that in Figure 2.7. On "Device" select "LPC1769". Set the baudrate to 115200 bps, ISP interface and 12 MHz oscillator.
The application's HEX file can be downloaded using the FlashMagic using the optional USB Debugger by following these steps:
- 1. Select the COM port that corresponds to the USB Debugger
- 2. Make sure JP3 and JP4 are set to pins 2 and 3
- 3. Browse for the hex file that will be programmed into the Lincoln 60
- 4. Press and hold the 'USER' button on the Lincoln 60
- 5. Press and release the 'RESET' button on the Lincoln 60
- 6. Release the 'USER' button.
- 7. Click the "Start" button on Flash Magic
- 8. Press and release the 'RESET' button on the Lincoln 60 to start running the application
The application's HEX file can be downloaded using the FlashMagic using COM1 by following these steps:
- 1. Select the COM port that corresponds to the one connected to COM1
- 2. Make sure JP3 and JP4 are set to pins 1 and 2
- 3. Browse for the hex file that will be programmed into the Lincoln 60
- 4. Press and hold the 'USER' button on the Lincoln 60
- 5. Press and release the 'RESET' button on the Lincoln 60
- 6. Release the 'USER' button.
- 7. Click the "Start" button on Flash Magic
- 8. Press and release the 'RESET' button on the Lincoln 60 to start running the application











