Home

Application Note

image

Contents

1. dE db db tE SHE db db db t db d SESE db db SHEE db db dL db dL SESE db db HE db db db d db db db db SESE d SEE db db db E db db dL dB HE db d db db db SRE HE dE db db d db db db db L db d db db d db SHE db db db dL db dL db db db db dL db db db d db db db db db db d db dL db db db db db db dL dB db db d db db db db db w29 Z CODE INTVEC 0 X INTVEC SIZE 1 A CODE TINY F X FLASH BASE FF A CODE NEAR F X FLASH BASE X FLASH END A CODE SWITCH X FLASH BASE X FLASH END A CODE INITTAB X FLASH BASE X FLASH END A CODE DIFUNCT X FLASH BASE X FLASH END A CODE CODE X FLASH BASE X FLASH END A CODE TINY ID X FLASH BASE X FLASH END A CODE NEAR ID X FLASH BASE X FLASH END A CODE CHECKSUM X FLASH BASE X FLASH END A DATA TINY I TINY Z TINY N X SRAM BASE X SRAM TEND A DATA CSTACK X CSTACK SIZE X SRAM BASE X SRAM TEND A DATA HEAP X HEAP SIZE X SRAM BASE X S RAM TEND A DATA RSTACK X RSTACK SIZE X SRAM BASE X SRAM END X EXT RSTACK BASE X EXT RSTACK END Z DATA NEAR_I NEAR_Z _ X_SRAM BASE X SRAM EN D X EXT SRAM BASE X EXT SRAM END A DATA NEAR C X EXT ROM BASE X EXT ROM END A DATA NEAR N 7 X EXT NV BASE X EXT NV END A XDATA EEPROM I EEPROM N 1 X EEPROM END D X FLASH BASE
2. z Loaded plugin STK500 Program 8 1E s Loaded partfile C Program Files Atmel AYR T OStcb Area AVR Simulator Please wait while configuring sirr g d EE Es T UE g A 0 str amp AVR Simulator ATS30S8515 Configured OK S Ea 5 FH 1 str Loaded objectfile C temp Debug Exe myex1 oe p yi oooooc 18 95 20 2 str OO0010 3F B7 F8 M 000014 FO 83 21 zi Watch 1 Watch 2 A Watch 3 A Wa LI AT9058515 AVR Simulator Auto Stopped e Ln 89 Col 1 CAP NUM SCRL 4 Figure 20 Source Level Debugging in AVR Studio In addition to debugging in the AVR Studio simulator you can also download your application to an Atmel STK500 development board by selecting Tools STK500 STK500 and then programming the device by Simulator Emulator FLASH Memory selecting Use Current Migrating to Embedded Workbench for Atmel AVR v3 16 Existing Salvo applications built as projects pjt under IAR s Embedded Workbench for Atmel AVR v2 can be migrated to v3 using the following steps e In Embedded Workbench for Atmel AVR v3 choose File New Workspace to create a new workspace file eww e Choose Project Add Existing Project select Files of type Old Project Files prj pew navigate to the old project and select Open then OK e Under Project Options selec
3. 5 Cancel Open as Auto Figure 18 Opening the Object File Select Open AVR Studio will load the object file then present another window wherein you can select a Debug Platform and a Device Select device and debug platform Select debug platform and device Debug Platform Gren Batom Options Help lt lt Beck Mex Finish Cancel ver 408 310 Figure 19 Selecting the Debug Platform and Device Select Finish AVR Studio will configure the simulator load the object file and setup for source level debugging at the start of your main AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE 15 lication Note AVRStudio c temp main c al xj File Project Edit View Tools Debug Window Help D ludgo eS cass AEEA gt An 5 8 wOcot N A a EB Stack Monitor 3 8 o AT9058515 19 ANALOG_COMPARATOR a g CPU E EEPROM x amp EXTERNAL_INTERRUPT H PORTA 3 PORTB PORTB 0x02 DDRB OxFF PINB 0x02 PORTC PORTD ag SPI TIMER COUNTER 0 x H S Project Elyo info c temp main c B c temp main c void Task3 void for PORT OSSignalBinSem BINSEM1 P void main void InitPORT Init 1 OS Delay 40 Task3a 0x08
4. Application Note 750 Naples Street San Francisco CA 94112 415 584 6360 htto www pumpkininc com Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE Introduction This Application Note explains how to use JAR s http www iar com AVR C compiler and Embedded Workbench IDE to create a multitasking Salvo application for Atmel s http www atmel com AVR and MegaAVR 8 bit microcontrollers We will show you how to build the Salvo application contained in salvo ex ex1 main c for an AT9088515 using IAR Embedded Workbench for Atmel AVR Note IAR Embedded Workbench for Atmel AVR underwent changes between v2 e g EW 2 31E with the last version of the compiler being v2 28A and v3 e g EW 3 3A with v3 x compilers e g v3 10A The procedures and illustrations in this document are from IAR Embedded Workbench for Atmel AVR v2 31E and the associated IAR AVR C compiler v2 28A Where substantive differences exist they will be noted as such 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 IAR Embedded Workbench for Atmel AVR You may also install the latest version of Atmel s AVR Studio available at http www avrtreaks com created by Andrew E Kalman on Feb 21 2004 updated on Feb 21 2004 All trademarks mentioned herein are properties of their respective companies App
5. Files in Group C salvo src binsem c Add n Remove CAsalvo src inittask c CAsalvoXsrcimem c Remove All Done Cancel Figure 15 Adding Salvo Source Files to the Project Select Done when finished Your project window should now look like this IM myexl prj Iof x Targets Debug a Debug Listings c3 Salvo Configuration File HE salvoctg h 9 Salvo Help Files J Salvo Libraries 53 3 Salvo Sources E binsem c E delay c E event c E idle c E initc E inittask c mem c E portiaravr c E qins c E sched c f timer c 5 3 Sources E main c Figure 16 Project Window for a Source Code Build 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 AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE 11 m Application Note define OSBYTES OF DELAYS T define OSENABLE IDLING HOOK TRUE define OSENABLE BINARY SEMAPHORES TRUE 0define OSEVENTS L define OSTASKS 3 Listing 2 salvocfg h for a Source Code Build Building the Project 12 For a successful compile your project must also include a header file e g include lt io8515 h gt for the particular chip you are using Normally this is included in each of your sourc
6. sf iw sfiaravr t m r80 m sfiaravrlt d r90 a sfiaravr2ttr90 a sfiaravr3te 90 i sf w sfiaravr ttr90 m sfiaravrit er80 a sfiaravr3s a r90 a sfiaravr3t m r90 a sf lal sfiaravris a r90 a sfiaravrlt m r90 jm sfiaravr3s d r90 a sfiaravr3t tr90 an sf la sfiaravrls d r90 a sfiaravvrlt tr90 im sfiaravr3s e r90 m sfiaravrdl a r90 a sf aj sfiaravrls e r90 sfiaravr2t a r90 m sfiaravr3s m r90 m sfiaravrdl d r90 a sf File name sfiaravrl t a r30 Files of type Library Object Files r Add to Group Salvo Libraries Files in Group C salvo lib iaravrv2 sfiaravr ta r90 Add Add All Remove Remove All Done Cancel Figure 10 Adding the Library to the Project Note Salvo libraries for IAR s v2 x AVR C compilers are located in salvo lib iaravr v2 Libraries for v3 x compilers are located in salvo lib iaravr v3 The libraries are not interchangeable Select Done when you are finished You can find more information on Salvo libraries in the Salvo User Manual and in the Salvo Compiler Reference Manual RM IARA VH 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 Files C C Source Files c cpp cc under Files of type select Salvo Sources under Add to Group navigate to salvo src select mem c and Add Your Project Fi
7. DATA 0000001C rel 0 DATA 0000001D DATA 0000001E DATA 0000001F DATA 00000037 00000037 DATA 00000038 00000038 DATA 0000004A 0000004B 2 DATA 0000004C 0000004D 2 DATA 0000004E 0000004E DATA 00000059 00000059 TINY DATA 00000060 dse 0 TINY Z DATA 00000060 0000007F 20 rel 0 CSTACK DATA 00000080 0000009F 20 dse 0 RSTACK DATA 000000A0 000000BF 20 dse 0 xk Cc Ck ck CC 000 CS Ck Sk A e KR A x A KG X R END OF CROSS REFERENCE CK CK C CK 0C CCS CK CCS SC Sk E e KR KG x A ko 1 518 bytes of CODE memory 16 range fill 104 bytes of DATA memory Errors none Warnings none Listing 3 Library Build Results Abbreviated Note The Embedded Workbench for Atmel AVR projects supplied in the Salvo for Atmel AVR and MegaAVR distributions contain additional help files in each project s Salvo Help Files group Tip If you configure Embedded Workbench to display the memory utilization for individual source files and the complete application you won t have to look in the map file Select Options Settings Make Control Message Filtering Level and choose All AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE 13 Application Note Testing the Application C SPY You can test and debug this application using the C SPY debugger and either the simulator or other debugging hardware To launch C SPY choose
8. Project Files Window When finished select Done and your project window should look like this II exi lite prj Iof x Targets Debug da a Debug 4 Listings 9 Salvo Configuration File I Salvo Help Files Salvo Libraries 3 Salvo Sources 4 43 Sources E main c Figure 9 Project Window with Project Specific Source Files 6 AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE Application Note 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 Library AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE For a library build a fully featured Salvo freeware library for the AT90S8515 when using the tiny memory model is sfiaravrlt a r90 Select Project Files Library Object Files r under Files of type Salvo Libraries under Add to Group navigate to the salvo lib iaravr v2 directory select sfiaravrlt a r90 and Add Project Files 2x Look in Giaev2 B al e a sfiaravrOta r90 a sfiaravris m r90 j sfiaravr2t d r30 a sfiaravr3s t r90 w sfiaravr t d r80 m sfiaravrls tr90 a sfiarawr2t e r90 m sfiaravr3 a r80 ia sf w sfiaravr t e r80 m sfiaravrlt a r90 jm sfiaravr2t m r90 a sfiarawr3t d r90 fa
9. X INTVEC SIZE H1895 h CODE O X INTVEC SIZE 1 D X EXT SRAM BASE X SRAM BASE D X EXT SRAM END X SRAM BASE D X EXT ROM BASE X SRAM BASE D X EXT ROM END 2 X SRAM BASE AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE m Application Note D X EXT NV BASE X SRAM BASE D X EXT NV END 2 X SRAM END D X EXT CSTACK BASE X SRAM BASE D_ X_EXT_CSTACK_END _ X_SRAM_ BASE D X EXT RSTACK BASE X SRAM BASE D X EXT RSTACK END X SRAM BASE D Copyright 1987 2002 IAR Systems All rights reserved FERE FE TE TE TE TE TE HE E H H EH EEE EH FE TE TE TE HEE HE HEE E HEH EH HEH EH E HE E E E E E E E HE EH HE EH E E E E E E E E EH EEE E E E H SNIP OC CK 0 o0 00k 0 0k Sk Sk E ok A o ko Kk ko Ko Kk ko Kk kx ko Kk koX SEGMENTS IN ADDRESS ORDER p dir di dir div dir div di div di dir div div div di dir div div div di dir di div div di div div dir div div div di div di dir div di div dir dir d SEGMENT SPACE START ADDRESS END ADDRESS SIZE TYPE ALIGN NTVEC CODE 00000000 00000009 A com 1 FILLI CODE 0000000A 00000019 10 rel 0 NITTAB CODE 0000001A 0000001F 6 rel 0 CODE CODE 00000020 000005FD 5DE rel 1 ABSOLUTE ABS
10. your project window should look like this E myexl prj inl x Targets Debug da S Debug Listings 9 Salvo Configuration File 9 Salvo Help Files E Salvo Libraries E Salvo Sources Sources Figure 3 Project Window with Groups Now let s setup the projects options for processor type Salvo s pathnames etc for your particular Atmel AVR microcontroller Select Options General Target and under Processor configuration and Memory model make the appropriate selections for your project Note Wherever possible you should always choose a Processor configuration that matches your target processor as closely as possible Avoid using the generic vN options unless your particular configuration requires them Your choice of Memory model will dictate which Salvo library you use in this project AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE 3 PUMPKIN Application Note cpu 8515 AT90S6515 Ehhenced care io PAWMPZ fEGISIET Figure 4 General Settings Processor Configuration and Memory Model Select Project Options ICCAVR Preprocessor and define any symbols you may need for your project and add the include paths PROJ DIRSN and c salvo inc TOOLKIT DIRSSRCACLIBAINCA PROJ DIR c salvo ine Presenve comments Generate Hine directives Figure 5 ICCAVR Settings Project Include Paths and Define
11. 3 IAR Systems All rights reserved Error e117 Incompatible runtime models Module binsem specifies that __rt_version must be 2 30 but module main has the value 3 Total number of errors 1 Total number of warnings 0 gt Build Find in Files in Files Tool Output Figure 22 Linker Error due to Version Mismatch EW v3 This type of error occurs because the Salvo library in this case salvo lib iaravr v2 sliaravrit a r90 was built with v2 of the IAR AVR C Compiler which defines a symbol called rt version as 2 30 yet the project was built in EW v3 which expects rt version to be 3 The solution is simply to use the Salvo library appropriate for the version of the IAR AVR C compiler you are using in this case salvoNXlrbNLaravr v3Nsliaravrlt a r90 AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE 17 Application Note Note version is used by XLINK at link time to ensure consistency between modules C Embedded C or assembler See the AR AVR C EC Compiler Reference Guide for more information Note As long as the major version number of the IAR AVR C Compiler youre using and therefore rt version s value matches that used to generate the Salvo libraries you will be able to link to the precompiled Salvo libraries that are supplied in each salvo for Atmel AVR and MegaAVR distribution E g v3 x can be used with Salvo libraries built with
12. Pro libraries are sliaravrit ar90 and sliaravr1tia r90 respectively You can Ctrl select multiple files at once We recommend that you add the project s map file to your project s Listings group AVRStudio v4 08 is shown In this example the major version number is 3 19
13. Project Debugger You can use all of C SPY s supported features when debugging and testing Salvo applications This includes breakpoints profiling intelligent watch window cycle counting etc ss CSPY myex1 d90 ioj x File Edit View Execute Control AVR Options Window Help Slelzas4esa 4 H e re nnana BI Yatch EY Source main c mein void Task3 void for i OS Delay 40 Task3a PORT 0x08 OSSignalBinSem BINSEM1 P CYCLES 0046680311 RO RI R2 faa an nn void maini void InitPORT bl Profiling i 1 425 46672560 1 113 46672135 1 46672022 E 45672077 1 7154 46679714 0 0 0 Figure 17 Testing a Salvo Application in C SPY Note C SPY supports debugging at the source code level Only applications built from the Salvo source code or a Salvo Pro library 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 C SPY 14 AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE Application Note AVR Studio To test your Salvo application in AVR Studio under File Open File navigate to your project s Debug Exe subdirectory and open the object d90 file Open 2 x Look in a Exe B cs iS e a myex1 d90 File name myex1 90 Open Files of type al Files
14. _WITH_FREE_LIB symbol 18 AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE PUMPKIN REAL TIME SOFTWARE Application Note AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE Complete Salvo LE library build projects are contained in the project files salvo tut tul 6 sysac tul 6le These projects also define the MAKE_WITH_STD_LIB symbol Complete Salvo Pro library build projects are contained in the project files salvo tut tul 6 sysac tul 6prolib 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 sysac tul 6pro These projects also define the MAKE_WITH_SOURCE symbol Note Tutorial and example projects are provided for IAR Embedded Workbench for Atmel AVR v2 prj files and IAR Embedded Workbench for Atmel AVR v3 ewp amp eww files This Salvo project supports a wide variety of targets and compilers For use with IAR s AVR C compiler it requires the SySAc defined symbol as well as the symbols MAKE WITH FREE LIB or MAKE WITH STD LIB for library builds When you write your own projects you may not require any symbols We recommend using the Embedded Workbench s argument variables like PROJ_DIR and TOOLKIT_DIR whenever possible This Salvo Lite library contains all of Salvo s basic functionality The corresponding Salvo LE and
15. d Symbols Next select XLINK List Generate Linker listing This will create a useful map file with the applications ROM and RAM requirements etc Under XLINK Include ensure that the automatically selected xci linker filename matches your target processor 4 AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE PUMPKIN A lication Note TOOLKIT DIRSALIBA Figure 6 XLINK Settings Lastly under C SPY Setup select the Driver ICE200 emulator JTAG emulator Tool ROM monitor CC or oimulator and ensure that the Device description file is the appropriate one for your AVR Figure 7 C SPY Settings Project Chip Description File Select OK to finish configuring your project AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE 5 Application Note Adding your Source File s to the Project Now it s time to add files to your project Choose Project Files C C Source Files c cpp cc under Files of type select Sources under Add to Group navigate to your project s directory select your main c and Add Your Project Files window should look like this Project Files 3 x Look in Gi temp Eo amp al ei main c File name main c Files of type C C Source Files c cpp cc Add to Group Sources Files in Group C temp main c Add Add All Remove Done Cancel Figure 8
16. e 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 Make or Project Build All The build results can be seen in the map file located in the projects Debug List subdirectory FE at TE FE He He aE E FE He AE FE HE AE AE aE EEE EEE aE EEE PEE TAR Universal Linker V4 530 WIN 21 Feb 2004 16 03 32 A90 C temp Debug List myexl1 map C temp Debug Exe myex1 d90 Format debug UBROF version 8 0 2 Using library modules for C SPY rt Command line C salvo lib iaravr v2 sfiaravrit a r90 C temp Debug 0bj mem r90 temp Debug 0bj main r90 IAR EW23 avr lib clit r90 o temp Debug Exe myex1 d90 rt 1 temp Debug List myexl map xms C NIARNEW23NavrNLIBN f NIARNEW23NavrNsrcNtemplateNcfg8515 xcl D X INTVEC SIZE 1A D X FLASH END 1FFF D X SRAM BASE 60 D X SRAM TEND FF D X SRAM END 25F D X EEPROM END 1FF D X HEAP SIZE 10 D X CSTACK SIZE 20 D X RSTACK SIZE 20 e small write formatted write e medium read formatted read f C MNIARNEW23NavrNsrcNtemplateNcfglt xcl ca90 Link time Target CPU List file Output file 1 ise oana
17. ine OSLIBRARY_TYPE OSF define OSLIBRARY_CONFIG OSA Listing 1 salvocfg h for a Library Build Select Project Files All Files under Files of type Salvo Configuration File under Add to Group navigate to your project s directory select salvocfg h and Add Project Files 2 xj Look in Gi temp M al ei Be main c E salvoctg h a myex dtp i myex1 prj File name salvoctg h Files of type All Files Add to Group Salvo Confiquration File Files in Group C temp salvoctg h Add Add All Remove Remove All Done Cancel Figure 13 Adding the Configuration File to the Project Your project window should now look like this I myexl prj Bl x Targets Debug da a Debug 9 Listings 3 Salvo Configuration File B salvoctg h LQ Salvo Help Files 5 3 Salvo Libraries f sfiaravrita r90 53 3 Salvo Sources mem c d Sources i main c Figure 14 Project Window for a Library Build AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE 9 Application Note 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 If you have a Salvo Pro distribution you can do a source code build instead of a library build The application in salvo ex ex1 mai
18. les window should look like this Project Files 2 x Look in Cu src B al c iK cyclic5 c amp eflag c amp inittcb c i m iB binsem c iR cyclicB c B eflag2 c E license c E pi iB binsem2 c iB cyclic c iR eid c B mem c E pi iR chk c iR debug c B event c B msg c E pi B cyclic c E delay c E idle c B msg 2 c E qi iR cyclic2 c iR delay2 c BJ initc B msqq c E gi iE cyclic3 c iR delay3 c E initecb c B msqq2 c E iE cyclic4 c iE destroy c E inittask c B msgq3 c B s H File name mem c Files of type C C Source Files c cpp cc Add to Group Salvo Sources Files in Group C salvo src mem c Add Add All Remove Remove All Done Cancel Figure 11 Project Files Window When finished select Done and your project window should look like this Targets Debug da J Debug Listings 0 Salvo Configuration File E Salvo Help Files Salvo Libraries j sfiaravrlt a ra0 Salvo Sources E mem c a Sources E main c Figure 12 Project Window with Library mem c and User Source File s AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE Application Note The salvocfg h Header File 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 def
19. lication Note Related Documents The following Salvo documents should be used in conjunction with this manual when building Salvo applications with IAR s AVR C compiler Salvo User Manual Salvo Compiler Reference Manual RM IARAVR Creating and Configuring a New Project Create a new Embedded Workbench project under File New Project OK Select AVR as the Target CPU Family navigate to your working directory in this case we ve chosen c temp and create a project named myex1 pr j New Project L2 xi Target CPU Family AVR Save in temp amp Al e File name nyexi prj Create Save as type Project Files prj Cancel Figure 1 Creating the New Project Click Create to continue Choose File Save to save the project Note In Embedded Workbench for Atmel AVR v3 first you create a workspace and then you create one or more projects within that workspace 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 2 AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE Application Note For each group choose Project New Group add in the Group Name and select OK New Group x Group Name OK listings Add to Targets Cancel Figure 2 Creating a Group When finished
20. n c contains calls to the following Salvo user Services OS_Delay Oslin OS WaitBinSem OSSignalBinSem OSCreateBinSem OSSched OSCreateTask OSTimer OSEJX 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 Salvo 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 portiaravr c event c gingt idle sched c 1 oC LINefo inittask C To add these files to your project select Project Files All Files under Files of type Salvo Sources under Add to Group navigate to the salvo src directory select the files listed above and Add 10 AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE Ee Application Note Project Files 2 x Lookin src 7 amp Al esj ij cyclic4 c fe destroy c Inittask c fee m B array c W cyclic5 c We eflag c WB inittch c em B binsem c HE cyclic6 c i etlag c Hlicense c Hp Be binsem2 c HE cyclic c ie eid c W mem c p W chic W debug c W event c W msg c Fp Be cyclic c He delay c We idle c He msg2 c ep Be cyclic2 c HE delay2 c Pinitc He msgg c Wq i HE delay3 c WB initecb c He msgq2 c HB gi File name Files of type C C Source Files c cpp cc Add to Group Salvo Sources
21. t the device e g AT90S8515 under General Target Processor configuration if necessary Set the desired optimizations under ICCAVR Optimizations e Remove the existing Salvo library from the project and replace it with a same named one from salvo lib iaravr v3 AN 29 Building a Salvo Application with IAR s AVR C Compiler and Embedded Workbench IDE Application Note Troubleshooting When finished the new project window will look like this i myexl1 myexl E S myex Debug A Listings E myex1 map A Salvo Configuration File L salvoctg h C Salvo Help Files Salvo Libraries aaa L 8 sfiaravrit a r90 CJ Salvo Sources 2 mem c Ql Sources E main c myex1 Figure 21 Project Window for a Library Build in Embedded Workbench for Atmel AVR v3 r d r Linker Error Incompatible runtime models If you are doing a library build and your version of the IAR AVR C Compiler is different from that used to build the Salvo library you have added to your project the linker will issue an error like this one Messages Bl x Messages l D_ X_EXT_ROM_BASE _ xX_SRAM_BASE D_ X_EXT_ROM_END _ X_SRAM_BASE D_ X_EXT_NV_BASE _ X_SRAM_BASE D_ D_ xX_EXT_CSTACK_BASE _ xX_SRAM_BASE D_ X_EXT_CSTACK_END _ xX_SRAM_BASE D_ X_EXT_RSTACK_BASE _ X_SRA Files IAR Systems Embedded Workbench 3 2 avrilib clib cl1tr90 IAR Universal Linker 4 56F 386 Copyright 1387 200
22. v3 10A rt version mismatches like this will occur whenever Salvo users and the Salvo for Atmel AVR and MegaAVR distribution are at substantially different versions of the IAR AVR C compiler Therefore we strongly recommend that Salvo users keep their IAR AVR C compiler up to date to avoid any potential difficulties Salvo Pro users can avoid any potential problems by simply re building the Salvo libraries with their own version of the IAR AVR C compiler This type of linker error will not happen with source code builds e g when using Salvo Pro to build an application using the Salvo source files as project nodes instead of linking to a Salvo library Application Crashes After Changing Processor Type Example Projects Remember to include the appropriate header file for your AVR variant 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 Example projects for IAR s AVR C compiler can be found in the salvo tut tul 6 sysac directories The include path for each of these projects includes salvo tut tul sysac and each project defines the sysac symbol Complete Salvo Lite library build projects are contained in the project files salvo tut tul 6 sysac tul 6lite These projects also define the MAKE

Download Pdf Manuals

image

Related Search

Related Contents

Epson EMP-730 User's Manual  13IGS 技資第 010 取扱説明書 【はじめに】 このたびは、弊社  (SWR) Test Using the TEGAM 1830A RF Power Meter  User Manual - Led-g  Vivitek D857WT data projector  Samsung Galaxy S Advance Priručnik za korisnike  AT-SL931HD 取扱説明書  Bedienungsanleitung  Téléchargez  Une performance fascinante. - Accu-Chek  

Copyright © All rights reserved.
Failed to retrieve file