Home

Developing your STM32VLDISCOVERY application using the Atollic

image

Contents

1. CT UM0987 NJ User manual Developing your STM32VLDISCOVERY application using the Atollic TrueSTUDIO software Introduction This document provides an introduction on how to use the Atollic TrueSTUDIO software development toolchain version 1 4 0 and later with the STM32VLDiscovery board It provides novice users of the Atollic TrueSTUDIOC tool chain some guidelines to build and run the sample program provided with this document which demonstrates how to create and build their own applications The DISCOVER project referenced in this document corresponds to the demo Flashed into the STM382VLDISCOVERY board during production The project is available within the STM32VLDISCOVERY firmware package available at http www st com stm32vldiscovery Although this application note cannot show all the topics relevant to the Atollic TrueSTUDIC tool it demonstrates the first basic steps necessary to get started with the compiler debugger October 2010 Doc ID 17878 Rev 2 1 22 www st com Contents UM0987 Contents 1 About Atollic TrueSTUDIO toolchain 0 0c e ees 3 2 Starting an existing Atollic TrueSTUDIO project 4 3 Creating your first application lt lt cece ee 14 4 MRGVISION NISIONY 222nccteevicasewteeeesaeeeeseiaceees we ee eas 21 2 22 Doc ID 17878 Rev 2 ky UM0987 1 Note About Atollic TrueSTUDIO toolchain About Atollic TrueSTUDIO toolchain Atollic TrueSTU
2. gt Properties C Build DISCOVER Discovery FIRMWARE Libraries CH3 I3 CM3 CoreSupporti core cm3 c arm atallic eabi gee User stm3zfli x_it o User main o i i TrueSTUDIO startup_stm3zf10x_md_vl o atdPeriph Driver atm3 f10x rec o StdPeriph Driver stma32t10x pwr o atdPeriph Driver stma2t10x gpio a StdPeriph_Driver stm32 10x_exti o atdPeriph Driver misc o STH32 Discovery STN32F100 Discovery o CMSIS system stmg2f10x 0 CMSIS core cm STM32100B EVAL elf rithumb mepu cortex m3 TC Value Line Discovery FIRMWARE Project Value Line Discovery Demonstration TrueSTUDIO DISCOVER STN32F100RB_ FLASH 1d Static J1 cref u Reset Handler W1 HMap STH32100B EVaAL map W1l gqe sections Build complete for project DISCOVER Time consumed 5314 ms 17 Before running your application you should establish the connection with the STM32VLDiscovery board as shown in Figure 11 Figure 11 Hardware environment Computer with TrueSTUDIO running STM32VLDISCOVERY ha TL Do USB cable type A to mini B Note For more details on how to establish your hardware environment you can refer to the UM0919 User Manual STM32VLDiscovery available at www st com stm32 discovery Doc ID 17878 Rev 2 11 22 d Starting an existing Atollic TrueSTUDIO project UM0987 18 Select the DISCOVER project in the project explorer and then press F11 to dis
3. File Menu Figure 16 New C project wie Edit Source Refactor Navigate Search Run Project Manuals Window Help ae Z C Project Open File 1 Project F Project Convert to a ChC Project 5 Source Folder C Folder Di Source File K Header File E File from Template Rename G Class L Refresh ri Other Ctrl M Doc ID 17878 Rev 2 15 22 d Creating your first application UM0987 16 22 Name the project NewProject select STM32 C Project in the Project type and click Figure 17 Name the project a C Project C Project Create C project of selected type Project name NewProject Use default location CiiNewWorkspaceNewProject Project type Toolchains elf Executable E Atollic ARM Tools S Empty Project S SIE Project i Makefile project Show project types and toolchains only if they are supported on the platform Cancel 9 Doc ID 17878 Rev 2 UM0987 Creating your first application 6 Select STM32_Discovery as Evaluation board and click Next Figure 18 Select STM32_Discovery as the evaluation board a C Project TrueSTUDIO Build Settings Select hardware and build configuration Target Evaluation board 5TM32_Discovery Microcontroller Family Microcontroller Floating point Software implementation Na Code location FLASH M Instruction set LS Thumb Endianess LS Little endian Optimization Remove unused code dead code removal Remove unused data
4. dead data removal Cancel Note Note Choosing STM32_Discovery as evaluation board configures the project as follows Microcontroller STM32F100RB Debug probe ST LINK Connection Serial Wire Debug SWD d Doc ID 17878 Rev 2 17 22 Creating your first application UM0987 7 Verify that ST LINK is used as JTAG probe and click Finish Figure 19 Select ST LINK as JTAG probe a C Project TrueSTUDIO Misc Settings Select miscellaneous project settings JTAG Probe ST LINK w ST LIMK Atollic TruesTUDIO Lite only supports one type of JTAG probe Please purchase the Professional version bo get support For a large number of other types of JTAG probes fe Your project is successfully created Note Atollic TrueSTUDIO generates target specific sample files main c stm32f10x_it c and so on in the project folder to simplify development You can tailor this project to your needs by modifying these sample files The easiest way to add source files to the project is to copy them into this src folder which contains main c stm32f10x_it c and so on Figure 20 Project sample files L Project Explorer 52 El NewProject Hi Includes H E STM32_EVAL B S src H e stmi32Fi0x_ Cont X ic stmazf10x t c h stm2F1O _it h 4 Firmware E i Debug stm32_Flash ld lt 1 8 22 Doc ID 17878 Rev 2 UM0987 Creating your first application 8 To build the project select the NewProject pr
5. any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever any liability of ST ST and the ST logo are trademarks or registered trademarks of ST in various countries Information in this document supersedes and replaces all information previously supplied The ST logo is a registered trademark of STMicroelectronics All other names are the property of their respective owners 2010 STMicroelectronics All rights reserved STMicroelectronics group of companies Australia Belgium Brazil Canada China Czech Republic Finland France Germany Hong Kong India Israel Italy Japan Malaysia Malta Morocco Philippines Singapore Spain Sweden Switzerland United Kingdom United States of America www st com 22 22 Doc ID 17878 Rev 2 ky
6. is now open Figure 3 shows the names of the different views referred to in this document Figure 3 Atollic TrueSTUDIO windows a C C Atollic TrueSTUDIO STM32 Lite Sle File Edit Source Refactor Navigate Search Run Project Manuals Window Help 0 ES Gey cic 0 Q SH L Project Explorer 25 R G Y Files window Project explorer Z Problems J Tasks l Console 2 C Properties C Build STM32100B EV AL F Ek i Console window g D items selected 9 6 22 Doc ID 17878 Rev 2 UM0987 Starting an existing Atollic TrueSTUDIO project 9 Now the workspace is open you are ready to load projects The TrueSTUDIO Discovery workspace contains a demo project for the Discovery kit To load this project the following steps should be performed a Select Import from File menu b Inthe Import window select General Existing Projects into Workspace and click Next Figure 4 Select to import an existing project BER Select Create new projects From an archive File or directory Select an import source type fiter test id General Ie Archive File E Existing Projects into Workspace G File System E Preferences AL CICLE H Run Debug H Team Cancel d Doc ID 17878 Rev 2 7 22 Starting an existing Atollic TrueSTUDIO project UM0987 c Browse to the TrueSTUDIO workspace folder which contains the DISCOVER project folder located at stm32vidiscovery_package Proje
7. 23 Edit configuration a Edit Configuration Edit launch configuration properties Mame YewProject elf Main Kk Debugger lt Startup i Source E Common Project CICLE Application Debug NewProject elf Search Project 13 In the Debug configurations window click on OK to program the Flash and begin debugging 14 Now you can start debugging your application lt 20 22 Doc ID 17878 Rev 2 UM0987 Revision history 4 Revision history Table 1 Document revision history bam Sameon e 10 Sep 2010 Initial release Changed Firmware Project Value Line Discovery Demonstration TrueSTUDIO path to eo Cheon s stm32vidiscovery_package Project Demo TrueSTUDIO Changed Figure 7 and Figure 5 Doc ID 17878 Rev 2 21 22 d UM0987 Please Read Carefully Information in this document is provided solely in connection with ST products STMicroelectronics NV and its subsidiaries ST reserve the right to make changes corrections modifications or improvements to this document and the products and services described herein at any time without notice All ST products are sold pursuant to ST s terms and conditions of sale Purchasers are solely responsible for the choice selection and use of the ST products and services described herein and ST assumes no liability whatsoever relating to the choice selection or use of the ST products and services described herein No license express or implied by estoppel or ot
8. DIO is an Eclipse based software development platform that includes a highly optimizing C C compiler a state of the art editor and a professional debugger It integrates all the tools needed to develop embedded applications and helps expedite the development process of embedded applications by providing many features such as Powerful source code editor with many features like spell checking of C C comments word and code completion content assist parameter hints and code templates Project manager that automates the task of creating a working project for an electronic board or microcontroller device Integrated Make Utility functionality for assembling compiling and linking your embedded applications True integrated source level and assembler level debugger with high speed CPU Flash programming utility for downloading the application program into Flash ROM Productivity features such as a graphical file difference viewer a programmer s calculator an integrated MS DOS console window and a batch file execution window Links to manuals on line help and user guides Atollic TrueANALYZER STM82 product is available for professional code quality analyzis of STM32 applications Atollic TrueSTUDIO STM32 Professional version is available with a lot more capabilities Further information about Atollic TrueSTUDIO toolchain can be found at www atollic com Doc ID 17878 Rev 2 3 22 Starting an existing Atollic TrueSTUDIO p
9. artup and Shutdown Web Browser Workspace Build Order linked Resources Local History CICLE H Help W Instali Update H Runt Debug H Team 13 Add a path variable named CurPath which points to the stm32vidiscovery_package folder containing Libraries Project and Utilities folders Note All Files in the DISCOVER project are linked using a path variable called CurPath to allow users to copy and run this project under any path location just by updating this variable d Doc ID 17878 Rev 2 9 22 Starting an existing Atollic TrueSTUDIO project UM0987 Figure 8 Add path variable CurPath Define a New Path Yariable Enter a new variable name and its associated location Mame CurPath Location iC Value Line Discovery FIRMWARE Folder selection Specify the Folder to be represented by the variable E L value Line Discovery 1 boc Seer FIRMWARE Libraries Project C Utilities Folder FIRMWARE Make New Folder 14 To build the project select the DISCOVER project in the project explorer 15 Click on Build Project in the Project menu Figure 9 Build project names Manuals Window Help Seem De re eee k JEM KF UO eLC E Ctrl B Build Project Build Working Set Clean Build Automatically Make Target lt 10 22 Doc ID 17878 Rev 2 UM0987 Starting an existing Atollic TrueSTUDIO project 16 Your project is successfully compiled
10. ct Demo TrueSTUDIO Figure 5 Select the project to import r impo rt SEE Import Projects Select a directory to search For existing Eclipse projects Select root directory C an326e stm32vidiscovery_package Project DemoyTruesS TUDIC O Select archive He Projects DISCOVER C ans268 stmsevidiscovery_ package Project Demoa TruesSTUDIO DISCOVER Select All Deselect All A Copy projects into workspace Working seks add project to working sets 10 Select the DISCOVER project from the Projects list and click Finish 11 Select Preferences from Window menu Figure 6 Window preferences Mu j mn d il New Window New Editor Open Perspective Show view Customize Perspective Save Perspective S Reset Perspective Close Perspective Close All Perspectives Navigation 9 8 22 Doc ID 17878 Rev 2 UM0987 Starting an existing Atollic TrueSTUDIO project 12 Inthe Preferences window select General gt Workspace gt Linked Resources and click New button to add a path variable Figure 7 Add linked resources a Preferences f B Ed type fiter tet Linked Resources General 4ppearance Compare Patch Content Types Path variables specify locations in the file system The locations of linked resources Editors may be specified relative to these path variables Enable linked resources Keys Defined path variables Network Connections Perspectives Search Security St
11. ded to the workspace and sample files are generated in the project folder to simplify development The debug configuration is done automatically when the STM32VLDiscovery kit is selected as the evaluation board 1 Start Atollic TrueSTUDIO STM32 as follows a Open the Microsoft Windows Start menu b Click on Programs c Open the Atollic folder d Open the TrueSTUDIO STM32 product folder e Click on the Atollic TrueSTUDIO STM32 product name 2 The program is then started and requests the Workspace location Click the OK button if you want to add your project to an existing workspace otherwise enter a new workspace location Figure 14 Select workspace a Workspace Launcher Select a workspace Atollic TrueSTUDTOR STH 32 Lite stores your projects in a Folder called a workspace Choose 4 workspace Folder to use For this session Workspace ciNewWorkspace M t Copy Settings a Z 14 22 Doc ID 17878 Rev 2 ky UM0987 Creating your first application 3 A Welcome window is then displayed To start using Atollic TrueSTUDIO click on the Start using TrueSTUDIO link Figure 15 Start using TrueSTUDIO Intreduction Product cyeryiewy Product doourmentation Tiethini al super Engineering services a aa ae ES Product mews Ae sere Ta oe TrueSTUDIO Lite version Start using TreeSTUGIO Click here to continue 4 The main window of Atollic TrueSTUDIO is now open Select New gt C Project from the
12. e Discovery FIRMWARE Project value Line Discovery Demc H ST LINK z Wee ee see Gilet AKIRA Te TIT OTA Like 1 A RAT elek Bini ser kelh ek at S ii Lc main c Lc stm32FiOx_exti c Fc main c 25 7 oe Outline 25 Se 59 gt int main void L lee i N 60 pl 7 gt Enable GPIOxu Clock RCC APBIPeriphClock md RCC APB B1Periph PWR ENABLE RCC APHIPeriphClock md RCC APBePeriph GPIOC ENABLE RCC APHIPeriphClock md RCC APBzPeriph GPIOA BBL stma2F 10 STM32F100_Discovery h LSE_FAIL FLAG LSE_PASS FLAG LSE Delay u32 count uaz BlinkSpeed use KeyState uae Delaytuints2 E void WF Tiii TEE ee oe E LZ TT lt iili gt El console 22 4 Tasks 2i Problems 4 Executables U Memory Ee RE E e gies a STM 32 1006 EV4L elf Embedded CfC Application C Value Line Discovery FIRMWARE Project Value Line Discovery Demonstration TruesTUDIO DO oTMH32 Successutully completed reset operation LG D Ch M Gh Be Ln m Ch Ti 7 X Initialise LEDs LD34 amp LD4 both off STH32F100 Discovery LEDInit LEDS STH32F100 Discovery LEDInit LED4 4 Ch Ch LD om DE EEE N HR DG L TS Doc ID 17878 Rev 2 13 22 d Creating your first application UM0987 3 Creating your first application Creating a new project for the STM32VLDiscovery with Atollic TrueSTUDIO is very easy With a few steps all the required files startup file firmware library and so on are ad
13. herwise to any intellectual property rights is granted under this document If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein UNLESS OTHERWISE SET FORTH IN ST S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION OR INFRINGEMENT OF ANY PATENT COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE ST PRODUCTS ARE NOT RECOMMENDED AUTHORIZED OR WARRANTED FOR USE IN MILITARY AIR CRAFT SPACE LIFE SAVING OR LIFE SUSTAINING APPLICATIONS NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY DEATH OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE ST PRODUCTS WHICH ARE NOT SPECIFIED AS AUTOMOTIVE GRADE MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER S OWN RISK Resale of ST products with provisions different from the statements and or technical features set forth in this document shall immediately void
14. oject in the project explorer 9 Click on Build Project in the Project menu Figure 21 Build project woes Manuals Window Help aro Build All Ctrl B Build Configurations Build Project Build Working Set Clean Build Automatically 10 Your project is successfully compiled Figure 22 Successfully compiled project ch Problems HS Tasks El console 5 C Properties F Ek Kal C Build NewProject firmvare STN32F10x StdPeriph DPriver sre misc o firmware CHS La CNS Devicesupport aT STNs2F10xysystem stmg2zf10x 0 firmware CHS La CMS Devicesupport ST S3STM32F10x startupi TC ue TUD LO startup 3 tmszZf10x mad vl o firmware i CHS LS C HB3 Y COESSupHOE LX GDE S GCm3 0 STM32 EVAL Board STW32 Discovery o o NewProject elf mthumb mcpu cortex m3 TC Newlorkspace NewProject stmae flash ld static Wl cref u Reset Handler W1l Map NewProject map W1l ge sections arm atollic eabi objcopy 0 ihex NewProject 1f amp NewProject hex Flash Converter only available in TrueSTuUbIoO Professional Build complete for project NewProject Time consumed 186515 ms Doc ID 17878 Rev 2 19 22 d Creating your first application UM0987 11 Before running your application you should establish connection with the STM32VLDiscovery as shown in Figure 11 Hardware environment 12 Select the NewProject project in the project explorer and then press F11 to display the debug configurations window Figure
15. play the debug configurations window Figure 12 Edit configuration a Edit Configuration Edit launch configuration properties Name STM321006 4lF Main C Debugger z Startup Ey Source E Common Project CICLE Application Debug STM32 1006 elf Search Project lt 12 22 Doc ID 17878 Rev 2 UM0987 Starting an existing Atollic TrueSTUDIO project 19 Inthe Debug configurations window click on OK to program the Flash and begin debugging 20 Now you can start debugging your application The debugger perspective supplied by Atollic TrueSTUDIO allows source code debugging at C and assembly levels breakpoint setting individual variables monitoring and watching during code execution 21 Torun your application click on Resume in the Run menu or click on the resume button as shown in Figure 13 If everything is OK LEDS blinks and every time the USER button is pressed LEDS blinking frequency changes and LED4 is turned on Figure 13 Resume execution a Debug C Walue Line Discovery FIRMWARE WrojectWalue Line Discovery Demonstration src main c A ele Fie Edit Source Refactor Navigate Search Bun Project Manuals Window Help im ion W O Q 1 Swe Fey E Debug Hg cic 3 Na lt gt F Debug E3 o b 7 o BS eB WTE a lt E STM321006 E AL elf EmbResume F8 Application aA E ER Embedded C C Application 8 20 10 2 04 PM Suspended lg Thread 1 Suspended 1 main C Walue Lin
16. roject UM0987 2 Starting an existing Atollic TrueSTUDIO project After installing Atollic True STUDIO STM32 on your computer start the program by performing the following steps Open the Microsoft Windows Start menu Click on Programs Open the Atollic folder Open the TrueSTUDIO STM32 product folder Click on the Atollic TlueSTUDIO STM32 product name The programs starts and asks for the Workspace location Browse to the folder that contains the Value Line Discovery Demonstration TrueSTUDIO workspace located at stm32vidiscovery_package Project Demo TrueSTUDIO and click on OK oe e ee D Figure 1 Open workspace a Workspace Launcher Select a workspace Stollic TruesSTUDTOR SHS Lite stores your projects in a Folder called a workspace Choose a workspace Folder to use For this session Workspace CHans26eistmseyidiscovery packagelProject Demo TruesSTUDIC Copy Settings UM0987 Starting an existing Atollic TrueSTUDIO project 7 A Welcome window is then displayed To start using Atollic TrueSTUDIO click on Start using TrueSTUDIO Figure 2 Start using TrueStudio D cits Mak True TOR TIM LRS k WW atollit corm Introduction Product very baw Technical support Erejimeerinig services Product news en D Start using trestupio Click here to continue d Doc ID 17878 Rev 2 5 22 Starting an existing Atollic TrueSTUDIO project UM0987 8 The main window of Atollic TrueSTUDIO

Download Pdf Manuals

image

Related Search

Related Contents

Keithley 177 Microvolt DMM  マニュアル - Scythe  - BlowerDoor  Panasonic DMW-AC6EB  Manual - DURAN ELECTRONICA  Scarlett Studio Guía del Usuario  - Salvatore Leanza Photography    Case Logic 2 Capacity USB Drive Shuttle  FEA-028 取扱説明書  

Copyright © All rights reserved.
Failed to retrieve file