Difference between revisions of "Setting Up Keil5 For ExploreM3"
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Explore M3 Bare Metal]] | [[Category:Explore M3 Bare Metal]] | ||
+ | [[category: LPC1768 Tutorials]] | ||
In this tutorial we will see how to setup a keil5 project to generate .bin file for Explore M3(LPC1768)<br> | In this tutorial we will see how to setup a keil5 project to generate .bin file for Explore M3(LPC1768)<br> | ||
[[LPC1768: Keil Project For Bin File|Check this link]] to setup keil4 from generating .bin file. | [[LPC1768: Keil Project For Bin File|Check this link]] to setup keil4 from generating .bin file. | ||
Line 31: | Line 32: | ||
<b>Step7:</b> Now we need to add the files to the project.<br> | <b>Step7:</b> Now we need to add the files to the project.<br> | ||
− | [[File:Keil5_Setup07.png]]<> | + | [[File:Keil5_Setup07.png]]<br><br> |
Line 39: | Line 40: | ||
− | <b>Step9:</b> | + | <b>Step9:</b> Select Source and click on Add Files to add the source files. |
[[File:Keil5_Setup09.png]]<br><br> | [[File:Keil5_Setup09.png]]<br><br> | ||
Line 92: | Line 93: | ||
<b>Step19b:</b>Relative path is added to include paths.<br> | <b>Step19b:</b>Relative path is added to include paths.<br> | ||
[[File:Keil5_Setup19b.png]]<br><br> | [[File:Keil5_Setup19b.png]]<br><br> | ||
− | |||
=Setup Bin File Generation= | =Setup Bin File Generation= | ||
Line 114: | Line 114: | ||
=Uploading the Bin file= | =Uploading the Bin file= | ||
− | After generating the .bin file check this tutorial for [[ | + | After generating the .bin file check this tutorial for [[Uploading .bin file to ExploreM3|Uploading .bin files.]]. |
<br><br> | <br><br> | ||
Latest revision as of 16:55, 17 May 2016
In this tutorial we will see how to setup a keil5 project to generate .bin file for Explore M3(LPC1768)
Check this link to setup keil4 from generating .bin file.
Keil5 software can be downloaded form Keil website. Along with Keil5 you need to install Legacy support for ARM Cortex-M devices. Once the software's are installed, follow the below steps to setup Keil project.
Keil Setup Steps
Step1: Open the Keil software and select the New Microvision project from Project Menu as shown below.
Step2: Browse to your project folder and provide the project name and click on save.
Step3: Once the project is saved a new pop up “Select Device for Target” opens, Select the controller(NXP:LPC1768) and click on OK.
Step4:As LPC1768 needs the startup code, click on Yes option to include the LPC17xx Startup file.
Step5: Create a new file to write the program.
Step6: Type the code or Copy paste the below code snippet and save the file as main.c
Step7: Now we need to add the files to the project.
Step8: Rename the Source Group to Source.
Create a new group called Header to include header files.
Step9: Select Source and click on Add Files to add the source files.
Step10: Add the recently saved file to the project.
Step11: Add the library source files from 00-libfiles folder.
Step12: All the .c files are visible under source group.
Step13: Similarly select Header and click on Add Files to add the header files.
Step14: Add the library header files from 00-libfiles folder.
Step15: The .h files are visible under header group.
Step16: The IDE is not able to locate the library files as shown in line 37.
Click on Options for Target to add the libfile path and also to configure the ROM,RAM address.
Step16: The IDE is not able to locate the library files as shown in line 37.
Step17: Select C/C++ options to add the libfile path.
Step18: Setup the Compiler Include Path.
Step19a: Browse and select the folder containing libfiles.
Step19b:Relative path is added to include paths.
Setup Bin File Generation
Step20: Set IROM1 start address as 0x2000. Bootloader will be stored from 0x0000-0x2000 so application should start from 0x2000
Step21: Write the command to generate the .bin file from .axf file
Command: fromelf --bin Objects\KeilSetup.axf --output KeilSetup.bin
Step22: Now enable the linker option to use the IROM1 address from target settings
Step23: .Bin file is generated after a rebuild.
Check the project folder for the generated .Bin(ER_ROM1) file.
Uploading the Bin file
After generating the .bin file check this tutorial for Uploading .bin files..
Downloads
Have a opinion, suggestion , question or feedback about the article let it out here!