当前位置:网站首页>srec_ Use of common cat parameters
srec_ Use of common cat parameters
2022-07-26 16:28:00 【Big orange madness】
Preface
Here is the image file tool srec_cat Use , How to realize the functions you need through relevant parameters .
Download link :SRecord
Usage mode
file type
When inputting and outputting files, the file type should be indicated , Commonly used as :
test.hex -intel
test.bin -binary
File conversion
You can enter file type conversion through this software .
Such as hex File transfer bin file :
srec_cat.exe stm32.hex -intel -offset 0x08000000 -o stm32.bin -binary
take stm32.hex from 0x08000000 Address starts to be converted into bin file .
bin File transfer hex file :
srec_cat.exe stm32.bin -binary -offset 0x08000000 -o stm32.hex -intel
take stm32.bin The offset 0x08000000 Address starts to be converted into hex file .
File capture
If you need to intercept part of the file , You can use parameters -crop.
srec_cat.exe stm32.hex -intel -crop 0x08000000 0x08003FFF -o stm32_app.hex -intel
take stm32.hex In file 0x08000000 - 0x08003FFF The valid data in generates a new file stm32_app.hex, If the end address of the code is 0x0800 1FFF, Then the code range of the newly generated file is 0x08000000 - 0x08001FFF.
Content filling
character string
If you want to fill in the string information at the position specified in the file , Such as version information
srec_cat.exe -generate 0x08000000 0x08000005 -repeat-string STM32 stm32.hex -intel -exclude 0x08000000 0x08000005 -o stm32_new.hex -intel
stay 0x08000000 0x08000005 Repeat filling in the range of “STM32” String information , and stm32.hex ( Exclude 0x08000000 0x08000005 Range data ) A merger , Generate new files stm32_new.hex
- -generate: Data generator parameters , Address range - data source
- -repeat-string: String parameters , Access string parameters later
- -exclude: Exclude filter parameters , Does not include data in a certain range of memory
- repeat : If the string length is less than the reserved range , Then repeat filling , For example, will 0x14 Change it to 0x16, be 0x15 and 0x16 The data corresponding to the address is ‘ST’
Numbers
If you want to fill in digital information at the location specified in the file , Such as file size
srec_cat.exe -generate 0x08 0x0C -constant-l-e 0x123456 4 stm32.bin -Binary -exclude 0x08 0x0C -o stm32_new.bin -Binary
stay 0x08~0x0C Fill the range according to 4 Byte repeat fill 16 Hexadecimal Numbers 0x123456, and stm32.bin ( Exclude 0x08~0x0C Range data ) A merger , Generate new files stm32_new.bin
- -constant-l-e: Numeric value byte width parameter , Instant value - Byte width
- repeat : If the alignment length is less than the reserved range , Then repeat filling , For example, will 0x0C Change it to 0x0D, be 0x0D The data corresponding to the address is 0x56( The small end model )
边栏推荐
- 基于NoCode构建简历编辑器
- First knowledge of OpenGL (2) compilation shaders
- 我的sql没问题为什么还是这么慢|MySQL加锁规则
- 2022 latest Beijing Construction Safety Officer simulation question bank and answers
- 2022牛客暑期多校训练营1(ACDGIJ)
- PAT甲级 1050 String Subtraction
- 综合设计一个OPPE主页--导航栏的设计
- Want the clouds in the picture to float? Video editing services can be achieved in three steps with one click
- 最终一致性性分布式事务 TCC
- “核弹级” Log4j 漏洞仍普遍存在,并造成持续影响
猜你喜欢

2022 latest Beijing Construction Safety Officer simulation question bank and answers

Google Earth engine - merra-2 m2t1nxaer: aerosol daily data set from 1980 to 2022

Pat grade a 1048 find coins

CAD进阶练习题(一)
![[physical simulation] the principle and practice of the simplest shape matching](/img/1e/d91ed992bc648d90d0c68bfe541d7e.jpg)
[physical simulation] the principle and practice of the simplest shape matching

Comprehensive design of an oppe homepage -- Design of navigation bar

vscode批量删除

Mapwithstate of spark streaming state flow

PAT甲级 1050 String Subtraction

Re7:读论文 FLA/MLAC Learning to Predict Charges for Criminal Cases with Legal Basis
随机推荐
博途PLC顺序开关机功能块(SCL)
Google Earth engine - merra-2 m2t1nxlv: 1980 present global pressure, temperature, wind and other data sets
[RCTF2015]EasySQL
[ten thousand words long text] Based on LSM tree thought Net 6.0 C # realize kV database (case version)
Technology vane | interpretation of cloud native technology architecture maturity model
【万字长文】使用 LSM-Tree 思想基于.Net 6.0 C# 实现 KV 数据库(案例版)
Re7: reading papers fla/mlac learning to predict charges for critical cases with legal basis
First knowledge of OpenGL (4) link shader
docker安装redis?如何配置持久化策略?
Internet Protocol
PAT甲级1048 Find Coins
Trends in software testing tools in 2021
Botu PLC Sequential switch function block (SCL)
Compiler analysis of clojure operation principle
微信小程序---网络数据请求
Pat grade a 1046 shortest distance
Sql语句——单行注释与多行注释
kubernetes之探针
《From SICP to Lisp》视频回播
2022 latest Tibet Construction scaffolder (construction special operation) simulation exam questions and answers