Windows 下搭建 Zephyr 开发环境

news2025/6/8 11:10:42

1. 系统要求

  • 操作系统:Windows 10/11(64位)
  • 磁盘空间:至少 8GB 可用空间(Zephyr 及其工具链较大)
  • 权限:管理员权限(部分工具需要)

 2. 安装必要工具

winget安装依赖工具(Windows Package Manager)

管理员身份 打开 cmd.exe或者PowerShell,运行:

winget install Kitware.CMake Ninja-build.Ninja oss-winget.gperf python Git.Git oss-winget.dtc wget 7zip.7zip

windows安装包下载临时目录

C:\Users\Administrator\AppData\Local\Temp\WinGet

安装日志:

Microsoft Windows [版本 10.0.26100.4061]
(c) Microsoft Corporation。保留所有权利。

C:\Users\Administrator>winget install Kitware.CMake Ninja-build.Ninja oss-winget.gperf python Git.Git oss-winget.dtc wget 7zip.7zip
找到已安装的现有包。正在尝试升级已安装的包...
找不到可用的升级。
配置的源中没有可用的较新的包版本。
已安装程序包: Kitware.CMake
找到已安装的现有包。正在尝试升级已安装的包...
找不到可用的升级。
配置的源中没有可用的较新的包版本。
已安装程序包: Ninja-build.Ninja
找到已安装的现有包。正在尝试升级已安装的包...
找不到可用的升级。
配置的源中没有可用的较新的包版本。
已安装程序包: oss-winget.gperf
找到已安装的现有包。正在尝试升级已安装的包...
找不到可用的升级。
配置的源中没有可用的较新的包版本。
已安装程序包: python
找到已安装的现有包。正在尝试升级已安装的包...
找不到可用的升级。
配置的源中没有可用的较新的包版本。
已安装程序包: Git.Git
找到已安装的现有包。正在尝试升级已安装的包...
找不到可用的升级。
配置的源中没有可用的较新的包版本。
已安装程序包: oss-winget.dtc
找到已安装的现有包。正在尝试升级已安装的包...
找不到可用的升级。
配置的源中没有可用的较新的包版本。
已安装程序包: wget
找到已安装的现有包。正在尝试升级已安装的包...
找不到可用的升级。
配置的源中没有可用的较新的包版本。
已安装程序包: 7zip.7zip

3. 获取Zephyr和安装Python依赖项

1. 使用普通用户打开cmd.exe or PowerShell 终端

2. 创建新的虚拟环境

cd D:\workspace\
mkdir zephyrproject
python -m venv zephyrproject\.venv

3. 激活虚拟环境

zephyrproject\.venv\Scripts\activate.bat

4.  安装west

pip install west -i https://pypi.mirrors.ustc.edu.cn/simple/

5. 获取Zephyr源码

west init zephyr-project
cd zephyr-project
west update

 west update日志

(.venv) D:\workspace\zephyrproject\zephyr-project>west update
=== updating acpica (modules/lib/acpica):
HEAD is now at 8d24867bc Merge pull request #5 from dcpleung/kernel/mm_z_phys_map_unmap_rename
=== updating cmsis (modules/hal/cmsis):
HEAD is now at d1b8b20 Backport CMSIS_6#102 to CMSIS 5.9.0
=== updating cmsis-dsp (modules/lib/cmsis-dsp):
HEAD is now at d80a49b2 do not generate warnings when scalar functions are used with MVE
=== updating cmsis-nn (modules/lib/cmsis-nn):
HEAD is now at e9328d6 manifest: zephyr module file
=== updating cmsis_6 (modules/hal/cmsis_6):
HEAD is now at 6dd50439 cmsis_6: Integrate with zephyr build system
=== updating edtt (tools/edtt):
HEAD is now at b9ca3c7 Fix for for python >= 3.11
=== updating fatfs (modules/fs/fatfs):
HEAD is now at 16245c7 fs: Update driver to version 0.15a
=== updating hal_adi (modules/hal/adi):
HEAD is now at f8f6547 chore(PeriphDrivers): Replace pow() with left shift in UART drivers
=== updating hal_afbr (modules/hal/afbr):
HEAD is now at 4e1eea7 general: MAKE_VERSION is defined in other modules so let's change it
=== updating hal_ambiq (modules/hal/ambiq):
HEAD is now at f46941f hal: uart: minor change for uart dma support
=== updating hal_atmel (modules/hal/atmel):
HEAD is now at ca7e4c6 sam3x: spi: missing adc macro
=== updating hal_bouffalolab (modules/hal/bouffalolab):
HEAD is now at 5811738 bflb: add register files for bl60x
=== updating hal_espressif (modules/hal/espressif):
HEAD is now at 1f1d6937f8 hal: esp32c6: Fix sleep routine
=== updating hal_ethos_u (modules/hal/ethos_u):
HEAD is now at 50ddffc Cache optimizations
=== updating hal_gigadevice (modules/hal/gigadevice):
HEAD is now at 2994b7d README.md: add pllmf and pack exception for gd32a50x
=== updating hal_infineon (modules/hal/infineon):
HEAD is now at 0fe4f3a hal: infineon: Modifications required to support XMC7200
=== updating hal_intel (modules/hal/intel):
HEAD is now at 0447cd2 Update pm_regs.h
=== updating hal_microchip (modules/hal/microchip):
HEAD is now at 4b74f40 hal: microchip: sam: Update some register definitions for FLEXCOM USART
=== updating hal_nordic (modules/hal/nordic):
HEAD is now at 4eafaa4 nrfs: usb vbus enable/disable: expand usb service
=== updating hal_nuvoton (modules/hal/nuvoton):
HEAD is now at be1042d hal:nuvoton:m55m1: support emac
=== updating hal_nxp (modules/hal/nxp):
HEAD is now at e0b43431 dts: nxp: nxp_imx: update the pinctrl dtsi for mimx9131cvvxj
=== updating hal_openisa (modules/hal/openisa):
HEAD is now at eabd530 fix-double-promotion in fsl_xcvr_trim
=== updating hal_quicklogic (modules/hal/quicklogic):
HEAD is now at bad8944 HAL: eoss3_dev: add missing `__cplusplus` handling
=== updating hal_renesas (modules/hal/renesas):
HEAD is now at 9d68ee7 portable: rp_crc: add runtime reconfigure for CRC
=== updating hal_rpi_pico (modules/hal/rpi_pico):
HEAD is now at 7b57b24 Merge pull request #8 from ajf58/merge-2.1.0
=== updating hal_silabs (modules/hal/silabs):
HEAD is now at a0095a7 wiseconnect: Apply 802.11ax config only in client mode
=== updating hal_st (modules/hal/st):
HEAD is now at 9f81b44 sensor/stmemsc: Align stmemsc i/f to v2.9.1
=== updating hal_stm32 (modules/hal/stm32):
HEAD is now at 5cbc642b dts: New batch with HSPI signals
=== updating hal_tdk (modules/hal/tdk):
HEAD is now at 6727477 Merge pull request #8 from tdk-invn-oss/main
=== updating hal_telink (modules/hal/telink):
HEAD is now at 4226c7f drivers: Disable BLE support
=== updating hal_ti (modules/hal/ti):
HEAD is now at bc8e7b9 hal: ti: mspm0: Add a support for MSPM0
=== updating hal_wch (modules/hal/wch):
HEAD is now at 6dd3137 hal: wch: update the HAL to pull in CH32V00x support
=== updating hal_wurthelektronik (modules/hal/wurthelektronik):
HEAD is now at e3e2797 Remove preprocessor warnings for not enabling float
=== updating hal_xtensa (modules/hal/xtensa):
HEAD is now at b38620c zephyr: Add SoC overlay for i.MXRT700 HiFi1 DSP
=== updating hostap (modules/lib/hostap):
HEAD is now at 8412f4b23 [noup] zephyr: remove zephyr wpas monitor socket pair
=== updating liblc3 (modules/lib/liblc3):
HEAD is now at 48bbd3e Rename lc3 python package to lc3py, and bump version to 1.1.2
=== updating libmctp (modules/lib/libmctp):
HEAD is now at b97860e build MCTP zephyr library only when CONFIG_MCTP is enabled
=== updating libmetal (modules/hal/libmetal):
HEAD is now at 14f5195 lib: update libmetal to SHA 9a21915a5f8f
=== updating littlefs (modules/fs/littlefs):
HEAD is now at 8f5ca34 Merge pull request #19 from mkaranki/update-to-v2.10.2
=== updating loramac-node (modules/lib/loramac-node):
HEAD is now at fb00b383 zephyr: configure FragDecoder using Kconfig
=== updating lvgl (modules/lib/gui/lvgl):
HEAD is now at 1ed1ddd88 docs(Alif): add docs for Alif chip vendor (#7622)
=== updating mbedtls (modules/crypto/mbedtls):
HEAD is now at 5f8899343 Merge pull request #70 from tomi-font/bump_to_3.6.3
=== updating mcuboot (bootloader/mcuboot):
HEAD is now at 990b1fcb docs: release-notes: Add additional fixes
=== updating mipi-sys-t (modules/debug/mipi-sys-t):
HEAD is now at 33e5c23 Fix for warning of potential error using = instead of ==
=== updating net-tools (tools/net-tools):
HEAD is now at 986bfeb Replace native_posix with native_sim
=== updating nrf_hw_models (modules/bsim_hw_models/nrf_hw_models):
HEAD is now at c6296f6 52/53 CCM: Remove warning on TASK_STOP
=== updating nrf_wifi (modules/lib/nrf_wifi):
HEAD is now at 0cd7f28 Fix delayed stats event handling
=== updating open-amp (modules/lib/open-amp):
HEAD is now at f7f4d08 lib: update open-amp lib  to SHA 9a21915a5f8f
=== updating openthread (modules/lib/openthread):
HEAD is now at 3ae741f95 [instance] fix index computation in multi-instances context (#11099)
=== updating percepio (modules/debug/percepio):
HEAD is now at 49e6dc2 Merge branch 'main' into zephyr
=== updating picolibc (modules/lib/picolibc):
HEAD is now at 560946f26 Delete obsoleted _syslist.h
=== updating segger (modules/debug/segger):
HEAD is now at cf56b1d readme: Add readme
=== updating tinycrypt (modules/crypto/tinycrypt):
HEAD is now at 1012a3e Fix warnings reported by UBSAN
=== updating trusted-firmware-a (modules/tee/tf-a/trusted-firmware-a):
HEAD is now at 713ffbf96 Merge pull request #4 from ceolin/v2.10.4
=== updating trusted-firmware-m (modules/tee/tf-m/trusted-firmware-m):
HEAD is now at c150f4885 platform: ext: adi: pull in update from TF-M main
=== updating uoscore-uedhoc (modules/lib/uoscore-uedhoc):
HEAD is now at 54abc10 Merge pull request #5 from rlubos/upmerge-02-2025
=== updating zcbor (modules/lib/zcbor):
HEAD is now at 9b07780 Update version to 0.9.1

 6. Export Zephyr package

west zephyr-export

7. 安装west python依赖包

# 使用国外镜像源比较慢
west packages pip --install

 注意:永久切换pip使用国内镜像源

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip config set global.trusted-host pypi.tuna.tsinghua.edu.cn

pip config list
# 恢复默认配置
pip config unset global.index-url
pip config unset global.trusted-host

常见镜像源地址

镜像名称

URL

清华大学

https://pypi.tuna.tsinghua.edu.cn/simple

阿里云

https://mirrors.aliyun.com/pypi/simple

腾讯云

https://mirrors.cloud.tencent.com/pypi/simple

华为云

https://repo.huaweicloud.com/repository/pypi/simple

4. 安装 Zephyr SDK

Zephyr SDK 包含编译工具链(如 GCC ARM 工具链)。

(1) 下载 SDK

从 Zephyr SDK 官方页面 下载最新版(如 zephyr-sdk-0.17.1_windows-x86_64.7z)。

(2) 解压并安装

1. 解压到 D:\workspace\zephyrproject\zephyr-sdk\zephyr-sdk-0.17.1(路径不要有空格或中文)。

以管理员身份运行解压目录中的 setup.cmd

cd D:\workspace\zephyrproject\zephyr-sdk\zephyr-sdk-0.17.1
.\setup.cmd

2. 按提示输入 Y 同意安装。

验证安装

(1) 检查环境

west --version
cmake --version
ninja --version
python --version

# 所有命令应正常输出版本号
(.venv) D:\workspace\zephyrproject\zephyr-project\zephyr>west --version
West version: v1.4.0

(.venv) D:\workspace\zephyrproject\zephyr-project\zephyr>cmake --version
cmake version 4.0.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

(.venv) D:\workspace\zephyrproject\zephyr-project\zephyr>ninja --version
1.12.1

(.venv) D:\workspace\zephyrproject\zephyr-project\zephyr>python --version
Python 3.10.11

(2) 编译示例项目

cd D:\workspace\zephyrproject\zephyr-project\zephyr
west build -b blackpill_f401cc samples/hello_world
  • -b blackpill_f401cc:指定 Black Pill STM32F401CC 开发板
  • 首次编译会下载工具链和依赖,耗时较长。

(3) 烧录与调试

west flash --runner blackmagicprobe --gdb-serial "\\.\COM12"
west debug --runner blackmagicprobe --gdb-serial "\\.\COM12"
west attach --runner blackmagicprobe --gdb-serial "\\.\COM12"

west flash --runner blackmagicprobe --gdb-serial "\\.\COM12"
-- west flash: rebuilding
ninja: no work to do.
-- west flash: using runner blackmagicprobe
-- runners.blackmagicprobe: using GDB serial: \\.\COM12
Remote debugging using \\.\COM12
Target voltage: 2.51V
Available Targets:
No. Att Driver
1      STM32F401E M4
Attaching to Remote target
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
0x08002d22 in ?? ()
Loading section rom_start, size 0x194 lma 0x8000000
Loading section text, size 0x367c lma 0x8000194
Loading section .ARM.exidx, size 0x8 lma 0x8003810
Loading section initlevel, size 0x80 lma 0x8003818
Loading section device_area, size 0x180 lma 0x8003898
Loading section sw_isr_table, size 0x2a8 lma 0x8003a18
Loading section gpio_driver_api_area, size 0x24 lma 0x8003cc0
Loading section reset_driver_api_area, size 0x10 lma 0x8003ce4
Loading section clock_control_driver_api_area, size 0x1c lma 0x8003cf4
Loading section uart_driver_api_area, size 0x4c lma 0x8003d10
Loading section rodata, size 0x2d4 lma 0x8003d5c
Loading section datas, size 0x4c lma 0x8004030
Loading section device_states, size 0x18 lma 0x800407c
Loading section .last_section, size 0x4 lma 0x8004094
Start address 0x080008c4, load size 16536
Transfer rate: 23 KB/sec, 590 bytes/write.
[Inferior 1 (Remote target) killed]


west debug --runner blackmagicprobe --gdb-serial "\\.\COM12"
-- west debug: rebuilding
ninja: no work to do.
-- west debug: using runner blackmagicprobe
-- runners.blackmagicprobe: using GDB serial: \\.\COM12
GNU gdb (Zephyr SDK 0.17.1) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-host_w64-mingw32 --target=arm-zephyr-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://github.com/zephyrproject-rtos/sdk-ng/issues>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Remote debugging using \\.\COM12
Target voltage: 2.44V
Available Targets:
No. Att Driver
 1      STM32F401E M4
Attaching to Remote target
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
0x08002d22 in ?? ()
Reading symbols from D:/workspace/zephyrproject/zephyr-project/zephyr/build/zephyr/zephyr.elf...
Loading section rom_start, size 0x194 lma 0x8000000
Loading section text, size 0x367c lma 0x8000194
Loading section .ARM.exidx, size 0x8 lma 0x8003810
Loading section initlevel, size 0x80 lma 0x8003818
Loading section device_area, size 0x180 lma 0x8003898
Loading section sw_isr_table, size 0x2a8 lma 0x8003a18
Loading section gpio_driver_api_area, size 0x24 lma 0x8003cc0
Loading section reset_driver_api_area, size 0x10 lma 0x8003ce4
Loading section clock_control_driver_api_area, size 0x1c lma 0x8003cf4
Loading section uart_driver_api_area, size 0x4c lma 0x8003d10
Loading section rodata, size 0x2d4 lma 0x8003d5c
--Type <RET> for more, q to quit, c to continue without paging--
Loading section datas, size 0x4c lma 0x8004030
Loading section device_states, size 0x18 lma 0x800407c
Loading section .last_section, size 0x4 lma 0x8004094
Start address 0x080008c4, load size 16536
Transfer rate: 6 KB/sec, 590 bytes/write.

west attach --runner blackmagicprobe --gdb-serial "\\.\COM12"
-- west attach: rebuilding
ninja: no work to do.
-- west attach: using runner blackmagicprobe
-- runners.blackmagicprobe: using GDB serial: \\.\COM12
GNU gdb (Zephyr SDK 0.17.1) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-host_w64-mingw32 --target=arm-zephyr-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://github.com/zephyrproject-rtos/sdk-ng/issues>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Remote debugging using \\.\COM12
Target voltage: 2.53V
Available Targets:
No. Att Driver
 1      STM32F401E M4
Attaching to Remote target
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
0x08002d22 in ?? ()
Reading symbols from D:/workspace/zephyrproject/zephyr-project/zephyr/build/zephyr/zephyr.elf...
(gdb)

如果看到 Hello World! zephyr 输出,说明环境搭建成功!

这里主要使用的是开源调试器Black Magic Debug,Black Magic Debug自带Debug口和串口,使用windows命令行请注意:

COM 端口号过高(> COM9)
  • 问题原因:Windows 对 COM 端口号的命名规则有特殊限制:
    • COM1~COM9 是传统端口,可直接以 COMx 形式访问。
    • COM10 及以上的端口属于扩展端口,需通过 \\.\COMx 格式访问(例如 \\.\COM12)。

    本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2404060.html

    如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

    相关文章

    Readest(电子书阅读器) v0.9.53

    Readest 是一款开源电子书阅读器&#xff0c;专为沉浸式和深度阅读体验而设计。它是对Foliate的现代重写&#xff0c;利用Next. js 15和Tauri v2在macOS、Windows、Linux和Web上提供无缝的跨平台体验&#xff0c;并即将支持移动平台。 软件特色 多格式支持 支持EPUB、MOBI、K…

    USART 串口通信全解析:原理、结构与代码实战

    文章目录 USARTUSART简介USART框图USART基本结构数据帧起始位侦测数据采样波特率发生器串口发送数据 主要代码串口接收数据与发送数据主要代码 USART USART简介 一、USART 的全称与基本定义 英文全称 USART&#xff1a;Universal Synchronous Asynchronous Receiver Transmi…

    UOS无法安装deb软件包

    UOS无法安装deb软件包 问题描述解决办法: 关闭安全中心的应用隔离结果验证 问题描述 UOS安装Linux微信的deb包时&#xff0c;无法正常安装 解决办法: 关闭安全中心的应用隔离 要关闭-安全中心的应用隔离后才可以正常软件和运行。 应用安全----》 允许任意应用。 结果验证 # …

    VUE前端实现自动打包成压缩文件

    VUE前端实现自动打包成压缩文件 背景思路实现打包代码实现 尾巴 背景 做前端开发的兄弟们都经历过每次开发完成之后发包需要进行打包&#xff0c;然后将打包文件压缩。每次打好包了都得手动压缩一遍&#xff0c;就有点繁琐。今天我们就使用一种命令行自动压缩的方法&#xff0…

    2025政务服务便民热线创新发展会议顺利召开,张晨博士受邀分享

    5月28日&#xff0c;由新华社中国经济信息社、新华社广东分社联合主办的2025政务服务便民热线创新发展暨“人工智能热线”会议在广州举行。会议围绕“人工智能与新质热线”主题&#xff0c;邀请全国的12345政务服务便民热线主管部门负责人、省市热线负责人和专家学者&#xff0…

    【PDF PicKiller】PDF批量删除固定位置图片工具,默认解密,可去一般图、背景图、水印图!

    PDF批量删除固定位置图片工具 PDF PicKiller <center>PDF PicKiller [Download](https://github.com/Peaceful-World-X/PDF-PicKiller)&#x1f929; 工具介绍&#x1f973; 主要功能&#x1f92a; 软件使用&#x1f92a; 参数解释&#x1f92a; 关键代码&#x1f929; 项…

    GIC700组件

    GIC700包含了几个重要的组件,它们使用一个内部的GIC互联,用于在不同的组件之间使用AXI5-Stream接口进行路由。 1. Distributor(GICD) gicd是GIC700中所有组件之间的主要通信节点。它作为SPI的管理者以及维护LPI的cache,并且与其它chip上的GIC700组件进行通信。当支持GIC…

    有没有 MariaDB 5.5.56 对应 MySQL CONNECTION_CONTROL 插件

    有没有 MariaDB 对应 MySQL CONNECTION_CONTROL 插件 背景 写这篇文章的目的是因为昨晚半夜突然被call起来&#xff0c;有一套系统的mysql数据库启动失败了。尝试了重启服务器也不行。让我协助排查一下问题出在哪。 分析过程 一开始拿到服务器IP地址&#xff0c;就去数据库…

    TripGenie:畅游济南旅行规划助手:个人工作纪实(二十二)

    这周&#xff0c;我进行了历史记录的设计与制作&#xff0c;我对于每一个用户与智能体交互得出的历史行程的数据进行了存储与可视化展示。 首先&#xff0c;我设置了一个csv文件存储每一个得出的行程规划&#xff0c;注意这里的地图我设置了一个全路径进行存储&#xff0c;这样…

    如何用AI高效运营1000+Tiktok矩阵账号

    在当今数字化的时代&#xff0c;Tiktok 矩阵账号运营成为了众多企业和个人追求流量与变现的重要手段。然而&#xff0c;面对众多的账号管理&#xff0c;如何高效运营成为了关键。此时&#xff0c;AI 工具的出现为我们提供了强有力的支持。 一、Tiktok 矩阵账号的重要性 Tiktok…

    【论文解读】Toolformer: 语言模型自学使用工具

    1st author: ‪Timo Schick‬ - ‪Google Scholar‬ paper: Toolformer: Language Models Can Teach Themselves to Use Tools | OpenReview NeurIPS 2023 oral code: lucidrains/toolformer-pytorch: Implementation of Toolformer, Language Models That Can Use Tools, by…

    408第一季 - 数据结构 - 线性表II

    链表 头节点始终指向第一个 头节点的好处&#xff1a; 第一个好处 这里L是头节点 可以发现&#xff0c;删除第一个也可以统一了 第二个好处 这是无头节点&#xff0c;空和非空指向的不一样 然后有头节点就可以统一了&#xff01; 双链表 插入 第一步要在第四步之前&…

    基于VMD-LSTM融合方法的F10.7指数预报

    F10.7 Daily Forecast Using LSTM Combined With VMD Method ​​F10.7​​ solar radiation flux is a well-known parameter that is closely linked to ​​solar activity​​, serving as a key index for measuring the level of solar activity. In this study, the ​​…

    35 C 语言字符串转数值函数详解:strtof、strtod、strtold(含 errno 处理、ERANGE 错误)

    1 strtof() 函数 1.1 函数原型 #include <stdlib.h> // 必须包含这个头文件才能使用 strtof() #include <errno.h> // 包含 errno 和 ERANGE #include <float.h> // 包含 FlOAT_MAX 和 FLOAT_MIN #include <math.h> // 包含 HUGE_VALF(inf)float…

    日志收集工具-Filebeat

    提示&#xff1a;windows 环境下 Filebeat 的安装与使用 文章目录 前言一、安装二、配置部署三、启动测试 前言 Filebeat 一般用于日志采集&#xff0c;由两部分组成 &#xff1a;Harvesters 和 prospector Harvesters采集器&#xff1a;逐行读取单个文件的内容&#xff0c;并…

    Vue3学习(4)- computed的使用

    1. 简述与使用 作用&#xff1a;computed 用于基于响应式数据派生出新值&#xff0c;其值会自动缓存并在依赖变化时更新。 ​缓存机制​&#xff1a;依赖未变化时直接返回缓存值&#xff0c;避免重复计算&#xff08;通过 _dirty 标志位实现&#xff09;。​响应式更新​&…

    手机上网可以固定ip地址吗?详细解析

    在移动互联网时代&#xff0c;手机已成为人们日常上网的主要设备之一。无论是工作、学习还是娱乐&#xff0c;稳定的网络连接都至关重要。许多用户对IP地址的概念有所了解&#xff0c;尤其是固定IP地址的需求。那么&#xff0c;手机上网能否固定IP地址&#xff1f;又该如何实现…

    如何在Unity中实现点击一个按钮跳转到哔哩哔哩

    1.创建一个按钮 2.编写一个脚本&#xff08;你可以把链接改成你想要跳转的网站&#xff09; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI;public class JumpToBilibili : MonoBehaviour {void Start(){gameObject.…

    PySide6 GUI 学习笔记——常用类及控件使用方法(单行文本控件QLineEdit)

    文章目录 QLineEdit 介绍常用方法QLineEdit.EchoMode 取值光标相关方法文本选择方法输入格式化字符&#xff08;Input Mask&#xff09;常用信号QLineEdit 实例 QLineEdit 介绍 QLineEdit 是 PySide6&#xff08;Qt for Python&#xff09;中用于单行文本输入的控件。它支持文本…

    【数据结构】6. 时间与空间复杂度

    文章目录 一、算法效率1、算法的复杂度 二、时间复杂度1、时间复杂度的概念2、大O的渐进表示法3、常见时间复杂度计算1&#xff09;实例12&#xff09;实例23&#xff09;实例34&#xff09;实例45&#xff09;实例56&#xff09;实例67&#xff09;实例78&#xff09;实例8 三…