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...
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
- Popular Resources
- Popular amplifiers
- STM8 C language programming (1) - basic program and startup code analysis
- Description of the BLDC back-EMF sampling method based on the STM8 official library
- STM32 MCU project example: Smart watch design based on TouchGFX (8) Associating the underlying driver with the UI
- uCOS-III Kernel Implementation and Application Development Practical Guide - Based on STM32 (Wildfire)
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- 10 Tips for Writing Better Embedded Software Code
- FPGA Timing Constraints Practice: Multi-Cycle Path Constraints
- Didn’t Vicor apply for a Chinese patent?
- Engineers tell you how to do PCB design——[Worthy of collection]
- Big disaster! HP Japan accidentally deleted 77TB of important data from Kyoto University's supercomputer system
- Configuration and use of TI C2000 TMS320F28379D SCID SCIB
- How many filters does IMX283 CAN support at most?
- Prize discussion: Reply to the "live" DAC application you have encountered and receive 10-30 core points!
- CMD file allocation method
- LSM6DS3 3D Accelerometer and 3D Gyroscope PCB Package and Code