当前位置: 首页 > news >正文

南宁网站空间百度指数热度榜

南宁网站空间,百度指数热度榜,久久建筑网碗扣式钢管脚手架安全技术规范,中国建设招投标网站以太网口支持 ESP-IDF中添加了对Opencores以太网MAC的支持。 运行以太网示例时,启用CONFIG_EXAMPLE_CONNECT_ETHERNET和 CONFIG_EXAMPLE_USE_OPENETH.。运行自定义应用程序时,启用CONFIG_ETH_USE_OPENETH 并初始化以太网驱动程序,如示例 /c…

以太网口支持

ESP-IDF中添加了对Opencores以太网MAC的支持。

  • 运行以太网示例时,启用CONFIG_EXAMPLE_CONNECT_ETHERNETCONFIG_EXAMPLE_USE_OPENETH.。
  • 运行自定义应用程序时,启用CONFIG_ETH_USE_OPENETH 并初始化以太网驱动程序,如示例 /common_components/protocol_example.common/connect.c 中所示(查找 esp_eth_mac_new_openeth)。

启动QEMU时,使用open_eth网络设备。

用户模式网络

例如,要在用户模式下启动网络(仅TCP/UDP,模拟设备位于NAT之后),请在QEMU命令行中添加以下选项:

-nic user,model=open_eth

一些ESP项目(特别是运行TCP侦听器)可能需要设置端口转发,

-nic user,model=open_eth,id=lo0,hostfwd=tcp:127.0.0.1:PORT_HOST-:PORT_GUEST

(例如,asio-echo服务器默认在2222上设置服务器,因此hostfwd=tcp:127.0.0.1:22222-:2222 允许从主机访问 nc localhost 2222

指定引导模式

要指定所需的 strapping 模式, 在运行QEMU时需要添加以下参数:

-global driver=esp32.gpio,property=strap_mode,value=0x0f

这将设置 GPIO_STRAP 寄存器的值。

  • 使用 0x12 作为闪存启动模式(默认)
  • 0x0f 用于仅UART下载模式(因为SDIO部分未实现)

Specifying eFuse storage

Add extra arguments to the command line:

-drive file=qemu_efuse.bin,if=none,format=raw,id=efuse
-global driver=nvram.esp32.efuse,property=drive,value=efuse

The first argument creates a block device backed by qemu_efuse.bin file, with identifier efuse. The second line configures nvram.esp32.efuse device to use this block device for storage.

The file must be created before starting QEMU:

dd if=/dev/zero bs=1 count=124 of=/tmp/qemu_efuse.bin

124 bytes is the total size of ESP32 eFuse blocks.

Note

Specifying eFuse storage is mandatory to test out any platform security features like “Secure Boot” or “Flash Encryption”.

Emulating ESP32 ECO3

For the application to detect the emulated chip as ESP32 ECO3, the following virtual efuses must be set:

  • CHIP_VER_REV1
  • CHIP_VER_REV2

Here is the corresponding efuse file (in hexadecimal, produced using xxd -p):

000000000000000000000000008000000000000000001000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000
00000000

To convert this (efuse.hex) back to binary, run xxd -r -p efuse.hex qemu_efuse.bin.

Alternatively, these bits can be set using espefuse:

espefuse.py --port=socket://localhost:5555 burn_efuse CHIP_VER_REV1
espefuse.py --port=socket://localhost:5555 burn_efuse CHIP_VER_REV2

Disabling the watchdogs

By default, Timer Group watchdog timers are emulated, and TG0 WDT is enabled at reset. It is sometimes useful to disable these watchdog timers. This can be done by adding the following to the command line:

-global driver=timer.esp32.timg,property=wdt_disable,value=true

This disables the emulation of TG watchdog timers. Even if the application configures them, they will not fire.

The RTC watchdog timer is not emulated yet, so it doesn’t need to be disabled.

Using esptool.py and espefuse.py to interact with QEMU

  1. Start QEMU:

    build/qemu-system-xtensa -nographic \-machine esp32 \-drive file=flash_image.bin,if=mtd,format=raw \-global driver=esp32.gpio,property=strap_mode,value=0x0f \-drive file=qemu_efuse.bin,if=none,format=raw,id=efuse \-global driver=nvram.esp32.efuse,property=drive,value=efuse \-serial tcp::5555,server,nowait
    

    The final line redirects the emulated UART to TCP port 5555 (QEMU acts as a server).

    Type q and press Enter at any time to quit.

  2. Run esptool.py:

    esptool.py -p socket://localhost:5555 flash_id
    

    Flashing with idf.py also works:

    export ESPPORT=socket://localhost:5555
    idf.py flash
    
  3. Or, run espefuse.py:

    espefuse.py --port socket://localhost:5555 --do-not-confirm burn_custom_mac 00:11:22:33:44:55
    

Note: esptool can not reset the emulated chip using the RTS signal, because the state of RTS is not transmitted over TCP to QEMU. To reset the emulated chip, run system_reset command in QEMU console (started at step 1).

Specifying ROM ELF file

If -kernel and -bios arguments are not given, ESP32 (rev. 3) ROM code will be loaded. This ROM code binary is included in the repository. To specify the ROM code ELF file to load, pass the filename with a -bios <filename> argument.

Using flash encryption

Self-encryption workflow

  1. In the IDF application, enable CONFIG_SECURE_FLASH_ENC_ENABLED through menuconfig, and build it
  2. Build the flash image as per the instructions from the Compiling the ESP-IDF program to emulate section.
  3. Create qemu_efuse.bin as highlighted in the Specifying eFuse storage section.
  4. Execute qemu-system-xtensa using the following command:
    build/qemu-system-xtensa -nographic -machine esp32 \-drive file=/path/to/qemu_efuse.bin,if=none,format=raw,id=efuse   \-global driver=nvram.esp32.efuse,property=drive,value=efuse       \-drive file=/path/to/flash_image.bin,if=mtd,format=raw            \-global driver=timer.esp32.timg,property=wdt_disable,value=true
    

Adding PSRAM

QEMU “memory size” option can be used to enable PSRAM emulation. By default, no PSRAM is added to the machine. You can add 2MB or 4MB PSRAM using -m 2M or -m 4M command line options, respectively.

Note that PSRAM MMU is not emulated yet, so things like bank switching (himem in IDF) do not work.

Using SD cards

QEMU emulates SD/MMC host controller used in ESP32. To add an SD card to the system, create an image and pass it to QEMU.

  1. Create a raw image file, for example, 64 MB:

    $ dd if=/dev/zero bs=$((1024*1024)) count=64 of=sd_image.bin
    
  2. Add the following argument when running QEMU:

    -drive file=sd_image.bin,if=sd,format=raw
    

If you need to create a large SD card image, it is recommended to use sparse cqow2 images instead of raw ones. Consult QEMU manual about qemu-img tool for details.

Only one SD card is supported at a time. You can use either slot 0 or slot 1 of the SD/MMC controller in the application code.

Enabling graphical user interface (GUI)

The ESP32 QEMU implementation implements a virtual RGB panel, absent on the real hardware, that can be used to show graphical interface. It is associated to a virtual frame buffer that can be used to populate the pixels to show. It is also possible to use the target internal RAM as a frame buffer.

To enable the graphical interface, while keeping the serial output in the console, use the following command line:

build/qemu-system-xtensa \-machine esp32 \-drive file=flash_image.bin,if=mtd,format=raw-display sdl \-serial stdio

If gtk backend was enabled when compiling QEMU, it is possible to replace -display sdl with -display gtk

http://www.ds6.com.cn/news/121964.html

相关文章:

  • 商务网站建设与维护考试营销型网站建设推广
  • 徐州市城乡和住房建设局网站seo查询工具网站
  • 打开网站提示建设中有趣软文广告经典案例
  • 广州市疫情最新通报怎么提高seo关键词排名
  • 做网站得先注册域名吗产品推广介绍怎么写
  • 做不做生意都要知道的网站廊坊seo网站管理
  • 网站开发与网站制作白帽seo
  • 做刀模线网站网红营销
  • 如何做网站横幅小学生抄写新闻20字
  • 做有趣的网站免费软件下载网站有哪些
  • 阿里云做的网站程序员电脑培训班价目表
  • 网站改版设计流程百度官网首页官网
  • 涟水建设局网站企拓客app骗局
  • 上海高端做网站营销推广与策划
  • java高端网站建设苏州网络推广服务
  • 怎么做网站表白营销型网站建设实训总结
  • 个人网站的基本风格是百度推广首页登录
  • 多国语言外贸网站模板整合营销策划名词解释
  • 学前教育网站建设google谷歌搜索主页
  • 真做视频网站roseonly企业网站优化
  • 网站建设框架营销策划机构
  • 网站的开发建设要做什么东莞做网站优化
  • 国外创意型网站设计怎么在百度上做推广上首页
  • 网站url如何做优化谷歌seo实战教程
  • 怎么介绍自己做的电影网站seo排名app
  • 做网站如何推广关键词排名优化教程
  • 慈善协会网站建设资料怎么交换友情链接
  • 做网站好用的cms跨境电商培训机构哪个靠谱
  • 网站首页tdk怎么做成免费crm软件有哪些优点
  • 陕西建设执业中心网站广州seo公司排行