Home

Application Note

image

Contents

1. ci ah cals ake grarer WARNING L23 UNRESOLVED EXTERNAL SYMBOLS ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSDelay T ADDRESS 00000190H SNIP ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSCreateBinSem T ADDRESS 000002B4H ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSEnableInts T ADDRESS 000002BEH ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSSched T ADDRESS 000002C8H xx ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSTimer A ADDRESS 00000338H Program Size data 1259 const 24 code 864 Target not created Listing 7 Linker Error due to Missing Salvo Library Note The unresolved externals in Listing 7 reference services in Salvo s API Their names begin with an upper case letter and are prefixed by os e g OSTimer The T after the function name indicates that the unresolved external 1s a Thumb mode function See Adding a Salvo Library and Adding Salvo Source Files above for how to ensure that the linker can find the Salvo services referenced in the application 20 AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE Application Note Thumb vs ARM Mode Mismatch Failure to ensure that all components in a project are built in the same CPU mode Thumb or ARM will cause the following linker error Build target Target 1 CompilLing Mem Ceis assembling Startup s compiling
2. Failure to add salvo src mem c to the project will cause the following linker error Build target Target 1 assembling Startup s compiling main c i ai aie ole pera WARNING L23 UNRESOLVED EXTERNAL SYMBOLS ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSecbArea ADDRESS QOOOO1A4H SNIP ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSframeP ADDRESS QOOOO6FOH ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OScecTcbP ADDRESS 000006FEH ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OScTcbP ADDRESS OOQ0072CH ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSdelayQOP ADDRESS 00000774H Program Size data 1168 const 16 code 2088 Target not created Listing 6 Linker Error due to Missing Salvo mem c Note The unresolved externals in Listing 6 reference Salvo s global variables Their names begin with a lower case letter and are prefixed by OS e g OScTcbP See The salvocfg h Header File above for how to add Salvo s mem c file to your project AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE 19 Application Note Missing Library Failure to add a Salvo library in library builds or the appropriate Salvo source file s in source code builds to the project will cause the following linker error Build target Target 1 CompilLing Mem Ceis assembling Startup s compiling main c
3. Reset pointers if required ik oxo0000000 oe Jelse ok a AA OScTCbP OSeligQP We oxoo000000 ie oscTcbpy Re ox00000000 e p Ba o ERN 0x00000000 Io mo aa e Be ae a R12 0x00000000 lODIAT 0x00FF0000 LIO MEMM OO Perr rrr Bane RI3 SP 0x40000450 9 O RIA LR 0x0000055b IOSET1 0xFF0E0000 VVMMVVMM i CPP Perr Pere ie Ox00000616 IOCLR1 0x00000000 BEE eee eee eee eee iat er eer IOPIN1 0xFF0E0000 H SPSR 0x60000030 J PE IPA FA Fe P Cv i ete e ie e e E ee ee e ry User Syst Pins 0xFF0E0000 VMMVMVhV hee COOCOeM eee va Fast Interrupt Interrupt x structtchb mal union lt no_tag gt i aA 0xE59FF018 union lt no_tag gt Ss a es ee Figure 20 Single stepping in the Simulator Note uVision supports debugging at the source code level Only applications built from the Salvo source code enable you to step through Salvo services e g OSCreateBinSem at the source code level Regardless of how you build your Salvo application you can always step through your own C and assembly code in the u Vision debugger Flash Download Application code can be downloaded to target hardware using external tools e g the Philips LPC2000 Flash Utility or via Keil s ULINK ARM debugger AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE 15 Application Note Flash Utilities For use with Flash utilities you ll need to force uVision to generate a HEX file C
4. Salvo Application with Keil s CARM C Compiler and uVision IDE Application Note Figure 7 Selecting the CARM Compiler Click on OK to finish configuring your project 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 your main c and Add then Close Your Project Files window should look like this Listings Startup s Salvo Configuration File main c Salvo Help Files Salvo Libraries Salvo Sources Figure 8 Adding Source Files to the Project AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE 5 Application Note When finished select OK and your project window should look like this I amp Hak 5I A C ll Project Workspace F Target1 3 Listings 0 Salvo Configuration File Salvo Help Files Salvo Libraries Salvo Sources EY Sources Startup s main c Files Figure 9 Project Window with Project Specific Source Files 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 or with the Salvo source code files as nodes in your project Adding a Salvo Library For a library build e g what you
5. convenience you ll want your project s salvocfg h to be easily accessible Choose Project Components Environment and Books and under Project Components Groups select Salvo Configuration File Click on Add Files navigate to your project s directory select salvocfg h and Add then Close Your Project Files window should look like this Components Environment and Books X Project Components Folders Extensions Books Files xt F salvoctg h Project Targets LK Groups Salvo Configuration File Salvo Help Files Salvo Libraries Salvo Sources Sources Setas Current Target Add Files OK Cancel WeETauItS Help Figure 14 Adding the Configuration File to the Project Application Note When finished select OK and your project window should look like this e Hy 5 OS BB A Target 1 Yv Project Workspace x f Target 1 0 Listings Salvo Configuration File Le salvoctg h 3 Salvo Help Files Salvo Libraries X sfkcarm4lt a lib Salvo Sources a memc Ey Sources Startup s w main c Files Figure 15 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 Proceed to Building the Project below Adding Salvo Source Files 10 If you have a Salvo Pro distribution you can do a
6. main c ci ah cals ake grarer WARNING L23 UNRESOLVED EXTERNAL SYMBOLS ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSDelay A ADDRESS 000001D0H SNIP ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSCreateBinSem A ADDRESS 000003B0H ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSEnableInts A ADDRESS 000003C0H ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSSched A ADDRESS 000003D0H ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSTimer A ADDRESS 0000042CH Program Size data 1259 const 24 code 1108 Target not created Listing 8 Linker Error due to Missing Salvo Library In Listing 8 the project was built in ARM mode but the Salvo library used only supports Thumb mode As a result of this mismatch the linker looked for but could not find Salvo services in ARM mode hence the a s above Salvo libraries for Keil s CARM C compiler are available in pure Thumb pure ARM and mixed mode versions You must ensure that when using pure Thumb or pure ARM versions all of the files in the project are compiled using the same mode See Preprocessor Options above for how to set Thumb or ARM mode See the Salvo Compiler Reference Manual RM KCARM for more information on Salvo libraries for Keil s CARM C compiler AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE 21 Application Note Linker Erro
7. Application Note 750 Naples Street San Francisco CA 94112 415 584 6360 htto www pumpkininc com Building a Salvo Application with Keil s CARM C Compiler and UVision IDE Introduction This Application Note explains how to use Keil s http www keil com CARM compiler and u Vision IDE to create a multitasking Salvo application for microcontrollers with embedded ARM7TDMI cores We will show you how to build the Salvo application contained in salvo ex exl main c for a Philips http www philips com LPC2129 using the Keil tools 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 CARM and uVision tools With the u Vision IDE you will be able to run and debug this application in the simulator or on real hardware if available Related Documents The following Salvo documents should be used in conjunction with this manual when building Salvo applications with Keil s CARM compiler and u Vision IDE Salvo User Manual Salvo Compiler Reference Manual RM KCARM created by Andrew E Kalman on Oct 16 2004 updated on Oct 17 2004 All trademarks mentioned herein are properties of their respective companies Application Note 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 in this
8. Select Yes to continue uVision3 2 Copy Philips LPC2100 Startup Code to Project Folder and Add File to Project Figure 3 Confirming Addition of Startup Code to Project 2 AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE Application Note The Keil file Startup s will be added to the project Preprocessor Options Now let s setup the project s options for Salvo s pathnames etc Choose Project Options for Target Target 1 C and define any symbols you may need for your project in the Preprocessor Symbols Define area In the Include Paths add salvo inc Options for Target Target 1 Device Target Output Listing Asm LA Misc LA Locate Debug Utilities Preprocessor Symbols Undefine m Code Optimization Warnings Waminglevel 2 Level f Loop strength reduction Emphasis Favor execution speed M treat plain char as unsigned char M Use Thumb Mode vent ea gt double precieion fiaeting paor M Alias checking on pointer accesses Include Paths salvo ine Misc Controls Compiler THUMB OPTIMIZE 7 5PEED BROWSE INCDIR salvo inc DEFINE SYSAG MAKE_WITH_FREE_LIB control DEBUG TABS 4 string OK Cancel Defaults Figure 4 CARM C Options for Target Note This project options screen is also used to select Thumb mode or ARM mode The CARM default is Thumb mode Click on OK to con
9. ar chip you are using Normally this is included in each of your source files e g main c or in a header file that s included in each of your source files e g main h 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 Build window Build target Target 1 compiling mem Cc assembling Startup s compiling main c linking Program Size data 1259 const 24 code 2204 myex1 O Error s 0 Warning s Listing 3 Salvo Lite Library Build Results This example uses a total of 1259 bytes of RAM in the data space see Note below 24 bytes in the const space and 2204 bytes of ROM in the code space Note The data space total shown in Listing 3 includes all stacks in the application In this example the default Startup s file has allocated a total of 0x490 1168 bytes to the Undefined Supervisor Abort Fast Interrupt Interrupt and User System Mode stacks Therefore in this example the project specific RAM size AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE Application Note including the RAM used by Salvo is 1259 1168 91 bytes of RAM Note The pVision projects supplied in the Salvo for ARM distributions contain additional help files in each project s Salvo Help Files group Viewing Salvo Documentation Salvo documentation is available directly from within
10. ask Task3 TASK3 P 14 ke oul E ee i E a aa _ Gl OSdelayQP structtch fH status union lt no_tag gt id Ox0000077F union lt no_tag gt CULI S tFP F Load C temp Nnyex 1 x z e H l z Fi E A aa ee ee Soy Figure 24 Single stepping with ULINK Troubleshooting Compiler Error Can t Open File Failure to add the salvo inc path to the C compiler s include paths will cause the following compiler error Build target Target 1 compiling mem c Cs salvo sre mem c 30 error C310 can t open file salvo h Listing 4 Compiler Error due to Missing Salvo Include Path See Preprocessor Options above for how to add the Salvo include path to the project s C compiler options Failure to have a salvocfg h configuration file in the project s directory will cause the following compiler error assembling Startup s compiling Malte c i SALVO INC SALVO H 98 error C318 can t open file salvocfg h SALVO INC SALVO H 130 error C320 salvo h salvocfg h OSTASKS undefined aborting Listing 5 Compiler Error due to Missing salvocfg h Configuration File 18 AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE Application Note See The salvocfg h Header Fileabove for how to add the Salvo configuration file to the project Linker Error Unresolved Externals Missing mem c
11. case we ve chosen c temp and enter a name for the project we ll use myex1 in the File Name field Create New Project 2x Save in S temp amp Al c File name myex1 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 Philips Select Device for Target Target 1 x cpu Vendor Philips Device LPC2129 Toolset ARM Data base contents Description 3 8xC58 3 LPC2104 3 LPC2105 3 LPC2106 3 LPC2114 3 LPC2119 3 LPC2124 3 LPC2129 3 LPC2132 3 LPC2134 3 LPC2136 3 LPC2138 3 LPC2194 3 LPC2212 3 LPC2214 4 LPC2290 ARM TDOMI S based high performance 32 bit RISC Microcontroller with Thumb e 256KB on chip Flash ROM with In System Programming ISP and In Application F 16KB RAM Vectored Interrupt Controller Two UARTs I2C serial interface 2 SPI serial interfaces Two timers 7 capture compare channels PYM unit with up to 6 PVM outputs 4 channels 10bit ADC 2 CAN channels Real Time Clock Watchdog Timer General purpose I O pins CPU clock up to 60 MHz On chip crystal oscillator and On chip PLL OK Cancel Figure 2 Vision Device Selection Window with Philips LPC2129 Selected Select LPC2129 and click on OK to continue You ll be prompted to copy and add target specific startup code to the project
12. hoose Project Options for Target Target 1 Output and select Create HEX File IV Browse Information Figure 21 Generating a HEX file Select OK to continue Rebuild the application Launch the Flash utility and navigate to your project s hex output file to select the file for downloading PHILIPS i ee a e Figure 22 Downloading the HEX file via a Flash Utility Download the hex file to your target You ll probably have to manually reset the target to begin execution 16 AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE Application Note You can also launch the flash utility directly from within u Vision Choose Project Options for Target Target 1 Utilities and select Use External Tool for Flash Programming Options for Target Target 1 Device Target Output Listing c Asm LA Misc LA Locate Debug Utilities Configure Flash Menu Command C Use Target Driver for Flash Programming ULINK ARM Debugger M Update merget beoe Debugging Init File y Edit Use External Tool for Flash Programming Command C Program Files LPC2106 ISP LPC210x_ISP exe By Arguments H x D COM2 9600 1 T Run Independent OK Cancel Defaults Figure 23 Integrating a Flash Programming Utility into uVision Select OK to continue With the Command line properly configured you can download via the Flash utility sim
13. les window should look like this Components Environment and Books x Project Components Folders Extensions Books Files x te F Listings mem c Salvo Configuration File Salvo Help Files salvo Libraries Set as Current Target Add Files OK Cancel Defaults Figure 12 Adding Salvo s mem c to the Project When finished select OK and your project window should look like this f Target Listings 3 Salvo Configuration File Salvo Libraries LE sfkcarm4 lt a lib 5 3 Salvo Sources SJ meme Sources w main c B Files Figure 13 Project Window with Salvo Libraries 8 AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE Application Note The salvocfg h Header File AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE You will also need a salvocfg h file for this project To use the library selected in Figure 10 your salvocfg h should contain only define OSUSE LIBRARY TRUE define OSLIBRARY TYPE OSF define OSLIBRARY CONFIG OSA define OSEVENTS 1 define OSEVENT_FLAGS define OSMESSAGE QUEUES O define OSTASKS 3 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
14. ply by choosing Flash Download ULINK Keil s ULINK ARM debugger provides the ability to debug on real hardware over a JTAG port Choose Project Options for Target Target 1 Utilities and select ULINK ARM Debugger under the Use Target Driver for Flash Programming pull down You ll probably want to select Update Target before Debugging to streamline your debugging sessions AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE 17 PUMPKIN Application Note k myexl u ision3 File Edit View Project Debug Flash Peripherals Tools SVCS Window Help jesOa s t e oc E 4 AA Jae e mlaja mtmmern Project Workspace 0x00000000 ERI 0x00000000 Ge 0x00000000 RB Ox00040023 advances automatically R 0x00000000 444 Reset pointers if required Be RS Oxe01fc040 445 else R6 0xe5801000 O7 Naas OScTCbP OSeligQP R 0xe3a02801 i 447 if OScTcbP RB 0xe59f001c i TR 0xe5901000 i R10 0xe0211002 ARII 0xe5601000 EE R12 Dxebffffa1 R13 0x40000450 R14 0x0000055b S RI5 Ox00000616 a CPSR 0x60000030 H SPSR 0x00000010 UserfS Fast Inter 5 Interrupt 450 OSeligQP OSeligQP gt u2 nextTcbP if OSCLEAR_UNUSED_ POINTERS Alemoeh Dann neavtTehD MIITT 0XxFF0000 OxFFOOOO osSCreateTask Task1l TASK1 P 3 osSCreateTask Task2 TASK2 P 7 osSCreateT
15. points M Toolbox M Watchpaoints amp PA M Memory Display Restore Debug Session Settings M Breakpoints M Toolbox M Watchpoints M Memory Display GPUDLLE Parameter SARM DLL feLPc21 00 Dialog DLL Parameter DARM P DLL feLPc2i x9 Driver DLL Parameter SARM DLL Dialog DLL Parameter TARM P DLL fe LPC21x9 OK Cancel Defaults Figure 19 Selecting the Simulator Select OK to continue Choose Debug Start Stop Debug Session Go and the Salvo application will begin executing in the simulator When code execution is interrupted via Stop Running the debugger will locate the PC at the current instruction If that instruction is in user or Salvo source code the debugger will stop within C source code Otherwise it will stop and display disassembly AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE PUMPKIN Application Note Within the simulator you can view peripherals and registers watch variables of interest single step in C or assembly set breakpoints etc k myexl pV ision3 _ O x File Edit View Project Debug Flash Peripherals Tools SVCS Window Help jasaa saeloc eournel JA H gt fe imal FF OBP Oo gt ARARA soe MD Project Workspace C temp main c oxoo000000 RI Ox00000000 ER 0x00000000 a R3 0x000400c7 advances automatically 0x00000000 444
16. r Data Types Different In a library build adding a library to a project that does not conform to the configuration options in the project s salvocfg h will cause the following linker error Build target Target 1 compiling m em c assembling Startup s Comp idling Ma Li Cs Linking WARNING L25 DATA TYPES DIFFERENT SYMBOL OSeligQP MODULE C salvo lib kcarm sfkcarm4lt m lib init DEFINED mem obj mem WARNING L25 DATA TYPES DIFFERENT SYMBOL OScTcbP MODULE C salvo lib kcarm sfkcarm4lt m lib init DEFINED mem obj mem SNIP WARNING L23 UNRESOLVED EXTERNAL SYMBOLS ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSDelay T ADDRESS 00000190H ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSWaitBinSem T ADDRESS 000001B6H ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSDelay T ADDRESS 000001EAH xx ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSSignalBinSem T ADDRESS 00000204H ERROR L128 REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL OSCreateBinSem T ADDRESS 0000028CH Program Size data 1259 const 24 code 1268 Target not created Listing 9 Linker Error due to Wrong Salvo Library In Listing 9 the project called for the Salvo library sfkcarm4lt a lib but the project contained the library sfkcarm4lt m lib As a result of this mismatch various data types are different and some required Salvo services were not found See
17. s of the user control function oScirwdt If your application enables the watchdog and you want Salvo to clear the watchdog you must create your own user control function to ensure that the watchdog timer is cleared See the Salvo Compiler Reference Manual RM KCARM for more information on the watchdog timer Example projects for Keil s CARM C compiler can be found in the salvo tut tul 6 sysag directories The include path for each of these projects includes salvo tut tul sysag and each project defines the sySAG ymbol with Keil s CARM C Compiler and uVision IDE 23 Application Note Complete Salvo Lite library build projects are contained in the project files salvo tut tul 6 sysag tul 6lite These projects also define the MAKE_WITH_FREE_LIB symbol Complete Salvo LE library build projects are contained in the project files salvo tut tul 6 sysag tul 6le These projects also define the MAKE_WITH_STD_LIB symbol Complete Salvo Pro source code build projects are contained in the project files salvo tut tul 6 sysag tul 6pro These projects also define the MAKE_WITH_SOURCE symbol The Salvo Lite project exllite upon which this example is based supports a wide variety of targets and compilers For use with u Vision and the CARM compiler it requires the SYSAG and MAKE_WITH_FREE_LIB defined symbols When you write your own projects using your own source code you may not require any symbols Groups can be renamed in this
18. source code build instead of a library build The application in salvo ex ex1 main c contains calls to the following Salvo user Services OS_Delay OSIN OS WaitBinSem OSSignalBinSem OSCreateBinSem OSSched OSCreateTask OSTimer OSE1 You must add the Salvo source files that contain these user Services aS well as those that contain internal Salvo services to your project The Reference chapter of the Sa vo User Manual lists the source file for each user service Internal services are in other Salvo source files For this project the complete list is binsem c mem c delay c portkcarm s event c Cis sg idles sched c inic Limer c inittask c WaCCEL rl intctrl c AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE Application Note To add these files to your project choose Project Components Environment and Books and under Project Components Groups select Salvo Sources Click on Add Files navigate to the salvo src directory select the files listed above and Add then Close Your Project Files window should look like this Project Components Folders Extensions Books Project Targets EXIS Groups Salvo Configuration File Salvo Help Files Salvo Libraries Salvo Sources Setas Current Target Add Files OK Cancel Defaults Figure 16 Adding Salvo Source Files to the Project When finished select OK and your project window sho
19. the Salvo Compiler Reference Manual RM KCARM for more information on Salvo libraries for Keil s CARM C compiler 22 AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE Application Crashes Application Note After Changing Processor Type Remember to include the appropriate header file for your ARM7 microcontroller see Building the Project above A common cause for such crashes is a difference in interrupt vector locations or definitions between two members of a processor family Mainline code may work correctly but the application will crash if interrupt vectors are not in the right locations When Interrupts are Enabled Salvo libraries and salvo sre intctrl c contain dummy versions of the user control functions OSDisableInts OSEnableliInts OSRestorelInts and OSSavelInts If your application uses interrupts you must create your own user control functions to ensure that Salvo s critical sections are protected from interrupts See the Salvo Compiler Reference Manual RM KCARM for more information on interrupt control Also ensure that 1f present you ve defined the default interrupt vector for your target s Vectored Interrupt Controller VIC Failure to define this vector as a dummy ISR may lead to instability due to spurious interrupts When the Watchdog is Enabled Example Projects AN 31 Building a Salvo Application Salvo libraries and salvo src wdtctrl c contain a dummy version
20. tinue Groups In order to manage your project effectively we recommend that you create a set of groups for your project They are Listings Salvo Configuration File Salvo Help Files Salvo Libraries Salvo Sources Sources AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE 3 Application Note 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 Components Environment and Books X Project Components Folders Extensions Books Project Targets 27 G a Files xt Salvo Configuration File Salvo Help Files Salvo Libraries Salvo Sources Sources Set as Current Target Add Files OK Cancel Detauits Figure 5 Creating a Group When finished your project window should look like this AELS A Target 1 ba Project Workspace 3 Salvo Configuration File 3 Salvo Help Files 3 Salvo Sources Sources Files Regs d Books 29 Funct Figure 6 Project Window with Groups Compiler Selection Lastly you ll need to configure this project for use with Keil s CARM compiler Choose Project Components Environment and Books and under Folders Extensions Select ARM Development Tools select Use Keil ARM Tools Additionally under Development Tools Folders select Use Settings from TOOLS INI 4 AN 31 Building a
21. u Vision s project window Simply select the Books tab and expand the Tool User s Guide group i i 2S 82 A Target 1 Project Workspace x fi vision vision Release Notes oe uVision User s Guide Tools User s Guide Release Notes Complete User s Guide Selection Macro Assembler Quick Reference es Linker Locater Quick Reference Salvo Release Notes Salvo for ARM Release Notes Salvo Application Note AN 31 Salvo Compiler Reference Manual RM KCARM Salvo User Manual a Device Data Books Data Sheet ee User Manual Files Regs Books GA Terpl Figure 18 Salvo Documentation in Project Window s Books Tab AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE 13 Application Note Testing the Application Simulator 14 You can test and debug this application using the u Vision debugger and its simulator a Flash programming utility or the optional ULINK JTAG interface Choose Project Options for Target Target 1 Debug and select Use Simulator Options for Target Target 1 X Device Target Output Listing C Asm LA Misc LA Locate Debug Utilities Use Simulator Settings C Use ULINK ARM Debugger Settings M Load Application at Startup M Go till maing Initialization File M Load Application at Startup T Go till maing Initialization File Restore Debug Session Settings M Break
22. uld look like this E 8 A Target 1 Project Workspace x f Target 1 A Listings Salvo Configuration File os La salvocfg h 0 Salvo Help Files 3 Salvo Libraries H 3 Salvo Sources ST binsem c m K delay c a SJ eventc E K idle c ST inite ST inittask c SF intctrl c SJ meme E portkearm s SJ qins c SJ sched c SJ timer c lS waltctrl c Ey Sources 7 Files Regs d Books 29 Funct GA Temp Figure 17 Project Window for a Source Code Build AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE 11 Application Note The salvocfg h Header File You will also need a salvocfg h file for this project Configuration files for source code builds are quite different from those for library builds see Listing 1 above For a source code build the salvocfg h for this project contains only define OSENABLE IDLING HOOK TRUE define OSENABLE BINARY SEMAPHORES TRUE define OSEVENTS 1 define OSEVENT_ FLAGS O define OSMESSAGE QUEUES O define OSTASKS 3 Listing 2 salvocfg h for a Source Code Build Note The settings above are for this particular example project The settings for your projects will vary depending on which configurations you use how many tasks and events are in your application etc Building the Project 12 For a successful compile your project must also include a header file e g include lt LPC21xx h gt for the particul
23. window This Salvo Lite library contains all of Salvo s basic functionality The corresponding Salvo LE and Pro library is slkcarm4lt a lib 24 AN 31 Building a Salvo Application with Keil s CARM C Compiler and Vision IDE
24. would do when evaluating Salvo via Salvo Lite a fully featured Thumb mode little endian Salvo freeware library for the Philips LPC2129 and all microcontrollers based on the ARM7TDMI and related cores is sfkcarm4lt a lib Choose Project Components Environment and Books and under Project Components Groups select Salvo Libraries Click on Add Files navigate to the salvo lib kcarm directory select sfkcarm41t a lib and Add then Close Your Project Files window should look like this 6 AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE Application Note Listings Salvo Configuration File Salvo Help Files Salvo Libraries Salvo Sources Sources WETEUITE Figure 10 Adding Salvo Libraries to the Project When finished select OK and your project window should look like this Figure 11 Project Window with Salvo Libraries You can find more information on Salvo libraries in the Salvo User Manual and in the Salvo Compiler Reference Manual RM KCARM AN 31 Building a Salvo Application with Keil s CARM C Compiler and uVision IDE 7 Application Note Adding Salvo s mem c Salvo library builds also require Salvo s mem c source file as part of each project Choose Project Components Environment and Books and under Project Components Groups select Salvo Sources Click on Add Files navigate to the salvo src directory select mem c and Add then Close Your Project Fi

Download Pdf Manuals

image

Related Search

Related Contents

User Manual - Wuxi Thinkpower New Energy Technolog Co.,Ltd.  User Manual  H.264 Network DVR User Manual  Sony NEX-3A/B Update Manual  Univex Clipper 385002X108 User's Manual  Rimage 360i CD/DVD Publisher Built in 4800 DPI HP Print Engine Printer  manual - Process Controls  招集ご通知 - 商船三井  BeneView T5 Patient Monitor Service Manual  TU-550/550L  

Copyright © All rights reserved.
DMCA: DMCA_mwitty#outlook.com.