Difference between revisions of "Setting Up ARM GCC For ExploreM3 LPC1768"
(Created page with "Category:Explore M3 Bare Metal") |
|||
Line 1: | Line 1: | ||
[[Category:Explore M3 Bare Metal]] | [[Category:Explore M3 Bare Metal]] | ||
+ | In this tutorial we will compile a project on LPC1768 through command line using ARM GCC and make utility. The best part of it is we don't need any IDE to compile the program, a simple makefile will do job for you. To start with you will require ARM GCC and make utility, download both from following links. | ||
+ | =Downloads= | ||
+ | [https://launchpad.net/gcc-arm-embedded ARM GCC] | ||
+ | |||
+ | [http://gnuwin32.sourceforge.net/packages/make.htm Make Utility] | ||
+ | |||
+ | =Setting Environment= | ||
+ | #Once ARM GCC is downloaded install it on your machine. While installing do select the option '''Add path to environment variable''' as shown below | ||
+ | <html> | ||
+ | <img src="https://www.exploreembedded.com/wiki/images/e/e0/GCC1.PNG" class="img-responsive"> | ||
+ | </html> | ||
+ | |||
+ | |||
+ | #To test the ARM GCC open the command line and use command '''arm-none-eabi-gcc -v''', which will give the version information. | ||
+ | #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 | ||
+ | #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 | ||
+ | #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 | ||
+ | #You can get all these files from [https://github.com/ExploreEmbedded/Explore-Cortex-M3-LPC1768-DVB-14001/tree/master/Code/ARM_GCC/Led_Blinking_GCC Github] | ||
+ | |||
+ | |||
+ | #After that open command line in your local directoty and compile program by using '''make all''' command | ||
+ | |||
+ | [[File:GCC2.PNG|x480px|center]] | ||
+ | |||
+ | #After compilation is over hex and bin file gets generated which can be flashed to our LPC1768 board directly. | ||
+ | |||
+ | {{DISQUS}} |
Revision as of 16:55, 23 April 2016
In this tutorial we will compile a project on LPC1768 through command line using ARM GCC and make utility. The best part of it is we don't need any IDE to compile the program, a simple makefile will do job for you. To start with you will require ARM GCC and make utility, download both from following links.
Downloads
Setting Environment
- Once ARM GCC is downloaded install it on your machine. While installing do select the option Add path to environment variable as shown below
- To test the ARM GCC open the command line and use command arm-none-eabi-gcc -v, which will give the version information.
- 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
- 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
- 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
- You can get all these files from Github
- After that open command line in your local directoty and compile program by using make all command
- After compilation is over hex and bin file gets generated which can be flashed to our LPC1768 board directly.