Lincoln-60 Manual/Getting Started
From Manuals
Contents |
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.
Programming Language Support
After testing the board with the example application, you should become familiar with development tools used to take advantage of the board’s functionality. The Lincoln Board Support Package (BSP) includes examples to use the board functionality with several development tools. Currently the following compilers and programming languages are supported:
- 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 tools included in the disks shipped with the board include a kickstart version of the IAR Embedded Workbench for ARM and one of the GNU Toolchains for ARM. Project files are included to build C, Assembler and CMSIS applications with both the IAR and Eclipse IDEs.
The Lincoln Tools Disk includes tools and example applications to get you started with the Lincoln 60 SBC. The main menu is shown in Figure 2.3. For developing applications with the IAR Embedded Workbench for ARM please see section 2.3 of this manual. For developing applications with the GNU Toolchain please see section 2.4 of this manual.
Getting Started with the IAR Embedded Workbench for ARM (EWARM)
The IAR Kickstart CD installs a 32 KB code-sized limited version of the IAR C/C++ compiler and debugger. The IAR compiler generally produces the smallest code sizes for ARM targets and has excellent debugging capabilities.
Installing EWARM
To install the IAR Embedded Workbench for ARM insert the CD into the computers CD ROM drive. The CD should automatically start. Select the "Install IAR Embedded Workbench" option from the CDs 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 the Lincoln BSP
Insert the Lincoln Tools Disk in your computer. The disk should automatically start. Select the "C Tools" option from the disk main menu shown in Figure 2.3. Select the "Lincoln BSP" option from the disk’s Development Tools menu. Follow the instructions in the installation application. At minimum we suggest that the Code Examples, Flash Programmer, and Documentation be installed for developing applications with EWARM. We suggest installing them in the default directory of "%USERPROFILE%\Projects\Micromint\Lincoln\".
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.
Getting Started with the GNU Toolchain
The Lincoln Tools Disk has a GNU toolchain C compiler that can be used to compile applications for the Lincoln SBC. Eclipse is used as the IDE for the GNU compiler. The GNU toolchain tends to produce larger binaries than the IAR C/C++ compiler. When installing the GNU toolchain please install the GNU tool chain followed by the Eclipse IDE and finally the Lincoln BSP.
Installing the GNU Tool Chain
Open the Lincoln Tools Disk in your computer. The disk should automatically start. Select the "Development Tools" option from the disk Main Menu shown in Figure 2.3. Select the "GNU Toolchain" option from the disk’s Development Tools menu. Follow the instructions in the installation application.
Installing the Eclipse IDE
Select the "Eclipse IDE" option from the disk’s Development Tools menu. Follow the instructions in the installation application. We suggest installing the default install in the default directory of "C:\Program Files\Micromint\Tools\eclipse".
Installing the Lincoln BSP
Select the "Development Tools" option from the disk main menu shown in Figure 2.3. Select the "Lincoln BSP" option from the disk’s Development Tools menu. Follow the instructions in the installation application. At minimum we suggest that the Code Examples, Flash Programmer, and Documentation be installed for developing applications with the GNU toolchain. We suggest installing them in the default directory of "%USERPROFILE%\Projects\Micromint\Lincoln\".
Installing Sourcery G++ Lite
Select the "Development Tools" option from the disk main menu shown in Figure 2.3. Select the "Sourcery G++ Lite" option from the disk’s Development Tools menu. This will open a link on CodeSourcery.com where Sourcery G++ Lite can be downloaded. Select the EABI version and a new page will open. Click in the Select the IA32 Windows Installer and click "Run" when prompted. Follow the onscreen instructions.
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
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".
Firmware Download Procedures
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 Firmware 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 Firmware 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







