Home
Flasher STM8 Software
Contents
1. 16 2 2 1 Sample Projects CHAPTER 2 Getting Started If you are new to Flasher STM8 Software it might be a good idea to open one of our sample projects to familiarize yourself with the application You find those project files in the Projects subdirectory of Flasher STM8 Software s installation directory Once you have opened a project file the project window contains the relevant project settings e g chip type RAM size etc The settings are known to be good defaults for the respective devices You may then continue to open your own data files to actually program your device The table below contains the included project files together with a short description Project Description STM8L101K3 jflash STM8L101K3 with internal flash memory STM8S208MB jflash STM8S208MB with internal flash memory Table 2 2 List of sample Flasher STM8 Software projects Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 2 3 Menu structure The main window of Flasher STM8 Software contains seven drop down menus File Edit View Target Options Window Help Any option within these drop down menus that is followed by a three period ellipsis is an option that requires more information before proceeding Flasher STM8 Software UM05007 2009 2014 SEGGER Microcontroller GmbH amp Co KG File menu elements CHAPTER 2 Getting Started Comma
2. readchip Read entire flash chip readrange lt SADDR gt lt EADDR gt Read specified range of target memory startapp Start target application exit Exit Flasher STM8 Software help Display help dialog Display help dialog Flasher STM8 Software UMO5007 Table 4 1 Flasher STM8 Software command line options 2009 2014 SEGGER Microcontroller GmbH amp Co KG 38 CHAPTER 4 Command Line Interface 4 3 Batch processing Flasher STM8 Software can be used for batch processing purposes All important options are available in command line mode as well If you provide command line options Flasher STM8 Software will still start its GUI but processing will start imme diately The example batchfile displays a message opens a project and a data file starts pro gramming and closes Flasher STM8 Software The return value will be checked and in case of an error an error message displayed Adapt the example according to the requirements of your project QECHO OFF ECHO Open a project and data file start programming and exit FlasherSTM8 exe openprjC Projects Default jflash openC Data data bin 0x4800 program exit IF ERRORLEVEL 1 goto ERROR goto END ERROR ECHO Flasher STM8 Software Error pause END Note that every call of FlasherSTM8 exe has to be completed with the exit option otherwise the execution of the batch file stops and the following comm
3. Pay special attention to the following aspects RAM address Flash base address MCU e Try to program your target device using a sample project file if available Flasher STM8 Software ships with an extensive number of project files for many target boards See section Sample Projects on page 16 for a complete list of project files 7 1 2 Typical problems Failed to connect Meaning This error message is shown if any error occurs during the connection process Remedy Make sure the target is actually connected to Flasher STM8 and powered Verify the correct connection between target and Flasher Blank check failed Meaning The target memory was not empty during blank check Remedy Erase target memory RAM check failed Meaning No RAM found at the specified RAM location Remedy Make sure a correct RAM address is specified in the project settings See section CPU Settings on page 25 Unsupported flash type bus width Meaning The target flash memory or the bus organization is not yet supported Remedy Inform us about the device you want to use SEGGER is constantly adding support for new devices No matching RAMCode Meaning There is no programming algorithm available for the selected target memory type Remedy Inform us about the device you want to use SEGGER is constantly adding support for new devices Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 7
4. address of the selected flash memory The default value is O which fits for all STM8 devices 3 1 4 2 Organization You should select the buswidth and the number of flash chips connected to the address and data bus of the MCU Normally this has not to be changed for STM8 devices 3 1 4 3 Sector selection The final section of this dialog indicates the sectors to be acted upon whether they are to be cleared read back or written An individual or series of sectors may be selected from the predetermined valid range Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 3 1 5 Production settings 27 The performed actions of the auto programming feature Target gt Auto shortcut F7 can be defined in the production settings dialog The default behaviour is Pro gram and Verify Complete data General Target interface CPU Fash Production m Production mode Vol age thre shold 3000 my Delay before start 500 ms sesseesseoseecsassesesssensnagsevsuscaseossecsonssney Kette gl Address 00004000 Next SN fi Len a Increment H m Actions performed by Auto J Program F Secure chip IT Unsecure chip F Start application Erase Chip IV Verify Complete data y 3 1 5 1 Program serial number Flasher STM8 supports programming of serial numbers In order to use the serial number programming feature the project to be used as
5. of the gen erated data file can be defined Test speed writes data of a specified size to a defined address reads the written data back and measures the up and download speed Hardware gt allows testing of proper functionality of the Flasher RS232 interface signals Secure chip Secures the MCU Unsecure chip Unsecures the MCU Check blank Checks flash to see if it is empty Fill with zero Fills all selected flash sectors with zero Erase sectors Erases all selected flash sectors Erase chip Erases the entire chip Program Programs the chip using the currently active data file Program amp Verify Programs the chip using the currently active data file and then verifies that it was written successfully The Auto command performs a sequence of steps It con nects to the device erases sectors and programs the chip using the currently active data file before the written Auto data is finally verified The range of sectors to be erased can be configured through the Flash tab of the Project settings dialog and through the Global settings dialog See chapter Settings on page 21 for further details Verify Verifies the data found on the chip with the data file VerifyCRC gt Verifies the CRC There are three ways in which the CRC can be verified Affected sectors verifies the CRC of the affected sec tors Selected sectors verifies the CRC of the selec
6. 2 51 Contacting support If you experience a Flasher STM8 Software related problem and the advices from the sections above do not help you to solve it you may contact our Flasher STM8 Soft ware support In this case please provide us with the following information A detailed description of the problem The relevant log file and project file In order to generate an expressive log file set the log level to All messages see section Global Settings on page 31 for information about changing the log level in Flasher STM8 Software The relevant data file as a hex or mot file if possible The processor used Once we received this information we will try our best to solve the problem for you Our contact address is as follows SEGGER Microcontroller GmbH Co KG In den Weiden 11 D 40721 Hilden Germany Tel 49 2103 2878 0 Fax 49 2103 2878 28 Email support segger com Internet http www segger com Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 52 CHAPTER 7 Support Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 53 Chapter 8 Literature and references This chapter lists documents which we think may be useful to gain a deeper under standing of technical details Flasher STM8 Software UMO5007 O 2009 2014 SEGGER Microcontroller GmbH 8 Co KG 54 CHAPTER 8 Literature and references Reference Title
7. 3 2 1 2 Automatically unlock sectors If this option is checked all sectors affected by an erase or program operation will be automatically unlocked if necessary 3 2 1 3 Perform blank check If this option is checked a blank check is performed before any program operation to check if the affected flash sectors are completely empty The user will be asked to erase the affected sectors if they are not empty 3 2 1 4 Skip blank areas on read If this option is checked a blank check is performed before any read back operation to check which flash areas need to be read back from target This improves perfor mance of read back operations since it minimizes the amount of data to be trans ferred via SWIM and USB or ethernet Flasher STM8 Software UM05007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 32 CHAPTER 3 Settings 3 2 2 Logging You may set some logging options to customize the log output of Flasher STM8 soft ware 3 2 2 1 General log level This specifies the log level of Flasher STM8 Software Increasing log levels result in more information logged in the log window 3 2 2 2 Enable DLL logfile If this option is checked you can specify a file name for the DLL logfile The DLL log file differs from the log window output of Flasher STM8 Software It does not log Flasher STM8 Software operations performed Instead of that it logs the STM8 DLL API functions called from within Flasher STM8 Software only Flasher ST
8. Comments This document describes the SWIM STM8 SWIM STM8 SWIM communica protocol used by STM8 targets for rotocol tion protocol and debug communication with the Flasher p module UM0470 STM8 It is publicly available from ST www st com Table 8 1 Literature and References Flasher STM8 Software UM05007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 55 Index F Flasher ug eegent 12 M Menu structure US 17 P PCOJECUS eessen ege eg 16 S SWIM entendu are 12 Syntax conventions used 5 T Le E EE 23 U USB inicio A ge 23 Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 56 CHAPTER Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG
9. Flasher STM8 Software User amp Reference Guide Document UMO5007 Software version 1 30 Revision 0 Date July 24 2014 Ve SEGGER A product of SEGGER Microcontroller GmbH amp Co KG www segger com Disclaimer Specifications written in this document are believed to be accurate but are not guar anteed to be entirely free of error The information in this manual is subject to change for functional or performance improvements without notice Please make sure your manual is the latest edition While the information herein is assumed to be accurate SEGGER Microcontroller GmbH 8 Co KG the manufacturer assumes no responsibility for any errors or omissions The manufacturer makes and you receive no warranties or conditions express implied statutory or in any communication with you The manufacturer specifically disclaims any implied warranty of merchantability or fitness for a particular purpose Copyright notice You may not extract portions of this manual or modify the PDF file in any way without the prior written permission of the manufacturer The software described in this doc ument is furnished under a license and may only be used or copied in accordance with the terms of such a license 2009 2014 SEGGER Microcontroller GmbH amp Co KG Hilden Germany Trademarks Names mentioned in this manual may be trademarks of their respective companies Brand and product names are trademarks or registered trademarks
10. H amp Co KG 1 2 Assumptions This user manual assumes that you already possess working knowledge of the Flasher STM8 device If you feel that your knowledge of Flasher STM8 is not sufficient we recommend the Flasher STM8 manual which describes the device and its use in detail Flasher STM8 Software UM05007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 12 CHAPTER 1 Introduction 1 3 Requirements 1 3 1 Host Flasher STM8 Software requires a PC running Microsoft Windows 2000 or later with a free USB port dedicated for a Flasher STM8 A network connection is required only if you want to use Flasher STM8 Software together with a remote Flasher STM8 device When using a network connection for communication with the Flasher no USB data connection is required USB will be needed for power only 1 3 2 Target A SWIM interface must be available on the target device to establish the connection with the host system The target has to be either be powered externally or being able to be powered by 5V that can optionally be output from the Flasher itself Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG Chapter 2 Getting Started This chapter presents an introduction to Flasher STM8 Software It provides an overview of the included sample projects and describes Flasher STM8 Software s menu structure in detail Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH
11. In order to program serial numbers that can not be covered by the continuous serial number scheme above e g when programming non continuous serial numbers or having gaps between serial numbers a serial number list file needs to be created manually by the user When selecting Target gt Auto the Flasher STM8 software will then check its working folder for a serial number list file named lt Project Name gt _SNList txt Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 29 The serial number list file needs to adhere to the following syntax e One serial number per line e Each byte of the serial number is described by two hexadecimal digits Example An 8 byte serial number should be programmed at address 0x08000000 and read in the memory as follows 0x08000000 0x01 0x02 0x03 0x04 0x55 0x66 0x77 0x88 To do so the serial number list file should look as follows Format View Help 0102030455667788 0102030455667789 010203045566778A 0102030455667788 01020304556677 8C 010203045566778D 010203045566778E 010203045566778F 0102030455667790 0102030455667791 0102030455667792 0102030455667793 0102030455667794 0102030455667795 The number of bytes to read per line is configured via the Len option in the settings menu The line the Flasher STM8 software has to program in the first programming cycle is configured via the Next SN option in the settings menu In this case Next SN needs to b
12. M8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 33 3 2 3 Projects You may define whether changes to a project should be saved automatically 3 2 3 1 Save project file on close If this option is checked the Flasher STM8 Software will automatically save project changes including firmware files when closing the software If the option is not checked but the Flasher STM8 Software detects changes to the project upon closing a dialog will ask whether these changes should be saved When using the Flasher STM8 Software via command line the dialog will not appear and changes will only be saved if the option was checked Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 34 Flasher STM8 Software UMO5007 CHAPTER 3 Settings 2009 2014 SEGGER Microcontroller GmbH amp Co KG 35 Chapter 4 Command Line Interface This chapter describes the Flasher STM8 Software command line interface The command line allows using Flasher STM8 Software in batch processing mode and other advanced uses Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 36 CHAPTER 4 Command Line Interface 4 1 Overview In addition to its traditional Windows graphical user interface GUI Flasher STM8 Software supports a command line mode as well This makes it possible to use Flasher STM8 Software for batch processing purposes All important optio
13. addr saveprjas lt FILENAME gt Save the current project in the specified file saveprj Save the current project open lt FILENAME gt lt SADDR gt Open a data file Please note that the lt SADDR gt parameter applies only if the data file is a bin file saveas lt FILE NAME gt lt SADDR gt lt EADDR gt Save the current data file into the specified file Please note that the parameters lt SADDR gt lt EADDR gt apply only if the data file is a bin file or c file save lt SADDR gt lt EADDR gt Save the current data file Please note that the parameters lt SADDR gt lt EADDR gt apply only if the data file is a bin file or c file savecfg lt FILENAME gt Saves programmer config file savedat lt FILENAME gt Saves programmer data file download Downloads configuration to programmer relocate lt OFFSET gt Relocate data by the given offset delrange lt SADDR gt lt EADDR gt Delete data in the given range connect Connect to target disconnect Disconnect from target unsecurechip Unsecures target device checkblank Blank check target erasesectors Erases selected sectors erasechip Erases entire flash chip programverify Program and verify target program Program target auto Erases programs and verifies target verify Verify target memory readsectors Read selected sectors
14. amp Co KG 14 CHAPTER 2 Getting Started 2 1 Setup The Flasher STM8 setup procedure required in order to work with Flasher STM8 Soft ware is described in the Flasher STM8 User Guide The Flasher STM8 User Guide is part of the Flasher STM8 software package which is available for download under www segger com 2 1 1 Whatis included The following table shows the contents of all subdirectories of the Flasher STM8 software and documentation pack with regard to Flasher STM8 Software Directory Contents The Flasher STM8 Software application Please refer to the Flasher STM8 manual for more information about the other Flasher related tools Contains the Flasher STM8 Software documentation and OS the other Flasher related manuals Two csv files for the Flasher STM8 Software internal EE EE EE management of supported MCU s und flash chips Sam Contains sample projects with good default settings ple FlasherSTM8 Pro see section Sample Projects on page 16 for further jectFiles details Table 2 1 Flasher STM8 Software directory structure Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 15 2 2 Using Flasher STM8 Software for the first time Start Flasher STM8 Software from the Windows Start menu Flasher STM8 Software s main window will appear which contains a log window at the bottom and the Project window of a default project on the left The application l
15. ands will not be processed Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 39 Chapter 5 Working with Flasher STM8 software This chapter contains information about the required steps how to setup a new Flasher STM8 Software project and other common tasks related to the Flasher STM8 software that you may need when working with the Flasher STM8 Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG A0 CHAPTER 5 Working with Flasher STM8 software 5 1 Creating a new Flasher STM8 Software project Before creating a new Flasher STM8 Software project you should have an under standing of your target system e Take a look at the schematic and the documentation of your CPU SOC e Locate RAM in the chip documentation In the following all the necessary steps to create a project file are explained 1 Select File gt New Project to open a new project 2 Open the Project Settings context menu Select Options gt Project Settings or press ALT F7 to open the Project settings dialog and select the type of con nection to Flasher STM8 Project settings Select Engineering More options typically used for setup Flasher STM8 Software UMO5007 O 2009 2014 SEGGER Microcontroller GmbH amp Co KG 41 3 The Target interface dialog should look similar to the one below Using the SWIM high speed interface should be fine in almost any case If y
16. drivers e g for NAND and NOR flashes SD MMC and Com pactFlash cards are available emUSB USB device stack A USB stack designed to work on any embedded system with a USB client controller Bulk communication and most standard device classes are sup ported Table 1 1 ES dh Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG Table of Contents 1 is e A EE 9 1 1 What is Flasher STM8 Software nan nnan nan c ron nn rr rrr rr nen EE nae eae nS 10 1 1 1 A E DU ES CR A 10 1 2 LC Du e e al EE 11 1 3 REQUIEM stan AE renews ee Dale de daemon da aE ENA ERA dent 12 1 3 1 TOS e 12 1 3 2 WAKO E 12 2 SONG Slanted EE 13 2 1 SU EE E lt Be Batt aad 14 2 1 1 What is included esse es a A A AS a 14 2 2 Using Flasher STM8 Software for the first time 15 2 2 1 Sampl Projects mica ir a TE RL E ia e 16 2 3 BET UK ged e 17 A A lt cis ee ga eee 21 3 1 Project e DEI IS ER 3 1 1 Ge eral gl Le tas etd ER 3 1 1 1 A A ace dna 23 3 1 1 2 Enable Flasher logfile rran aa e a as 23 3 1 2 Target Interface Settings a 24 3 1 3 ERR EE ENEE dee RE RARE dE do cernes case eee 25 3 1 3 1 DEVICE A ETE 25 3 1 3 2 Us target RAM ARO 25 3 1 4 Flash Settings ii A ones 26 3 1 4 1 Bas Address dae 26 3 1 4 2 OrganiZzatiOn A OS 26 3 1 4 3 SECO Sl d d degt ZE NEEN EEN des tn das 26 3 1 5 Production Setting S A A AA A 27 3 1 5 1 Program s rial NUMBEE isis sieeve dev eae sk aside A A 27 3 1 5 2 Acti
17. e lt ProjectName gt _Serial txt file is cre ated within the folder of the Flasher project file 3 1 5 2 Actions performed by Auto The checked options will be perforemed when auto programming a target Target gt Auto shortcut F7 The default behaviour is Program and Verify CRC You can optionally include Erase Unsecure Chip and Start application Find below a table which describes the commands Command Description Performs an erase depending on the settings selected in the aes drop down box e e Chip Erase the entire chip independent of the con tent Program Programs the data file Verify Verifies the program data a SC e Complete data Verifies data by reading it back Unsecure chip Unsecures the device if supported by algorithm Spent Ge Starts application after programming verify completed Needs reset pin to be connected to Flasher STM8 Table 3 2 Actions performed by Auto Flasher STM8 Software UM05007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 31 3 2 Global Settings Global settings are available from the Options menu in the main window Global settings Affected sectors only iy im ks ks i 3 2 1 Operation You may define the behavior of some operations such as Auto or Program amp Ver ify 3 2 1 1 Disconnect after each operation If this option is checked connection to the target will be closed at the end of each operation
18. e set to 0 since programming should start with the serial number bytes defined in the first line of the file Note If the number of bytes specified in a line of the serial number list file is less than the serial number length defined in the project the remaining bytes are filled with Os Note If the number of bytes specified in a line of the serial number list file is greater than the serial number length defined in the Flasher project the remaining bytes will be ignored Note When using Windows 7 please make sure that the used project file is located at a folder with write permission 3 1 5 1 4 Programming process Flasher STM8 will increment the serial number in lt ProjectName gt _Serial txt by the value defined in Increment after each successful programming cycle 3 1 5 1 5 Sample setup The following is a small sample to demonstrate the setup of the Flasher STM8 soft ware for serial number programming In this sample 4 byte serial numbers starting at 1234567 shall be programmed at address 0x08001000 Defining serial number address length start value and increment In the Flasher project the following values need to be defined Flasher STM8 Software UM05007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 30 Len is 4 Increment is 1 CHAPTER 3 Settings Address is 0x08001000 Next SN is 1234567 Now Flasher STM8 is prepared to program the serial number After programming the serial number th
19. e usage Recent Files gt Contains a list of the most recently open data files Recent Projects gt Contains a list of the most recently open project files Exit Exits the Flasher STM8 Software application Table 2 3 File menu elements Edit menu elements Command Description Relocate Relocates the start of the data file to the supplied hex offset from the current start location Delete range Deletes a range of values from the data file starting and ending at given addresses The End address must be greater than the Start address otherwise nothing will be done Table 2 4 Edit menu elements View menu elements Command Description Opens and or brings the log window to the active win Log dow Project Opens and or brings the project window to the active window Table 2 5 View menu elements Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG Target menu elements Command Description Connect Creates a connection through the Flasher using the con figuration options set in the Project settings of the Options drop down menu Disconnect Disconnects a current connection that has been made through the Flasher Test gt Two test functions are implemented Generates test data generates data which can be used to test if the flash can be programmed correctly The size
20. nd Description Opens a data file that may be used to flash the target Open device The data file must be an Intel HEX file a Motorola S file or a Binary file hex mot srec Or bin Merge Merges two data files hex mot srec Or bin Save Saves the data file that currently has focus dave Rex Saves the data file that currently has focus using the name and location given New Project Creates a new project using the default settings Open Project Opens a Flasher STM8 Software project file Note that only one project file may be open at a time Opening a project will close any other project currently open Save Project Saves a Flasher STM8 Software project file Save Project As Saves a Flasher STM8 Software project file using the name and location given Close Project Closes a Flasher STM8 Software project file Save programmer con figuration file Saves a Flasher STM8 Software configuration as pro grammer configuration file using the name and location given Save programmer data file Saves the content of the memory window as programmer data image file using the name and location given Download config amp data file to program mer Download configuration and data to program to a con nected programmer for stand alone usage Download serial num ber file to programmer Download serial number file to program to a connected programmer for stand alon
21. ns Sample Sample code in program examples Reference Reference to chapters tables and figures or other documents GUIElement Buttons dialog boxes menu names menu commands Emphasis Very important sections Table 1 1 Typographic conventions Flasher STM8 Software UM05007 2009 2014 SEGGER Microcontroller GmbH amp Co KG SEGGER Microcontroller GmbH amp Co KG develops and distributes software development tools and ANSI b C software components middleware for embedded systems in several industries such as telecom medi d cal technology consumer electronics automotive SEGG ER industry and industrial automation SEGGER S intention is to cut software development time for embedded applications by offering compact flexible and easy to use middleware allowing developers to concentrate on their application Our most popular products are emWin a universal graphic software package for embed ded applications and embOS a small yet efficent real time kernel emWin written entirely in ANSI C can easily be used on any CPU and most any display It is comple mented by the available PC tools Bitmap Converter Font Converter Simulator and Viewer embOS supports most 8 16 32 bit CPUs Its small memory footprint makes it suitable for single chip applications Apart from its main focus on software tools SEGGER developes and produces program ming tools for flash microcontrollers as well as J Link a JTAG emula
22. ns accessi ble from the menus are available in command line mode as well If you provide com mand line options Flasher STM8 Software will still start its GUI but processing will start immediately The screenshot below shows the command line help dialog which is displayed if you start Flasher STM8 Software in a console window with FlasherSTM8 exe help or FlasherSTM8 exe Commandline w Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 37 4 2 Command line options This section lists and describes all available command line options Some options accept additional parameters which are enclosed in angle brackets e g lt FILE NAME gt If these parameters are optional they are enclosed in square brackets too e g lt SADDR gt Neither the angel nor the square brackets must be typed on the command line they are used here only to denote optional parameters Also note that a parameter must follow immediately after the option e g FlasherSTM8 exe openprjC Projects Default jflash All command line options return 0 if the processing was successfully An return value unequal O means that an error occured Option Description openprj lt FILENAME gt Open an existing project file merge lt FILENAME gt SADDR Merges the currently opened datafile with another data file hex mot srec or bin In case of bin a second parameter in hex is needed as start
23. of their respec tive holders Contact address SEGGER Microcontroller GmbH amp Co KG In den Weiden 11 D 40721 Hilden Germany Tel 49 2103 2878 0 Fax 49 2103 2878 28 Email support segger com Internet http www segger com Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG Manual versions This manual describes the latest software version If any error occurs please inform us and we will try to assist you as soon as possible Contact us for further information on topics or routines not yet specified Print date July 24 2014 Software Revision Date By Description 1 30 0 140724 MC Initial version Flasher STM8 Software UMO5007 O 2009 2014 SEGGER Microcontroller GmbH 8 Co KG Flasher STM8 Software UMO5007 O 2009 2014 SEGGER Microcontroller GmbH 8 Co KG About this document Assumptions This document assumes that you already have a solid knowledge of the following e The target processor e DOS command line How to use this manual This manual explains all the functions that Flasher STM8 Software offers Typographic conventions for syntax This manual uses the following typographic conventions Style Used for Body Body text Text that you enter at the command prompt or that appears on the Keyword display that is system functions file or pathnames Parameter Parameters in API functio
24. og will initially display The version and time of compilation for the Flasher STM8 Software application The version and time of compilation for the STM8 DLL The number of supported flash devices The number of supported MCU devices The location of the default project The Project window contains an overview of the current project settings initially Flasher STM8 Software opens a default project ny SEGGER Flasher STM8 1 02 C Work FlasherSTM8 Shipping_STM8 FlasherSTM8 Default jflash File Edit View Target Options Window Help y Project Default Connection USB Device 0 Target interlace SWIM MCU ST STM8AF5169 Endian Big Use target RAM No RAM address Ox0 RAM size 2KB Ate Application log started Flasher STM8 W1 02 Flasher STM8 Software Stee In 24 2010 11 06 57 JLinkSTM8 dll 1 02 DLL compiled Jun 24 2010 11 06 Reading flash device list C ao T HENS Hepes TMB FlesherS TMENETCFlasherS THEN inch cv EN List of flash devices read successfully 104 Devices Reading MCU device list C WorkFlasherS TM8 Shipping_STM8 FlasherS TM8 E TC FlasherS TM8 MCU csv List of MCU devices read successfully 104 Devices d Creating new project file C w ork FlasherS TM8 Shipping_STM8 FlasherS TM8 Default fach New project created successfully ID List of MCU devices read successfully 104 Devices 7A Flasher STM8 Software UM05007 2009 2014 SEGGER Microcontroller GmbH amp Co KG
25. ollowing chapter contains information about the supported flash devices Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 48 CHAPTER 6 Target systems 6 1 Which devices can be programmed by Flasher STM8 Software Flasher STM8 Software can program internal flash Flasher STM8 Software supports all STM8 microcontrollers The only limitation in using a specific STM8 device is typi cally that it might not be known to the STM8 software yet A list of devices supported in the most recent version of the Flasher STM8 Software can be found at the following location http www segger com flasher stm8_supported_devices html If you need support for a chip or flash not supported yet do not hesitate to contact us Segger is constantly adding support for new devices You may want to request an updated list or have a look at http www segger com for more up to date informa tion Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 49 Chapter 7 Support The following chapter provides information about how to contact our support Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 50 7 1 CHAPTER 7 Support Troubleshooting 7 1 1 General procedure e Make sure your Flasher is working as expected See the troubleshooting section in the Flasher manual e Ensure that the target hardware matches the project file settings
26. ons performed bY MATO ni AA AE 30 3 2 Global SENOS Auge enee Seege geil dish EES da ion 31 3 2 1 OPE A dE EE EE 31 3 2 1 1 Disconnect after each operation sisi 31 3 2 1 2 Automatically unlock sector Sinite a TEE 31 3 2 1 3 Perform blank CHECK oia das 31 3 2 1 4 Skip blank areas on read EES 31 3 2 2 o M Greets 32 3 2 2 1 General log level iia advan teas teeth NEES ENEE 32 3 2 2 2 Enable RR LEE ER 3 2 3 AS e dt rad at aia ava 33 3 2 3 1 Save project file Onm Close ai esis fae dee EEN EE 33 4 Command Line Mera A nrnna 35 4 1 ONE WA Ee A A re 36 4 2 Command line options ENNEN 37 4 3 Batch PROCESS Iii A ent cc lec 38 5 Working with Flasher STM8 software ue 39 Flasher STM8 Software UM05007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 5 1 Creating a new Flasher STM8 Software Droiect 40 5 2 Programming STM8 option bytes 45 5 2 1 Modifying option bytes already present LR 45 5 2 2 Creating option byte values for your target 45 O Target systems into rata taa 47 6 1 Which devices can be programmed by Flasher STM8 Software 48 A A tte tank 49 7 1 TroUblesho0ti iii di A ge de Ee AA 50 7 1 1 General proced re ee A As 50 7 1 2 Typical PTOS A ee ee EE NEEN Eer 50 7 2 Contacting SUPP OTE A A 51 8 Literature and references ill 53 Flasher STM8 Software UM05007 2009 2014 SEGGER Microcontroller GmbH amp Co KG Chapter 1 Introduction The following chapter introduces Flasher STM8 Sof
27. ou are using a longer target cable than shipped with your Flasher STM8 operation in high speed mode can not be guaranteed If your Flasher is operating unstable or is not able to communicate with the target at all it might help to use the low speed mode instead Flasher STM8 Software UM05007 O 2009 2014 SEGGER Microcontroller GmbH amp Co KG 42 CHAPTER 5 Working with Flasher STM8 software 4 Choose a device from Device choice list in the CPU dialog Flasher STM8 Soft ware uses correct default values RAM address and size for this device If your device is not in the list you may have success in choosing a device which fits your target system best Flasher STM8 Software UMO5007 O 2009 2014 SEGGER Microcontroller GmbH amp Co KG 43 5 The Flash dialog should look similar to the screenshot below Normally all default settings can be used without modifications Flasher STM8 Software UMO5007 O 2009 2014 SEGGER Microcontroller GmbH 8 Co KG A4 CHAPTER 5 Working with Flasher STM8 software 6 The Production dialog is secondary for a setup You can define the behaviour of the Auto option Target gt Auto or shortcut F7 which will affect the auto oper ation in Flasher stand alone mode 7 Save your project File gt Save Project and test it Flasher STM8 Software UM05007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 45 5 2 Programming STM8 option bytes For STM8 devices the option by
28. respective microcontroller from the list to program internal flash devices 3 1 3 2 Use target RAM You may enable the use of target RAM to speed up flash operations To use the target RAM a start location in RAM and the amount of RAM to be used must be entered Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 26 CHAPTER 3 Settings 3 1 4 Flash Settings This dialog is used to select and configure the flash device to operate with The listed options of the Flash settings menu are dependent on the selection in the CPU settings dialog The menu should look similar to the screenshot below Project settings i 2 x General Target interface CPU Hash Production Base Addr 00000000 Organization le y Bits x fi M Chip s Manufacturer ST Chip STM8s208MB internal Size 133248 Bytes Sectors 1041 Ce Individual sectors Sector 0 0x4000 Ox407F Sector 1 0x4080 Ox40FF Sector 2 0x4100 0241 7F Sector 3 0x4180 0x41FF Sector 4 0x4200 Ox427F Sector 5 0x4280 Ox42FF Sector 6 0x4300 Ox437F y AO tr er 9 4900 C Start End sector Start Addr End Addr Sector 1040 Ox27FFF Sector 0 024000 Selected ranges 1041 Sectors 2 Ranges 0x4000 0x487F 0x8000 Ox27FFF SI S lt lt lt lt NALATE Apply 3 1 4 1 Base Address You may enter the base
29. software for Flasher STS lt requires a license which can be obtained from SEGGER www segger com This software is capable of programming the flash memory of several STM8 micros Connection to Flasher USB Deviso y USB SN D Seta nie D Logging Enable Flasher logfile User interface mode Ce Engineering More options typically used for setup Simplified Less options typically used for production The complexity of the user interface can be selected Select the Engineering checkbox if you want to setup your project or the Simplified checkbox if you use Flasher STM8 Software in production environments In the simplified user interface some options are disabled to decrease possible error sources in the production phase Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 23 3 1 1 1 USB If this option is checked Flasher STM8 Software will connect to Flasher over the USB port You may change the device number if you want to connect more than one Flasher to your PC The default device number is 0 For more information about how to use multiple Flasher on one PC please refer to the Flasher STM8 User Guide 3 1 1 2 TCP IP If this option is checked Flasher STM8 Software will connect to Flasher via TCP IP You have to specify the IP address of the Flasher you want to connect to 3 1 1 3 Enable Flasher logfile If this option is checked you can specif
30. ted sec tors Entire chip verifies the CRC of the entire chip Read back gt Reads back the data found on the chip and creates a new data file to store this information There are three ways in which the data can be read back The Selected sectors identified on the Flash tab of the Project Settings found in the Options drop down menu may be read back The Entire chip may be read back A specified Range may be read back Start Application Starts the application found on the chip Table 2 6 Target menu elements Flasher STM8 Software UM05007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 20 Options menu elements CHAPTER 2 Getting Started Command Description Project settings Location of the project settings that are displayed in the snapshot view found in the Project window of the Flasher STM8 Software application as well as various settings needed to locate the Flasher and pass specified com mands needed for chip initialization Global settings Settings that influence the general operation of Flasher STM8 Software Table 2 7 Options menu elements Window menu elements Command Description Cascade Arranges all open windows one above the other with the active window at the top Tile Horizontal Tiles the windows horizontally with the active window at the top Tile Vertical Tiles the windows vertically wi
31. tes are memory mapped to the addr 0x4800 For Flasher STM8 software option bytes are handled the same way as any other program mable code data area The exact meaning of every option byte for your device can be found in the device specific manual of your chip manufacturer 5 2 1 Modifying option bytes already present If the output of your program code already contains option bytes it is very easy to modify them Open your output with the Flasher STM8 Software and modify the option byte values already present as needed 5 2 2 Creating option byte values for your target If for some reason you do not already have option bytes in your data file or you do not have the option bytes available you need you can follow these steps to create the desired option byte values e Start the Flasher STM8 software e Open or create a project for your device e Inthe project settings on the Flash tab select only the sector located at 0x4800 from the sector list box e Use the menu entry Target gt Read back gt Selected sectors to read back the sector that contains the option bytes You can now freely edit the option bytes and any other data stored in the option bytes sector Flasher STM8 Software UM05007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 46 Flasher STM8 Software UMO5007 CHAPTER 5 Working with Flasher STM8 software 2009 2014 SEGGER Microcontroller GmbH amp Co KG 47 Chapter 6 Target systems The f
32. th the active window at the left Table 2 8 Window menu elements Help menu elements Command Description Flasher STM8 Software User s Guide Shows this help file in a PDF viewer such as Adobe Reader Flasher STM8 User s Guide Shows the Flasher STM8 User s Guide in a PDF viewer such as Adobe Reader Shows a dialog with licensing information The serial Licenses number of a connected Flasher may be read and licenses added or removed About Flasher STM8 Software and company information Table 2 9 Help menu elements Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 21 Chapter 3 Settings The following chapter provides an overview of the program settings Both general and per project settings are considered Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 22 CHAPTER 3 Settings 3 1 Project Settings Project settings are available from the Options menu in the main window or by using the ALT F7 keyboard shortcut 3 1 1 General Settings This dialog is used to choose the connection to the Flasher STM8 The Flasher can either be connected directly over USB to the host system or it can be connected through TCP IP remotely Refer to the Flasher STM8 manual for more information regarding the operation of Flasher STM8 General Target interface CPU Flash Production Flasher STMB is a
33. tor to assist in devel opment debugging and production which has rapidly become the industry standard for debug access to ARM cores Corporate Office United States Office http www segger com http www segger us com EMBEDDED SOFTWARE SEGGER TOOLS Middleware emWin Flasher Graphics software and GUI Flash programmer emWin is designed to provide an effi Flash Programming tool primarily for microcon cient processor and display control trollers ler independent graphical user interface GUI for any application that J Link operates with a graphical display JTAG emulator for ARM cores Starterkits eval and trial versions are USB driven JTAG interface for ARM cores available J Trace embos JTAG emulator with trace Real Time Operating System USB driven JTAG interface for ARM cores with emb0OS is an RTOS designed to offer Trace memory supporting the ARM ETM Embed TT the benefits of a complete multitasking ded Trace Macrocell EJ system for hard real time applications with minimal resources The profiling J Link J Trace Related Software PC tool embOSView is included Add on software to be used with SEGGER s indus try standard JTAG emulator this includes flash emFile programming software and flash breakpoints File system emFile is an embedded file system with FAT12 FAT16 and FAT32 support emFile has been optimized for mini mum memory consumption in RAM and ROM while maintaining high speed Various Device
34. tware highlights some of its features and lists its requirements on host and target systems Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 10 CHAPTER 1 Introduction 1 1 Whatis Flasher STM8 Software Flasher STM8 Software is a stand alone flash programming software for PCs running Microsoft Windows The following Microsoft Windows versions are supported Microsoft Windows 2000 Microsoft Windows XP Microsoft Windows XP x64 Microsoft Windows 2003 Microsoft Windows 2003 x64 Microsoft Windows Vista Microsoft Windows Vista x64 Microsoft Windows 7 Microsoft Windows 7 x64 Microsoft Windows 8 Flasher STM8 Software has an intuitive user interface and makes programming flash devices convenient Flasher STM8 Software requires a Flasher STM8 flasher for STM8 cores to interface to the hardware Flasher STM8 Software supports a feature called smart read back which only transfers non blank portions of the flash increas ing the speed of read back greatly These features along with its ability to work with any STM8 chip makes it a great solution for most projects 1 1 1 Features Any STM8 core supported STM8 microcontroller internal flash support Smart read back only non blank portions of flash are transferred and saved Verbose logging of all communication hex mot srec and bin support Intuitive user interface Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller Gmb
35. umber and its comple mentary is programmed at the given Len address In case a serial number list file is given Flasher STM8 will take the serial number bytes from the list file If a serial number in the list file does not define all bytes of Len the remaining bytes are filled with Os No complements etc are added to the serial number In case no serial number list file is given Next SN is the next serial number which should be programmed The serial number is always stored in big endian format in the flash memory In case a serial number list file is given Next SN describes the line of the serial number list file where to read the next serial number bytes from Flasher STM8 starts counting with line 0 so in order to start serial number programming with the first line of the SNList txt Next SN needs to be set to 0 Specifies how much Next SN is incre mented Next SN Increment Table 3 1 Flasher STM8 serial number settings 3 1 5 1 2 Serial number file When programming continuous serial numbers upon starting the program process Target gt Auto the Flasher STM8 software will automatically create a file named lt ProjectName gt _Serial txt at the software s working folder This file contains the value defined by the Next SN option in the Flasher STM8 settings The file can also be edited manually by the user as the serial number is written to it in ASCII 3 1 5 1 3 Serial number list file
36. well as some files in the working folder depending on the configuration need to be configured first In general Flasher STM8 supports two ways of programming a serial number into the target 1 Programming continuous serial numbers Serial number is 1 4 bytes in size The serial number to start with serial number increments the size of serial numbers and the chosen address have to be configured 2 Programming custom serial numbers from a serial number list file The line of the list file to start with the line increment the size of serial numbers and the cho sen address have to be configured Also a serial number list file needs to be cre ated by user In the following some generic information on how to setup a serial number program ming configuration are given Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG CHAPTER 3 Settings 3 1 5 1 1 Serial number settings In order to use the serial number feature the Flasher STM8 project has to be config ured to enable programming a serial number at a specific address This is done by enabling the Program serial number option Setting Meaning The address the serial number should be programmed at The length of the serial number in bytes which should be programmed Address If no serial number list file is given Flasher STM8 allows to use a 1 4 byte serial number In case of 8 is selected as length the serial n
37. y a file name for the Flasher STM8 Software logfile The Flasher logfile will contain the same outputs as the Flasher STM8 Soft ware log window You can specify one logfile per project Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 24 CHAPTER 3 Settings 3 1 2 Target Interface Settings This dialog is used to configure the target interface General Target interface CPU Flash Production At the moment Flasher STM8 is able to choose between the target interfaces SWIM high speed which is the default and should be used in almost any case and SWIM low speed which is slower than the high speed interface but might help if Flasher STM8 is not operating stable within your environment Further details about the bit format used in high speed and low speed interface mode can be acquired from the STM8 SWIM protocol available from ST Flasher STM8 Software UMO5007 2009 2014 SEGGER Microcontroller GmbH amp Co KG 25 3 1 3 CPU Settings This dialog allows the selection of microcontroller dependent settings General Target interface CPU Flash Production ST 51 Mas 208ME PE Use target HAM fasten Adar o E KB Device To program internal flash devices choose the respective microcontroller in the Device list If your microcontroller is not found on this list contact SEGGER as new microcontrollers are continuously being added 3 1 3 1 Device Select the
Download Pdf Manuals
Related Search
Related Contents
"取扱説明書" SERVICE MANUAL ROOM AIR CONDITIONER SM0007 1 - Honda Samsung D860 Инструкция по использованию LEVANCIO取扱説明書-基本編 MiniBlue II Pneumatic Applicator Au Lycée Louis Pasteur cliMATE ® User Manual - Remote Control your Mercedes cliMATE Good Sense Summer Festival Copyright © All rights reserved.
Failed to retrieve file