Assignment 09. Problem statement : Write a Embedded C program to switch-on/switch-off LED.



Similar documents
Introduction to the use of the environment of Microsoft Visual Studio 2008

Using the TASKING Software Platform for AURIX

Code::Block manual. for CS101x course. Department of Computer Science and Engineering Indian Institute of Technology - Bombay Mumbai

Quick Start Tutorial. Using the TASKING* Software Development Tools with the Intel 8x930 Family Evaluation Board

Lab 5 Using Remote Worklight Server

An Introduction to MPLAB Integrated Development Environment

Getting Started with Embedded System Development using MicroBlaze processor & Spartan-3A FPGAs. MicroBlaze

3. Programming the STM32F4-Discovery

CooCox CoIDE UserGuide Version: page 1. Free ARM Cortex M3 and Cortex M0 IDE: CooCox CoIDE UserGuide

EMBEDDED C USING CODEWARRIOR Getting Started Manual

Hitchhiker's Guide to CodeWarrior EE371, EE475 Fall 2005

Appendix K Introduction to Microsoft Visual C++ 6.0

MS Visual C++ Introduction. Quick Introduction. A1 Visual C++

Beginner s Matlab Tutorial

Introduction to Eclipse

Start A New Project with Keil Microcontroller Development Kit Version 5 and Freescale FRDM-KL25Z

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

32-bit AVR UC3 Microcontrollers. 32-bit AtmelAVR Application Note. AVR32769: How to Compile the standalone AVR32 Software Framework in AVR32 Studio V2

Installation of IR under Windows Server 2008

Developing an Application on Core8051s IP-Based Embedded Processor System Using Firmware Catalog Drivers. User s Guide

Note: With v3.2, the DocuSign Fetch application was renamed DocuSign Retrieve.

Stellar Phoenix Exchange Server Backup

DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB

Using an Automatic Back Up for Outlook 2003 and Outlook 2007 Personal Folders

Quick Start Tutorial. Presentation Tutorial for a Quick Start Handson Session: Creating a simple Project using PWM and Count Apps.

Getting Started with Kinetis SDK (KSDK)

CodeWarrior Development Studio for Freescale S12(X) Microcontrollers Quick Start

1. To ensure the appropriate level of security, you will need Microsoft Windows XP or above.

Andreas Burghart 6 October 2014 v1.0

Before you can use the Duke Ambient environment to start working on your projects or

Installing the Android SDK

TUTORIAL ECLIPSE CLASSIC VERSION: ON SETTING UP OPENERP 6.1 SOURCE CODE UNDER WINDOWS PLATFORM. by Pir Khurram Rashdi

Using Microsoft Visual Studio API Reference

How to Setup and Connect to an FTP Server Using FileZilla. Part I: Setting up the server

Introduction to Android Development

SecureAware on IIS8 on Windows Server 2008/- 12 R2-64bit

Fusion. User s Guide: Updating the Fusion s Image

Developing an Application for the i.mx Devices on the Linux Platform

Deposit Direct. Getting Started Guide

Instructions for Configuring a SAS Metadata Server for Use with JMP Clinical

Contents. Using Web Access Managing Shared Folders Managing Account Settings Index... 39

SoundLAB Software Download Software from the Bogen website:

WA1826 Designing Cloud Computing Solutions. Classroom Setup Guide. Web Age Solutions Inc. Copyright Web Age Solutions Inc. 1

Building an Embedded Processor System on a Xilinx Zync FPGA (Profiling): A Tutorial

MPLAB C18 C Compiler

How do I Configure, Enable, and Schedule Reports?

WA2262 Applied Data Science and Big Data Analytics Boot Camp for Business Analysts. Classroom Setup Guide. Web Age Solutions Inc.

Communicating with Skype for Business

Zynq-7000 Platform Software Development Using the ARM DS-5 Toolchain Authors: Simon George and Prushothaman Palanichamy

COGNOS REPORTING SYSTEM USER GUIDE

Using a USB Flash Drive to Back Up Your Data Files on a Mac Computer

SubCue Analyzer Software - Introduction

10 STEPS TO YOUR FIRST QNX PROGRAM. QUICKSTART GUIDE Second Edition

Rational Application Developer v7.0 (RAD7) trial version. Installation guide

Using Karel with Eclipse

Freescale Semiconductor, I

Cosmic Board for phycore AM335x System on Module and Carrier Board. Application Development User Manual

Create a PDF File. Tip. In this lesson, you will learn how to:

Lesson 1 - Creating a Project

Q N X S O F T W A R E D E V E L O P M E N T P L A T F O R M v Steps to Developing a QNX Program Quickstart Guide

Microsoft Visual Studio 2010 Instructions For C Programs

Using Windows CE Applications in the Pathfinder

5.4.8 Optional Lab: Managing System Files with Built-in Utilities in Windows 7

SQL Server 2005: Report Builder

Setting up Auto Import/Export for Version 7

FLASH PROCEDURE for GSM BENTEL and DSC cards


PhoneCrypt Desktop. Phone Encryption Software. PhoneCrypt Manual Mobile phone encryption for Windows Platforms

ACTIVE DIRECTORY DEPLOYMENT

BulkSMS Text Messenger Product Manual

Nios II IDE Help System

Previewing & Publishing

XStream Remote Control: Configuring DCOM Connectivity

Using HiTOP with the HOT16x Hands-On Training Materials

PaperStream Connect. Setup Guide. Version Copyright Fujitsu

AVR Butterfly Training. Atmel Norway, AVR Applications Group

UM0985 User manual. Developing your STM32VLDISCOVERY application using the IAR Embedded Workbench software. Introduction

Guide to PDF Publishing

Crop and Frame Your Photos

SIM900 Eclipse environment install Application Note_V1.00

For paid computer support call

Using SSH Secure Shell Client for FTP

Troubleshooting Guide

Using Example Projects, Code and Scripts to Jump-Start Customers With Code Composer Studio 2.0

Windows Live Mail Setup Guide

How to Install Eclipse. Windows

Turning Off Pop-Up Blockers

Microcontroller Systems. ELET 3232 Topic 8: Slot Machine Example

Building and Debugging a project using Keil MDK-ARM Eclipse plug-in

UM1727 User manual. Getting started with STM32 Nucleo board software development tools. Introduction

Mini Amazing Box Update for Windows XP with Microsoft Service Pack 2

Using WINK to create custom animated tutorials

Installing a printer in Windows 95.

CM HOST CM CardTransporter Fuel Communication and Management Software Software version up to 3.1

Vodafone Text Centre User Guide for Microsoft Outlook

Primavera Unifier v9.14 / 2014 EPPM Day Hands On Session Exercise Document

MSP-EXP430G2 LaunchPad Workshop

FrontDesk Installation And Configuration

TYPING IN ARABIC (WINDOWS XP)

Creating a Patch Management Dashboard with IT Analytics Hands-On Lab

Transcription:

Assignment 09 Problem statement : Write a Embedded C program to switch-on/switch-off LED. Learning Objective: -> To study embedded programming concepts -> To study LCD control functions -> How output is provided to different port Description: Let us assume that LED is connected at pin RD0. RD0 is a pin0 of port D. When RD0 is high LED become ON and when RD0 is low LED become OFF.This program toggle the LED connected at PORT D0. Code: #include<lpc2138.h> void delay(long); int main(void) { IO0DIR=0x007F8000; while(1) { IO0SET =0x00550000; IO0CLR = 0x002A8000; delay(70000); IO0CLR =0x00550000; IO0SET = 0x002A8000; delay(70000); } return 0; } void delay(long i) { while(i--); } # Steps For Creating A Demo Project in Eclipse This is the screen you will see in front of you when you double click the Eclipse icon on desktop. Step1 : Select the working perspective

First of all select the working perspective for providing the compilation environment to your project. Click on window >> Open Perspective >> C/C++ Step2 : Select the Project Type Now select the project type whether you want to compile it as a standard make C or managed make C project. For that, drop down the File menu >> open New >>select Project

And select the Standard Make C Project in the C drop down option and click next Now here is the window where you can give the name to your project.

Just type the name you want to give to your project but make sure the right path of the workspace being displayed and there is no other project having same name exists in that particular workspace. Otherwise it will prompt an error message and will not crate the project. If you want to change the workspace, just uncheck the Use default location and type the right path manually. Then click Next Then after, open the make builder window and check for the highlighted comments in displayed in yellow box. And click Finish Step3 : Adding / Importing Supporting files Soon after you finish up with the previous step, the following screen window will be exposed. Make sure it displays the name of your project as shown below. Before we start the actual compilation we will have to add / import some basic source files. Although they are specific to the respective projects but must be included (with little up gradations) to each new project, so as to specify memory initialization and MAKE ( sequential compilation arrangements ) commands.

Thus for that we will use the Import feature of CDT ( C Development Tools ). Now first highlight the project like shown below, and then.. Again open up the File drop-down list. Where, you will find the Import command (not shown in this picture). Select that feature and you will find the screen displayed as below. Here we will import the files from the general environment.

Now open the drop down menu for General >> Select File System >> click Next Then in the Import window click Browse to give the appropriate path where the demo project folder is located. As we had earlier added the demo project folder, we have to select the same path C:\GCCFD\Demo_Projects\demo_lpc2138_blink_flash And then click OK

Now when the demo project folder is selected, you can get a view of all files present in that folder. Among those, select the minimum required (or the basic) files which can be stated as follows: 1. Assembler Source File : crt.s Which contains the startup function (called in ld-script), Reset Handler function, and necessary interrupt vector functions ( if included) in a project. 2. Linker script file : $Project name$.cmd This contains, the memory mapping specific initialization instructions. 3. Make file : makefile.mak This contains the sequential compilation process instructions to be executed after every Build command. 4. C source code file : main.c This contains the basic source code file of the project. It s not always that we ve to import this file from another location. But because here we re creating a demo project so we ll have to take the file as it is. Otherwise when we create our different projects, this file will obviously be edited each time for the respective C source codes. Here the name

main is just a symbolic representation of our main C code. You can give any name as you want. 5. Respective Header File : lpcxxx.h Here we will just include the necessary header file specific to our target processor. We must import this file from appropriate location. Check the boxes in front of the files to be selected >> make sure the right name of your project is displayed in the Into Folder text box >> click Finish. Step4 : The Compilation Process Here we are in the actual compilation environment having all the files needed for the assembling, building and compilation process.

But before going into further steps, first make sure that all files you have selected earlier are included in the C/C++ window as shown marked. With those considerations, we begin the compilation process. Note that, each time you build or compile your code you should have to follow these process steps. Soon while you see the clean window, select (check) the check box in front of the project name >> click on OK Note: Here you can also have an option to automatically start the build just after cleaning the project environment. For that, select the check box for Start a build immediately

iii ) Repeat the step ii) this time for the Build All option

As the Build All command is executed the gcc compiler will run in background taking reference of the compilation commands specified in make file. The stepwise execution and the end result can be visible in the console window located at the bottom of the screen (as shown in the picture). Now here notice that, after the build (/ compile) some more files have been created in the C/C++ projects window. These are some of the output files which are required by the debugger to come into act. The files are main.bin : (required for the openocd utility to program the processor core) main.out : (required for the symbolic reference to be taken by GNUARM debugger) main.hex : (required for flash utility software to program the processor core)