前言
自己购买的Ti Al Board 开发记录说明,美元支付,海外发货…. 真是种新奇的体验….
总体参考资料
镜像地址下载
https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-4K6R4tqhZI/08.02.00.02/ti-processor-sdk-linux-sk-tda4vm-etcher-image.zip?_ticdt=MTY1MjYzNzI3OXwwMTgwYzhkYTA2ZjkwMDFmYTFlOWVjYzlmMDM1MDUwNzkwMDI3MDcxMDA5NDJ8R0ExLjMuMTMyNjM3NTcyMC4xNjUyNjM3MTc1
边缘ai 在线文档
Processor SDK Linux for Edge AI — Processor SDK Linux for Edge AI Documentation
https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-sk-tda4vm/08_02_00/exports/docs/sdk_overview.html
TDA4
https://www.ti.com.cn/product/zh-cn/TDA4VM#features
https://www.ti.com/tool/PROCESSOR-SDK-J721E#downloads
https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/08_01_00_07/exports/docs/linux/Foundational_Components_Multimedia_D5520_VXE384.html#gstreamer-pipelines
https://git.ti.com/cgit/jacinto7_multimedia/videnc-test-app/
docker 使用
https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-sk-tda4vm/08_02_00/exports/docs/docker_environment.html
20220721 GPIO USE
https://github.com/TexasInstruments/ti-gpio-py
https://pinout.xyz
和树莓派保持一致,设计拓展板子说明
- 两个spi ,需要
- 一个uart,需要
- 两个i2c,需要
- 一个key
- 一个led
- 3个pwm
- other not used
20220822 拓展io 板
- led 和key 测试通过
- can 设备
https://blog.csdn.net/weixin_35662051/article/details/116746707
ip link set can1 type can bitrate 500000
ip link set can1 up
- 开机自启动led root@tda4vm-sk:/etc/systemd/system# cat led_blink.service
1
2
3
4
5
6
7
[Unit]
Description= led blink by python scripts
After=network.target network-online.target sshd.service
[Service]
ExecStart=python3 /opt/ti-gpio-py/samples/simple_out.py
[Install]
WantedBy=defalut.target
调试code
sudo systemctl daemon-reload
sudo systemctl enable led_blink.service
sudo systemctl start led_blink.service
查看启动脚本的log信息,也可以在/var/log/syslog中查看 systemctl status led_blink.service -l
ros_相关
https://software-dl.ti.com/jacinto7/esd/robotics-sdk/08_02_00/docs/source/docker/README.html
weston 桌面
http://www.linuxboy.net/linuxjc/55245.html
https://github.com/mm2/Little-CMS
https://github.com/wayland-project/weston/tree/main
meson build/ –prefix=/opt/edge_ai_apps/software_test/weston/weston/out_dir -Dbackend-drm-screencast-vaapi=false -Dbackend-rdp=false -Dbackend-x11=false -Dxwayland=false -Dcolor-management-lcms=false
代理
file:///Users/liugaojie/Downloads/ti-processor-sdk-rtos-j721e-evm-08_04_00_06-docs_only/vision_apps/docs/user_guide/ENVIRONMENT_SETUP.html
export https_proxy=http://192.168.31.47:7890 export http_proxy=http://192.168.31.47:7890 export all_proxy=socks5://192.168.31.47:7890
export https_proxy=127.0.0.1:7890 export http_proxy=127.0.0.1:7890 export all_proxy=socks5://127.0.0.1:7890
unset http_proxy 或: unset https_proxyexport HTTPS_PROXY=”socks5://192.168.1.1:8088” wget –max-redirect=0 https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
docker run -it e388ba47e867 /bin/bash
curl -sSL –proxy http://192.168.31.47:7890 ‘http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xC1CF6E31E6BADE8868B172B4F42ED6FBAB17C654’ | apt-key add - |
mkdir -p /etc/ros/rosdep/sources.list.d/ curl -o /etc/ros/rosdep/sources.list.d/20-default.list https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/sources.list.d/20-default.list # 为 rosdep update 换源 export ROSDISTRO_INDEX_URL=https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml rosdep update
sudo rosdep update –rosdistro noetic
deb http://mirrors.ustc.edu.cn/ros/ubuntu/ bionic main deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ bionic main deb http://mirror-ap.packages.ros.org/ros/ubuntu/ bionic main deb http://mirror-eu.packages.ros.org/ros/ubuntu/ bionic main
docker commit d120207ecdcb ubuntu_ros:1.0
20230313 linux点亮led
原理图
使用SysConfig ,设置pinctrl
- 设置相关输出/上拉
- 得到相关PIN的设备树设置
更改设备树
在/home/gaojie/software/linux_sdk81/board-support/linux-5.10.65+gitAUTOINC+dcc6bedb2c-gdcc6bedb2c/arch/arm64/boot/dts/ti/k3-j721e-sk.dts 中
1
2
3
4
5
6
&main_pmx0 添加
led_gpio_pins_default: led_gpio_pins_default { pinctrl-single,pins = < J721E_IOPAD(0x104, PIN_INPUT_PULLUP, 7) /* (AD28) PRG0_PRU1_GPO1.GPIO0_64 */ >; };
在/节点添加
leds { #address-cells = <1>; #size-cells = <0>; compatible = "gpio-leds"; pinctrl-names = "default"; pinctrl-0 = <&led_gpio_pins_default>; led-gpio = <&main_gpio0 64 GPIO_ACTIVE_HIGH>; };
make linux-dts make linux-dts_install
修改 /home/gaojie/software/linux_sdk81/Rules.make
export DESTDIR = /home/gaojie/software/linux_sdk81/_linux_install
在/proc/device-tree可查看到leds 添加相关驱动,编译成Ko
https://blog.csdn.net/kelsel/article/details/52758278
/home/gaojie/software/linux_sdk81/board-support/linux-5.10.65+gitAUTOINC+dcc6bedb2c-gdcc6bedb2c/drivers/char/Makefile
直接添加相关ko,也可以配置
添加相关*.c, 在/home/gaojie/software/linux_sdk81 make linux
app 应用层
202303添加USB摄像头
使用balenaEtcher 下载安装好sdk82的image sudo minicom -D /dev/ttyUSB2 -c on 登录相关串口,必须在 /opt/edge_ai_apps 执行 ./setup_script.sh
检查usb摄像头
source ./init_script.sh
1
2
3
4
5
6
#Check for USB Camera ls /dev/v4l/by-path/*usb*video-index0 > /dev/null 2>&1 if [ "$?" == "0" ];
then USB_CAM_DEV=`ls /dev/v4l/by-path/*usb*video-index0 | head -1 | xargs readlink -f`
echo "USB Camera detected"
echo " device = "$USB_CAM_DEV
echo " format = jpeg"
fi
保存一张usb 图片 v4l2-ctl –device /dev/video2 –set-fmt-video=width=1280,height=720,pixelformat=MJPG –stream-mmap –stream-to=/home/root/software/video0-output.jpg –stream-count=1
摄像头图像获取并显示 gst-launch-1.0 v4l2src device=/dev/video2 ! image/jpeg,width=1280,height=720,framerate=30/1 ! jpegdec ! videoconvert ! autovideosink
https://blog.csdn.net/qq_32196869/article/details/124495493 https://blog.csdn.net/cau_weiyuhu/article/details/128208070
添加sharememory