stm8 download program (using ST-LINK downloader and STVP download software)

Publisher:TurquoiseLatest update time:2020-06-21 Source: eefocusKeywords:stm8 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

First of all, let's talk about why we need to build a flashing project - there is only one reason. Because you can't give the source code project to others to help you burn the program.


- -Then I want to complain about ST's official IDE. Really. I was extremely unhappy with it. So I later switched to IAR. It turned out that IAR cannot be mass-produced - -Because IAR's few programs seem to have to be under the project. You can't directly burn the HEX file into the board. So in the end I still had to use STVP for mass burning.

First, you need to prepare your burning file. HEX or S19 file. (Generated by IAR or STVD, the premise must be to ensure that your program is ok - this goes without saying).


Step 1: Then open STVP 

After opening it, it looks like this 

Step 2: Click OPTION BYTE. ROP ON. This will lock the FLASH after each programming to prevent others from reading your IC.


Also, if your crystal is 24M, WAITSTATE should be turned on. Then click File->Save. Then save. Remember that this saves the OPTIOIN BYTE!! If your clock is 24M or the program needs to be locked, be sure to generate this HEX file.

SAVE OPTION BYTE

Step 3: Project->New to create your own flashing project. Save. Then the Project Edition will pop up.

First menu. Configuration. Select. ST-LINK. USB. SWIM. Chip model

Then select Properties. Check Unlock project....(This is to unlock the automatic protection before each burning. Then burn)

Check Prompt for new programming cycle. (This will pop up after each programming to ask whether to proceed to the next programming)

Then click OPTION BYTE. ADD and select the OPTION BYTE.HEX file you generated in the first step. (This hex file is specifically for configuring your OPTION BYTE information)

Then if you have EEPROM to burn, select DATA MEMORY. The steps are the same as above.


Finally, PROGRAM MEMORY. Select the program file generated by STVD or IAR. Then click OK

Then close STVD. You will be prompted to save. Click Yes.

Reopen STVD. Click Project->Open to open the project file you just generated. 

Then connect the board to ST-LINK and power on.

Then click PROGRAM ALL TABS to program.

Select "Yes"

Select "Yes"

At this point, the burning is complete. Then it will prompt whether to burn the next time. At this time, you just need to connect a new board. Click "Yes" to start a new burning.

Many people will ask, why is there no response after I finish burning and writing? I think countless people must have been trapped by this problem. Damn it.


After STVP finishes burning the program, unless you unplug the ST-LINK and power your board from somewhere else, or you shut down STVP on the computer and then power the board back on.


The program on the board can run because the connection between your board and STVP has not been disconnected! !


This is so annoying. IAR doesn't work like this!! Maybe it's because you have to click GO or run after IAR finishes burning it before it will run.


This design is very unreasonable... But I can't complain about it...

Keywords:stm8 Reference address:stm8 download program (using ST-LINK downloader and STVP download software)

Previous article:STM8--STVD compilation tool installation and program download
Next article:IAR hardware simulation to view the running time

Recommended ReadingLatest update time:2024-11-15 07:23

STM8 clock source switching
STM8 clock source: 1. 1~24MHz high-speed external crystal oscillator (HSE), that is, external crystal oscillator  2. 1~24MHz high-speed external clock signal (HSE),  3. 16MHz high-speed internal RC oscillator (HSI)  4. 128KHz low-speed internal RC oscillator (LSI)  Default clock source: From the above clock block di
[Microcontroller]
STM 8 AD conversion problem
The other settings are very simple. You only need to pay attention to one thing: when starting AD conversion, you need to delay it and then turn it on again after the delay. The main is as follows: ADC_CR1|=0x01; //Start conversion DelayMS(1); ADC_CR1|=0x01; //Start conversion important while(!(ADC_CSR&0x80)); // Wa
[Microcontroller]
The biggest feature of STM8 (compared with other 8-bit MCUs)
STM8 is an 8-bit microcontroller developed by STMicroelectronics for industrial applications and consumer electronics. Each MCU has its own advantages and disadvantages. Compared with other 8-bit MCUs, the biggest features of STM8 8-bit MCU are: Kernel: The maximum fcpu frequency can reach 24MHz. When fcpu≤16MHz,
[Microcontroller]
Introduction to capacitive touch button solution based on STM8
The capacitive touch sensing software library provides the following features: The software library module can be easily applied to most microcontrollers and directly embedded in the main controller. The library covers most user interface needs: up to 24 buttons and 2 sliders/wheels. Economical solution: low hardwa
[Microcontroller]
Introduction to capacitive touch button solution based on STM8
About IAREWSTM8 HEX file
After studying the relationship between BIN and HEX, I found that converting from BIN to HEX is relatively simple, but converting from BIN to HEX feels like there is one more line of stuff.         Take a look at the picture above:      The same is true when using code written by others.      I searched online and f
[Microcontroller]
About IAREWSTM8 HEX file
Design of key detection circuit for STM8 microcontroller
The hardware environment uses STM8SF103, and the voltage is 3.3V. What needs to be noted in the circuit is that the IO of the STM8SF103 series can only be pulled up and floating input when used as an input port. Although it is a weak pull-up, it can still be pulled up to about 3.0V when the VCC voltage is 3.3V. Th
[Microcontroller]
Design of key detection circuit for STM8 microcontroller
STM8 firmware library GPIO study notes
1. STM8 register mapping  STM8 core uses Harvard structure, with two buses for accessing Flash and RAM respectively, but Flash, RAM, GPIO and peripheral registers are mapped to linear 16Mbyte (24-bit address) memory space; GPIO and peripheral registers of stm8s208rb are mapped to 0x00 5000 ~ 0x00 57FF address space. S
[Microcontroller]
STM8 interrupt vector table
// Copyright (c) 2009, Wolver Wang, Innov Inc. R&D Center // wolver@21com.com // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // 1. Redistributions of source code must retain the above cop
[Microcontroller]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号