Home

GSG-STELLARIS- KRVMDK-ARM Building a Salvo

image

Contents

1. PUNIPKIN csc sTELLaris KRVMDK ARM Getting Started Guide 750 Naples Street San Francisco CA 94112 415 584 6360 htto www pumpkininc com Building a Salvo Application for Stellaris Microcontrollers using Keil s ARM RealView Microcontroller Development Kit Introduction This Getting Started Guide explains how to use Keil s http www keil com ARM RealView Microcontroller Development Kit to create a multitasking Salvo application for Luminary Micro s Stellaris Cortex M3 based microcontrollers We will show you how to build the standard Salvo demo application tut5 A complete project to build tut5 is included in every Salvo distribution Building your own applications will be substantially similar For more information on how to write a Salvo application please see the Salvo User Manual Before You Begin If you have not already done so install the Keil ARM RealView MDK tools With the included u Vision IDE you will be able to run and debug this application on real hardware e g a Stellaris Development Kit Related Documents The following Salvo documents should be used in conjunction with this manual when building Salvo applications for Stellaris created by Andrew E Kalman on May 15 2006 updated on May 17 2006 All trademarks mentioned herein are properties of their respective companies Getting Started Guide MCUs using Keil s ARM RealView Microntroller Development Kit
2. Salvo User Manual Salvo Compiler Reference Manual RM STELLARIS ARMRV Creating and Configuring a New Project Create a new uVision project using Project New Project In the Create New Project window navigate to your working directory we ll use Pumpkin Salvo Examples ARM Luminary_LM3S1XX Luminary_DK LM3S1XX RVMDK Tut Tut5 Lite and enter a name for the project we ll use tut5 in the File Name field GE NE EOFT ey Preteens Create New Project A A E ASSIN 2 x Save in Lite ce Fav File name tuts Save Save as type Project Files uve Cancel Z Figure 1 Creating the New Project Click on Save to continue The Select Devices for Target Target 1 window appears Under the CPU tab select and expand Luminary Micro 2 GSG STELLARIS KRVMDK ARM Building a Salvo Application for Stellaris Microcontrollers using Keil s ARM RealView Microcontroller Development Kit C C Options GSG STELLARIS KRVMDK ARM_ Building a Salvo Application for Stellaris Microcontrollers using Getting Started Guide Select Device for Target Target 1 CPU Vendor Luminary Micro Device LM35101 Toolset ARM Data base contents Description Cortex M3 based Microcontroller 8KB Flash ROM 2KB SRAM 1 UART SSI 2 Analog Comparators 2 Timers 1 PWM g Honeywell H Hynix Semiconductor 4 Hyundai H Infineon InnovASiC Intel 4 ISS E Luminary Micr
3. aly savedARMRegs gt u2 H ul 684712 687152 0 structtch structtch structtch union lt notaq gt struct lt notag gt 0x00080022 0x0000023D 0x200000AC union lt notag gt union lt notag gt Ox00000000 ULINK Cortex M3 Debugger t1 O 00000000 sec L 275C 1 PAW Z Figure 18 Single stepping with ULINK C Pumpkin Salvo Examples ARM Luminary_LM3S1XX Luminary_DK LM3S1XX RVMDK Enable Arm Thumb interworking is a bug in uVision and will be fixed in a future release Stellaris Cortex M3 parts run only in Thumb2 mode and therefore have no need for an ARM interworking veneer This option is greyed out in the evaluation version of the Keil RealView MDK toolset Groups can be renamed in this window This Salvo Lite library contains all of Salvo s basic functionality The corresponding Salvo LE and Pro libraries are salvolarmrvcm3 li t lib Salvo Pro only GSG STELLARIS KRVMDK ARM_ Building a Salvo Application for Stellaris Microcontrollers using Keil s ARM RealView Microcontroller Development Kit Example Salvo projects for use with the Stellaris Development Board Keil s ARM RealView compiler and Keil s uVision3 IDE can be found in the directories of every Salvo for Stellaris family distribution Salvo Lite and LE example projects are built using Salvo libraries Salvo Pro example projects are built using Salvo
4. libraries and the Salvo source code 15 PUMPKIN Getting Started Guide i Once your target is successfully programmed you can start program execution immediately without entering the uVision debugger e g by pressing the Stellaris Development Kit s reset button 16 GSG STELLARIS KRVMDK ARM Building a Salvo Application for Stellaris Microcontrollers using Keil s ARM RealView Microcontroller Development Kit
5. 4 C C Options for Target Assembler Options If your project s assembly code requires any defined symbols add them under the Asm tab INGENTES Figure 5 Asm Options for Target Linker Options Under the Linker tab be sure to select Use Memory Layout from Target Dialog if the checkbox is available Add entry Reset_Handler to the Misc controls box to ensure proper startup at runtime GSG STELLARIS KRVMDK ARM Building a Salvo Application for Stellaris Microcontrollers using Keil s ARM RealView Microcontroller Development kit PUMPKIN Getting Started Guide Ko m m m Figure 6 Linker Options for Target Debug Options You ll need to select the appropriate debugger Keil s ULINK debugger provides the ability to debug on real hardware over a JTAG port Under the Debug tab select the ULINK Cortex M3 Debugger from the drop down list and ensure it s selected via the Use radio button x ce Defeuts o ote Figure 7 Debug Options for Target GSG STELLARIS KRVMDK ARM Building a Salvo Application for Stellaris Microcontrollers using 5 Keil s ARM RealView Microcontroller Development Kit Getting Started Guide Utilities Options Under the Utilities tab select Use Target Driver for Flash Programming pull down Selecting Update Target before Debugging will streamline your debugging sessions Options for Target tut5lite LM3S1XX o Device T
6. als Tools SVCS Window Help Example Projects Asg tagel nc laO 8 0 Po gt sot Alay aE m m e Project Workspace x Bl xPSR H Banked R15 PC 0x00000000 Octttttttf Ox20000000 Ox20000244 Ox00000000 Ox00000000 Ox00000000 Ox00000000 Ox00000000 0x00000000 0x00000000 0x00000000 0x20000160 0x20000244 0x000002e5 Ox000003c6 Ox61000000 Files Regs Q Books D Functions amp Templates Copyrights Licensor SSour 275 Disassembly amar ANAF onm se len am Tanam amp C Pumpkin Salvo Examples ARMiLuminary LM3S 46 E Ml Wet gt 2 sa RAER 2s esm amp C Pumpkin Salvo Examples ARM Luminary_LM3S1XX Luminary DK LM3S DOGRYMDK ERERERAREKERAE KERR KEER ERE RERRAKEREKRRA EKER RERRRRARERERE a sdm mma if_fstatus undate ats LCDA m 1XX Luminary_ DK LM3S 1 ARY Auth SRevi 27 Date i 273 if i 0 akaek 274 W275 if status updateLCD Salvo 26 g LM3si 27 if status runTaskCount 0 Realy 278 i 279 Write2LinestoLcD str 12 str 13 Notes 280 281 else 1 In 282 by dil 283 Write2LinestoLcD str 12 str 14 ona readme tt amp Disasse S 1 error 34 counter undefined identifier counter Dx0A taskCounter 0x0A lt idleCounter 0x0A Output Window EB nextDiyTcbP OE
7. andler in your application Building the Project With everything in place you can now build the project using Project Build Target or Project Rebuild all target files The build results can be seen in the Output window readme te Build target tut5 assembling Startup s compiling tut5S c compiling timer c compiling pde c compiling salvomem c compiling salvohook_interrupt_em3 c linking Obj tutS axf O Error s 0 Warning s AL ey ah build Command FindinFilesf Iuel ULINK Cortex M 4 Output Window Figure 17 Build Results for a Library Build Note The uVision projects supplied in the Salvo for Stellaris distributions contain additional help files in each project s Salvo Help Files group Testing the Application You can test and debug this application using the optional ULINK JTAG interface After building the project select Flash Download This will erase program and then verify your application on the target Select Flash Start Stop Debugging session This will begin your debugging session where you can run your application set and clear breakpoints watch variables etc GSG STELLARIS KRVMDK ARM Building a Salvo Application for Stellaris Microcontrollers using Keil s ARM RealView Microcontroller Development Kit PUMPKIN Getting Started Guide kf tut5lite pVision3 Eile Edit View Project Debug Flash Peripher
8. arget Output Listing C C Asm Linker Debug Utilities Configure Flash Menu Command Use Target Driver for Flash Programming ULINK Cortex M3 Debugger Settings M Update Target before Debugging nit File E Edit C Use External Tool for Flash Programming Commana Ea Arguments fo Bun Indesendent OK Cancel Defaults Figure 8 Utilities Options for Target Click on OK to finish configuring your project Groups In order to manage your project effectively we recommend that you create a set of groups for your project They are Header Files Sources Board Driver Library Salvo Help Files Salvo Configuration File Salvo Source Files Salvo Target Specific Source Files Salvo Library Files Listings For each group choose Project Components Environment and Books and under Project Components Groups add and re order the new group names and select OK When finished your project window should look like this 6 GSG STELLARIS KRVMDK ARM Building a Salvo Application for Stellaris Microcontrollers using Keil s ARM RealView Microcontroller Development Kit Getting Started Guide Board Driver Library Salvo Help Files Salvo Configuration File Salvo Source Files Salvo Target Specific Source Files Salvo Library Files Listings WETEUITE Figure 9 Project Window with Groups Compiler Selection Lastly you ll need to configure
9. c source files These include the files for user hooks to target specific hardware The files in Pumpkin Salvo Src ARMRV provide pre defined user hooks and the Salvo context switcher for Keil s ARM RealView compiler salvohook_interrupt_cm3 c To add these files to your project choose Project Components Environment and Books and under Project Components Groups select Salvo Target Specific Source Files Click on Add Files navigate to the Pumpkin Salvo Src ARMRV directory select the c files listed above and Add then Close Your Project Components window should look like this 10 GSG STELLARIS KRVMDK ARM Building a Salvo Application for Stellaris Microcontrollers using Keil s ARM RealView Microcontroller Development Kit Getting Started Guide S REPOS TIN Oa aa ey SPRY Components Environment and Books Sopa ay x Project Components Folders Extensions Books Project Targets ExXe Files xt Header Files salvohook_interrupt_cm3 c Sources Board Driver Library Salvo Help Files Salva Configuration File Salvo Source Files salvo Target Specific Source Files Salvo Library Files Listings Set as Current Target Add Files Figure 14 Adding Salvo Target specific Source Files to the Project When finished select OK The salvocfg h Header File A salvocfg h header file is required for every Salvo project You can create your Own salvocfg h or copy an
10. existing one and modify it accordingly Place it in the project s directory part of the project s include paths see C C Options The salvocfg h for this project contains only define OSUSE_LIBRARY TRUE define OSLIBRARY_TYPE OSF define OSLIBRARY_CONFIG OST define OSEVENTS define OSEVENT_ FLAGS define OSMESSAGE QUEUES define OSTASKS Aa O OC FF Listing 1 Example salvocfg h for a Salvo Lite Library Build Note The settings above are for this particular example project The settings for your projects will vary depending on which libraries you use how many tasks and events are in your application etc For your convenience you ll want your project s salvocfg h to be easily accessible Choose Project Components Environment and Books and under Project Components GSG STELLARIS KRVMDK ARM_ Building a Salvo Application for Stellaris Microcontrollers using 11 Keil s ARM RealView Microcontroller Development Kit Getting Started Guide Groups select Salvo Configuration File Click on Add Files navigate to your project s directory select salvocfg h and Add then Close Your Project Components window should look like this a n oana RRSSAA A Components Environment and Books x Files xt F salvocfg h Board Driver Library salvo Help Files Salvo Confiquration File Salvo Source Files Salvo TargetSpecific Source Files Salvo Library Files Listings Set as Current Targe
11. f source files those that are shared across multiple Salvo projects are often located in higher level parent directories above the project directories Therefore when adding source files to a group like the Sources group you may need to navigate to multiple folders to select the desired files In the above example the Sources files in Figure 11 are located in the parent directory of the project directory Adding Salvo specific Files to the Project Now it s time to add the Salvo files your project needs Salvo applications can be built by linking to precompiled Salvo libraries Salvo Lite LE and Pro or with the Salvo source code files Salvo Pro only as nodes in your project GSG STELLARIS KRVMDK ARM Building a Salvo Application for Stellaris Microcontrollers using Keil s ARM RealView Microcontroller Development Kit Getting Started Guide Adding a Salvo Library For a library build e g what you would do when evaluating Salvo via Salvo Lite the Salvo freeware library for the Luminary Micro LM3Sxxx is salvofarmrvem3 t 1lib Choose Project Components Environment and Books and under Project Components Groups select Salvo Library Files Click on Add Files navigate to the Pumpkin Salvo Lib ARMRV directory select salvofarmrvem3 t lib and Add then Close Your Project Files window should look like this xt salvofarmrvem3 tlib Board Driver Library Salvo Help Files Salvo Config
12. lates Figure 16 Project Window for a Library Build Tip The advantage of placing the various project files in the groups shown above is that you can quickly navigate to them and open them for editing etc Additional often used files like header or listing files can be added to their appropriate groups Modifying the Startup s file The default startup code in Startup s is populated primarily with default handlers that will trap errant vectors Nearly all Salvo applications will make use of Salvo s time services e g OS_Delay normally via an IRQ handler Therefore you must modify the vector table in Startup s to invoke your application s interrupt handlers so that OSTimer 1s called In this example the IRQ handler SysTick_irg_handler in the project s timer c 1s used to call Salvo s oSTimer at a fixed rate of 100Hz Therefore you must edit your project s Startup s file to add the SysTick handler vector E g replace DCD Default Handler PendSV Handler DCD Default Handler SysTick Handler DCD Default Handler gt GPIO Port A with GSG STELLARIS KRVMDK ARM_ Building a Salvo Application for Stellaris Microcontrollers using 13 Keil s ARM RealView Microcontroller Development Kit Getting Started Guide DCD Default Handler PendSV Handler EXTERN SysTick_irg_handler DCD SysTick irg handler SYSTick Handler DCD Default Handler gt GPIO Pore A in Startup s Repeat this procedure for every IRQ h
13. o 3 LM35101 d L35102 a Maxim H Megawin Mentor Graphics Co a Micronas H MXC Mvson Technoloay OK Cancel Figure 2 Vision Device Selection Window with Luminary Micro LM3S101 Selected Select LM3S101 and click on OK to continue You ll be prompted to copy and add target specific startup code to the project Select Yes to continue Q Copy Luminary Startup Code to Project Folder and Add File to Project Yes No Figure 3 Confirming Addition of Startup Code to Project The file Startup s will be added to the project Now let s setup the project s options for Salvo s pathnames etc Choose Project Options for Target Target 1 C C and define any symbols you may need for your project in the Preprocessor Symbols Define area In the Include Paths add a path to the current directory Salvo needs this to find its project specific configuration file salvocfg h see below Next add the path to Salvo s include directory C Pumpkin Salvo Inc is the default location Lastly add any other include paths your project may require e g to find board specific header files in this example Keil s ARM RealView Microcontroller Development Kit Getting Started Guide Level0 O0 lt unspecified gt v thom Mode eCA Pumpkin Salvoyne 4 4 4 Figure
14. t Add Files OK Cancel Defaults Figure 15 Adding the Configuration File to the Project When finished select OK Lastly you ll need to add any board driver files your application requires to the Board Driver Library folder These files are usually provided as part of Keil s ARM RealView MDK or with your target hardware In this example pdc c and its header file pdc h are provided by Luminary Micro for the Stellaris Development Kit and are located in the Salvo Examples tree several levels up from the project directory hence the include path see C C Options The DriverLib lib library is part of Keil s ARM RealView MDK installation GSG STELLARIS KRVMDK ARM Building a Salvo Application for Stellaris Microcontrollers using Keil s ARM RealView Microcontroller Development Kit Getting Started Guide Your project window should now look like this S if Eo By Aftuts d Project Workspace x Ey tut5 3 Header Files Ey Source 2 Startup s H tut5 c timer c H 3 Board Driver Library pdec 4 DriverLib lib H 3 Salvo Help Files 2 readme txt a newforSalvo4 tet H 3 Salvo Configuration File J salvocfg h Ee Salvo Source Files A salvomem c H 3 Salvo Target Specific Source Files 4 salvohook_interrupt_cm3 c H 3 Salvo Library Files 4 salvofarmrvem3 t lib J Listings H n a Files Regs QA Books Di Functions amp Temp
15. this project for use with Keil s ARM RealView C compiler Choose Project Components Environment and Books and under Folders Extensions Select ARM Development Tools select Use RealView Compiler M Use Settings from Toolsi pee _ B Figure 10 Selecting the RealView C Compiler Click on OK to finish configuring your project GSG STELLARIS KRVMDK ARM Building a Salvo Application for Stellaris Microcontrollers using 7 Keil s ARM RealView Microcontroller Development Kit Getting Started Guide Adding your Source File s to the Project Now it s time to add files to your project Choose Project Components Environment and Books and under Project Components Groups select Sources Click on Add Files navigate to your project s directory select the files your application requires and Add then Close Your Project Files window should look like this a EPR ET S Sah OLA CAO Ce Components Environment and Ba y EEE n x Project Components Folders Extensions Books Project Targets KI PS Groups PK FS Eiles xt Header Files Board Driver Library Salvo Help Files Salvo Configuration File Salvo Source Files Salvo Target Specific Source Files Salvo Library Files Listings Set as Current Target Add Files Figure 11 Adding Source Files to the Project When finished select OK Note In an attempt to minimize the unnecessary duplication o
16. uration File Salvo Source Files Salvo Target Specific Source Files Salvo Library Files Listings Set as Current Target Add Files Figure 12 Adding Salvo Libraries to the Project When finished select OK Note When browsing to add files to a group via the Add Files button use the Files of type setting to see files other than source c files You can find more information on Salvo libraries in the Salvo User Manual and in the Salvo Compiler Reference Manual RM STELLARIS ARMRV Adding Salvo s salvomem c GSG STELLARIS KRVMDK ARM_ Building a Salvo Application for Stellaris Microcontrollers using Every Salvo project requires Salvo s salvomem c source file Choose Project Components Environment and Books and under Project Components Groups select Salvo Source Files Click on Add Files navigate to the Pumpkin Salvo Src directory select salvomem c and Add then Close Your Project Components window should look like this Keil s ARM RealView Microcontroller Development Kit Getting Started Guide salvomem c Board Driver Library Salvo Help Files salvo Configuration File Salvo Source Files Salvo TargetSpecific Source Files Salvo Library Files Listings Set as Current Target Add Files Wetanits OK Cancel Figure 13 Adding Salvo Source Files to the Project Adding Target specific Salvo Source Files Additionally your project will require target specifi

Download Pdf Manuals

image

Related Search

Related Contents

Utiliser votre tablette  Integrity Objects Schematics –User Guide  ABiLINX 1501 取扱説明書[第2.2版]  User`s Manual - OEM International AB  Samsung Galaxy Tab 3 (8.0 3G) Felhasználói kézikönyv(Kitkat)  Philips D2153B  Sika®  Savin 40105 User's Manual  Volkshochschule Moosburg • Au i.d. Hallertau  

Copyright © All rights reserved.
Failed to retrieve file