Line 6: Line 6:
 
=Downloads=
 
=Downloads=
 
[https://launchpad.net/gcc-arm-embedded ARM GCC]<br>
 
[https://launchpad.net/gcc-arm-embedded ARM GCC]<br>
[https://sourceforge.net/projects/winavr/files/]<br>
+
[https://sourceforge.net/projects/winavr/files/ WinAvr]<br>
 
[http://gnuwin32.sourceforge.net/packages/make.htm Make Utility]<br><br>
 
[http://gnuwin32.sourceforge.net/packages/make.htm Make Utility]<br><br>
 
  
 
=Setting Environment=
 
=Setting Environment=

Revision as of 18:33, 24 April 2016

In this tutorial we will see how to setup ARM GCC Tool Chain to generate .hex and .bin file for LPC1768. To start with you will require ARM GCC, winAvr and make utility, download all the software's from following links.


Downloads

ARM GCC
WinAvr
Make Utility

Setting Environment

  1. Once ARM GCC is downloaded install it on your machine. While installing do select the option Add path to environment variable as shown below


  1. To test the ARM GCC open the command line and use command arm-none-eabi-gcc -v, which will give the version information.
  2. After installing ARM GCC install make utility by following the instructions

Procedure

We will compile a simple Led Blinking program for LPC1768 using ARM GCC using following procedure

  1. There are different ways to access your files depending on the makefile. We can write makefile as per our folder structure and where we are storing different files. As per the makefile we are using make one folder in your local directory where you will store all your source and header files
  2. Along with the makefile, main and all other library files, keep all following files in this folder
          Core Support: core_cm3.c, core_cm3.h, core_cm3.o
          Device Support: system_LPC17xx.c, system_LPC17xx.h, lpc17xx.h
          Startup file: startup_LPC17xx.c
          Linker Script: LPC17xx.ld
  1. You can get all these files from Github


  1. After that open command line in your local directoty and compile program by using make all command
GCC2.PNG
  1. After compilation is over hex and bin file gets generated which can be flashed to our LPC1768 board directly.