Home
User Manual on How to use USB Bootloader for
Contents
1. Asm Linker Debug Utilities NXP founded by Philips LPC2148 Code Generation Xtal MHz fi2 0 ARM Mode bd E eaten in Use Cross Module Optimization V Use MicroLiB fe Use Link Time Code Generation Read Only Memory Areas Read Write Memory Areas default off chip Start Size Startup default off chip Start Size Nolnit ROMI g E RAMI ROM2 9 RAM2 ROM3 RAM3 on chip on chip 0 8000 080000 IRAM1 040000000 08000 IRAM2 www coineltech com 7 CoiNel Technology Solutions LLP 3 Click on Output Tab and make settings as required Options for Target Target 1 Device Target Listing User C C Asm Linker Debug Utilities Select Folder for Objects Name of Evecutabld LED_TOGGLE Create Executable LED_TOGGLE V Debug Information Create Batch File reate HEX File You can change the name of the executable file as per your preference Appropriate Executable file will be created with the given Crdpte Library LED_TOGGLE LIB pasta V Browse Information Select if you need to create a HEX File Cancel Defaults Help www coineltech com 8 CoiNel Technology Solutions LLP 4 Click on User Tab and type in box next to RUN 1 as shown in below image Options for Target Target 1 Device Target Output Listing User C C Asm Linker Debug Utilities Run User Programs Before Compilation of a C C File M Runt r D0
2. LED_TOGGLE axf uNjision4 Protect FFB AXF Fie ise 243 isk LED_TOGGLE hex LED_TOGGLE inp ED a Hi ic LED_TOGGLE tra LED_TOGGLE uvopt LED_TOGGLE_Target 1 dep TRA Fie FH LIVOPT File ER DEP File YE 55 KB am 2kB This bin file need to be loaded on the bootloader enabled board www coineltech com 11 CoiNel Technology Solutions LLP IV Loading the Bin file onto the Bootloader Enabled Board After following the steps above we would be ready with the following LPC2148 Board with the USB Boot loader firmware USB cable Required bin file for the project Now we will see how we can load this bin file on the controller Procedure gt Plug in the USB cable to your computer and to the Board Once the USB cable is plugged in Board is powered up a Removable Disk Drive will be available This drive represents the memory space on the card In the below image you can notice a drive named CoiNel USB g My Computer Fie Edit View Favorites Tools Help Q Bad gt B Po search Ey Folders E Folder Sync Address My Computer System Tasks 2 View system information Add or remove programs E change a setting Other Places GQ My Network Places My Documents E Shared Documents amp Control Panel Details My Computer System Folder Files Stored on This Computer iS Shared Documents Hard Disk Drives Re Local Disk C Devices with Removable
3. 516 Run 2 ee basis Run User Programs Before Build Rebuild l Run 1 L J D0S16 M Run 2 ri l f basis Run User Programs After B fromelf bin LED_TOGGLE asf output LED_TOGGLE bin E poste posts V Beep When Complete Start Debugging You can also copy and paste the following fromelf bin LED_TOGGLE axf output LED_TOGGLE bin Above image shows an example for LED_TOGGLE If you are doing this for other code replace LED TOGGLE with name that you have given to your code project www coineltech com 9 CoiNel Technology Solutions LLP 4 Click on Asm Tab and make settings as below and then click OK button Options for Target Target 1 x Device Target Output Listing User Cice CAsm Linker Debug Utilities Conditional Assembly Control Symbols Language Code Generation F Split Load and Store Multiple Read Only Position Independent l Read Write Position Independent Thumb Mode l No Warnings Include Paths LJ Misc D Controls cpu Cortex M3 pd _ EVAL SETA 1 g apcs interwork C AKei ARMSINC I Assembler control PEAKeiMARMSINCANXPSLPCI 7x pd NO_CRP SETA 1 list Ist xref o 0 string After all the settings made press ok You need to rebuild the code for compilation When the code is complied binary files are created for your program that can be loaded on your LPC 2148 Board Rebuilding the code Z LED_TOG
4. GLE pVision4 File Edt view erore lash Debug Peripherals Tools SVCS Window Help aga Tew pVision Project gt itj ie 2 New Multi Project Workspace Project Open Project Close Project 5 Target 1 Close Projec Source d Ek P Export F 10te start Manage Select Device for Target Target 1 amp Options For Target Target 1 Alt F7 Clean target 2 Build target F7 Ce Ra OAE www coineltech com 10 CoiNel Technology Solutions LLP After compilation you will see the following in build output window Build Output Build target Target 1 assembling Startup s compiling main c Linking Program Size Code 864 RO data 16 RU data 0 ZI data 1256 FromELF creating hex file User command 1 fromelf bin LED TOGGLE ax outpurx LED TOGGLE bin LED TOGGLE axf 0 Error s O Warning s Shows binary file being created The bin File will be created in the same folder where project file is created Note You can change the location of the bin file by changing the output location in Flash gt Configure Flash Tools gt Output gt Select Folder for objects The details of which are not explained in this document BIN File is created as shown TOtest iotest crf iotest d File FEB CRF Fle fasa OFle 1 KE S25 44KB us ike 1E Ees iotest o LED_TOGGLE J File CromeHT t Jye g a r LED_TOGGLE
5. K AM CoiNel Technology Solutions LLP USB BOOT LOADER Tutorial on LPC2148 BASED BOARD www coineltech com LPC2148 Bootloader User Manual CoiNel Technology Solutions LLP Designed by CoiNel Technology Solutions LLP No 816 2 Floor 4 B Cross 9 A Main RPC Layout Vijaynagar Bangalore 560040 State Karnataka Country India www coineltech com Designations used by companies to distinguish their products are often claimed as trademarks In all instances where CoiNel is aware of trademark claim the product name appears in initial capital letters in all capital or in accordance with the vendor s capitalization preference Users should contact appropriate companies for more complete information on trademark and trademark registrations All trademarks and registered trademarks in this manual are the property of their respective holders No part of this document may be reproduced or distributed in any form or by any means or stored in the database or retrieval system without the prior written permission from CoiNel Technology Solutions LLP with the exception that the listings may be entered stored and executed in a computer system but they may not be reproduced The content in this document are presented for instruction value The details have been carefully tested but are not guaranteed for any particular purpose CoiNel Technology Solutions does not offer any warranties and does not guarantee the accuracy adequacy or
6. Storage f A CD Drive G www coineltech com CJ xyz s Documents lt p Local Disk D Se Local Disk E e Local Disk F or Cone us0 44 5 12 CoiNel Technology Solutions LLP gt When you enter into this CoiNel USB drive you could notice a default firmware file already present CoiNel USB H File Edit View Favorites Tools Help Q sack gt 2i Search K5 Folders EB o Fold Address H mS Sash init Tak firmware FOT4 Data File s 4 KB File and Folder Tasks Ca Make a new Folder D Publish this folder to the Web Ea Share this folder You need to delete this firmware file Copy and paste the newly created project binary file into this drive Below figure shows a newly created project binary file is pasted File Edit View Favorites Tools Help Back gt wi P Search W Folders fi Address LED_TOGGLE bin BIN File File and Folder Tasks a Make a new folder 2 Publish this folder to the Web kad Share this folder Other Places Once the file has been copied to this new location Press reset on your board and your new code will be running www coineltech com 13 CoiNel Technology Solutions LLP Note In case you want to dump a new program into LPC2148 Board you need to connect port P1 20 to ground pin of the board and then press reset switch Doing this will again have the board d
7. completeness of any information herein and is not responsible for any errors or omissions CoiNel Technology Solutions LLP assumes no liability for damages resulting from use of such information in this document or for any infringement of intellectual property rights of third parties that would result from use of this information CoiNel Technology Solutions LLP assumes no liability for applications assistance customer product design software performance or infringement of patents or services described herein For any enquires kindly contact info coineltech com www coineltech com CoiNel Technology Solutions LLP CONTENTS I What is a Boot loader ll Why would you use the LPC2148 USB Boot loader lll How do you use the Boot loader IV Loading the Bin file onto the Bootloader Enabled Board www coineltech com CoiNel Technology Solutions LLP The USB Bootloader for the LPC2148 is a cool trick that CoiNel created for some of our ARM7 based boards Since the ARM architecture allows for large flash space loading code onto the LPC2148 ARM7 over the serial port was very slow The bootloader brings various techniques together to create an easy to use and very fast development system to load the program without any need for expensive hardware or software In this tutorial we will cover what a Bootloader is why should we use it and how to use it What is a Boot loader A Boot loader is a small piece of code that runs b
8. e a binary file Note You should be familiar with Keil environment amp programming For more details on Keil programming check tutorials on how to use Keil www coineltech com 4 CoiNel Technology Solutions LLP Compiling and Loading Code onto an USB Boot loader Enabled Board The axf file would be created once you compile the code The axf file will be created in the folder where you have saved the project Note You can change the location of axf file storage if required whose details are not explained in this document Vision4 a 15 KB PROJECT LED_TOGGLE FILE Text Document 50 KB LED_TOGGLE_uvproj bak BAK File 15 KB iotest d D File be created is chosen LED_TOGGLE tra A TRA File 1 KB HEX File Will only if create HEX file option al a ale 1Otest c C Source file 1 KB startup_LPC1 xx Ist LST File 35 KB LED_TOGGLE HTML Document 1 KB iotest o O File 34 KB LED_TOGGLE Firefox Document 27 KB startup_LPC1 xx o O File 6 KB E EL H LED_TOGGLE_Target 1 dep DEP File 1 KB LED_TOGGLE uvopt UVOPT File 54 KB iotest crf CRF File 44 KB LED_TOGGLE axf AXF File AXF File 16 KB LED_TOGGLE np LNP File 1 KB Now that you have created axf file how can it be converted into a binary file so that it can be loaded onto USB bootloader enabled LPC2148 board The following documentation gives you the detail www coinelt
9. ech com CoiNel Technology Solutions LLP gt How to create binary file using Keil uVision4 To create binary file follow the settings as shown in the images below 1 Click on Flash Menu gt Go to Configure Flash Tools WILED_TOGGLE pVision4 File Edit Yiew Project Flash Debug Peripherals Tools Svcs Window Help 3 Ya Download PE Erase FQ Target 1 MH include LPC214x H LPC2ixx definitions gy Source Group 1 include type h _ Startup s main c define TEST_LED 14422 f REKEKRERERAEEELELEKEKEEKELEREREERERERELEEEEEEEEEELEREREREEREREREEREREEELEEE 44441111 Function Name delay Description This function suspends the tasks for specified ticks Input ticks no of ticks in multiple of 1 usec task task to be suspended Output void Note KRKEKRERARAKEE LE LEKEKEEKELEREREREEREREREEEEE EE ELELEEEREEEEREREREEREREKELELERERES mf void delay int count Fit int j 0 i 0 for j 0 j lt count j Build Output i vaxl Configure flash programming tools H JTAG ARM www coineltech com 6 CoiNel Technology Solutions LLP 2 Click on Target Tab and type in IROMT as shown in below image Change the start address of on chip IROM1 memory to 0x8000 to 0x80000 as shown in fig Below This is the area where user program is placed and has to be run when the controller is reset Options for Target Target 1 Device Target Output Listing User C C
10. efore the operating system starts running In our case the bootloader is the code that runs before the device firmware starts up Typically a bootloader is used because the system memory is too small to contain the entire program and so the bootloader uses a set of routines to call the program from a different part of memory The CoiNel LPC2148 ARM7 USB Boot loader performs three steps 1 First the Boot loader checks to see if a USB cable has been plugged in If the LPC2148 is connected as a USB device then it initiates a USB Mass Storage system This will cause the target board to appear on any computer platform as a removable flash drive The user can then seamlessly transfer files to the flash drive 2 The next thing the Boot loader does is look for a firmware file This file contains the desired operating firmware in a binary file format for the LPC2148 If the Boot loader finds this file system then it programs the contents of this file to the flash memory of the LPC2148 In this way the Boot loader acts as a programmer and we can upgrade the firmware on the LPC2148 simply by loading a new file 3 After performing for first two checks the boot loader calls the main firmware www coineltech com 3 CoiNel Technology Solutions LLP ll Why would you use the LPC2148 USB Bootloader The bootloader provides several distinct advantages First if you have a LPC2148 Board that has been preloaded with the bootloader then you don
11. etected as a removable disc ie the board will exit from application mode and will switch back to bootloader mode Follow the above procedure and copy load the new bin file Note Once programmed make sure that the P1 20 pin is removed not grounded CLARIFICATIONS AND SUPPORT CoiNel is at your service If you have any clarifications or suggestions on this document or need any technical support and consultation we are available in forms of telephone and E mail TEL 91 80 23154423 Technical Support E mail support coineltech com For any questions or concerns submit them to info coineltech com www coineltech com 14
12. t even need a programmer to load code onto the board Another reason that LPC2148 USB Boot loader is great because it is very fast at loading code When using a serial programmer to load code onto an ARM it can take several minutes to get your code up This can be a major setback when you re writing very large programs and you start debugging Using the LPC2148 USB bootloader allows you to load code in seconds lll How do you use the Boot loader First you have to program the Boot loader code onto the LPC2148 Board The Boot loader code can be downloaded at the download section of LPC2148 Based product page You can check the product page at www coineltech com shop You may either use FLASH MAGIC software for programming i e serial programming or H JTAG parallel port programming to load this code Once the Boot loader program is on the LPC2148 using it is very simple Let us assume that you have written some neat code to use on LPC2148 Board Plug in a USB cable and when the USB Mass Storage Device opens on your desktop just drag and drop the binary file onto the device then press reset the bootloader will look for the binary file and if the file is found the bootloader will program the new code onto the controller That seems easy enough but how do get this binary file In order to get the binary file first we have to compile the code In order to compile the code you need have Kiel uVision4 Below steps would show you how to creat
Download Pdf Manuals
Related Search
Related Contents
USING YOUR BREWER - rapid-elearning ALL METAL MOTION SENSOR QUARTZ LIGHT CONTROL My Custom Design ver.1.0 Concentrate2 - KellySolutions.com HP Ps1810-8g User's Manual Manual de instruções Installation and Operation Guide Chiot, mode d`emploi BEGO ウイロボンド ソルダー Copyright © All rights reserved.
Failed to retrieve file