In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the "esp8266 rtos sdk compiled flash image composition method is what", in the daily operation, I believe that many people in the esp8266 rtos sdk compiled flash image composition method is what the problem is, the editor looked up all kinds of data, sorted out a simple and easy to use method of operation, hope to answer the "esp8266 rtos sdk compiled flash image composition method is what" the doubt is helpful! Next, please follow the editor to study!
Because the official document does not describe the startup characteristics of esp8266, this paper briefly analyzes the startup and operation of esp8266 and the composition characteristics of flash image according to the flash map documents in sdk, sdk makefile, ld files and python script files generated by flash image. For the sdk and compile-time configuration items used here, see the use of esp8266 rtos sdk on the small yellow board.
# # elf files generated by sdk. Here, you can get elf-related information by analyzing the makefile files in the sdk root directory.
Before executing make, we have selected the compiled configuration item, which is directly given here:
Boot=none
App=0
Freqdiv=0
Mode=0
Size_map=4
Flash=4096
The ld files that can be analyzed from within makefile to use are:
LD_FILE = $(LDDIR) / eagle.app.v6.ld
Eagle.app.v6.ld can see
MEMORY {dport0_0_seg: org = 0x3FF00000, len = 0x10 dram0_0_seg: org = 0x3FFE8000, len = 0x14000 iram1_0_seg: org = 0x40100000, len = 0x8000 irom0_0_seg: org = 0x40240000, len = 0x3C000}
During the compilation of sdk, it will be converted to eagle.app.v6.out, and then dump will produce segment information and symbol files.
@ $(RM)-r.. / bin/eagle.S.. / bin/eagle.dump@$ (OBJDUMP)-x-s $
< >.. / bin/eagle.dump@$ (OBJDUMP)-S $
< >.. / bin/eagle.S
From eagle.dump, you can find five section that are valid for actual operation:
Idx Name Size VMA LMA File off Algn 0 .data 00000634 3ffe8000 3ffe8000 000000e0 2 stories 4 1 .rodata 000008b0 3ffe8640 3ffe8640 00000720 2 stories 4 2 .BSS 00006bc8 3ffe8ef0 3ffe8ef0 00000fd0 2 stories 4 3 .text 0000776a 40100000 40100000 00000fd0 2 stories 2 4 .irom0.text 00030928 40240000 40240000 008740 2 stories 4
Combined with the memory information of the ld file, you can see that .data, .rodata, .bbs are all put into dram0_0_seg, .text is put into iram1_0_seg, and .irom0.text is put into irom0_0_seg.
# # convert elf files into burning images # makefile convert the above section copy into a single file
$(OBJCOPY)-- only-section .text-O binary $
< eagle.app.v6.text.bin$(OBJCOPY) --only-section .data -O binary $< eagle.app.v6.data.bin$(OBJCOPY) --only-section .rodata -O binary $< eagle.app.v6.rodata.bin$(OBJCOPY) --only-section .irom0.text -O binary $< eagle.app.v6.irom0text.bin ###将section打包 然后使用gen_appbin.py脚本将eagle.app.v6.text.bin,eagle.app.v6.data.bin,eagle.app.v6.rodata.bin三个文件打包成一个eagle.app.flash.bin, 命令为: python ../tools/gen_appbin.py $< 0 $(mode) $(freqdiv) $(size_map) 这里直接给出gen_appbin.py的各项参数 elf_file = sys.argv[1] >Eagle.app.v6.outboot_mode = sys.argv [2] > 0flash_mode = sys.argv [3] > 0flash_clk_div = sys.argv [4] > 0flash_size_map = sys.argv [5] > 4BIN_MAGIC_IROM = 0xEATEXT_ADDRESS = 0x40100000
The packaging process is brief:
Generate eagle.app.sym through nm-g eagle.app.v6.out, and find out the section address and entry address in the sym file
Call_user_start-- > entry_addr > 40100004 entry address _ data_start-- > data_start_addr > 3ffe8000 .data segment start address _ rodata_start-- > rodata_start_addr > 3ffe8640 .rodata segment start address
Package it into eagle.app.flash.bin in the following format
HEAD0 = BIN_MAGIC_FLASH
HEAD1 = 3
HEAD2 = flash_mode
HEAD3 = flash_size_map
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.