당신은 주제를 찾고 있습니까 “stvp programming toolkit – How to use Cosmic IdeaSTM8 C Compiler and ST Visual Programmer (STVP) to Code STM8 Microcontrollers“? 다음 카테고리의 웹사이트 https://chewathai27.com/you 에서 귀하의 모든 질문에 답변해 드립니다: https://chewathai27.com/you/blog. 바로 아래에서 답을 찾을 수 있습니다. 작성자 MicroArena 이(가) 작성한 기사에는 조회수 5,114회 및 989532 Like 개의 좋아요가 있습니다.
stvp programming toolkit 주제에 대한 동영상 보기
여기에서 이 주제에 대한 비디오를 시청하십시오. 주의 깊게 살펴보고 읽고 있는 내용에 대한 피드백을 제공하세요!
d여기에서 How to use Cosmic IdeaSTM8 C Compiler and ST Visual Programmer (STVP) to Code STM8 Microcontrollers – stvp programming toolkit 주제에 대한 세부정보를 참조하세요
https://www.facebook.com/MicroArena
https://www.facebook.com/groups/microarena
https://www.facebook.com/groups/ArduinoBangla
stvp programming toolkit 주제에 대한 자세한 내용은 여기를 참조하세요.
STVP-STM32 – STMicroelectronics
ST Visual Programmer (STVP) is a full-featured software interface for programming ST Flash microcontrollers. It proves an easy-to-use and efficient …
Source: www.st.com
Date Published: 11/15/2021
View: 9006
STVP ST Visual Programmer for programming ST7, STM8 …
In addition, developers can take advantage of the Free Programming Toolkit with C/C++ sources for all the functions needed to develop a customized …
Source: www.bdtic.com
Date Published: 12/11/2021
View: 2869
ST UM0151 User Manual STVP programming toolkit Manual : Free …
wy UM0151 Y User Manual STVP programming toolkit Introduction The STVP programming toolkit proves a set of C++ source and header files that can be used to …
Source: archive.org
Date Published: 7/22/2022
View: 9114
Không có tiêu đề
The STVP programming toolkit proves a set of C++ source and header files that can be. used to design a customized programming application for any ST …
Source: www.stmcu.com.cn
Date Published: 4/7/2022
View: 1578
Stvp Programming Toolkit – Fill Online, Printable, Fillable, Blank
Fill Stvp Programming Toolkit, Edit online. Sign, fax and printable from PC, iPad, tablet or mobile with pdfFiller ✓ Instantly. Try Now!
Source: www.pdffiller.com
Date Published: 9/29/2021
View: 8782
ST Visual Programmer (STVP) Online Help Contents
Configure icon: Configures Hardware, Port, Programming mode and Device. ST microcontroller type list: Lists the ST microcontrollers that can be programmed with …
Source: documentation.help
Date Published: 10/1/2022
View: 3196
STVP-LIB-STM8 STMicroelectronics | Mouser Việt Nam
STVP-LIB-STM8 STMicroelectronics STMicroelectronics STVP programming toolkit: C++ source files for creating PC programming interface bảng dữ liệu, …
Source: www.mouser.vn
Date Published: 4/21/2022
View: 8824
PtkApi.ccp – PtkToolBox.ccp. Programming DLLs (from STVP …
UM0151 User manual STVP programming toolkitIntroduction The STVP programming toolkit proves a set of C++ source and …
Source: kipdf.com
Date Published: 9/22/2022
View: 813
주제와 관련된 이미지 stvp programming toolkit
주제와 관련된 더 많은 사진을 참조하십시오 How to use Cosmic IdeaSTM8 C Compiler and ST Visual Programmer (STVP) to Code STM8 Microcontrollers. 댓글에서 더 많은 관련 이미지를 보거나 필요한 경우 더 많은 관련 기사를 볼 수 있습니다.
주제에 대한 기사 평가 stvp programming toolkit
- Author: MicroArena
- Views: 조회수 5,114회
- Likes: 989532 Like
- Date Published: 2018. 10. 17.
- Video Url link: https://www.youtube.com/watch?v=mX1-YaUfdsk
ST Visual Programmer STM32 (replaced by STM32CubeProgrammer)
Request Software
Something went wrong with the server request. Please try again in a few moments.
Project Title: A project title is required. Project Description: A project description is required. Application: An application is required. End Application: Please choose a sub-application An end application is required. Nature of Business: Education Institute / University Other Research Center Investors Consultant Private / Personal User Manufacturer of OEM equipment Outsourced Manufacturer Distributor of Components Retailers A nature of business is required. Military Related: Yes No A military relation status is required. Country/Region where the Software will be used: Afghanistan Aland Islands Albania Algeria American Samoa Andorra Angola Anguilla Antartica Antigua and Barbuda Argentina Armenia Aruba Ascension Island Australia Austria Azerbaijan Bahamas Bahrain Bangladesh Barbados Belarus Belgium Belize Benin Bermuda Bhutan Bissau Bolivia Bonaire Sint Eustatius and Saba Bosnia and Herzegovina Botswana Bouvet island Brazil British Indian Ocean Territory British Virgin Islands Brunei Darussalam Bulgaria Burkina Faso Burma Burundi Cambodia Cameroon Canada Cape Verde Cayman islands Central Africa Republic Chad Chile China Christmas Island Coco Islands Colombia Comoros Cook Islands Costa Rica Croatia Cuba Curacao Cyprus Czech Republic Democratic Republic of Congo Denmark Diego Garcia Djibouti Dominica Dominican Republic East Timor Ecuador Egypt El Salvador Equatorial Guinea Eritrea Estonia Ethiopia Faeroe Islands Falkland Islands Fiji Finland France French Guiana French Polynesia French Southern and Antarctic Territories Gabon Gambia Georgia Germany Ghana Gibraltar Greece Greenland Grenada Guadeloupe Guam Guatemala Guernsey Guinea Guyana Haiti Heard Island and McDonald Islands Honduras Hong Kong Hungary Iceland India Indonesia Iran Iraq Ireland Isle of Man Israel Italy Ivory Coast Jamaica Japan Jersey Jordan Kazakhstan Kenya Kiribati Korea Kuwait Kyrgyzstan Lao Latvia Lebanon Lesotho Liberia Libya Liechtenstein Lithuania Luxembourg Macao Macedonia Madagascar Malawi Malaysia Maldives Mali Malta Marshall Islands Martinique Mauritania Mauritius Mayotte Mexico Micronesia Moldova Monaco Mongolia Montenegro Montserrat Morocco Mozambique Myanmar Namibia Nauru Nepal Netherlands New Caledonia New Zealand Nicaragua Niger Nigeria Niue Norfolk Island Northern Korea Northern Mariana Islands Norway Oman Pakistan Palau Palestinian territories Panama Papua New Guinea Paraguay Peru Philippines Pitcairn Poland Portugal Puerto Rico Qatar Republic of Congo Réunion Romania Russia Rwanda Saint elena Saint Kitts and Nevis Saint Lucia Saint Pierre and Miquelon Saint Vincent and the Grenadines Samoa San Marino Sao Tome and Principe Saudi Arabia Senegal Serbia Serbia and Montenegro Seychelles Sierra Leone Singapore sint maarten Slovakia Slovenia Solomon Islands Somalia South Africa South Georgia and the South Sandwich Islands South Sudan Spain Sri Lanka Sudan Suriname Svalbard and Jan Mayen Swaziland Sweden Switzerland Syria Taiwan Tajikistan Tanzania Thailand Timor-Leste Togo Tokelau Tonga Trinidad and Tobago Tunisia Turkey Turkmenistan Turks and Caicos Islands Tuvalu U.S. Virgin Islands Uganda Ukraine United Arab Emirates United Kingdom United States United States Minor Outlying Islands Unspecified Uruguay Uzbekistan Vanuatu Vatican Venezuela Vietnam Wake Island Wallis and Futuna Western Sahara Yemen Zambia Zimbabwe A country/region of use is required Please keep me informed about future updates for this product. Comment: I accept all Terms & Conditions of the Export Control regulations Accept Terms & Conditions Confirm Request Cancel
STVP ST Visual Programmer for programming ST7, STM8, STM8T and STM32
STVP ST Visual Programmer for programming ST7, STM8, STM8T and STM32
ST Visual Programmer (STVP) is a full-featured software interface for programming ST Flash microcontrollers. It provides an easy-to-use and efficient environment for reading, writing to and verifying device memory and option bytes. STVP is delivered as part of the free ST MCU Toolset, which includes the ST Visual Develop (STVP) integrated development environment and the ST Assembler Linker.
In addition, developers can take advantage of the Free Programming Toolkit with C/C++ sources for all the functions needed to develop a customized programming interface based on STVP for any supported ST programming hardware. It contains source code for all the functions that allow a programming application to access STVP’s low-level DLLs and program microcontrollers using any of the supported programming hardware and programming method (socket, in-circuit programming or in situ programming).
技术特性 Free software
Supports Motorola S19 and Intel HEX formats
Load, Edit and Save executable and/or data files generated by the Assembler/Linker or C compilers
Erase, Program, View and Verify device Flash memory contents
Project mode to automate all configuration and programming tasks
Programming Toolkit with C/C++ source files for creating a programming application based on ST Visual Programmer (STVP)
STVP supports microcontroller programming via a complete range of hardware development tools and dedicated programmers, including: ST-LINK in-circuit debugger/programmer for STM8 and STM32 RLink in-circuit debugger/programmer for STM8 and ST7 STice advanced emulators for STM8 ST7 Flash STICK in-circuit programmer ST7-EPB programming board ST7-DVP3 & DVP2 series emulators ST7-EMU3 series emulators
功能框图
STVP 订购信息
订购型号 产品状态 美金价格 数量 封装 包装形式 温度范围 材料声明 STVP Active
DATA BRIEF
描述 版本 大小 STVP :DB1116: ST Visual Programmer 1 48KB
RELEASE NOTES
描述 版本 大小 RN0011: ST Visual Programmer (STVP) release 3.2.6 21 248KB
USER MANUALS
描述 版本 大小 UM0151: STVP programming toolkit 6 264KB
DEVICE PROGRAMMERS
描述 版本 大小 STVP programming toolkit: C++ source files for creating PC programming interface 3.0 294KB
TOOLSETS
March 2012 Doc ID 11472 Rev 6 1/30
UM0151
User manual
STVP progr amming toolkit
Intr oduction
The STVP progr amming toolkit pro vides a set of C++ sour ce and header files that can be
used to design a c ustomized programming applica tion for an y ST programming hardware
that is suppor ted by STVP .
The pro vided files contain the sour ce code f or functions tha t allow y our progr amming
application to access STVP’ s low le v el DLLs.
With access to these STVP DLLs , you can p rogram ST7 , STM8 and STM32
microcontrollers using an y supported prog ramming ha rdware (ST7-STI CK, ST sock et
boards, EPB , D VP3, EMU3, STice, ST -LINK, ST -TSLINK and Raison ance STX-RLINK) and
progr amming methods (soc k et, in-circuit or in-situ pr ogrammin g).
Figure 1. Programming application sc hematic
Note: Creating a programmin g applicat ion with the STVP pro gramming toolkit require s the
installation of ST Visu al Programm er ver sion 1.9.1 or later .
Y our pr ogramming applicatio n Programming toolkit – PtkApi.ccp – PtkT oolBo x.ccp Programming DLLs (from STVP) Configuration files (from STVP) 1. ST7 Flash STICK : In-circuit progr amming (ICP) 2. D VP3 ser ies emulator : In-circuit p rogramming (ICP) 3. EMU3 series emul ator with ICC Add-o n (ICP) 4. ST7SB sock et board: Programming sockets f or all ICP capable hardware 5. EPB series programmer: – Programming soc kets – ICP depending on version and target ST microcontroller 6. STice advanced emul ation system (ICP) 7. ST -LINK in-circ uit debugger/prog rammer (ICP) 8. STX-RLink in-circui t debugger/prog rammer (ICP) 9. ST -TSLINK progr amming dongle (ICP)
www .st.com
STVP-LIB-STM8 STMicroelectronics | Mouser
Mouser vận chuyển hầu hết các đơn hàng qua UPS, FedEx và DHL cùng ngày. Đơn đặt hàng Global Priority Mail được vận chuyển vào ngày làm việc kế tiếp. Đơn hàng trong các trường hợp ngoại lệ sau sẽ được rà soát trước khi xử lý. Hầu hết các trường hợp ngoại lệ được hoàn tất ngay nhưng sẽ vận chuyển đơn hàng chậm một ngày trong một số trường hợp.
– Nếu bạn có hưỡng dẫn đặc biệt cho đơn hàng
– Đơn hàng của khách hàng mới yêu cầu xác minh địa chỉ hoặc bảo mật
– Các vấn đề về bảo mật thẻ tín dụng
– Một khách hàng có tài khoản mở lo ngại về tín dụng
– Hạn chế nhập khẩu tại một số quốc gia
– Đơn hàng xuất khẩu ra ngoài Hoa Kỳ do quy định xuất khẩu
PtkToolBox.ccp. Programming DLLs (from STVP) Configuration files (from STVP)
UM0151 User manual STVP programming toolkit
Introduction The STVP programming toolkit provides a set of C++ source and header files that can be used to design a customized programming application for any ST programming hardware that is supported by STVP. The provided files contain the source code for functions that allow your programming application to access STVP’s low level DLLs. With access to these STVP DLLs, you can program ST7, STM8 and STM32 microcontrollers using any supported programming hardware (ST7-STICK, ST socket boards, EPB, DVP3, EMU3, STice, ST-LINK, ST-TSLINK and Raisonance STX-RLINK) and programming methods (socket, in-circuit or in-situ programming). Figure 1.
Programming application schematic
Your programming application
Programming toolkit – PtkApi.ccp – PtkToolBox.ccp Programming DLLs (from STVP) Configuration files (from STVP)
1. ST7 Flash STICK: In-circuit programming (ICP) 2. DVP3 series emulator: In-circuit programming (ICP) 3. EMU3 series emulator with ICC Add-on (ICP) 4. ST7SB socket board: Programming sockets for all ICP capable hardware 5. EPB series programmer: – Programming sockets – ICP depending on version and target ST microcontroller 6. STice advanced emulation system (ICP) 7. ST-LINK in-circuit debugger/programmer (ICP) 8. STX-RLink in-circuit debugger/programmer (ICP) 9. ST-TSLINK programming dongle (ICP)
Note:
March 2012
Creating a programming application with the STVP programming toolkit requires the installation of ST Visual Programmer version 1.9.1 or later.
Doc ID 11472 Rev 6
1/30 www.st.com
Contents
UM0151
Contents 1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1
About the user manuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2
Getting assistance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2
Programming toolkit contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3
Understanding the STVP DLLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4
Designing a custom programming application . . . . . . . . . . . . . . . . . . . 7 4.1
Setting up the DLL environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.2
Configuring the device and the programming hardware . . . . . . . . . . . . . . . 8
4.3
Accessing the memory image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.4
5
6
4.3.1
Loading a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.3.2
Writing in the memory image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Connecting to the device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.4.1
Blank checking the device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.4.2
Programming the device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.4.3
Verifying the programming of the device . . . . . . . . . . . . . . . . . . . . . . . . 11
4.4.4
Reading the device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
DLL supported functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.1
DLL environment functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.2
Hardware and device configuration functions . . . . . . . . . . . . . . . . . . . . . . 17
5.3
Image area access functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.4
Device connection functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Programming toolkit helper functions . . . . . . . . . . . . . . . . . . . . . . . . . 23
Appendix A Product support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 7
2/30
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Doc ID 11472 Rev 6
UM0151
Overview
1
Overview
1.1
About the user manuals This manual provides information and examples to help you develop your programming application with the programming toolkit. It describes: ●
The functions supported by the STVP DLLs
●
Using the functions provided by the programming toolkit
For information about STVP and supported ST programming hardware, you can refer to the following: ●
ST Visual Programmer on-line help, information about STVP and supported hardware and programming methods
●
ST Visual Programmer Release Notes, complete release information about the current release of STVP, including supported programming hardware and ST microcontrollers
For information about setup and connection information for supported programming hardware, you can refer to the following: ●
ST7-STICK User Manual
●
ST7SB Socket Board User Manual
●
ST7-EPB User Manual
●
ST7-DVP3 Emulator User Manual
●
ST7-EMU3 Emulator User Manual
●
STice User Manual
●
ST-LINK User Manual
●
ST-TSLINK User Manual
●
Raisonance STX-RLINK User Manual (on the Raisonance web site)
For programming information that is specific to your ST microcontroller, refer to the relevant datasheet.
1.2
Getting assistance For more information, application notes, FAQs and software updates on all the ST microcontroller families, check out the CD-ROM or our website: www.st.com For assistance on all ST microcontroller subjects, or for help using your emulator, refer to the contact list provided in the Chapter Appendix A: Product support. We’ll be glad to help you.
Doc ID 11472 Rev 6
3/30
Programming toolkit contents
2
UM0151
Programming toolkit contents The programming toolkit is a set of C++ source and header files that you integrate into your application in order to use the programming functions supported by STVP’s DLLs. In addition, the toolkit contains two samples that demonstrate the types of applications that can be created. When you run the auto extracting zip, the programming toolkit files and this documentation are placed in the directory that you specified on your PC. These files and folders include: Table 1. src:
Installed components: programming toolkit source and header files Contains the C++ source files that you include in your application in order to access the functions of the STVP DLLs.
PtkApi.cpp:
Source and header that enable the importation of functions from the application programming interfaces (API) of the STVP DLLs.
PtkApi.h: PtkToolBox.cpp PtkToolBox.cpp
Note:
Source and header for “Helper Functions” for tasks such as retrieving configuration files or accessing the “memory image.” The Helper Functions should always be used to access the configuration information as the format and content of these databases may change without notification when STVP is upgraded. Even if the format of the database changes, the prototypes for the Helper Functions will remain the same.
The source files provided in the programming toolkit are in C++ format (.cpp), however they can be compiled as C source files. Developing your application using another programming language does not necessarily pose a compatibility problem with the STVP DLLs, however these developers will have to rewrite the application programming interface (PtkApi.cpp). Programming applications created using the programming toolkit rely on STVP’s DLLs and configuration files (see the cover page). The programming toolkit does not contain these files; they are installed with STVP. These files must then be placed in the same directory as your programming application. More information about these DLLs is provided in the next chapter, Understanding the STVP DLLs.
Note:
4/30
Both the STVP programming toolkit and the latest version of ST Visual Programmer can be downloaded for free from www.st.com/mcu.
Doc ID 11472 Rev 6
UM0151 Table 2.
Programming toolkit contents Source files and executables for two sample applications:
Sample:
The samples, STVP_CmdLine.exe and MFCSample.exe, are C applications developed with Visual C++ 6.0. They should be executed from the directory where you have installed STVP version 1.9.1 or later.
ApiSample:
Readme.txt
Release:
Contains the C++ source and header files for a console application that is intended to illustrate: • How to set the hardware and MCU configuration: ST-LINK, USB, STM8L15xC6, SWIM protocol • How to load binary files in “PROGRAM MEMORY” and in “OPTION BYTE” areas • How to program and verify the “PROGRAM MEMORY” • How to program and verify the “OPTION BYTE” This sample can easily be rebuilt in an environment other than Visual C++ 6.0. Provides details about the use of the STVP_CmdLine application. This subdirectory contains the executable and .hex files for the STVP_CmdLine. The files include:
STVP_CmdLine.exe:
progmem.hex:
Readme.txt:
Release:
Contains the C++ source and header files for an application that uses the Microsoft Foundation Classes. In addition to the features demonstrated in STVP_CmdLine, MFCSample specifically illustrates the use of the helper functions to access and configure data. Provides details about the use of the MFCSample application.
This subdirectory contains the MFCSample executable file.
MFCSample.exe:
res:
Dummy application code that the sample application programs to the ST microcontroller’s Program Memory area. Dummy application code that the sample application programs to the option byte area of the ST microcontroller’s memory.
option.hex:
MFCSample:
The executable for the application programming interface. This executable should be executed from the directory where you have installed STVP.
The executable for the application programming interface. This executable should be executed from the directory where you have installed STVP.
Contains the resource files for the graphical interface, which were used to build the sample application.
Doc ID 11472 Rev 6
5/30
Understanding the STVP DLLs
3
UM0151
Understanding the STVP DLLs Because your programming application must use the STVP DLLs, you should first understand their roles. The software elements that your application accesses and their relationships are shown in Figure 2. These elements include:
Table 3.
STVP DLLs and configuration files
Configuration files DBCFILE.CNF TOOLS.CNF
Contain a database of information on all STVP supported devices (memory mappings, option bytes, protocols) and programming hardware configurations (supported devices, protocols, communication ports). Typically, these files evolve with new releases of STVP. However, if you use the programming toolkit, these evolutions should not pose a problem for your application.
DLLs DBCA60.DLL
Database configuration access. Used by HAPL, EPRCORE60 and programming toolkit to get lists of devices, programming hardware and other hardware and device information from the configuration files.
EPRCORE60.DLL
Epromer core. Keeps track of the device description and creates the programming interface between the GUI and the appropriate HAPL.
FILE60.DLL
A component DLL of the EPRCORE60 layer. It ensures loading and saving of the device binary files. Supported formats include Motorola (.S19) and Intel (.HEX).
HAPL.DLL
Hardware programming level. Hardware specific DLLs that are in charge of programming a specific type of device using a specific type of hardware. The EPRCORE60 loads the appropriate HAPL for the hardware and device configuration.
LEF60.DLL
Logging / Error features. Ensures the propagation of errors between the different layers. It may also log execution traces.
Figure 2.
6/30
STVP DLLs and configuration files
Doc ID 11472 Rev 6
UM0151
4
Designing a custom programming application
Designing a custom programming application For the purposes of understanding the different functions supported by the STVP DLLs, the programming process can be divided into four categories of functions: ●
Setting up the DLL environment
●
Configuring the device and the programming hardware
●
Accessing the memory image
●
Connecting to the device
The following sections provide coded examples to show how an application might use the different functions in each category to accomplish specific programming tasks. Before getting started, it is also important to recognize that your application can be dynamic, offering as much control of hardware configuration and options as STVP, or static, with the hardware configuration hard-coded into the programming application. The programming toolkit provides Helper Functions that allow you to return lists of devices, hardware and protocols at run time so that they can be used by your application (refer to Programming toolkit helper functions). However, for simplicity, the examples provided in the following section are for a static interface with the configuration hard-coded into the application.
4.1
Setting up the DLL environment The STVP DLLs described in Section 3 must be initialized by your application and the callback functions that allow it to manage errors, messages and process execution must also be initialized. The following is a standard initialization that you might use in your application. long CALLBACK AppendMessageText( const char* szMsg) { ….. } long CALLBACK AppendErrorText( const char* szMsg) { ….. } long CALLBACK AppendWarningText( const char* szMsg) { ….. } long CALLBACK UpdateProgress( int percentage* szMsg) { ….. }
Note:
The CALLBACK notation used here is standard when using Microsoft Visual Studio C++. However, for other development environments, you may have to use a different notation. InitDLLCallBack()
Doc ID 11472 Rev 6
7/30
Designing a custom programming application
UM0151
{ LSetErrorCallBack( AppendErrorText); LSetWarningCallBack( AppendWarningText); LSetMessageCallBack( AppendMessageText); LSetProgressCallBack( UpdateProgress); } main() { // Load DLLs and Initialize the address of API // functions if (LoadDlls(“C:\my_installation\STVP\”)==1) { InitDLLCallBack(); ….. // Log everything LOpenLog( “Activity.log”); ….. SetProgrammingConfiguration(); DoesProgrammingJob(); ….. LCloseLog(); Clean(); } }
4.2
Configuring the device and the programming hardware The STVP DLLs support numerous hardware configurations and target devices. Correct identification of the programming hardware is important in establishing the necessary hardware connections, as well as programming and verification of the target device. Once the configuration is set, the correct HAPL.DLL is loaded to manage communication with the device. Based on the device selected for programming, the programming software also creates buffer area in your PCs RAM for the data that will be programmed to the device. This buffer is called the Memory Image. It is also used as a model to check against when verifying the programming of the device. The routine below is initiated by the SetProgrammingConfiguration() function. This is an example of a static interface where the following configuration is hard-coded into the application: Hardware: ST-LINK Protocol: SWIM Device: STM8L15xC6 Port: USB
Note:
This example is incomplete as some parts of the code are implementation-driven. BOOL SetProgrammingConfiguration() { // Select the hardware in this case ST-LINK with
8/30
Doc ID 11472 Rev 6
UM0151
Designing a custom programming application // “SWIM” // protocol, FALSE means that we are not using // simulation mode if (ESelectHard(“ST-LINK”, “SWIM” ,FALSE)==0) { return false; } // Prevent from opening a warning dialog box when // Option byte protection bit is to be programmed. // By default, the Protection warning dialog box is // opened if (ESetPreferences (PROTECTION_WARNING, FALSE)==0} { return false; } // Select the device : STM8L15xC6 device if (ESelectDevice(“STM8L15xC6”)==0)) { return false; } if (ESelectPort (“USB”)==0)) { return false; } return true; }
4.3
Accessing the memory image Once the programming hardware, the device and the port have been specified, the EPRCORE60.DLL allocates memory structures and buffers for each memory area supported by the device (PROGRAM, DATA, OPTION). The memory buffer internally allocated by EPRCORE60 is called the Memory Image. A unique internal identifier is given to each area. This identifier should be used later in the API functions whenever you need to identify a specific memory area. With the Memory Image established, the programing application can now access this buffer and load the binary file (.HEX or .S19) that you wish to program to your device, as well as writing any information that is specific to the programming of each device (ex. a product serial number).
Caution:
If your software reads your ST microcontroller’s memory, the data from the device overwrites any data that is already stored in the Memory Image.
Doc ID 11472 Rev 6
9/30
Designing a custom programming application
4.3.1
UM0151
Loading a file In the following example the specified binary file (MyAppli.S19), which is to be programmed to the target device, is retrieved and saved to the Memory Image. This file is located and saved by the FILE60 component of the EPRCORE60. // Search the PROGRAM MEMORY ID unsigned long iAreaId if (EGetId(“PROGRAM MEMORY”, &iAreaId) == 1) { // Load the file MyAppl.S19 in the program memory area iReturn = ELoadFile(“MyAppl.S19”,iAreaId); }
4.3.2
Writing in the memory image You can also write punctually to specific memory locations as shown in this example. In the sample provided the data is an integer that is incremented each time a device is programmed. For example, this value could be a product serial number or other identification. ….. // Write 1,2,3,4 in memory image at location 0x2000 for (i=1;i Microcontrollers to obtain a complete online selection guide, as well as documentation, software downloads and user discussion groups to help you answer questions and stay up to date with our latest product developments.
Software updates All our latest software and related documentation are available for download from the STMicroelectronics internet site, www.st.com. If you are using software from a third-party tool provider, please refer to the third-party for software product support and downloads.
28/30
Doc ID 11472 Rev 6
UM0151
7
Revision history
Revision history Table 5.
Document revision history
Date
Revision
01-Apr-2004
1
Initial release.
2
– – – – –
06-Apr-2009
3
Revalidation – Corrected revision numbers – Updated to new template
21-Jan-2010
4
– Updated to new template – Updated to support STM8, STice, ST-LINK, ST-TSLINK and Raisonance STX-RLINK
5
– Updated to support STM32 – Corrected some code examples on area name “PROGRAM MEMORY” (use a space character instead of ‘_’). – Updated examples to use an ST-LINK and STM8 device.
6
– Updated Table 2: Source files and executables for two sample applications: on page 5 – Replaced APISample.exe with STVP_CmdLine.exe – Changed “Example” format (codes)
15-Jul-2005
10-Jun-2011
19-Mar-2012
Changes
Added ST7SB Socket Board to supported hardware in Introduction Updated Figure 1 – showing supported programming hardware Updated About the user manuals – list of supporting documentation Updated internet address in Getting assistance Updated Table 1 – installed components
Doc ID 11472 Rev 6
29/30
UM0151
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 otherwise, 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 TWO AUTHORIZED ST REPRESENTATIVES, 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 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.
© 2012 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
30/30
Doc ID 11472 Rev 6
키워드에 대한 정보 stvp programming toolkit
다음은 Bing에서 stvp programming toolkit 주제에 대한 검색 결과입니다. 필요한 경우 더 읽을 수 있습니다.
이 기사는 인터넷의 다양한 출처에서 편집되었습니다. 이 기사가 유용했기를 바랍니다. 이 기사가 유용하다고 생각되면 공유하십시오. 매우 감사합니다!
사람들이 주제에 대해 자주 검색하는 키워드 How to use Cosmic IdeaSTM8 C Compiler and ST Visual Programmer (STVP) to Code STM8 Microcontrollers
- Compiler
- STM8
- STMicroelectronics
- IdeaSTM8
- Cosmic C
- C Compiler
- 8-bit Microcontroller
- Idea C Compiler
- STM
- STVP
- ST Visual Programmer
How #to #use #Cosmic #IdeaSTM8 #C #Compiler #and #ST #Visual #Programmer #(STVP) #to #Code #STM8 #Microcontrollers
YouTube에서 stvp programming toolkit 주제의 다른 동영상 보기
주제에 대한 기사를 시청해 주셔서 감사합니다 How to use Cosmic IdeaSTM8 C Compiler and ST Visual Programmer (STVP) to Code STM8 Microcontrollers | stvp programming toolkit, 이 기사가 유용하다고 생각되면 공유하십시오, 매우 감사합니다.