摘要: Overview 帧长度 = (帧头 + 数据+帧尾) Xmodem 原始版 Xmodem CRC Xmodem 1K Ymodem Ymodem-g Zmodem kermit 帧头(1字节) NAK SOH STX SOH或者STX SOH或者STX ? ? 数据包 128字节 128字节 10 阅读全文
posted @ 2024-07-02 10:51 zephyr~ 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 下面以新增一个新的riscv machine为例子进行说明 新增 Machine 步骤 修改 Kconfig hw/riscv/Kconfig 修改 configs configs/devices/riscv32-softmmu/default.mak 新增 Machine 的编译文件 下面两个文件 阅读全文
posted @ 2024-06-03 15:00 zephyr~ 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 介绍 官网 https://sourceware.org/newlib/ github 代码 https://github.com/mirror/newlib-cygwin 官网简介 Newlib是一个用于嵌入式系统的C库。它是几个库部分的集合,所有这些部分都在免费软件许可证下,使它们可以在嵌入式产 阅读全文
posted @ 2024-05-30 15:31 zephyr~ 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Newlib的构成 Newlib由三部分构成:libgloss、libc、libm,三者在Newlib原代码中的存储位置如下。 newlib-x.y.z libgloss newlib libc libm libc是标准C库,libm是标准数学库,那libgloss是干啥的? C库的部分函数需要引用 阅读全文
posted @ 2024-05-28 16:37 zephyr~ 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 背景 芯片运行过程中需要时钟切换时,要考虑到是否会产生glitch,小小的glitch有可能导致电路运行的错误。所以时钟切换时需要特别的处理。 直接使用MUX进行时钟切换或者采用如下电路结构进行时钟切换: assign outclock = (clk1 & select) | (~select & 阅读全文
posted @ 2024-05-02 16:35 zephyr~ 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 背景 在嵌入式领域,SRAM空间比较小,所以经常要求开发人员进行代码优化,那怎么去优化,如何判断哪个模块比较占用内存,是代码段还是数据段? 使用readelf和objdump工具能解析elf文件的代码和数据段,从而去查看每个变量和每个函数的大小 使用readelf # objdump file.el 阅读全文
posted @ 2024-04-24 12:54 zephyr~ 阅读(41) 评论(0) 推荐(0) 编辑
摘要: bootstrap 维基百科解释 bootstrap (复数 bootstraps) A loop (leather or other material) sewn at the side or top rear of a boot to help in pulling the boot on. ( 阅读全文
posted @ 2024-03-27 12:50 zephyr~ 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 整数 /* atf/include/lib/utils_def.h */ /* * This variant of div_round_up can be used in macro definition but should not * be used in C code as the `div` 阅读全文
posted @ 2024-03-06 16:18 zephyr~ 阅读(34) 评论(0) 推荐(0) 编辑
摘要: Linux很多地方会使用 local_irq_disable/local_irq_save函数,那么不同CPU架构,有不同的实现方式,arm64又是怎么实现的呢? 下面是spin_lock_irqsave的代码调用层次关系: -> spin_lock_irqsave /* include/linux 阅读全文
posted @ 2024-03-05 19:12 zephyr~ 阅读(47) 评论(0) 推荐(0) 编辑
摘要: https://mp.weixin.qq.com/s/yTInDBFbI0oM5bowx990lw 在我们嵌入式开发中,打印日志是最常用的一种调试手段。合理地打印日志,可以帮助我们快速地分析问题。 本篇文章我们来汇总一些嵌入式打log的一些规则。 1.什么操作下加日志? (1)错误处理 对于不能恢复 阅读全文
posted @ 2024-02-07 14:05 zephyr~ 阅读(119) 评论(0) 推荐(0) 编辑