k230学习笔记-疑难点(1)
1.出现boot failed with exit code 19:
需要将k230开发板的btoot0拨到ON
2.出现boot failed with exit code 13:
说明k230开发板的固件烧录已经丢失,需要重新烧录
*** 注意重新烧录时需要将btoot0重新拨到OFF,才会弹出加载固件需要的通用串行总线,Ganaan Creative K230 USB Boot Device ***
3.
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps$ scons --directory=04_rtt_shm_at
scons: Entering directory `/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/04_rtt_shm_at'
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build/rtt_shm_at
CC build/rtt_shm_at/main.o
sh: 1: riscv64-unknown-linux-musl-gcc: not found
scons: *** [build/rtt_shm_at/main.o] Error 127
scons: building terminated because of errors.
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps$ scons --directory=04_rtt_shm_get
scons: Entering directory `/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/04_rtt_shm_get'
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build/rtt_shm_get
CC build/rtt_shm_get/main.o
sh: 1: riscv64-unknown-linux-musl-gcc: not found
scons: *** [build/rtt_shm_get/main.o] Error 127
scons: building terminated because of errors.
总的来说,需要重新编译一下:
打开终端,切换到cd k230_sdk
make prepare_toolchain
为什么呢,在/home/ubuntu/k230_sdk/Makefile文件下第109-120,162行出现。
随后在vscode的终端中
存在/home/ubuntu/k230_sdk/src/big/rt-smart/smart-env.sh文件第42行存在我们需要的东西
{
"riscv64")
export RTT_CC=gcc
export RTT_EXEC_PATH=$(pwd)/../../../toolchain/
riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin
export RTT_CC_PREFIX=riscv64-unknown-linux-musl-
export RTT_SDK_BUILD_DIR=build
export MPP_SRC_DIR=$(pwd)/../mpp
export CDK_SRC_DIR=$(pwd)/../../common/cdk
cp userapps/configs/def_config_riscv64 userapps/.config
;;
}
使用命令
Source smart-env.sh riscv64
***注意,一定要在/home/ubuntu/k230_sdk/src/big/rt-smart这个文件下的终端,不然不管。
即可
source smart-env.sh riscv64 是一个命令,用于在当前的 shell 会话中加载一个名为 smart-env.sh 的脚本,并传递参数 riscv64 给它。这个命令通常用于配置环境变量或设置工具链,以便在开发过程中使用特定的工具链(如 RISC-V 工具链)
静态链接与动态链接:elf文件与out文件
通过gcc hello.c产生的a.out文件
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ file a.out
a.out: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=f0f27aaa6abdda45fd053b2fcbab5873609801dd, for GNU/Linux 3.2.0, not stripped
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ ls -a ./
. .. a.out build cconfig.h hello.c hello.elf SConscript .sconsign.dblite SConstruct
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ ld -al ./
ld: unrecognized option '-al'
ld: use the --help option for usage information
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ ls -al ./
total 340
drwxrwxr-x 3 ubuntu ubuntu 4096 Apr 16 05:21 .
drwxrwxr-x 22 ubuntu ubuntu 4096 Apr 15 03:29 ..
-rwxrwxr-x 1 ubuntu ubuntu 16672 Apr 16 05:21 a.out
drwxrwxr-x 3 ubuntu ubuntu 4096 Apr 15 04:12 build
-rw-rw-r-- 1 ubuntu ubuntu 352 Apr 16 02:34 cconfig.h
-rw-rw-r-- 1 ubuntu ubuntu 111 Apr 15 04:11 hello.c
-rwxrwxr-x 1 ubuntu ubuntu 294312 Apr 15 04:12 hello.elf
-rw-rw-r-- 1 ubuntu ubuntu 266 Apr 14 22:48 SConscript
-rw-rw-r-- 1 ubuntu ubuntu 3921 Apr 16 02:34 .sconsign.dblite
-rw-rw-r-- 1 ubuntu ubuntu 181 Apr 14 22:48 SConstruct
静态:
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ file hello.elf
hello.elf: ELF 64-bit LSB executable, UCB RISC-V, version 1 (SYSV), statically linked, with debug_info, not stripped
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$
readelf -a hello.elf
产生很多信息,以至于我的终端被爆掉了,逐渐静态编译包含很多无用信息。。。
0
.................1703: 000000020000b308 48 FUNC GLOBAL DEFAULT 1 close
1704: 0000000200012010 0 NOTYPE GLOBAL DEFAULT 8 __got_start__
1705: 0000000200009822 268 FUNC GLOBAL DEFAULT 1 vfprintf
1706: 000000020000c040 156 FUNC GLOBAL HIDDEN 1 __stpncpy
1707: 0000000200012ea8 8 OBJECT GLOBAL DEFAULT 16 __progname_full
1708: 0000000200007608 48 FUNC GLOBAL DEFAULT 1 free
No version information found in this file.
Attribute Section: riscv
File Attributes
Tag_RISCV_stack_align: 16-bytes
Tag_RISCV_arch: "rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0_v1p0_zicsr2p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0"
Tag_RISCV_priv_spec: 1
Tag_RISCV_priv_spec_minor: 11
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$
4.
msh />mount
filesystem device mountpoint
---------- ------ ----------
devfs (NULL) /dev
procfs (NULL) /proc
rom (NULL) /
tmp (NULL) /dev/shm
share (NULL) /sharefs
什么意思呢?
1. 什么是 mount 命令?
mount 是一个命令,用来查看或管理文件系统的挂载情况。简单来说,它会告诉你系统中有哪些文件系统被挂载到了哪些位置。文件系统就像是一个“存储规则”,它决定了数据如何被组织和访问。
2. 输出的每一列是什么意思?
mount 命令的输出有三列:
filesystem(文件系统):这是文件系统的类型,比如 devfs、procfs 等。
device(设备):这是文件系统所在的设备或资源。如果显示 (NULL),说明这个文件系统没有具体的硬件设备,而是虚拟的。
mountpoint(挂载点):这是文件系统被挂载到的具体位置,比如 /dev、/proc 等。
3. 逐条解释输出内容
根据你的输出:
复制
filesystem device mountpoint
---------- ------ ----------
devfs (NULL) /dev
procfs (NULL) /proc
rom (NULL) /
tmp (NULL) /dev/shm
share (NULL) /sharefs
第一条:devfs
filesystem:devfs 是设备文件系统。
device:(NULL),说明这是一个虚拟的文件系统,没有具体的硬件设备。
mountpoint:/dev,这是设备文件的挂载点。所有设备(比如键盘、鼠标、串口等)都会在这个目录下以文件的形式出现,方便程序访问。
简单理解:/dev 是一个特殊的目录,里面存放了所有设备的文件。
第二条:procfs
filesystem:procfs 是进程文件系统。
device:(NULL),同样是一个虚拟文件系统。
mountpoint:/proc,这是进程信息的挂载点。系统会把运行中的进程信息(比如进程 ID、内存占用等)以文件的形式放在这个目录下。
简单理解:/proc 是一个特殊的目录,里面存放了系统和进程的运行信息。
第三条:rom
filesystem:rom 是只读存储文件系统。
device:(NULL),说明这是一个虚拟文件系统。
mountpoint:/,这是根目录,也就是整个文件系统的起点。
简单理解:/ 是系统的根目录,所有文件和目录的组织都从这里开始。
第四条:tmp
filesystem:tmp 是临时文件系统。
device:(NULL),虚拟文件系统。
mountpoint:/dev/shm,这是共享内存的挂载点。程序可以在这个目录下创建临时文件,这些文件会存储在内存中,断电后会消失。
简单理解:/dev/shm 是一个临时存储区域,用来存放程序的临时数据。
第五条:share
filesystem:share 是共享文件系统。
device:(NULL),虚拟文件系统。
mountpoint:/sharefs,这是一个共享目录,可能用于设备之间的数据共享。
简单理解:/sharefs 是一个共享目录,不同程序或设备可以通过它交换数据。
4. 总结
这个 mount 命令的输出,实际上是在告诉你 RT-Thread 系统中有哪些文件系统被挂载到了哪些位置。这些文件系统有些是虚拟的(比如 devfs、procfs),有些是实际的存储(比如 rom 和 share)。它们共同组成了系统的文件结构,方便程序访问设备、进程信息、临时数据等。
- 考虑链接点:
考察一下他们的不同:
buntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ gcc hello.c -0 hello__gcc: error: hello__: No such file or directory
gcc: error: unrecognized command line option ‘-0’
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ gcc hello.c -o hello__
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ ./hello
bash: ./hello: No such file or directory
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ ./hello__
Hello World!
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ riscv64-unknown-linux-musl-gcc hello.c -o hello.elf -static
/* hello.elf文件是通过scons编译的,嗯up主的补救之路,通过修改SConstruct文件 */
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ file hello_back.elf
hello_back.elf: ELF 64-bit LSB executable, UCB RISC-V, version 1 (SYSV), statically linked, with debug_info, not stripped
/* 通过 riscv64-unknown-linux-musl-gcc hello.c -o hello.elf -static 编译*/
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ file hello.elf
hello.elf: ELF 64-bit LSB executable, UCB RISC-V, version 1 (SYSV), statically linked, not stripped
很明显少了with debug_info文件,scons编译与riscv64-unknown-linux-musl-gcc hello.c -o hello.elf -static 编译。
但通过这样,就又有了
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ riscv64-unknown-linux-musl-gcc hello.c -o hello.elf -static -g
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ file hello.elf
hello.elf: ELF 64-bit LSB executable, UCB RISC-V, version 1 (SYSV), statically linked, with debug_info, not stripped
哈哈哈,多么有趣。
但是就算文件都一样了,依旧无法再小核里使用哦,其中脚本语言涉及很多东西很复杂,我也不懂。
会报这个错误:
msh />/sharefs/hello.elf
[E/LWP] lwp load faild, -1
[E/LWP] lwp load ret = -1
/sharefs/hello.elf: command not found.
**** 注意这个hello.elf文件是通过riscv64-unknown-linux-musl-gcc hello.c -o hello.elf -static -g
编译的 ****
其中的差异到底是什么呢?
显然重点是这个:
通过scons编译:
编译命令:
riscv64-unknown-linux-musl-gcc -o build/hello_back/hello.o -c -mcmodel=medany -march=rv64imafdcv -mabi=lp64d -Werror -Wall -O0 -g -gdwarf-2 -n --static -DHAVE_CCONFIG_H -I/home/ubuntu/k230_sdk/src/big/rt-smart/userapps -I. -I/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/sdk/rt-thread/include -I/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/sdk/rt-thread/components/dfs -I/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/sdk/rt-thread/components/drivers -I/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/sdk/rt-thread/components/finsh -I/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/sdk/rt-thread/components/net hello.c
链接命令:
riscv64-unknown-linux-musl-gcc -o hello_back.elf -mcmodel=medany -march=rv64imafdcv -mabi=lp64d -T ../linker_scripts/riscv64/link.lds -Lsdk/rt-thread/lib -Wl,--whole-archive -lrtthread -Wl,--no-whole-archive -n --static build/hello_back/hello.o -L/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/sdk/lib/risc-v/rv64 -L/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/sdk/rt-thread/lib/risc-v/rv64 -Wl,--start-group -lrtthread -Wl,--end-group
编译命令:
工具:riscv64-unknown-linux-musl-gcc(RISC-V 架构的 GCC 编译器)。
目标文件:build/hello_back/hello.o。
选项:
-c:编译源文件,不进行链接。
-mcmodel=medany:指定内存模型。
-march=rv64imafdcv:指定目标架构(RISC-V 64 位)。
-mabi=lp64d:指定 ABI(应用程序二进制接口)。
-Werror:将警告视为错误。
-Wall:启用所有警告。
-O0:禁用优化。
-g:生成调试信息。
-gdwarf-2:使用 DWARF 2 格式的调试信息。
-n:生成紧凑的代码。
--static:静态链接。
-DHAVE_CCONFIG_H:定义宏 HAVE_CCONFIG_H。
包含路径:
-I:指定头文件的搜索路径。
链接命令:
工具:riscv64-unknown-linux-musl-gcc。
目标文件:hello_back.elf。
选项:
-T ../linker_scripts/riscv64/link.lds:指定链接脚本。
-Lsdk/rt-thread/lib:指定库文件的搜索路径。
-Wl,--whole-archive:链接整个库。
-lrtthread:链接 RT-Thread 库。
-Wl,--no-whole-archive:停止链接整个库。
-n:生成紧凑的代码。
--static:静态链接。
库路径:
-L/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/sdk/lib/risc-v/rv64:库文件路径。
-L/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/sdk/rt-thread/lib/risc-v/rv64:RT-Thread 库路径。
库组:
-Wl,--start-group 和 -Wl,--end-group:指定库的分组链接。
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps$ scons --directory=hello --verbose
scons: Entering directory `/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/hello'
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build/hello_back
riscv64-unknown-linux-musl-gcc -o build/hello_back/hello.o -c -mcmodel=medany -march=rv64imafdcv -mabi=lp64d -Werror -Wall -O0 -g -gdwarf-2 -n --static -DHAVE_CCONFIG_H -I/home/ubuntu/k230_sdk/src/big/rt-smart/userapps -I. -I/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/sdk/rt-thread/include -I/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/sdk/rt-thread/components/dfs -I/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/sdk/rt-thread/components/drivers -I/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/sdk/rt-thread/components/finsh -I/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/sdk/rt-thread/components/net hello.c
riscv64-unknown-linux-musl-gcc -o hello_back.elf -mcmodel=medany -march=rv64imafdcv -mabi=lp64d -T ../linker_scripts/riscv64/link.lds -Lsdk/rt-thread/lib -Wl,--whole-archive -lrtthread -Wl,--no-whole-archive -n --static build/hello_back/hello.o -L/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/sdk/lib/risc-v/rv64 -L/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/sdk/rt-thread/lib/risc-v/rv64 -Wl,--start-group -lrtthread -Wl,--end-group
/home/ubuntu/k230_sdk/toolchain/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin/../lib/gcc/riscv64-unknown-linux-musl/12.0.1/../../../../riscv64-unknown-linux-musl/bin/ld: warning: hello_back.elf has a LOAD segment with RWX permissions
scons: done building targets.
我们在改善一下,使用这个命令怎么样?riscv64-unknown-linux-musl-gcc hello.c -o hello.elf -static -g -mcmodel=medany -march=rv64imafdcv -mabi=lp64d
依旧无用:小核报错
msh />/sharefs/hello.elf[E/LWP] lwp load faild, -1
[E/LWP] lwp load ret = -1
/sharefs/hello.elf: command not found.
继续探讨:
/* riscv64-unknown-linux-musl-gcc hello.c -o hello.elf -static -g -mcmodel=medany -march=rv64imafdcv -mabi=lp64d编译 */
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ readelf -h hello.elf
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: RISC-V
Version: 0x1
Entry point address: 0x0
Start of program headers: 64 (bytes into file)
Start of section headers: 70712 (bytes into file)
Flags: 0x5, RVC, double-float ABI
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 5
Size of section headers: 64 (bytes)
Number of section headers: 23
Section header string table index: 22
/* 这个是scons编译的 */
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ readelf -h hello_back.elf
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: RISC-V
Version: 0x1
Entry point address: 0x200000000
Start of program headers: 64 (bytes into file)
Start of section headers: 290664 (bytes into file)
Flags: 0x5, RVC, double-float ABI
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 3
Size of section headers: 64 (bytes)
Number of section headers: 57
Section header string table index: 56
readelf: Error: Section 8 has invalid sh_entsize of 0000000000000008
readelf: Error: (Using the expected size of 24 for the rest of this dump)
- 报错提醒
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps$ scons --directory=hello --verbose
scons: Entering directory `/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/hello'
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build/hello_back
scons: `.' is up to date.
scons: done building targets.
从你的输出信息来看,SCons 构建工具成功运行了,并且没有生成新的目标文件,因为目标文件已经是“最新状态”(up to date)
解决方法
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps$ scons --directory=hello -c
scons: Entering directory `/home/ubuntu/k230_sdk/src/big/rt-smart/userapps/hello'
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Cleaning targets ...
Removed build/hello_back/hello.o
Removed hello_back.elf
scons: done cleaning targets.
RT-Thread ELF 文件对比分析
1. 入口地址
- hello.elf:
- 入口地址:0x0
- 解释:入口地址为 0x0,通常表示程序的入口点未正确设置,或是一个默认值。
- hello_back.elf:
- 入口地址:0x200000000
- 解释:入口地址为 0x200000000,表明程序的入口点被正确设置为一个合理的内存地址。
2. 程序头部数量
- hello.elf:
- 程序头部数量:5
- 解释:包含 5 个程序头部,通常表示有更多的加载段(如代码段、数据段等)。
- hello_back.elf:
- 程序头部数量:3
- 解释:包含 3 个程序头部,表明加载段较少,可能是由于链接脚本或构建工具的优化。
3. 节头部数量
- hello.elf:
- 节头部数量:23
- 解释:包含 23 个节头部,表示节(如 .text、.data、.bss 等)较少。
- hello_back.elf:
- 节头部数量:57
- 解释:包含 57 个节头部,表明节较多,可能是由于链接脚本或构建工具生成了更多的调试信息或元数据。
4. 节头部字符串表索引
- hello.elf:
- 节头部字符串表索引:22
- 解释:节名称字符串表的位置为索引 22。
- hello_back.elf:
- 节头部字符串表索引:56
- 解释:节名称字符串表的位置为索引 56。
5. readelf 错误
- hello_back.elf:
- 错误信息:
readelf: Error: Section 8 has invalid sh_entsize of 0000000000000008
readelf: Error: (Using the expected size of 24 for the rest of this dump)
- 解释:某个节头部的 sh_entsize 字段值无效(0x8),readelf 工具无法正确解析该节的大小。这可能是由于链接脚本或构建工具的问题,导致生成的 ELF 文件不符合规范。
总结
- hello.elf 是通过手动编译生成的,入口地址为 0x0,程序头部和节头部数量较少。
- hello_back.elf 是通过 SCons 构建工具生成的,入口地址为 0x200000000,程序头部和节头部数量较多,但存在 readelf 解析错误。
建议
1. 检查链接脚本:
- 确保链接脚本(如 link.lds)正确设置了入口地址和段布局。
- 修复 sh_entsize 错误,确保生成的 ELF 文件符合规范。
2. 使用构建工具:
- 使用 SCons 或其他构建工具可以简化构建过程,并减少手动编译时的错误。
通过补充编译链接-T /home/ubuntu/k230_sdk/src/big/rt-smart/userapps/linker_scripts/riscv64/link.lds
可以产生合适的Entry point address
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ riscv64-unknown-linux-musl-gcc hello.c -o hello.elf -static -g -mcmodel=medany -march=rv64imafdcv -mabi=lp64d -T /home/ubuntu/k230_sdk/src/big/rt-smart/userapps/linker_scripts/riscv64/link.lds
ubuntu@ubuntu2004:~/k230_sdk/src/big/rt-smart/userapps/hello$ readelf -h hello.elf
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: RISC-V
Version: 0x1
Entry point address: 0x200000000
Start of program headers: 64 (bytes into file)
Start of section headers: 75296 (bytes into file)
Flags: 0x5, RVC, double-float ABI
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 4
Size of section headers: 64 (bytes)
Number of section headers: 31
Section header string table index: 30
终于,完美解决了,哈哈,实在有趣。
msh />./sharefs/hello.elf
Hello World!
可认为是一个有意义的探索。
7.
如果端口缺失,OpenMV Cam USB COM Port (COM11),这需要在这个网站下载。
https://openmv.io/pages/download,就解决了
相关文章:
k230学习笔记-疑难点(1)
1.出现boot failed with exit code 19: 需要将k230开发板的btoot0拨到ON 2.出现boot failed with exit code 13: 说明k230开发板的固件烧录已经丢失,需要重新烧录 *** 注意重新烧录时需要将btoot0重新拨到OFF,才会弹出加载固件需要的通用串行总线&…...
JavaScript性能优化实战:让你的Web应用飞起来
JavaScript性能优化实战:让你的Web应用飞起来 在前端开发中,JavaScript性能优化是提升用户体验的关键。一个性能良好的应用不仅能吸引用户,还能提高转化率和用户留存率。今天,我们就来深入探讨JavaScript性能优化的实战技巧&…...
金融数据库转型实战读后感
荣幸收到老友太保科技有限公司数智研究院首席专家林春的签名赠书。 这是国内第一本关于OceanBase数据库实际替换过程总结的的实战书。打个比方可以说是从战场上下来分享战斗经验。读后感受颇深。我在这里讲讲我的感受。 第三章中提到的应用改造如何降本。应用改造是国产化替换…...
血脂代谢通路(医学-计算机系统对照方式)
血脂代谢通路(医学-计算机系统对照方式) 整合所有类比,用医学-计算机系统对照的方式完整描述血脂代谢通路,采用分步骤的对照结构: 1. 食物摄入(数据输入层) # 医学术语: 膳食脂肪摄入 → 计算机类比: 原始数据输入 …...
git更新的bug
文章目录 1. 问题2. 分析 1. 问题 拉取了一个项目后遇到了这个问题, nvocation failed Server returned invalid Response. java.lang.RuntimeException: Invocation failed Server returned invalid Response. at git4idea.GitAppUtil.sendXmlRequest(GitAppUtil…...
直流电源基本原理
整流电路 在构建整流电路时,要选择合适参数的二极管 If是二极管能够通过电流的能力,也是最大整流的平均电流。 还要考虑二极管的反向截至电压。 脉动系数电压交流幅值/直流平均电压(越小越好) 三相整流电路优点: …...
Git -> git merge --no-ff 和 git merge的区别
git merge --no-ff <branch> 与 git merge <branch> 的区别 核心区别 git merge <branch>: 默认使用Fast-forward模式(若可行)不创建额外的合并提交记录合并后看不出曾经存在过分支 git merge --no-ff <branch>:强制创建一个…...
名胜古迹传承与保护系统(springboot+ssm+vue+mysql)含运行文档
名胜古迹传承与保护系统(springbootssmvuemysql)含运行文档 名胜古迹传承与保护系统是一个专注于文化遗产保护和管理的综合性平台。系统提供了一系列功能模块,包括名胜古迹管理、古迹预约管理、古迹故事管理、举报信息管理、保护措施管理、古迹讨论、管理员管理、版…...
windows资源管理器左边导航窗格增加2个项,windows10/11有效
下面文档存为.reg文件, Windows Registry Editor Version 5.00; 根 CLSID —— 名称、图标、固定到导航窗格 [HKEY_CURRENT_USER\Software\Classes\CLSID\{C1A3F2D2-BD2D-4D60-82C5-394F01753A5F}] "手机系统" "System.IsPinnedToNamespaceTree&quo…...
【八股文】基于源码聊聊ConcurrentHashmap的设计
版本演进 jdk 1.7中是分段锁的设计,将哈希表划分为多个segment,每个段独立加锁,锁粒度为段级别。 操作需两次哈希,第一次定位段,第二次定位桶内链表。这种实现方式的缺点就是段数量固定,扩容复杂…...
Mysql--基础知识点--93--两阶段提交
1 两阶段提交 以update语句的具体执行过程为例: 具体更新一条记录 UPDATE t_user SET name ‘xiaolin’ WHERE id 1;的流程如下: 1.执行器负责具体执行,会调用存储引擎的接口,通过主键索引树搜索获取 id 1 这一行记录&#…...
数字化招标采购系统怎么让招采协同更高效?
招标采购领域的数智化转型正在引发行业革命性变革。从传统线下模式到全流程电子化,再到当前数智化阶段的超时空协同,行业的演进路径清晰展现了技术与管理的深度融合。郑州信源信息数智化招采系统作为行业标杆,其创新实践为未来协同工作方式的…...
池塘计数(BFS)
题目描述 由于最近的降雨,光头强的田地里的各个地方都积水了,用 NM(1≤N≤100;1≤M≤100)NM(1≤N≤100;1≤M≤100) 的正方形的矩形表示。每个广场都有水 W 或旱地 .。光头强想知道他的田地里形成了多少池塘。池塘是指一组相邻的有…...
《Science》观点解读:AI无法创造真正的智能体(AI Agent)
无论是想要学习人工智能当做主业营收,还是像我一样作为开发工程师但依然要运用这个颠覆开发的时代宠儿,都有必要了解、学习一下人工智能。 近期发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,入行门槛低&#x…...
从零开始学A2A四:A2A 协议的安全性与多模态支持
文章目录 A2A 协议的安全性与多模态支持一、A2A 协议安全机制1. 认证机制2. 授权机制3. 数据加密 二、多模态交互支持1. 文本交互2. 音频支持3. 视频与图像处理4. 复合数据格式 三、安全与多模态最佳实践1. 安全性实践2. 多模态实践 四、与 MCP 的对比1. 安全机制对比2. 多模态…...
一种大位宽加减法器的时序优化
平台:vivado2018.3 芯片:xc7a100tfgg484-2 (active) 在FPGA中实现超高位宽加减法器(如256)时,时序收敛常成为瓶颈。由于进位链(Carry Chain)跨越多级逻辑单元,关键路径延迟会随位宽…...
【专业解读:Semantic Kernel(SK)】大语言模型与传统编程的桥梁
目录 Start:什么是Semantic Kernel? 一、Semantic Kernel的本质:AI时代的操作系统内核 1.1 重新定义LLM的应用边界 1.2 技术定位对比 二、SK框架的六大核心组件与技术实现 2.1 内核(Kernel):智能任务调度中心 2…...
InfiniBand与RoCEv2负载均衡机制的技术梳理与优化实践
AI技术的高速迭代正驱动全球算力格局进入全新纪元。据IDC预测,未来五年中国智能算力规模将以超50%的年复合增长率爆发式扩张,数据中心全面迈入“智能算力时代”。然而,海量AI训练、实时推理等高并发场景对底层网络提出了更严苛的挑战——超大…...
Vue与React组件化设计对比
组件化是现代前端开发的核心思想之一,而Vue和React作为两大主流框架,在组件化设计上既有相似之处,也存在显著差异。本文将从语法设计、数据管理、组件通信、性能优化、生态系统等多个方向,结合实例详细对比两者的特点。 一、模板…...
UE中通过AAIController::MoveTo函数巡逻至目标点后没法正常更新巡逻目标点
敌人巡逻的逻辑如下: 敌人在游戏一开始的时候就通过moveto函数先前往首先设定的patroltarget目标,在距离patroltarget距离为patroradius(200unit)之内时就可以通过checkpatroltarget函数更新新的patroltarget目标,随后前往新的pat…...
Python-细节知识点range函数的详解
在 Python 中,range 是一个内置函数,用于生成一个不可变的整数序列,通常用于控制循环次数或生成数值范围。以下是详细说明: 基本语法 range(stop) # 生成 [0, stop) 的整数,步长为1 range(start, stop) …...
git rebase的使用
我的使用 git checkout feature # 本地分支 git pull origin main --rebase # 目标分支 git pull origin feature --rebase git push origin featuregit rebase 是 Git 中用于重写提交历史的强大工具,可将分支的提交移动到新的基点上,使历史更线性。以…...
CMake Error at build/_deps/glog-src/CMakeLists.txt:1 (cmake_minimum_required):
这个错误提示意思是你当前系统上安装的 CMake 版本过低,不满足项目的要求。根据错误信息: CMake Error at build/_deps/glog-src/CMakeLists.txt:1 (cmake_minimum_required): CMake 3.22 or higher is required. You are running version 3.16.3 项目…...
MATLAB 控制系统设计与仿真 - 34
多变量系统知识回顾 - MIMO system 这一章对深入理解多变量系统以及鲁棒分析至关重要 首先,对于如下系统: 当G(s)为单输入,单输出系统时: 如果: 则: 所以 当G(s)为MIMO时,例如2X2时ÿ…...
【Unity】JSON数据的存取
这段代码的结构是为了实现 数据的封装和管理,特别是在 Unity 中保存和加载玩家数据时。以下是对代码设计的逐步解释: 1. PlayerCoin 类 PlayerCoin 是一个简单的数据类,用于表示单个玩家的硬币信息。它包含以下字段: count&…...
利用 Java 爬虫按关键字搜索淘宝商品
在电商领域,通过关键字搜索商品是常见的需求。淘宝作为国内知名的电商平台,提供了丰富的商品搜索功能。本文将详细介绍如何使用 Java 爬虫技术按关键字搜索淘宝商品,并获取搜索结果的详细信息。 一、准备工作 1. 注册淘宝开放平台账号 要使…...
【C】初阶数据结构11 -- 选择排序
本篇文章主要讲解经典排序算法 -- 选择排序 目录 1 算法思想 2 代码 3 时间复杂度与空间复杂度分析 1) 时间复杂度 2) 空间复杂度 1 算法思想 选择排序是一种在一段区间里面选择最小的元素和最大的元素的一种排序算法。假设这里排升序&#…...
【Semantic Kernel核心组件】Plugin:连接AI与业务逻辑的桥梁
目录 一、Plugin是什么?为什么它是SK的核心? 一、Plugin的核心机制与Python实现 1. 插件类型:语义函数与本地函数 语义函数(Semantic Function) 本地函数(Native Function) 2. Plugin的注…...
《基于神经网络实现手写数字分类》
《基于神经网络实现手写数字分类》 一、主要内容: 1、通过B站陈云霁老师的网课,配合书本资料,了解神经网络的基本组成和数学原理。 2、申请云平台搭建实验环境 3、基于5个不同的实验模块逐步理解实验操作步骤,并实现不同模块代码…...
车载诊断架构 --- 车载诊断概念的深度解读
我是穿拖鞋的汉子,魔都中坚持长期主义的汽车电子工程师。 老规矩,分享一段喜欢的文字,避免自己成为高知识低文化的工程师: 周末洗了一个澡,换了一身衣服,出了门却不知道去哪儿,不知道去找谁,漫无目的走着,大概这就是成年人最深的孤独吧! 旧人不知我近况,新人不知我过…...
四、探索LangChain:连接语言模型与外部世界的桥梁
一、什么是 LangChain LangChain 是一个开源的软件框架,旨在帮助开发者高效构建和部署基于**大型语言模型(LLM)**的应用程序。它通过提供一系列工具、组件和接口,简化了从模型调用、提示工程到复杂应用开发的全流程,使得开发者能够快速将 LLM 集成到实际场景中。 1. 核心…...
LangChain4j中的Chat与语言模型API详解:构建高效对话系统的利器
LangChain4j中的Chat与语言模型API详解:构建高效对话系统的利器 引言:大模型时代的开发利器 在人工智能快速发展的今天,大型语言模型(LLM)已成为构建智能应用的核心组件。LangChain4j作为Java生态中领先的LLM集成框架…...
C++中const与constexpr的区别
在C中,const和constexpr都用于定义常量,但它们的用途和行为有显著区别: ### 1. **初始化时机** - **const**:表示变量是只读的,但其值可以在**编译时或运行时**初始化。 cpp const int a 5; // 编译…...
长亭2月公开赛Web-ssrfme
环境部署 拉取环境报错: 可以尝试拉取一下ubuntu:16.04,看是否能拉取成功 将wersion:"3"删掉 我拉去成功之后,再去拉取环境,成功! 访问环境 测试ssrf 源码 <?php highlight_file(__file__…...
AI日报 - 2025年4月18日
🌟 今日概览(60秒速览) ▎🤖 AGI探讨 | 专家激辩AGI定义与实现时间点,Causal AI被视为关键一步,o3模型预测2027年实现引关注。 Causal AI强调因果关系而非模式;专家清单推荐不同模型适用场景;AGI定义及何时…...
Spring IoC 详解
在 Spring IoC& DI 详解 中对 IoC已经有了介绍,下面对 IoC 进行详细介绍。 IoC,即控制反转,在之前我们编写程序的时候,我们都是自己 new 出来一个对象,然后自己去管理这个对象,但是这有时候有些麻烦&a…...
oracle查询当前用户所有字段和表
在 Oracle 数据库中,可以通过查询数据字典视图来获取某个表的字段(列)信息。以下是常用的查询方法: 查询当前用户下的表字段 如果您想查看当前用户下某个表的字段信息,可以查询 USER_TAB_COLUMNS 视图: SE…...
ACL(访问控制列表)
ACL(访问控制列表) 1、基础内容 访问控制列表ACL(Access ControlList)是由一条或多条规则组成的集合。所谓规则,是指描述报文匹配条件的判断语句,这些条件可以是报文的源地址、目的地址、端口号等。通过一系列规则来匹配报文,如…...
C语言数据结构---二叉树---堆的应用
1.建堆(向上调整) 1.1大堆 #include<stdio.h> void swap(int *p1,int *p2) {int temp *p1;*p1 *p2;*p2 temp; } void Ajustup(int *a,int child)//向上调整 {int parent (child - 1) / 2;while (child > 0){if (a[child] > a[parent]…...
在Linux下安装Gitlab
在Cenos7下安装GitLab 在ssh下安装 官方安装文档:https://gitlab.cn/install/?versionce 1. 使用阿里YUM 镜像云 下载 https://mirrors.aliyun.com/repo/Centos-7.repo替换 /etc/yum.repos.d/CentOS-Base.repo在目录/etc/yum.repos.d/下执行如下命令: curl …...
【算法】快速排序、归并排序(非递归版)
目录 一、快速排序(非递归) 1.原理 2.实现 2.1 stack 2.2 partition(array,left,right) 2.3 pivot - 1 > left 二、归并排序(非递归) 1.原理 2.实现 2.1 gap 2.1.1 i 2*gap 2.1.2 gap * 2 2.1.3 gap < array.…...
如何自学机器学习?零基础到实战的完整路径
机器学习作为人工智能的核心领域,已成为技术人必备的硬实力。本文为自学者梳理出一条从零基础到项目落地的系统学习路线,涵盖知识框架、工具链与实战技巧。 一、构建三大基础模块(1-2个月) 数学基石:线性代数重点掌握…...
PHP开发环境搭建(Hbuider+phpstudy)
目录 1.Hbuider下载 Hbuider的网址 2.Hbuilder的安装 1-首先找到刚刚下载的安装包 2-然后进行解压 3-进入解压后的文件夹HBuilderX,找到HBuilderX这一项,双击打开 4-选择你喜欢的风格,任意选择一个就可以了 5-选择你选快捷键的方案 6-点击开始体验就可了…...
【4.1.-4.20学习周报】
提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录 摘要Abstract一、方法介绍1.1HippoRAG 1.2HippoRAG2二、实验2.1实验概况2.2实验代码2.3实验结果 总结 摘要 本博客介绍了论文《From RAG to Memory: Non-Parametri…...
vim笔记
vim三种模式切换 命令常用 复制粘贴...
【JAVA】基础知识“抽象类”详解,从入门到理解~
目录 1. 抽象类 1.1 什么是抽象类❓ 1.2 为什么需要抽象类❓ 1.3 抽象类语法 1.4 抽象类特征 ① 抽象类是被abstract修饰的 ② 被abstract修饰的方法称为抽象方法,这个方法可以没有具体的实现 ③ 当一个类中含有抽象方法的时候,该类必须使用abst…...
docker 启动mysql9认证失败
docker compose 启动mysql9认证失败 随着mysql更新到了9版本,在docker中相较于8减少了一些体积,很吸引人尝试, 但是在使用原本的配置文件拉起mysql,连接时却提示权限认证失败 1045 - Access denied for user root172.18.0.1 (…...
【Axure绘制原型】图片切割、交互动效、热区、动态面板、元件显示隐藏、表单元件、表格、内联框架
切割 功能:将图片切成多部分。 通过移动鼠标可以调整两条虚线的位置,点击。虚线相当于切割刀,被虚线分离的部分将变成单独的图 切割后的图片: 交互 交互动效的构成: 目标:谁触发交互(元…...
DeepSeek智能时空数据分析(一):筛选特定空间范围内的POI数据
时空数据分析很有用,但是GIS/时空数据库技术门槛太高 时空数据分析在优化业务运营中至关重要,尤其在数据驱动决策的当下,其价值正随大模型时代的到来进一步凸显。然而,三大挑战仍制约其发展:技术门槛高,需…...
使用mybatisPlus自带的分页方法+xml实现数据分页
:因为需要实现多表关联分页,原本想的是直接使用selectpagehelper,但是pagehelper只对xml文件生效;后面发现可以直接使用mybatisplus自带的分页,不依靠pagehelper实现多表关联分页; 实现类:关键…...