开箱
换另一根网线2typec导网线
引导测试
上接,连线,需要安装CP2104的驱动百度下载一个
直接从emmc里驱动读取重新线程的内核参数有0x8000到1000的位置,直接运行内核,直接运行内核,最终目标应该是直接到内核和文件系统了,然后再研究下
问题
用了Ubuntu,直接的shell默认了fish,会导致smart-env.sh失败,切换成bash后无问题,当前arm架构的执行配置我没有def_config_arm,不过找了下gitee发现确实没有,没影响,的.config是arm架构的,如果想要开发其他架构的芯片,默认需要自己手动配置下配置
root@VM-QT:/lrl/vscode/ART-Pi-smart# source smart-env.sh
cp: cannot stat 'userapps/configs/def_config_arm': No such file or directory
Arch => arm
CC => gcc
PREFIX => arm-linux-musleabi-
EXEC_PATH => /root/lrl/vscode/ART-Pi-smart/tools/gnu_gcc/arm-linux-musleabi_for_x86_64-pc-linux-gnu/bin
root@VM-QT:/lrl/vscode/ART-Pi-smart# echo PATH
PATH
root@VM-QT:~/lrl/vscode/ART-Pi-smart# echo $PATH
/opt/Qt5.8.0_localpc/Tools/QtCreator/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/root/lrl/vscode/ART-Pi-smart/tools/gnu_gcc/arm-linux-musleabi_for_x86_64-pc-linux-gnu/bin
编译缺少工具问题
下载使用python可以通过指定python3 XXX.py来指定使用python3下载工具链,下载完成后,仍然编译不过,原因是工具链没有
立即查看输出
U-Boot 2017.03-g002b758ac9-dirty (Nov 24 2021 - 20:08:02 +0800)
CPU: Freescale i.MX6ULL rev1.1 696 MHz (running at 396 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 43C
Reset cause: WDOG
Model: Freescale i.MX6 ULL 14x14 EVK Board
Board: MX6ULL 14x14 EVK
DRAM: 512 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment
Display: TFT7016 (1024x600)
Video: 1024x600x24
In: serial
Out: serial
Err: serial
switch to partitions #0, OK
mmc1(part 0) is current device
Net: eth1: ethernet@020b4000, eth0: ethernet@02188000 [PRIME]
Normal Boot
Hit any key to stop autoboot: 0
reading /kernel/rtthread.bin
1149312 bytes read in 83 ms (13.2 MiB/s)
Starting application at 0x80001000 ...
\ | /
- RT - Thread Smart Operating System
/ | \ 5.0.0 build Dec 15 2021
2006 - 2020 Copyright by rt-thread team
lwIP-2.1.2 initialized!
[15] E/drv.enet: emac device init success
[20] I/I2C: I2C bus [i2c3] registered
[24] I/I2C: I2C bus [i2c4] registered
[83] E/drv.enet:
PHY Link down, please check the cable connection and link partner setting.
[117] I/SDIO: emmc card capacity 3817472 KB.
found part[0], begin: 2098176, size: 500.0MB
found part[1], begin: 526386176, size: 1.0GB
found part[2], begin: 1600128000, size: 10.0MB
found part[3], begin: 1610613760, size: 200.0MB
[154] I/touch: rt_touch init success
[158] I/gt911: touch device gt911 init success
[163] I/sal.skt: Socket Abstraction Layer initialize success.
emmc file system initialization done!
Dir / sd0 mount failed!
[1649] E/[RW007]: The wifi Stage 1 status 0 0 0 1
[1656] I/WLAN.dev: wlan init success
[1661] I/WLAN.lwip: eth device init ok name:w0
[1666] I/WLAN.dev: wlan init success
[1671] I/WLAN.lwip: eth device init ok name:w1
rw007 sn: [rw00700000000fc584a2c4d03]
rw007 ver: [RW007_2.1.0-a7a0d089-57]
[5128] D/drv.enet: enet1 link up
[5667] W/WLAN.mgnt: F:rt_wlan_connect L:1091 not find ap! ssid:rt-thread
hello rt-smart!
/sd/wifi.sh wi-fi configuration file not exist in sd card!
[5685] I/mcf.link.tcp: TCPServer Waiting for client on port 5555...
[5692] I/mcf.link: MCF link port(3) register successfully.
msh />[5728] I/mcf.trans: MCF(V0.1.0) initialized successfully.
[5733] I/urpc: uRPC(V0.1.0) initialize successfully.
[5739] I/mcf.trans: MCF protocol started successfully.
msh />
msh />
msh />
第一次玩rtthread,真快,看看uboot启动内核的参数,
=>
=> printenv
baudrate=115200
board_name=EVK
board_rev=14X14
boot_fdt=try
bootcmd=fatload mmc 1:4 0x80001000 /kernel/rtthread.bin;dcache flush;go 0x80001000
bootcmd_linux=run findfdt;run findtee;mmc dev {mmcdev};mmc dev {mmcdev}; if mmc rescan; then if run loadbootscript; then run bootscript; else if run loadimage; then run mmcboot; else run netboot; fi; fi; else run netboot; fi;
bootcmd_mfg=run mfgtool_args; if test {tee} = yes; then bootm {tee_addr} {initrd_addr} {fdt_addr}; else bootz {loadaddr} {initrd_addr} ${fdt_addr}; fi;
bootdelay=3
bootdir=/boot
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc0
eth1addr=00:01:1f:2d:3e:5d
ethact=ethernet@02188000
ethaddr=00:01:1f:2d:3e:4d
ethprime=eth0
fdt_addr=0x83000000
fdt_file=100ask_imx6ull_mini.dtb
fdt_high=0xffffffff
fdtcontroladdr=9ef40478
findfdt=if test fdt_file = undefined; then if test board_name = EVK && test board_rev = 9X9; then setenv fdt_file imx6ull-9x9-evk.dtb; fi; if test board_name = EVK && test board_rev = 14X14; then setenv fdt_file imx6ull-14x14-evk.dtb; fi; if test fdt_file = undefined; then setenv fdt_file imx6ull-14x14dtb; fi; fi;
image=zImage
initrd_addr=0x83800000
initrd_high=0xffffffff
ip_dyn=yes
loadaddr=0x80800000
loadbootscript=fatload mmc {mmcdev}:{mmcpart} {loadaddr} {script};
loadfdt=ext2load mmc {mmcdev}:{mmcpart} {fdt_addr} {bootdir}/${fdt_file}
loadimage=ext2load mmc {mmcdev}:{mmcpart} {loadaddr} {bootdir}/${image}
loadtee=fatload mmc {mmcdev}:{mmcpart} {tee_addr} {tee_file}
mfgtool_args=setenv bootargs console={console},{baudrate} rdinit=/linuxrc g_mass_storage.stall=0 g_mass_storage.removable=1 g_mass_storage.file=/fat g_mass_storage.ro=1 g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF g_mass_storage.iSerialNumber="" clk_ignore_unused
mmcargs=setenv bootargs console={console},{baudrate} root=${mmcroot}
mmcautodetect=yes
mmcboot=echo Booting from mmc ...; run mmcargs; if test {tee} = yes; then run loadfdt; run loadtee; bootm {tee_addr} - {fdt_addr}; else if test {boot_fdt} = yes || test {boot_fdt} = try; then if run loadfdt; then bootz {loadaddr} - {fdt_addr}; else if test {boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi; fi;
mmcdev=1
mmcpart=2
mmcroot=/dev/mmcblk1p2 rootwait rw
netargs=setenv bootargs console={console},{baudrate} root=/dev/nfs ip=dhcp nfsroot={serverip}:{nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs; setenv get_cmd tftp; {get_cmd} {image}; {get_cmd} {fdt_addr} {fdt_file}; bootz {loadaddr} - ${fdt_addr};
panel=TFT7016
script=boot.scr
tee=no
tee_addr=0x84000000
tee_file=uTee-6ullevk
Environment size: 2745/8188 bytes
直接从emmc里驱动读取重新线程的内核参数有0x8000到1000的位置,直接运行内核,直接运行内核,最终目标应该是直接到内核和文件系统了,然后再研究下
问题
用了Ubuntu,直接的shell默认了fish,会导致smart-env.sh失败,切换成bash后无问题,当前arm架构的执行配置我没有def_config_arm,不过找了下gitee发现确实没有,没影响,的.config是arm架构的,如果想要开发其他架构的芯片,默认需要自己手动配置下配置
root@VM-QT:~/lrl/vscode/ART-Pi-smart# source smart-env.sh
cp: cannot stat 'userapps/configs/def_config_arm': No such file or directory
Arch => arm
CC => gcc
PREFIX => arm-linux-musleabi-
EXEC_PATH => /root/lrl/vscode/ART-Pi-smart/tools/gnu_gcc/arm-linux-musleabi_for_x86_64-pc-linux-gnu/bin
root@VM-QT:~/lrl/vscode/ART-Pi-smart# echo PATH
PATH
root@VM-QT:~/lrl/vscode/ART-Pi-smart# echo $PATH
/opt/Qt5.8.0_localpc/Tools/QtCreator/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/root/lrl/vscode/ART-Pi-smart/tools/gnu_gcc/arm-linux-musleabi_for_x86_64-pc-linux-gnu/bin
编译缺少工具问题
下载使用python可以通过指定python3 XXX.py来指定使用python3下载工具链,下载完成后,仍然编译不过,原因是工具链没有
在使用当前目录为根深蒂固的脚本时,一定要在脚本的上,也调用目录脚本,并且设置源头就是在当前的终端环境下,所以你要使用其他环境设置变量,不会改变你导致终端的环境变量
调整好工具链,需要重新编译makefile文件,编译完成后,第一个程序就可以编译了
DHCP问题
手头没有路由器,板卡自带的程序默认了DHCP,设置静态IP
重新编译内核需要修改
注意不要修改.config 编译的时候应该是使用没有这个配置文件 需要修改rtconfig.h文件
重新编译内核,修改 uboot bootcmd 参数,setenv reset 完成后重启
启动成功挂载
感想
单片机了解使用RTT,对RTT的系统开发使用后,mar系列认为是在linux之前的内核上进行了比较linux的实际开发,比较linux更独立的说,RTT的环境开发的实时开发,用于开发的操作系统,于使用完成,板子的,在没有了解的下,照着当天执行了几个脚本,环境就直接完成了,APP非常简单,没有开发者监控。
接触功能性和性能方面还没有深入了解,刚刚继续更新。
原作者:刘容良