_ V ST STM8 Family On-Chip Emulation. Contents. Technical Notes

Similar documents
NEC 78K0- Family On-Chip Emulation

_ V Renesas R8C In-Circuit Emulation. Contents. Technical Notes

Renesas 78K/78K0R/RL78 Family In-Circuit Emulation

Freescale 68HCS12 Family On-Chip Emulation

HCS12 BDM Getting Started V4.3

_ V PowerPC 4xx Family On-Chip Emulation. Contents. Technical Notes

_ V Freescale ColdFire Family On-Chip Emulation. Contents. Technical Notes

_ V Intel 8085 Family In-Circuit Emulation. Contents. Technical Notes

Cortex-M3 Family On-Chip Emulation

_ V NEC V850ES/Fx3 Family In-Circuit Emulation. Contents. Technical Notes

Contents. Cortex M On-Chip Emulation. Technical Notes V

Freescale S12X Family In-Circuit Emulation

NEW CEIBO DEBUGGER. Menus and Commands

Trace Getting Started V8.02

_ V1.3. MPC564xB ActiveGT POD. POD Hardware Reference

All information, including contact information, is available on our web site Feel free also to explore our alternative products.

_ V1.3. Motorola 68HC11 AE/AS POD rev. F. POD Hardware Reference

Programming in the MAXQ environment

All information, including contact information, is available on our web site Feel free also to explore our alternative products.

_ V1.1. EVB-5566 Evaluation & Development Kit for Freescale PowerPC MPC5566 Microcontroller. User s Manual. Ordering code

EB-51 Low-Cost Emulator

Evaluation & Development Kit for Freescale PowerPC MPC5517 Microcontroller

Development Tools. 8-Bit Development Tools. Development Tools. AVR Development Tools

RFlasher7. Getting Started and Overview. Document version

ST SPC58 B Line Emulation Adapter System

This document describes support for OSEK operating system used with winidea.

S3 Flash In-System Programmer

Bolero Nexus Emulation Adapter 208BGA 100TQ

Supported Architectures Supported Cores Supported microcontroller families. Cortex-M0 Cortex-M1 Cortex-M3 Cortex-M4 ARM7 ARM720T ARM7DI ARM7TDMI

Course Introduction. Purpose: Objectives: Content: 27 pages 4 questions. Learning Time: 20 minutes

All information, including contact information, is available on our web site Feel free also to explore our alternative products.

CEIBO FE-51RD2 Development System

_ V1.0. Freescale MPC5607B Bolero Mini Target Board. User s Manual. Ordering code

DoCD IP Core. DCD on Chip Debug System v. 6.02

Infineon DAP Active Probe

_ V1.1. Motorola 6809 B POD rev. C. POD Hardware Reference

_ V1.2. Motorola 68HC08 JL POD rev. D1. POD Hardware Reference

Changing the Embedded World TM. Module 3: Getting Started Debugging

Bolero3M Nexus Emulation Adapter 256BGA 176TQ

Sophisticated Debugging Features for Motorola s HCS12 Family are available on Nohau s Full-Featured Emulator By: Doron Fael Nohau

User Manual. LPC-StickView V3.0. for LPC-Stick (LPC2468) LPC2478-Stick LPC3250-Stick. Contents

IN-CIRCUIT DEBUG (ICD) USER GUIDE

Freescale MPC5xxx & ST SPC56 Family On-Chip Emulation

_ V Intel 8051 Family In-Circuit Emulation. Contents. Technical Notes

indart -HCS08 In-Circuit Debugger/Programmer for Freescale HCS08 Family FLASH Devices User s Manual Rev. 2.0

AT09381: SAM D - Debugging Watchdog Timer Reset. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

_ V1.3. MPC5643L Target Board. User s Manual. Ordering code

Laboratory: Introduction to Mechatronics. Instructor TA: Edgar Martinez Soberanes Lab 1.

MPLAB SIM. MPLAB IDE Software Simulation Engine Microchip Technology Incorporated MPLAB SIM Software Simulation Engine

Product Update. Errata to Z8 Encore! 8K Series Silicon. Z8 Encore! 8K Series Silicon with Date Codes 0402 and Later

DOMAIN TECHNOLOGIES INC. Users Guide Version 2.0 SB-USB2. Emulator

Leopard Nexus Emulation Adapter 257BGA 144TQ

User Manual. LPC-StickView V1.1. for LPC-Stick. Contents

EMULATOR SETUP MB BIT COMPACT-ICE

CEIBO FE-5111 Development System

E8a Emulator Additional Document for User's Manual R0E00008AKCE00EP2

Hello, and welcome to this presentation of the STM32 Flash memory interface. It covers all the new features of the STM32F7 Flash memory.

IAR C-SPY Hardware Debugger Systems User Guide. for Renesas E30A/E30 Emulators

All information, including contact information, is available on our web site Feel free also to explore our alternative products.

ARM HSSTP Active Probe

Barracuda I and II Chips (I mask is OK36N and II mask is OK79X) PC9S12DP256

_ V1.2. ione-bt Wireless Debugger. Hardware Reference

E8a Emulator Additional Document for User's Manual R0E00008AKCE00EP9

E8a Emulator Additional Document for User's Manual R0E00008AKCE00EP21

indart -HC08 In-Circuit Debugger/Programmer for Freescale HC08 Family FLASH Devices User s Manual Rev. 2.0 Copyright 2006 SofTec Microsystems DC01027

Multi-core microcontroller design with Cortex-M processors and CoreSight SoC

A Seamless Tool Access Architecture from ESL to End Product

Advanced Debugging using the Ashling MPC5500 tools

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

All information, including contact information, is available on our web site Feel free also to explore our alternative products.

TRACE32 Debugger Getting Started... ICD Tutorial About the Tutorial... 2

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad

Legacy Debug Adapters

Memory Overview. Overview - Memory Types 2/17/16. Curtis Nelson Walla Walla University

Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

SiFive FE310-G000 Manual c SiFive, Inc.

CEIBO FE-W7 Development System

PK-HCS12C32 Starter Kit for Motorola MC9S12C32 User s Manual

CMS-8GP32. A Motorola MC68HC908GP32 Microcontroller Board. xiom anufacturing

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT

KIT-VR4120-TP. User's Manual (Rev.1.01) RealTimeEvaluator

Tutorial for I 2 C Serial Protocol

Keil uvision development story (Adapted from (Valvano, 2014a))

DS-XA In-Circuit Emulator

F 2 MC-8FX Family. 8-bit Microcontroller. MB95200 Series

Chapter 2 Sections 1 8 Dr. Iyad Jafar

indart -ST7C In-Circuit Debugger for STMicroelectronics ST72CXXX FLASH Devices User s Manual Copyright 2001 SofTec Microsystems DC00326

1. ONCE Module 2. EBDI. Application Note. AN2327/D Rev. 0, 9/2002. M Core EBDI Interface Application Note

ZAP Cross Debuggers for Motorola Microcontrollers

CEIBO FE-5131A Development System

In Circuit Emulators. In-Circuit Emulators.

DC6688EMT User Manual

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

NEXUS 5001 Forum Debug Interface Standard

UNIT:4 MEMORY ORGANIZATION

CONNECTING YOUR PC TO THE USB EVALUATION BOARD

Project Debugging with MDK-ARM

ELC4438: Embedded System Design ARM Cortex-M Architecture II

DS-51 Microprocessor Development System

Transcription:

_ V9.12. 225 Technical Notes ST STM8 Family On-Chip Emulation This document is intended to be used together with the CPU reference manual provided by the silicon vendor. This document assumes knowledge of the CPU functionality and the terminology and concepts defined and explained in the CPU reference manual. Basic knowledge of winidea is also necessary. This document deals with specifics and advanced details and it is not meant as a basic or introductory text. Contents Contents 1 1 Introduction 2 2 Emulation options 3 2.1 Hardware Options 3 2.2 Initialization Sequence 3 3 CPU Setup 4 3.1 General Options 4 3.2 Debugging Options 5 3.3 Reset Options 6 4 Internal FLASH Programming 7 5 Real-Time Memory Access 7 6 Access Breakpoints 7 7 Getting Started 10 8 Troubleshooting 10 isystem, May 2015 1/10

1 Introduction The STM8 emulator uses single wire interface to connect to the microcontroller debug module. It is used for debugging and flash programming. Communication is bidirectional, based on open-drain line. Non-intrusive read/write access to RAM and peripherals during program execution is allowed. Debug Features The STM8 emulation system features: Up to four hardware breakpoints Unlimited software breakpoints, including in the internal FLASH Access breakpoints Real-time access Internal FLASH programming isystem, May 2015 2/10

2 Emulation options 2.1 Hardware Options Debug I/O levels Emulation options, Hardware pane The development system can be configured in a way that the debug signal is driven at 3.3V, 5V or target voltage level (Vref). When 'Vref' Debug I/O level is selected, a voltage applied to the belonging reference voltage pin on the target debug connector is used as a reference voltage for voltage follower, which powers buffers, driving the debug SWIM signal. The user must ensure that the target power supply is switched on before the debug session is started. If these two conditions are not meet, it is highly probably that the initial debug connection will fail already. However in some cases it may succeed but then the system will behave abnormal. 2.2 Initialization Sequence Before the flash programming or download can take place, the user must ensure that the memory is accessible. This is very important since there are many applications using memory resources (e.g. external RAM, external flash), which are not accessible after the CPU reset. In that case, the debugger must execute after the CPU reset a so called initialization sequence, which configures necessary CPU chip selects and then the download or flash programming can actually take place. The user must set up the initialization sequence based on his application. Detailed information may be found in the Initialization Sequence help topic. Note: Normally, there is no need for initialization sequence in case of a single chip application/cpu. isystem, May 2015 3/10

3 CPU Setup 3.1 General Options Interrupts Enabled When Stopped STM8 Family Advanced CPU Options On-chip debug module itself doesn t support servicing interrupts while the application is stopped (interrupts in background). Setting of this option only impacts the CPU behavior during single step. Disabling this option makes the Emulator mask the interrupts during a debug step command, which normally results in more predictive behavior of applications using interrupts. This is a default setting. If this option is enabled, the Emulator doesn t mask interrupts and they can occur while stepping through the application. If there is a periodic interrupt, it may happen that the user will keep re-entering the interrupt while stepping. In such applications, it s recommended to disable this option. Cache downloaded code only (do not load to target) When this option is checked, the download files will not propagate to the target using standard debug download but the Target download files will. In cases, where the application is previously programmed in the target or it's programmed through the flash programming dialog, the user may uncheck 'Load code' in the 'Properties' dialog when specifying the debug download file(s). By doing so, the debugger loads only the necessary debug information for high level debugging while it doesn't load any code. However, debug functionalities like ETM and Nexus trace will not work then since an exact code image of the executed code is required as a prerequisite for the correct trace program flow reconstruction. This applies also for the call stack on some CPU platforms. In such applications, 'Load code' option should remain checked and 'Cache downloaded code only (do not load to target)' option checked instead. This will yield in debug information and code isystem, May 2015 4/10

image loaded to the debugger but no memory writes will propagate to the target, which otherwise normally load the code to the target. 3.2 Debugging Options Execution Breakpoints Hardware Breakpoints STM8 Family Debugging Options Hardware breakpoints are breakpoints that are already provided by the CPU. The number of hardware breakpoints is limited to three. The advantage is that they function anywhere in the CPU space, which is not the case for software breakpoints, which normally cannot be used in the FLASH memory, non-writeable memory (ROM) or self-modifying code. If the option 'Use hardware breakpoints' is selected, only hardware breakpoints are used for execution breakpoints. Note that the debugger, when executing source step debug command, uses one breakpoint. Hence, when all available hardware breakpoints are used as execution breakpoints, the debugger may fail to execute debug step. The debugger offers 'Reserve one breakpoint for high-level debugging' option in the Debug/Debug Options/Debugging' tab to circumvent this. By default this option is checked and the user can uncheck it anytime. Software Breakpoints Available hardware breakpoints often prove to be insufficient. Then the debugger can use unlimited software breakpoints to work around this limitation. Note that the debugger features unlimited software breakpoints in the STM8 CPU internal flash too. When a software breakpoint is being used, the program first attempts to modify the source code by placing a break instruction into the code. If setting software breakpoint fails, a hardware breakpoint is used instead. isystem, May 2015 5/10

Using flash software breakpoints A flash device has a limited number of programming cycles. Belonging flash sector is erased and programmed every time when a software breakpoint is set or removed. The debugger sets breakpoints hidden from the user also when a source step is executed. In worst case, a flash may become worn out due to intense and long lasting debugging using flash software breakpoints. 3.3 Reset Options RESET Output STM8 Family Reset Options Two types of RESET output, depending on the application used, are available Open Drain or Push-Pull. The appropriate RESET output type can be selected here. isystem, May 2015 6/10

4 Internal FLASH Programming STM8 CPUs have internal flash, which is programmed through standard debug download; thereby no standard FLASH setup dialog is available. The debugger recognizes which code from the download file fits in the FLASH. All necessary FLASH programming settings are done in the CPU Setup/Advanced dialog. During the debug download, the code can be loaded into internal FLASH eeprom options bytes RAM That depends on how the download file was created. 5 Real-Time Memory Access With this type of CPUs, real-time memory access is available. Watch window s Rt.Watch panes can be configured to inspect memory without stalling the CPU. Optionally, memory and SFR windows can be configured to use real-time access as well. Please refer to the Software User's Guide for more information on Real-Time watches. 6 Access Breakpoints Two hardware conditions are available to set access breakpoints. STM8 Hardware Breakpoint Configuration Condition defines at which event a breakpoint occurs: Data Write on Addr=BK1 and Data=BK2L Trigger when Addr matches BK1 and Data that matches BK2L is written. Data Read on Addr=BK1 and Data=BK2L Trigger when Addr matches BK1 and Data that matches BK2L is read. Data R/W on Addr=BK1 and Data=BK2L Trigger when Addr matches BK1 and Data that matches BK2L is read or written. isystem, May 2015 7/10

Instruction fetch BK1<=Addr<=BK2 Trigger when istruction is fetched in address range defined by BK1 and BK2. Data Write on BK1<=Addr<=BK2 Trigger when data is written in address range defined by BK1 and BK2. Data Read on BK1<=Addr<=BK2 Trigger when data is read in address range defined by BK1 and BK2. Data R/W on BK1<=Addr<=BK2 Trigger when data is read or written in address range defined by BK1 and BK2. Instruction Fetch on Addr<=BK1 or BK2<=Addr Trigger when istruction is fetched from address which is lower or equal to BK1 or greater or equal to BK2. Data Write on Addr<=BK1 or BK2<=Addr Trigger when data is written from address which is lower or equal to BK1 or greater or equal to BK2. Data Read on Addr<=BK1 or BK2<=Addr Trigger when data is read from address which is lower or equal to BK1 or greater or equal to BK2. Data R/W on Addr<=BK1 or BK2<=Addr Trigger when data is read or written from address which is lower or equal to BK1 or greater or equal to BK2. Instruction Fetch on Addr=BK1 then on Addr=BK2 Trigger when istruction is fetched from address BK1 and then from address BK2. Data Write on Addr=BK1 or Addr=BK2 Trigger when data is written from address BK1 or from address BK2. Data Read on Addr=BK1 or Addr=BK2 Trigger when data is read from address BK1 or from address BK2. Data R/W on Addr=BK1 or Addr=BK2 Trigger when data is read/written from address BK1 or from address BK2. Instruction fetch on Addr=BK1 or Addr=BK2 Trigger when instruction is fetched from address BK1 or from address BK2. Instruction fetch on Addr=BK1 / Data Write on Addr=BK2 Trigger when instruction is fetched from address BK1 or from address BK2. Instruction fetch on Addr=BK1 / Data Read on Addr=BK2 Trigger when instruction is fetched from address BK1 or data is read from address BK2. Instruction fetch on Addr=BK1 / Data R/W on Addr=BK2 Trigger when instruction is fetched from address BK1 or data is read or written from address BK2. isystem, May 2015 8/10

Data Write in Stack on Addr <=BK1 / Instruction fetch on Addr=BK2 Trigger when instruction is fetched from address BK1 or data is read or written from address BK2. Data Write in Stack on Addr <=BK1 / Data Write on Addr=BK2 Trigger when data is written in stack on address which is lower or equal to BK1 or data is written to address BK2. Data Write in Stack on Addr <=BK1 / Data Read on Addr=BK2 Trigger when data is written in stack on address which is lower or equal to BK1 or data is read from address BK2. Data Write in Stack on Addr <=BK1 / Data R/W on Addr=BK2 Trigger when data is written in stack on address which is lower or equal to BK1 or data is read from or written to address BK2. isystem, May 2015 9/10

7 Getting Started 1) Connect the system 2) Make sure that the target debug connector pinout matches with the one requested by a debug tool. If it doesn't, make some adaptation to comply with the standard connector otherwise the target or the debug tool may be damaged. 3) Power up the emulator and then power up the target. 4) Execute debug reset 5) The CPU should stop on location to which the reset vector points 6) Open memory window at internal CPU RAM location and check whether you are able to modify its content. 7) If you passed all 6 steps successfully, the debugger is operational and you may proceed to download the code in the internal CPU flash. 8) Check Erase before download' and 'Use monitor for programming' options in the 'CPU Setup/Advanced' tab. 9) Specify the download in the 'Debug/Files for download/download files' tab. 10) Execute Debug download, which should download the code in the internal CPU flash. 8 Troubleshooting When performing any kind of checksum, remove all software breakpoints since they may impact the checksum result. Disclaimer: isystem assumes no responsibility for any errors which may appear in this document, reserves the right to change devices or specifications detailed herein at any time without notice, and does not make any commitment to update the information herein. isystem. All rights reserved. isystem, May 2015 10/10