AliOS Things study notes (3)-ESP8266 compilation and burning

Compile:

# 进入`AliOS-Things`顶层目录
cd $AOS_SDK_PATH

# 配置
# 初次使用会显示"kconfig tools missing",并自动下载
aos make helloworld_demo@esp8266 -c config	

# 编译
# 初次编译如果没有 gcc-arm-none-eabi 编译链工具,会自动下载
aos make

Burning:

Linux ( recommended ):

The burning configuration file is in:, the stepsbuild/site_scons/upload/esp8266.json have been configured
:

  1. Execute the burning command:aos upload <工程名>@esp8266
  2. According to the listed ports, select the corresponding serial number and press Enter

Note: If you use the NodeMCU development board, you need to modify the configuration file and increase the programming mode, otherwise an error will be reported after programming and it cannot be used.
Reference: [Problem Solved] NodeMCU (ESP8266) reported an error when using the aos-cube tool to burn the AliOS Things project

Burn LOG:

$ aos upload helloworld_demo@esp8266
aos-cube version: 0.5.11
[INFO]: Currently in aos_sdk_path: '/home/pjw/ESP8266/AliOS-Things'
[INFO]: Target: helloworld_demo@esp8266
[INFO]: Currently in aos_sdk_path: '/home/pjw/ESP8266/AliOS-Things'


--- Available ports:
---  1: /dev/ttyUSB0         'CP2102 USB to UART Bridge Controller - CP2102 USB to UART Bridge Controller'
--- Enter port index or full name: 1
[INFO]: Running cmd:
	'esptool.py --chip esp8266 --port /dev/ttyUSB0 --baud 921600 write_flash --flash_size detect 0x0 /home/pjw/ESP8266/AliOS-Things/platform/mcu/esp8266/bsp/boot_v1.7_921600.bin 0x3fc000 /home/pjw/ESP8266/AliOS-Things/platform/mcu/esp8266/bsp/esp_init_data_default.bin 0x3fe000 /home/pjw/ESP8266/AliOS-Things/platform/mcu/esp8266/bsp/blank.bin 0x1000 /home/pjw/ESP8266/AliOS-Things/out/helloworld_demo@esp8266/binary/[email protected]'
esptool.py v3.0
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 5c:cf:7f:6c:d9:61
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0040
Compressed 4096 bytes to 2948...
Wrote 4096 bytes (2948 compressed) at 0x00000000 in 0.0 seconds (effective 937.4 kbit/s)...
Hash of data verified.
Compressed 128 bytes to 75...
Wrote 128 bytes (75 compressed) at 0x003fc000 in 0.0 seconds (effective 336.6 kbit/s)...
Hash of data verified.
Compressed 4096 bytes to 26...
Wrote 4096 bytes (26 compressed) at 0x003fe000 in 0.0 seconds (effective 17030.8 kbit/s)...
Hash of data verified.
Compressed 289220 bytes to 204900...
Wrote 289220 bytes (204900 compressed) at 0x00001000 in 3.1 seconds (effective 738.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
---host_os:Linux64
[INFO]: Firmware upload succeed!

windows:

  • Use the ESPFlashDownloadTool.exetool to burn, the software can only be run under windows.
  • You can use RaiDrive to remotely map the ubuntu folder to Windows.
  • RaiDrive Configuration Reference: Environment Setup [Windows Chapter] @ Mapping and Burning
  • The app firmware is in the /out/工程名@芯片名/binary/directory, and the burning address 0x1000.
  • Other firmwares are in the platform/mcu/esp8266/bspdirectory, such as:
    blank.bin: Burning address 0x3FE000
    esp_init_data_default.bin: Burning address 0x3FC000
    boot_v1.7_921600.bin: Burning address0x0

The burning configuration is as follows: (After the burning is completed, open the serial port assistant, the baud rate 921600will be printed hello world! count *)
Insert picture description here


LOG:

[Problem solving] ESP8266 uses AliOS Things to report an error: Fatal exception (0): epc1=0x401000b5...

2nd boot version : 1.7(5d6f877)
SPI Speed : 40MHz
SPI Mode : DIO
SPI Flash Size & Map: 32Mbit(1024KB+1024KB)

[11:20:15.772]收←◆jump to run user1 @ 1000

[11:20:15.916]收←◆OS SDK ver: 2.0-dev(1aa052f) compiled @ Aug 26 2019 13:39:05
             Welcome to AliOS Things           
nano entry here!
hello world! count 0 

[11:20:16.982]收←◆hello world! count 1 

[11:20:17.983]收←◆hello world! count 2 

[11:20:18.983]收←◆hello world! count 3 

[11:20:19.983]收←◆hello world! count 4 

[11:20:20.983]收←◆hello world! count 5 

Guess you like

Origin blog.csdn.net/p1279030826/article/details/113576716