这个资料在哪找呢?
楼主这个一键打包脚本太妙了, 简直妙不可言, 学习楼主的 shell 脚本.
https://github.com/xiaoxiaohuixxh/lichee-nano-one-key-package/blob/master/build.sh
#!/bin/bash
echo "Welcome to use lichee pi one key package"
toolchain_dir="toolchain"
cross_compiler="arm-linux-gnueabi"
temp_root_dir=$PWD
#uboot=========================================================
u_boot_dir="Lichee-Pi-u-boot"
u_boot_config_file=""
u_boot_boot_cmd_file=""
#uboot=========================================================
#linux opt=========================================================
linux_dir="Lichee-Pi-linux"
linux_config_file=""
#linux opt=========================================================
#linux opt=========================================================
buildroot_dir="buildroot-2017.08"
buildroot_config_file=""
#linux opt=========================================================
#pull===================================================================
pull_uboot(){
rm -rf ${temp_root_dir}/${u_boot_dir} &&\
mkdir -p ${temp_root_dir}/${u_boot_dir} &&\
cd ${temp_root_dir}/${u_boot_dir} &&\
git clone -b nano-v2018.01 https://github.com/Lichee-Pi/u-boot.git
if [ ! -d ${temp_root_dir}/${u_boot_dir}/u-boot ]; then
echo "Error:pull u_boot failed"
exit 0
else
mv ${temp_root_dir}/${u_boot_dir}/u-boot/* ${temp_root_dir}/${u_boot_dir}/
rm -rf ${temp_root_dir}/${u_boot_dir}/u-boot
echo "pull buildroot ok"
fi
}
pull_linux(){
rm -rf ${temp_root_dir}/${linux_dir} &&\
mkdir -p ${temp_root_dir}/${linux_dir} &&\
cd ${temp_root_dir}/${linux_dir} &&\
#git clone --depth=1 -b nano-4.14-exp https://github.com/Lichee-Pi/linux.git
git clone -b f1c100s --depth=1 https://github.com/Icenowy/linux.git
if [ ! -d ${temp_root_dir}/${linux_dir}/linux ]; then
echo "Error:pull linux failed"
exit 0
else
mv ${temp_root_dir}/${linux_dir}/linux/* ${temp_root_dir}/${linux_dir}/
rm -rf ${temp_root_dir}/${linux_dir}/linux
echo "pull buildroot ok"
fi
}
pull_toolchain(){
rm -rf ${temp_root_dir}/${toolchain_dir}
mkdir -p ${temp_root_dir}/${toolchain_dir}
cd ${temp_root_dir}/${toolchain_dir}
ldconfig
if [ $(getconf WORD_BIT) = '32' ] && [ $(getconf LONG_BIT) = '64' ] ; then
wget http://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabi/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi.tar.xz &&\
tar xvJf gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi.tar.xz
if [ ! -d ${temp_root_dir}/${toolchain_dir}/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi ]; then
echo "Error:pull toolchain failed"
exit 0
else
echo "pull buildroot ok"
fi
else
wget http://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabi/gcc-linaro-7.4.1-2019.02-i686_arm-linux-gnueabi.tar.xz &&\
tar xvJf gcc-linaro-7.4.1-2019.02-i686_arm-linux-gnueabi.tar.xz
if [ ! -d ${temp_root_dir}/${toolchain_dir}/gcc-linaro-7.4.1-2019.02-i686_arm-linux-gnueabi ]; then
echo "Error:pull toolchain failed"
exit 0
else
echo "pull buildroot ok"
fi
fi
}
pull_buildroot(){
rm -rf ${temp_root_dir}/${buildroot_dir}
mkdir -p ${temp_root_dir}/${buildroot_dir}
cd ${temp_root_dir}/${buildroot_dir} &&\
wget https://buildroot.org/downloads/buildroot-2017.08.tar.gz &&\
tar xvf buildroot-2017.08.tar.gz
if [ ! -d ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08 ]; then
echo "Error:pull buildroot failed"
exit 0
else
# mv ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08/* ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08
# rm -rf ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08
echo "pull buildroot ok"
fi
}
pull_all(){
sudo apt-get update
sudo apt-get install -y autoconf automake libtool gettext
sudo apt-get install -y make gcc g++ swig python-dev bc python u-boot-tools bison flex bc libssl-dev libncurses5-dev unzip mtd-utils
sudo apt-get install -y libc6-i386 lib32stdc++6 lib32z1
sudo apt-get install -y libc6:i386 libstdc++6:i386 zlib1g:i386
pull_uboot
pull_linux
pull_toolchain
pull_buildroot
cp -f ${temp_root_dir}/buildroot.config ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08
cp -f ${temp_root_dir}/linux-licheepi_nano_defconfig ${temp_root_dir}/${linux_dir}/arch/arm/configs/licheepi_nano_defconfig
cp -f ${temp_root_dir}/linux-licheepi_nano_spiflash_defconfig ${temp_root_dir}/${linux_dir}/arch/arm/configs/licheepi_nano_spiflash_defconfig
cp -f ${temp_root_dir}/linux-suniv-f1c100s-licheepi-nano-with-lcd.dts ${temp_root_dir}/${linux_dir}/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano-with-lcd.dts
cp -f ${temp_root_dir}/uboot-licheepi_nano_defconfig ${temp_root_dir}/${u_boot_dir}/configs/licheepi_nano_defconfig
cp -f ${temp_root_dir}/uboot-licheepi_nano_spiflash_defconfig ${temp_root_dir}/${u_boot_dir}/configs/licheepi_nano_spiflash_defconfig
mkdir -p ${temp_root_dir}/output
}
#pull===================================================================
#env===================================================================
update_env(){
if [ ! -d ${temp_root_dir}/${toolchain_dir}/gcc-linaro-7.4.1-2019.02-i686_arm-linux-gnueabi ]; then
if [ ! -d ${temp_root_dir}/${toolchain_dir}/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi ]; then
echo "Error:toolchain no found,Please use ./buid.sh pull_all "
exit 0
else
export PATH="$PWD/${toolchain_dir}/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin":"$PATH"
fi
else
export PATH="$PWD/${toolchain_dir}/gcc-linaro-7.4.1-2019.02-i686_arm-linux-gnueabi/bin":"$PATH"
fi
}
check_env(){
if [ ! -d ${temp_root_dir}/${toolchain_dir} ] ||\
[ ! -d ${temp_root_dir}/${u_boot_dir} ] ||\
[ ! -d ${temp_root_dir}/${buildroot_dir} ] ||\
[ ! -d ${temp_root_dir}/${linux_dir} ]; then
echo "Error:env error,Please use ./buid.sh pull_all"
exit 0
fi
}
#env===================================================================
#clean===================================================================
clean_log(){
rm -f ${temp_root_dir}/*.log
}
clean_all(){
clean_log
clean_uboot
clean_linux
clean_buildroot
}
#clean===================================================================
#uboot=========================================================
clean_uboot(){
cd ${temp_root_dir}/${u_boot_dir}
make ARCH=arm CROSS_COMPILE=${cross_compiler}- mrproper > /dev/null 2>&1
}
build_uboot(){
cd ${temp_root_dir}/${u_boot_dir}
echo "Building uboot ..."
echo "--->Configuring ..."
make ARCH=arm CROSS_COMPILE=${cross_compiler}- ${u_boot_config_file} > /dev/null 2>&1
# cp -f ${temp_root_dir}/${u_boot_config_file} ${temp_root_dir}/${u_boot_dir}/.config
if [ $? -ne 0 ] || [ ! -f ${temp_root_dir}/${u_boot_dir}/.config ]; then
echo "Error: .config file not exist"
exit 1
fi
echo "--->Get cpu info ..."
proc_processor=$(grep 'processor' /proc/cpuinfo | sort -u | wc -l)
echo "--->Compiling ..."
make ARCH=arm CROSS_COMPILE=${cross_compiler}- -j${proc_processor} > ${temp_root_dir}/build_uboot.log 2>&1
if [ $? -ne 0 ] || [ ! -f ${temp_root_dir}/${u_boot_dir}/u-boot ]; then
echo "Error: UBOOT NOT BUILD.Please Get Some Error From build_uboot.log"
error_msg=$(cat ${temp_root_dir}/build_uboot.log)
if [[ $(echo $error_msg | grep "ImportError: No module named _libfdt") != "" ]];then
echo "Please use Python2.7 as default python interpreter"
fi
exit 1
fi
if [ ! -f ${temp_root_dir}/${u_boot_dir}/u-boot-sunxi-with-spl.bin ]; then
echo "Error: UBOOT NOT BUILD.Please Enable spl option"
exit 1
fi
#make boot.src
if [ -n "$u_boot_boot_cmd_file" ];then
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Beagleboard boot script" -d ${temp_root_dir}/${u_boot_boot_cmd_file} ${temp_root_dir}/output/boot.scr
fi
echo "Build uboot ok"
}
#uboot=========================================================
#linux=========================================================
clean_linux(){
cd ${temp_root_dir}/${linux_dir}
make ARCH=arm CROSS_COMPILE=${cross_compiler}- mrproper > /dev/null 2>&1
}
build_linux(){
cd ${temp_root_dir}/${linux_dir}
echo "Building linux ..."
echo "--->Configuring ..."
make ARCH=arm CROSS_COMPILE=${cross_compiler}- ${linux_config_file} > /dev/null 2>&1
if [ $? -ne 0 ] || [ ! -f ${temp_root_dir}/${linux_dir}/.config ]; then
echo "Error: .config file not exist"
exit 1
fi
echo "--->Get cpu info ..."
proc_processor=$(grep 'processor' /proc/cpuinfo | sort -u | wc -l)
echo "--->Compiling ..."
make ARCH=arm CROSS_COMPILE=${cross_compiler}- -j${proc_processor} > ${temp_root_dir}/build_linux.log 2>&1
if [ $? -ne 0 ] || [ ! -f ${temp_root_dir}/${linux_dir}/arch/arm/boot/zImage ]; then
echo "Error: LINUX NOT BUILD.Please Get Some Error From build_linux.log"
#error_msg=$(cat ${temp_root_dir}/build_linux.log)
#if [[ $(echo $error_msg | grep "ImportError: No module named _libfdt") != "" ]];then
# echo "Please use Python2.7 as default python interpreter"
#fi
exit 1
fi
if [ ! -f ${temp_root_dir}/${linux_dir}/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano-with-lcd.dtb ]; then
echo "Error: UBOOT NOT BUILD.${temp_root_dir}/${linux_dir}/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano-with-lcd.dtb not found"
exit 1
fi
#build linux kernel modules
make ARCH=arm CROSS_COMPILE=${cross_compiler}- -j${proc_processor} INSTALL_MOD_PATH=${temp_root_dir}/${linux_dir}/mod_output modules > /dev/null 2>&1
make ARCH=arm CROSS_COMPILE=${cross_compiler}- -j${proc_processor} INSTALL_MOD_PATH=${temp_root_dir}/${linux_dir}/mod_output modules_install > /dev/null 2>&1
echo "Build linux ok"
}
#linux=========================================================
#linux=========================================================
clean_buildroot(){
cd ${temp_root_dir}/${buildroot_dir}
make ARCH=arm CROSS_COMPILE=${cross_compiler}- clean > /dev/null 2>&1
}
build_buildroot(){
cd ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08
echo "Building buildroot ..."
echo "--->Configuring ..."
rm ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08/.config
make ARCH=arm CROSS_COMPILE=${cross_compiler}- defconfig
cp -f ${temp_root_dir}/buildroot.config ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08/.config
make ARCH=arm CROSS_COMPILE=${cross_compiler}- ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08/.config
# make ARCH=arm CROSS_COMPILE=${cross_compiler}- ${buildroot_config_file} > /dev/null 2>&1
if [ $? -ne 0 ] || [ ! -f ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08/.config ]; then
echo "Error: .config file not exist"
exit 1
fi
echo "--->Compiling ..."
make ARCH=arm CROSS_COMPILE=${cross_compiler}- > ${temp_root_dir}/build_buildroot.log 2>&1
if [ $? -ne 0 ] || [ ! -d ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08/output/target ]; then
echo "Error: BUILDROOT NOT BUILD.Please Get Some Error From build_buildroot.log"
exit 1
fi
echo "Build buildroot ok"
}
#linux=========================================================
#copy=========================================================
copy_uboot(){
cp ${temp_root_dir}/${u_boot_dir}/u-boot-sunxi-with-spl.bin ${temp_root_dir}/output/
}
copy_linux(){
cp ${temp_root_dir}/${linux_dir}/arch/arm/boot/zImage ${temp_root_dir}/output/
cp ${temp_root_dir}/${linux_dir}/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano-with-lcd.dtb ${temp_root_dir}/output/
mkdir -p ${temp_root_dir}/output/modules/
cp -rf ${temp_root_dir}/${linux_dir}/mod_output/lib ${temp_root_dir}/output/modules/
}
copy_buildroot(){
cp -r ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08/output/target ${temp_root_dir}/output/rootfs/
cp ${temp_root_dir}/${buildroot_dir}/buildroot-2017.08/output/images/rootfs.tar ${temp_root_dir}/output/
gzip -c ${temp_root_dir}/output/rootfs.tar > ${temp_root_dir}/output/rootfs.tar.gz
}
#copy=========================================================
#pack=========================================================
pack_spiflash_normal_size_img(){
mkdir -p ${temp_root_dir}/output/spiflash-bin
dd if=/dev/zero of=${temp_root_dir}/output/spiflash-bin/lichee-nano-normal-size.bin bs=1M count=16
echo "--->Packing Uboot..."
_UBOOT_FILE=${temp_root_dir}/output/u-boot-sunxi-with-spl.bin
dd if=$_UBOOT_FILE of=${temp_root_dir}/output/spiflash-bin/lichee-nano-normal-size.bin bs=1K conv=notrunc
_DTB_FILE=${temp_root_dir}/output/suniv-f1c100s-licheepi-nano-with-lcd.dtb
echo "--->Packing dtb..."
dd if=$_DTB_FILE of=${temp_root_dir}/output/spiflash-bin/lichee-nano-normal-size.bin bs=1K seek=1024 conv=notrunc
echo "--->Packing zImage..."
_KERNEL_FILE=${temp_root_dir}/output/zImage
dd if=$_KERNEL_FILE of=${temp_root_dir}/output/spiflash-bin/lichee-nano-normal-size.bin bs=1K seek=1088 conv=notrunc
echo "--->Packing rootfs..."
#cp -r $_MOD_FILE ${temp_root_dir}/output/rootfs/lib/modules/
mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -d ${temp_root_dir}/output/rootfs/ -o ${temp_root_dir}/output/jffs2.img
dd if=${temp_root_dir}/output/jffs2.img of=${temp_root_dir}/output/spiflash-bin/lichee-nano-normal-size.bin bs=1K seek=5184 conv=notrunc
echo "pack ok"
}
pack_tf_normal_size_img(){
_ROOTFS_FILE=${temp_root_dir}/output/rootfs.tar.gz
_ROOTFS_SIZE=`gzip -l $_ROOTFS_FILE | sed -n '2p' | awk '{print $2}'`
_ROOTFS_SIZE=`echo "scale=3;$_ROOTFS_SIZE/1024/1024" | bc`
_UBOOT_SIZE=1
_CFG_SIZEKB=0
_P1_SIZE=16
_IMG_SIZE=200
_kernel_mod_dir_name=$(ls ${temp_root_dir}/output/modules/lib/modules/)
_MOD_FILE=${temp_root_dir}/output/modules/lib/modules/${_kernel_mod_dir_name}
_MOD_SIZE=`du $_MOD_FILE --max-depth=0 | cut -f 1`
_MOD_SIZE=`echo "scale=3;$_MOD_SIZE/1024" | bc`
_MIN_SIZE=`echo "scale=3;$_UBOOT_SIZE+$_P1_SIZE+$_ROOTFS_SIZE+$_MOD_SIZE+$_CFG_SIZEKB/1024" | bc` #+$_OVERLAY_SIZE
_MIN_SIZE=$(echo "$_MIN_SIZE" | bc)
echo "--->min img size = $_MIN_SIZE MB"
_MIN_SIZE=$(echo "${_MIN_SIZE%.*}+1"|bc)
_FREE_SIZE=`echo "$_IMG_SIZE-$_MIN_SIZE"|bc`
_IMG_FILE=${temp_root_dir}/output/image/lichee-nano-normal-size.img
mkdir -p ${temp_root_dir}/output/image
rm $_IMG_FILE
dd if=/dev/zero of=$_IMG_FILE bs=1M count=$_IMG_SIZE
if [ $? -ne 0 ]
then
echo "getting error in creating dd img!"
exit
fi
_LOOP_DEV=$(sudo losetup -f)
if [ -z $_LOOP_DEV ]
then
echo "can not find a loop device!"
exit
fi
sudo losetup $_LOOP_DEV $_IMG_FILE
if [ $? -ne 0 ]
then
echo "dd img --> $_LOOP_DEV error!"
sudo losetup -d $_LOOP_DEV >/dev/null 2>&1 && exit
fi
echo "--->creating partitions for tf image ..."
#blockdev --rereadpt $_LOOP_DEV >/dev/null 2>&1
# size only can be integer
cat <<EOT |sudo sfdisk $_IMG_FILE
${_UBOOT_SIZE}M,${_P1_SIZE}M,c
,,L
EOT
sleep 2
sudo partx -u $_LOOP_DEV
sudo mkfs.vfat ${_LOOP_DEV}p1 ||exit
sudo mkfs.ext4 ${_LOOP_DEV}p2 ||exit
if [ $? -ne 0 ]
then
echo "error in creating partitions"
sudo losetup -d $_LOOP_DEV >/dev/null 2>&1 && exit
#sudo partprobe $_LOOP_DEV >/dev/null 2>&1 && exit
fi
#pack uboot
echo "--->writing u-boot-sunxi-with-spl to $_LOOP_DEV"
# sudo dd if=/dev/zero of=$_LOOP_DEV bs=1K seek=1 count=1023 # clear except mbr
_UBOOT_FILE=${temp_root_dir}/output/u-boot-sunxi-with-spl.bin
sudo dd if=$_UBOOT_FILE of=$_LOOP_DEV bs=1024 seek=8
if [ $? -ne 0 ]
then
echo "writing u-boot error!"
sudo losetup -d $_LOOP_DEV >/dev/null 2>&1 && exit
#sudo partprobe $_LOOP_DEV >/dev/null 2>&1 && exit
fi
sudo sync
mkdir -p ${temp_root_dir}/output/p1 >/dev/null 2>&1
mkdir -p ${temp_root_dir}/output/p2 > /dev/null 2>&1
sudo mount ${_LOOP_DEV}p1 ${temp_root_dir}/output/p1
sudo mount ${_LOOP_DEV}p2 ${temp_root_dir}/output/p2
echo "--->copy boot and rootfs files..."
sudo rm -rf ${temp_root_dir}/output/p1/* && sudo rm -rf ${temp_root_dir}/output/p2/*
#pack linux kernel
_KERNEL_FILE=${temp_root_dir}/output/zImage
_DTB_FILE=${temp_root_dir}/output/suniv-f1c100s-licheepi-nano-with-lcd.dtb
sudo cp $_KERNEL_FILE ${temp_root_dir}/output/p1/zImage &&\
sudo cp $_DTB_FILE ${temp_root_dir}/output/p1/ &&\
sudo cp ${temp_root_dir}/output/boot.scr ${temp_root_dir}/output/p1/ &&\
echo "--->p1 done~"
sudo tar xzvf $_ROOTFS_FILE -C ${temp_root_dir}/output/p2/ &&\
echo "--->p2 done~"
# sudo cp -r $_OVERLAY_BASE/* p2/ &&\
# sudo cp -r $_OVERLAY_FILE/* p2/ &&\
sudo mkdir -p ${temp_root_dir}/output/p2/lib/modules/${_kernel_mod_dir_name}/ &&\
sudo cp -r $_MOD_FILE/* ${temp_root_dir}/output/p2/lib/modules/${_kernel_mod_dir_name}/
echo "--->modules done~"
if [ $? -ne 0 ]
then
echo "copy files error! "
sudo losetup -d $_LOOP_DEV >/dev/null 2>&1
sudo umount ${_LOOP_DEV}p1 ${_LOOP_DEV}p2 >/dev/null 2>&1
exit
fi
echo "--->The tf card image-packing task done~"
sudo sync
sleep 2
sudo umount ${temp_root_dir}/output/p1 ${temp_root_dir}/output/p2 && sudo losetup -d $_LOOP_DEV
if [ $? -ne 0 ]
then
echo "umount or losetup -d error!!"
exit
fi
}
#pack=========================================================
#clean output dir=========================================================
clean_output_dir(){
rm -rf ${temp_root_dir}/output/*
}
#clean output dir=========================================================
build(){
check_env
update_env
echo "clean log ..."
clean_log
echo "clean output dir ..."
clean_output_dir
build_uboot
echo "copy uboot ..."
copy_uboot
build_linux
echo "copy linux ..."
copy_linux
build_buildroot
echo "copy buildroot ..."
copy_buildroot
}
if [ "${1}" = "" ] && [ ! "${1}" = "nano_spiflash" ] && [ ! "${1}" = "nano_tf" ] && [ ! "${1}" = "pull_all" ]; then
echo "Usage: build.sh [nano_spiflash | nano_tf | pull_all | clean]";
echo "One key build nano finware";
echo " ";
echo "nano_spiflash Build nano firmware booted from spiflash";
echo "nano_tf Build nano firmware booted from tf";
echo "pull_all Pull build env from internet";
echo "clean Clean build env";
exit 0
fi
if [ ! -f ${temp_root_dir}/build.sh ]; then
echo "Error:Please enter packge root dir"
exit 0
fi
if [ "${1}" = "clean" ]; then
clean_all
echo "clean ok"
exit 0
fi
if [ "${1}" = "pull_all" ]; then
pull_all
fi
if [ "${1}" = "pull_buildroot" ]; then
pull_buildroot
fi
if [ "${1}" = "nano_spiflash" ]; then
echo "build rootfs maybe have some buf in this mode"
linux_config_file="licheepi_nano_spiflash_defconfig"
u_boot_config_file="licheepi_nano_spiflash_defconfig"
build
pack_spiflash_normal_size_img
echo "the binary file in output/spiflash-bin dir"
fi
if [ "${1}" = "build_buildroot" ]; then
build_buildroot
fi
if [ "${1}" = "nano_tf" ]; then
linux_config_file="licheepi_nano_defconfig"
u_boot_config_file="licheepi_nano_defconfig"
u_boot_boot_cmd_file="tf_boot.cmd"
build
pack_tf_normal_size_img
echo "the image file in output/image dir"
fi
sleep 1
echo "build ok"
一直扒核心板的资料,今天终于算小有收获。本机器的核心板应该是根据BBB板转变而来的,有一定的区别,但是核心板的电路可以很好跟BBB板契合,本机器核心板的原件,包括编号,都跟BBB板的编号一致。核心板应该可以增加一个网络IC LAN8710A,实现网络功能。BBB_SCH_4.pdf
给力给力, 这下好玩了. BBB开源资料太多了.
我一直有个疑问,正则表达式,是一个标准的东西么?还是每个软件用的正则表达式,都有自己的规则?
规则基本大同小异: https://tool.oschina.net/uploads/apidocs/jquery/regexp.html
但是有些库实现的功能更多, 比如java/python库还带替换功能, 这个c库没有这个功能.
https://stackoverflow.com/questions/7899119/what-does-s-mean-in-printf
void f(const char *str, int str_len)
{
printf("%.*s\n", str_len, str);
}
#include <stdio.h>
int main() {
int precision = 8;
int biggerPrecision = 16;
const char *greetings = "Hello world";
printf("|%.8s|\n", greetings);
printf("|%.*s|\n", precision , greetings);
printf("|%16s|\n", greetings);
printf("|%*s|\n", biggerPrecision , greetings);
return 0;
}
|Hello wo|
|Hello wo|
| Hello world|
| Hello world|
意外的收获, printf 的一种使用方法.
在一楼的基础上写一个简单的 AT 输出字符串处理函数:
#include <assert.h>
#include <stdio.h>
#include <sys/types.h>
#include <regex.h>
int main(void) {
int r;
regex_t reg;
regmatch_t match[7];
char *line = "+CCLK: \"20/03/08,17:31:52+32\"";
regcomp(®, "\\+CCLK: \"([0-9]{2})/([0-9]{2})/([0-9]{2}),([0-9]{2}):([0-9]{2}):([0-9]{2})", REG_ICASE | REG_EXTENDED);
r = regexec(®, line, 7, match, 0);
if (r == 0) {
printf("Match!\n");
printf("0: [%.*s]\n", match[0].rm_eo - match[0].rm_so, line + match[0].rm_so);
printf("1: [%.*s]\n", match[1].rm_eo - match[1].rm_so, line + match[1].rm_so);
printf("2: [%.*s]\n", match[2].rm_eo - match[2].rm_so, line + match[2].rm_so);
printf("3: [%.*s]\n", match[3].rm_eo - match[3].rm_so, line + match[3].rm_so);
printf("4: [%.*s]\n", match[4].rm_eo - match[4].rm_so, line + match[4].rm_so);
printf("5: [%.*s]\n", match[5].rm_eo - match[5].rm_so, line + match[5].rm_so);
printf("6: [%.*s]\n", match[6].rm_eo - match[6].rm_so, line + match[6].rm_so);
} else {
printf("NO match!\n");
}
return 0;
}
输出结果:
Match!
0: [+CCLK: "20/03/08,17:31:52]
1: [20]
2: [03]
3: [08]
4: [17]
5: [31]
6: [52]
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_74/rtref/regexec.htm
ibm 的一个演示代码:
#include <regex.h>
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
regex_t preg;
char *string = "a very simple simple simple string";
char *pattern = "\\(sim[a-z]le\\) \\1";
int rc;
size_t nmatch = 2;
regmatch_t pmatch[2];
if (0 != (rc = regcomp(&preg, pattern, 0))) {
printf("regcomp() failed, returning nonzero (%d)\n", rc);
exit(EXIT_FAILURE);
}
if (0 != (rc = regexec(&preg, string, nmatch, pmatch, 0))) {
printf("Failed to match '%s' with '%s',returning %d.\n",
string, pattern, rc);
}
else {
printf("With the whole expression, "
"a matched substring \"%.*s\" is found at position %d to %d.\n",
pmatch[0].rm_eo - pmatch[0].rm_so, &string[pmatch[0].rm_so],
pmatch[0].rm_so, pmatch[0].rm_eo - 1);
printf("With the sub-expression, "
"a matched substring \"%.*s\" is found at position %d to %d.\n",
pmatch[1].rm_eo - pmatch[1].rm_so, &string[pmatch[1].rm_so],
pmatch[1].rm_so, pmatch[1].rm_eo - 1);
}
regfree(&preg);
return 0;
/****************************************************************************
The output should be similar to :
With the whole expression, a matched substring "simple simple" is found
at position 7 to 19.
With the sub-expression, a matched substring "simple" is found
at position 7 to 12.
****************************************************************************/
}
运行结果:
With the whole expression, a matched substring "simple simple" is found at position 7 to 19.
With the sub-expression, a matched substring "simple" is found at position 7 to 12.
https://www.mitchr.me/SS/exampleCode/AUPG/regex_example.c.html
/* -*- Mode:C; Coding:us-ascii-unix; fill-column:132 -*- */
/**********************************************************************************************************************************/
/**
@file regex_example.c
@author Mitch Richling <https://www.mitchr.me/>
@Copyright Copyright 1994,2014 by Mitch Richling. All rights reserved.
@brief UNIX regex tools@EOL
@Keywords UNIX regular expressions regex
@Std ISOC POSIX.2 (IEEE Std 103.2) BSD4.3
@Tested
- Solaris 2.8
- MacOS X.2
- Linux (RH 7.3)
This is an example program intended to illustrate very basic use of regular expressions.
Grumpy programmer note: IEEE Std 1003.2, generally referred to as 'POSIX.2' is a bit vague regarding several details like how
back references work. It also has a couple of errors (like how a single ')' is treated in a regular expression. Because of
this, most actual implementations of the standard will have several minor inconsistencies that one must watch out for. My best
advice is to "read the man page" on the platforms you wish to run on and to avoid exotic things. For example, avoid things like
the BSD REG_NOSPEC and REG_PEND options. Another option is to simply carry your favorite regular expression library with you.
For example, C++11 has very good regex support, and the BOOST library has a very nice regex class for older C++ versions. PCRE
is probably the most popular alternative, FOSS regular expression library available.
***********************************************************************************************************************************/
#include <sys/types.h> /* UNIX types POSIX */
#include <regex.h> /* Regular Exp POSIX */
#include <stdio.h> /* I/O lib C89 */
#include <string.h> /* Strings C89 */
#include <stdlib.h> /* Standard Lib C89 */
/**********************************************************************************************************************************/
#define MAX_SUB_EXPR_CNT 256
#define MAX_SUB_EXPR_LEN 256
#define MAX_ERR_STR_LEN 256
/**********************************************************************************************************************************/
int main(int argc, char *argv[]) {
int i; /* Loop variable. */
char p[MAX_SUB_EXPR_LEN]; /* For string manipulation */
regex_t aCmpRegex; /* Pointer to our compiled regex */
char *aStrRegex; /* Pointer to the string holding the regex */
regmatch_t pMatch[MAX_SUB_EXPR_CNT]; /* Hold partial matches. */
char **aLineToMatch; /* Holds each line that we wish to match */
int result; /* Return from regcomp() and regexec() */
char outMsgBuf[MAX_ERR_STR_LEN]; /* Holds error messages from regerror() */
char *testStrings[] = { "This should match... hello",
"This could match... hello!",
"More than one hello.. hello",
"No chance of a match...",
NULL};
/* use aStrRegex for readability. */
aStrRegex = "(.*)(hello)+";
printf("Regex to use: %s\n", aStrRegex);
/* Compile the regex */
if( (result = regcomp(&aCmpRegex, aStrRegex, REG_EXTENDED)) ) {
printf("Error compiling regex(%d).\n", result);
regerror(result, &aCmpRegex, outMsgBuf, sizeof(outMsgBuf));
printf("Error msg: %s\n", outMsgBuf);
exit(1);
} /* end if */
/* Possible last argument to regcomp (||'ed together):
REG_EXTENDED Use extended regular expressions
REG_BASIC Use basic regular expressions
REG_NOSPEC Special character support off (Not POSIX.2)
REG_ICASE Ignore upper/lower case distinctions
REG_NOSUB No sub-strings (just check for match/no match)
REG_NEWLINE Compile for newline-sensitive matching
REG_PEND Specify alternate string ending (Not POSIX.2) */
/* Apply our regular expression to some strings. */
for(aLineToMatch=testStrings; *aLineToMatch != NULL; aLineToMatch++) {
printf("String: %s\n", *aLineToMatch);
printf(" %s\n", "0123456789012345678901234567890123456789");
printf(" %s\n", "0 1 2 3");
/* compare and check result (MAX_SUB_EXPR_CNT max sub-expressions).*/
if( !(result = regexec(&aCmpRegex, *aLineToMatch, MAX_SUB_EXPR_CNT, pMatch, 0)) ) {
/* Last argument to regexec (||'ed together):
REG_NOTBOL Start of the string is NOT the start of a line
REG_NOTEOL $ shouldn't match end of string (gotta have a newline)
REG_STARTEND Not POSIX.2 */
printf("Result: We have a match!\n");
for(i=0;i<=(int)aCmpRegex.re_nsub;i++) {
printf("Match(%2d/%2d): (%2d,%2d): ",
i,
(int)(aCmpRegex.re_nsub),
(int)(pMatch[i].rm_so),
(int)(pMatch[i].rm_eo));
if( (pMatch[i].rm_so >= 0) && (pMatch[i].rm_eo >= 1) &&
(pMatch[i].rm_so != pMatch[i].rm_eo) ) {
strncpy(p, &((*aLineToMatch)[pMatch[i].rm_so]), pMatch[i].rm_eo-pMatch[i].rm_so);
p[pMatch[i].rm_eo-pMatch[i].rm_so] = '\0';
printf("'%s'", p);
} /* end if */
printf("\n");
} /* end for */
printf("\n");
} else {
switch(result) {
case REG_NOMATCH : printf("String did not match the pattern\n"); break;
////Some typical return codes:
//case REG_BADPAT : printf("invalid regular expression\n"); break;
//case REG_ECOLLATE : printf("invalid collating element\n"); break;
//case REG_ECTYPE : printf("invalid character class\n"); break;
//case REG_EESCAPE : printf("`\' applied to unescapable character\n"); break;
//case REG_ESUBREG : printf("invalid backreference number\n"); break;
//case REG_EBRACK : printf("brackets `[ ]' not balanced\n"); break;
//case REG_EPAREN : printf("parentheses `( )' not balanced\n"); break;
//case REG_EBRACE : printf("braces `{ }' not balanced\n"); break;
//case REG_BADBR : printf("invalid repetition count(s) in `{ }'\n"); break;
//case REG_ERANGE : printf("invalid character range in `[ ]'\n"); break;
//case REG_ESPACE : printf("Ran out of memory\n"); break;
//case REG_BADRPT : printf("`?', `*', or `+' operand invalid\n"); break;
//case REG_EMPTY : printf("empty (sub)expression\n"); break;
//case REG_ASSERT : printf("can't happen - you found a bug\n"); break;
//case REG_INVARG : printf("A bad option was passed\n"); break;
//case REG_ILLSEQ : printf("illegal byte sequence\n"); break;
default : printf("Unknown error\n"); break;
} /* end switch */
regerror(result, &aCmpRegex, outMsgBuf, sizeof(outMsgBuf));
printf("Result: Error msg: %s\n\n", outMsgBuf);
} /* end if/else */
} /* end for */
/* Free up resources for the regular expression */
regfree(&aCmpRegex);
exit(0);
} /* end func main */
另外一个demo, 运行结果:
Regex to use: (.*)(hello)+
String: This should match... hello
0123456789012345678901234567890123456789
0 1 2 3
Result: We have a match!
Match( 0/ 2): ( 0,26): 'This should match... hello'
Match( 1/ 2): ( 0,21): 'This should match... '
Match( 2/ 2): (21,26): 'hello'
String: This could match... hello!
0123456789012345678901234567890123456789
0 1 2 3
Result: We have a match!
Match( 0/ 2): ( 0,25): 'This could match... hello'
Match( 1/ 2): ( 0,20): 'This could match... '
Match( 2/ 2): (20,25): 'hello'
String: More than one hello.. hello
0123456789012345678901234567890123456789
0 1 2 3
Result: We have a match!
Match( 0/ 2): ( 0,27): 'More than one hello.. hello'
Match( 1/ 2): ( 0,22): 'More than one hello.. '
Match( 2/ 2): (22,27): 'hello'
String: No chance of a match...
0123456789012345678901234567890123456789
0 1 2 3
String did not match the pattern
Result: Error msg: No match
#include <assert.h>
#include <stdio.h>
#include <sys/types.h>
#include <regex.h>
int main(void) {
int r;
regex_t reg;
regmatch_t match[2];
char *line = "----------------------- Page 1-----------------------";
regcomp(®, "[-]{23}[ ]*Page[ ]*([0-9]*)[-]{23}", REG_ICASE | REG_EXTENDED);
/* ^------^ capture page number */
r = regexec(®, line, 2, match, 0);
if (r == 0) {
printf("Match!\n");
printf("0: [%.*s]\n", match[0].rm_eo - match[0].rm_so, line + match[0].rm_so);
printf("1: [%.*s]\n", match[1].rm_eo - match[1].rm_so, line + match[1].rm_so);
} else {
printf("NO match!\n");
}
return 0;
}
这个可以直接编译运行.
windows下的VC编译估计通不过, 但是用mingw应该可以, 未测试.
运行结果:
Match!
0: [----------------------- Page 1-----------------------]
1: [1]
http://dl.widora.io/dl/linux-4.14.158.tar.xz 这个是日本节点的,测测速。
下半夜速度不行噢, 和般佤弓没什么区别.
现在速度 15KB/s 以下.
#include <QApplication>
#include <Windows.h>
#include <gl/GL.h>
#include <gl/GLU.h>
#include <QtOpenGL/QGLFormat>
#include <QtOpenGL/QGLPixelBuffer>
#include <QImage>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
// Construct an OpenGL pixel buffer.
QGLPixelBuffer glPixBuf(100, 100);
// Make the QGLContext object bound to pixel buffer the current context
glPixBuf.makeCurrent();
// The opengl commands
glClearColor(1.0, 1.0, 1.0, 0.0);
glViewport(0, 0, 100, 100);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0, 100, 0, 100);
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 0.0, 0.0);
glPointSize(4.0);
glBegin(GL_TRIANGLES);
glVertex2i(10, 10);
glVertex2i(50, 50);
glVertex2i(25, 75);
glEnd();
// At last, the pixel buffer was saved as an image
auto pImage = glPixBuf.toImage();
pImage.save(QString::fromLocal8Bit("gl.png"));
return a.exec();
}
记得 qt pro 工程文件要添加:
QT += core gui opengl
LIBS += -lopengl32 -lglu32
这里有一个OpenGL Qt渲染到内存, 然后输出到文件的demo
漂亮,推荐使用 http://g.widora.io 下载git包,填入: https://github.com/wujique/F1C200S_HDK.git
你这仓库中的 ibom.html 真牛逼,好评!
一直显示正在打包, 纹丝不动呢.
1. 可能没有进入FEL 模式(USB烧录模式)
2. 没有装 libusb 驱动
谢谢, 试了一把, 好用:
java -jar sfnttool.jar -s "米秒分钟小时瞬时流速累计流量水表单位立方米秒一二三四五六七八九十百千万亿0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ""!#$%&'()*+,-./:;<=>?@[\]^_`" msyh.ttf msyh_simple.ttf
参数 msyh.ttf 是源字库文件
参数 msyh_simple.ttf 是瘦身之后的字库文件
这里可以下载: msyh_simple.7z
刚刚翻京东方 bp101wx1-206 的手册, 发现有一个 CABC_EN 引脚, 搜了一下,这个神奇的功能
居然是背光节电技术, 就是根据显示的内容, 自动调整背光亮度, 用于节省能源。
以前的用的液晶都没有这个功能, 第一次见识。
参考: https://blog.csdn.net/chenzhen1080/article/details/54709715
22寸的,华星的组装屏200出头点。这个是我了解的22寸左右最便宜的。
10寸的居然也要毛200啊。。。。 这么贵,估计RGB/MIPI的可能便宜点吧
没办法, 客户只要便宜货,还要耐艹的。
找到一个楼上友达的兼容屏了,80元左右
https://detail.1688.com/offer/587638144808.html
另一家带电容触摸, 150元:
https://detail.1688.com/offer/557211351992.html
楼主最后液晶型号确定下来了吗?
没有呢,这种太贵,最便宜都要接近200元, 直接被老板打枪了。
友达AUO G101STN01 这种兼容屏貌似还行, 阿里巴巴售价 80 - 100块。
这是手册: G101STN01_V2.pdf
谢谢, 围观去。
LG LP101WX1: LP101WX1-SLN2.pdf
AUO B101EW05: B101EW05_V0.pdf
京东方的 BP101WX1-206 兼容 EJ101IA: bp101wx1-206.pdf
但是淘宝/阿里巴巴 价格够乱的, 不知道有没有靠谱的代理商。
https://detail.1688.com/offer/609193712967.html
这家的尺寸有点对不上, 143mm(W) x228mm(V)x2.5mm(T)
-------------------
才发现是 MIPI 接口的, 看来这个 HX010102 用不上了。
1 LCD size 10.1 inch(Diagonal)
2 Driver element a-Si TFT active matrix
3 Resolution 1280 × 3(RGB) × 800
4 Display mode Normally Black, Transmissive
5 Dot pitch 0.0565(W) × 0.1695(H) mm
6 Active area 216.96(W) × 135.60(H) mm
7 Module size 229.46(W) ×149.1(H) ×2.50(D) mm N
8 Surface treatment HC
9 Color arrangement RGB-stripe
10 Interface Digital
11 Backlight power consumption 1.76 W(Typ.)
12 Panel power consumption 0.7W(Typ.) Not
13 Weight 0.183KG(Typ.)
14 inversion 1+2line
15 IC HX8288*4&HX8695*1
手册奉上: EJ101IA-01G_Final_spec_V06_20160923.pdf
找到一些兼容的屏, 我对照过接口/分辨率/尺寸等, 所以更新:
----------------------
群创 EJ101IA: EJ101IA-01G_Final_spec_V06_20160923.pdf
韩国 LG LP101WX1: LP101WX1-SLN2.pdf
友达 AUO B101EW05: B101EW05_V0.pdf
京东方 BP101WX1-206: bp101wx1-206.pdf
翰彩 HSD101PWW1: HSD101PWW1.pdf
群创 EJ101IA
韩国 LG LP101WX1
友达 AUO B101EW05
京东方 BP101WX1-206
翰彩 HSD101PWW1
胸弟, 还是上个GUI吧,哪怕 ugui 也好啊: https://whycan.cn/t_29.html
代码非常的简单: https://github.com/achimdoebler/UGUI
底层只要提供一个画点函数就可以了: https://whycan.cn/t_29.html#p5129
UG_Init(&gui,ssd1325_pset,128,64);
按晕哥的提示,参考了 彩虹派V3s开发板原理图 和 A10 LCD 调试手册 这两份资料,画了块RGB屏转 i80屏的转接板。等打样回来慢慢调~
(图上丝印1脚和常用的线序是反的)
后面成功了吗?原理图是否正确?
https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html
的STM32F303是混合信号微控制器与ARM ® Cortex® -M4芯(具有FPU和DSP指令)在72兆赫运行。
这些是STM32F30x系列中的超集设备设备配备:
高达7倍的快速和超快速比较器(25 ns)
高达4倍的运算放大器,具有可编程增益
多达2个12位DAC
高达5个MSPS的4个超快速12位ADC
多达3个快速144 MHz电机控制定时器(分辨率<7 ns)
全速USB和CAN 2.0B通信接口
核心耦合内存SRAM(Routine Booster),一种特定的内存体系结构可增强对时间要求严格的例程,与闪存执行相比,性能提高了43%
STM32F303微控制器的工作电压为2至3.6伏。
内存范围从32到512 KB,封装范围从32到144引脚。
温度范围为-40至85°C或-40至105°C(结温为125°C)。
确实为电机而生.
@mango 我可以上传 tiny200-sch.pdf
vs工程生成脚本,一个由源文件自动生成vs2012工程的脚本,使用时放到源文件的根目录下,直接执行就可以看到效果了。
由于脚本是python编写的,请先安装python2.
下载地址: https://download.csdn.net/download/ybxuwei/9447004
# vsproj.py
import uuid
import os
import os.path
import re
def write_file(filepath, str):
f = file(filepath, "w")
f.write(str)
f.close()
proj_uuid = str(uuid.uuid1()).upper()
cwd = os.getcwd()
proj_name = cwd[cwd.rfind("\\")+1:]
vs_dir = "vs2012"
# sln
sln = \
"Microsoft Visual Studio Solution File, Format Version 12.00"\
"\n# Visual Studio 2012"\
"\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"$proj_name\", \"vs2012.vcxproj\", \"{$proj_uuid}\""\
"\nEndProject"\
"\nGlobal"\
"\n GlobalSection(SolutionConfigurationPlatforms) = preSolution"\
"\n Debug|Win32 = Debug|Win32"\
"\n Release|Win32 = Release|Win32"\
"\n EndGlobalSection"\
"\n GlobalSection(ProjectConfigurationPlatforms) = postSolution"\
"\n {$proj_uuid}.Debug|Win32.ActiveCfg = Debug|Win32"\
"\n {$proj_uuid}.Release|Win32.ActiveCfg = Debug|Win32"\
"\n EndGlobalSection"\
"\n GlobalSection(SolutionProperties) = preSolution"\
"\n HideSolutionNode = FALSE"\
"\n EndGlobalSection"\
"\nEndGlobal\n"
sln = sln.replace("$proj_uuid", proj_uuid).replace("$proj_name", proj_name)
#print sln
# vcxproj
vcproj = \
"<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
"\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">"\
"\n <ItemGroup Label=\"ProjectConfigurations\">"\
"\n <ProjectConfiguration Include=\"Debug|Win32\">"\
"\n <Configuration>Debug</Configuration>"\
"\n <Platform>Win32</Platform>"\
"\n </ProjectConfiguration>"\
"\n </ItemGroup>"\
"\n <Import Project=\"$(VCTargetsPath)\Microsoft.Cpp.Default.props\" />"\
"\n <Import Project=\"$(VCTargetsPath)\Microsoft.Cpp.props\" />"\
"\n <ImportGroup Label=\"ExtensionSettings\">"\
"\n </ImportGroup> "\
"\n <ImportGroup Label=\"PropertySheets\" Condition=\"\'$(Configuration)|$(Platform)\'==\'Debug|Win32\'\">"\
"\n <Import Project=\"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists(\'$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props\')\" Label=\"LocalAppDataPlatform\" />"\
"\n </ImportGroup>"\
"\n <PropertyGroup Condition=\"\'$(Configuration)|$(Platform)\'==\'Debug|Win32\'\" Label=\"Configuration\">"\
"\n <ConfigurationType>Application</ConfigurationType>"\
"\n <UseDebugLibraries>true</UseDebugLibraries>"\
"\n <PlatformToolset>v110</PlatformToolset>"\
"\n <CharacterSet>MultiByte</CharacterSet>"\
"\n </PropertyGroup>"\
"\n <PropertyGroup Label=\"Globals\">"\
"\n <ProjectGuid>{$proj_uuid}</ProjectGuid>"\
"\n <RootNamespace>vs2012</RootNamespace>"\
"\n <ProjectName>$proj_name</ProjectName>"\
"\n </PropertyGroup>"\
"\n <Import Project=\"$(VCTargetsPath)\Microsoft.Cpp.Default.props\" />"\
"\n <PropertyGroup Condition=\"\'$(Configuration)|$(Platform)\'==\'Debug|Win32\'\" Label=\"Configuration\">"\
"\n <ConfigurationType>Application</ConfigurationType>"\
"\n <UseDebugLibraries>true</UseDebugLibraries>"\
"\n <PlatformToolset>v110</PlatformToolset>"\
"\n <CharacterSet>MultiByte</CharacterSet>"\
"\n </PropertyGroup>"\
"\n <Import Project=\"$(VCTargetsPath)\Microsoft.Cpp.props\" />"\
"\n <ImportGroup Label=\"ExtensionSettings\">"\
"\n </ImportGroup>"\
"\n <ImportGroup Label=\"PropertySheets\" Condition=\"\'$(Configuration)|$(Platform)\'==\'Debug|Win32\'\">"\
"\n <Import Project=\"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists(\'$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props\')\" Label=\"LocalAppDataPlatform\" />"\
"\n </ImportGroup>"\
"\n <PropertyGroup Label=\"UserMacros\" />"\
"\n <PropertyGroup Condition=\"\'$(Configuration)|$(Platform)\'==\'Debug|Win32\'\">"\
"\n <IncludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath)</IncludePath>"\
"\n </PropertyGroup>"\
"\n <ItemDefinitionGroup Condition=\"\'$(Configuration)|$(Platform)\'==\'Debug|Win32\'\">"\
"\n <ClCompile>"\
"\n <WarningLevel>Level3</WarningLevel>"\
"\n <Optimization>Disabled</Optimization>"\
"\n <AdditionalIncludeDirectories>..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>"\
"\n </ClCompile>"\
"\n <Link>"\
"\n <GenerateDebugInformation>true</GenerateDebugInformation>"\
"\n </Link>"\
"\n </ItemDefinitionGroup>"\
"\n <ItemGroup>"\
"$item_list"\
"\n </ItemGroup>"\
"\n <Import Project=\"$(VCTargetsPath)\Microsoft.Cpp.targets\" />"\
"\n <ImportGroup Label=\"ExtensionTargets\">"\
"\n </ImportGroup>"\
"\n</Project>"
#print vcproj
# filters
filters = \
"<?xml version=\"1.0\" encoding=\"utf-8\"?>"\
"\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">"\
"\n <ItemGroup>"\
"$item_groups"\
"\n </ItemGroup>"\
"\n</Project>"
filter_group = \
"\n <Filter Include=\"$dir\">"\
"\n <UniqueIdentifier>{$uuid}</UniqueIdentifier>"\
"\n </Filter>"\
normal_group = \
"\n <$type Include=\"$file\">"\
"\n <Filter>$dir</Filter>"\
"\n </$type>"\
normal_group2 = "\n <$type Include=\"$file\" />"
#print uuid.uuid1()
groups = ""
list = ""
def gen_groups(rootdir):
global groups
global list
c_groups = ""
i_groups = ""
t_groups = ""
f_groups = ""
c_list = ""
i_list = ""
t_list = ""
for parent,dirnames,filenames in os.walk(rootdir):
parent = re.sub(r"^\.\\*", "", parent)
#print parent
for file in filenames:
if len(parent) == 0:
path = "..\\%s"%(file);
else:
path = "..\\%s\\%s"%(parent,file)
if(re.search(r'\.cc$|\.cpp$', file)):
c_groups += normal_group.replace("$type", "ClCompile").replace("$file", path).replace("$dir", parent)
c_list += normal_group2.replace("$type", "ClCompile").replace("$file", path)
if(re.search(r'\.h$', file)):
i_groups += normal_group.replace("$type", "ClInclude").replace("$file", path).replace("$dir", parent)
i_list += normal_group2.replace("$type", "ClInclude").replace("$file", path)
if(re.search(r'\.mk$', file)):
t_groups += normal_group.replace("$type", "Text").replace("$file", path).replace("$dir", parent)
t_list += normal_group2.replace("$type", "Text").replace("$file", path)
for dir in dirnames:
if len(parent) == 0:
path = dir;
else:
path = "%s\\%s"%(parent,dir)
if dir != vs_dir:
f_groups += filter_group.replace("$dir",path).replace("$uuid", str(uuid.uuid1()).upper())
groups = f_groups + i_groups + c_groups + t_groups;
list = c_list + i_list + t_list
gen_groups(".")
print groups
filters = filters.replace("$item_groups", groups)
#print filters
vcproj = vcproj.replace("$proj_uuid", proj_uuid)
vcproj = vcproj.replace("$proj_name", proj_name)
vcproj = vcproj.replace("$item_list", list)
# mkdir vs_dir
if os.path.exists(vs_dir) == False:
os.mkdir(vs_dir)
#gen files
write_file(vs_dir+"\\vs2012.vcxproj.filters",filters)
write_file(vs_dir+"\\vs2012.vcxproj",vcproj)
write_file(vs_dir+"\\vs2012.sln",sln)
自创一体怎么样
对个人几乎不可能,
https://www.zhihu.com/question/19889152
开发字体是一项非常庞大的工程,耗时长、人力多,据说微软雅黑平均每个字造价就在100美元左右。
http://davinci-linux-open-source.1494791.n2.nabble.com/DM365-uvc-gadget-td5992168.html
对USB协议没有研究, 这个问题太难了,等大神帮我填坑,或者以后再说吧
https://linux-sunxi.org/USB_OTG_Controller_Register_Guide
Supports up to 5 user configurable endpoints for bulk, isochronous, control, and interrupt bi-directional transfers
不知道这个补丁有没有用哦: https://gitlab-beta.engr.illinois.edu/ejclark2/linux/commit/f82a689faeb328ba7c194782f42cc438519d508e
musb_writew(hw_ep->regs, MUSB_RXCSR, val);
#ifdef CONFIG_USB_INVENTRA_DMA
if (usb_pipeisoc(pipe)) {
struct usb_iso_packet_descriptor *d;
d = urb->iso_frame_desc + qh->iso_idx;
d->actual_length = xfer_len;
/* even if there was an error, we did the dma
* for iso_frame_desc->length
*/
if (d->status != EILSEQ && d->status != -EOVERFLOW)
d->status = 0;
if (++qh->iso_idx >= urb->number_of_packets)
done = true;
else
done = false;
} else {
/* done if urb buffer is full or short packet is recd */
done = (urb->actual_length + xfer_len >=
urb->transfer_buffer_length
|| dma->actual_len < qh->maxpacket);
}
/* send IN token for next packet, without AUTOREQ */
if (!done) {
if (dma) {
struct dma_controller *c;
u16 rx_count;
int ret;
int ret, length;
dma_addr_t buf;
rx_count = musb_readw(epio, MUSB_RXCOUNT);
c = musb->dma_controller;
if (usb_pipeisoc(pipe)) {
int status = 0;
struct usb_iso_packet_descriptor *d;
d = urb->iso_frame_desc + qh->iso_idx;
if (iso_err) {
status = -EILSEQ;
urb->error_count++;
}
if (rx_count > d->length) {
if (status == 0) {
status = -EOVERFLOW;
urb->error_count++;
}
DBG(2, "** OVERFLOW %d into %d\n",\
rx_count, d->length);
length = d->length;
} else
length = rx_count;
d->status = status;
buf = urb->transfer_dma + d->offset;
} else {
length = rx_count;
buf = urb->transfer_dma +
urb->actual_length;
}
dma->desired_mode = 0;
#ifdef USE_MODE1
/* because of the issue below, mode 1 will
urb->actual_length)
> qh->maxpacket)
dma->desired_mode = 1;
if (rx_count < hw_ep->max_packet_sz_rx) {
length = rx_count;
dma->bDesiredMode = 0;
} else {
length = urb->transfer_buffer_length;
}
#endif
/* Disadvantage of using mode 1:
*/
ret = c->channel_program(
dma, qh->maxpacket,
dma->desired_mode,
urb->transfer_dma
+ urb->actual_length,
(dma->desired_mode == 0)
? rx_count
: urb->transfer_buffer_length);
dma->desired_mode, buf, length);
if (!ret) {
c->channel_release(dma);
}
}
if (dma && usb_pipeisoc(pipe)) {
struct usb_iso_packet_descriptor *d;
int iso_stat = status;
d = urb->iso_frame_desc + qh->iso_idx;
d->actual_length += xfer_len;
if (iso_err) {
iso_stat = -EILSEQ;
urb->error_count++;
}
d->status = iso_stat;
}
finish:
urb->actual_length += xfer_len;
qh->offset += xfer_len;
https://devtalk.nvidia.com/default/topic/1036885/tx1-usb-uvc-gadget-troubles/
问题:
TX1的OTG端口是否支持等时模式?
是否有不同的方法来配置系统以解决此错误?
我可以提供其他日志/信息,以便更容易调试吗?
在设备模式下,OTG端口不支持等时模式。
看来有点悲剧了
# modprobe g_webcam
[ 13.884493] g_webcam gadget: uvc: uvc_function_bind()
[ 13.889574] g_webcam gadget: uvc: Unable to allocate streaming EP
[ 13.895850] g_webcam musb-hdrc.1.auto: failed to start g_webcam: -22
[ 13.905209] g_webcam gadget: uvc: uvc_function_bind()
[ 13.910284] g_webcam gadget: uvc: Unable to allocate streaming EP
[ 13.916566] g_webcam musb-hdrc.1.auto: failed to start g_webcam: -22
modprobe: can't load module g_webcam (kernel/drivers/usb/gadget/legacy/g_webcam.ko): Invalid argument
发现 HI3518 也有一模一样的问题 http://bbs.ebaina.com/thread-39433-1-1.html
试了一下, 这个挂载TF卡成U盘, 卸载U盘挺好用的: https://gist.github.com/nv-h/972ece47ba28c07f825f0b272b71d3c6
usb_config_multi.sh
#!/bin/sh
# https:/github.com/torvalds/linux/blob/master/Documentation/usb/gadget_configfs.txt
# http:/irq5.io/2016/12/22/raspberry-pi-zero-as-multiple-usb-gadgets/
# 上記2つを参考に同時に二つのガジェットを有効化する。
# 1. mass storageで、SDカードをUSBメモリとして見せる
# 2. rndisで、USBをetherデバイスとして見せる
# ドライバを依存関係含めてロード
modprobe usb_f_rndis
modprobe usb_f_mass_storage
# configfsをマウント
mount -t configfs none /sys/kernel/config
# usb_gadgetの下に任意のディレクトリを生成する
g=/sys/kernel/config/usb_gadget/multi
mkdir ${g}
# USBの各種設定(VID/PIDは必須)
echo "64" > ${g}/bMaxPacketSize0
echo "0x200" > ${g}/bcdUSB # USB2.0
echo "0x100" > ${g}/bcdDevice # 適当
echo "0x03FD" > ${g}/idVendor # Xilinx
echo "0x0104" > ${g}/idProduct # Multifunction Composite Gadget
# 複数functionのcomposite USB向けの設定
# refer: https://msdn.microsoft.com/en-us/library/windows/hardware/ff540054.aspx
echo "0xEF" > ${g}/bDeviceClass
echo "0x02" > ${g}/bDeviceSubClass
echo "0x01" > ${g}/bDeviceProtocol
# functionsに登録
mkdir ${g}/functions/rndis.rn0
mkdir ${g}/functions/mass_storage.ms0
# rndis固有の設定(設定しないとランダムなmacアドレスを生成する)
# echo "${dev_mac}" > ${g}/functions/rndis.rn0/dev_addr
# echo "${host_mac}" > ${g}/functions/rndis.rn0/host_addr
# mass storage固有の設定
# fileにストレージとして見せるデバイスを指定する
echo /dev/mmcblk0p1 > ${g}/functions/mass_storage.ms0/lun.0/file
echo 1 > ${g}/functions/mass_storage.ms0/lun.0/removable
# functionとconfigを関連付け
mkdir ${g}/configs/c.1
ln -s ${g}/functions/rndis.rn0 ${g}/configs/c.1/
ln -s ${g}/functions/mass_storage.ms0 ${g}/configs/c.1/
# rndisをwindowsで見えるようにするための設定
echo "1" > ${g}/os_desc/use
echo "0xcd" > ${g}/os_desc/b_vendor_code
echo "MSFT100" > ${g}/os_desc/qw_sign
echo "RNDIS" > ${g}/functions/rndis.rn0/os_desc/interface.rndis/compatible_id
echo "5162001" > ${g}/functions/rndis.rn0/os_desc/interface.rndis/sub_compatible_id
ln -s ${g}/configs/c.1 ${g}/os_desc
# デバイス有効化
echo "ci_hdrc.0" > ${g}/UDC
usb_remove_multi.sh
#!/bin/sh
# https://github.com/torvalds/linux/blob/master/Documentation/usb/gadget_configfs.txt
# http://irq5.io/2016/12/22/raspberry-pi-zero-as-multiple-usb-gadgets/
# 上記を参考にusb_config_multi.shで追加したガジェット2つを無効化する。
# ガジェットを無効化
g=/sys/kernel/config/usb_gadget/multi
echo "" > ${g}/UDC
# functionsのsimlink先を削除
rm ${g}/os_desc/c.1
rm ${g}/configs/c.1/rndis.rn0
rm ${g}/configs/c.1/mass_storage.ms0
# Configurationsを削除
rmdir ${g}/configs/c.1/
# functionsのsimlink元を削除
rmdir ${g}/functions/rndis.rn0
rmdir ${g}/functions/mass_storage.ms0
# gadget本体を削除
rmdir ${g}
# ドライバを依存関係含めてアンロード
modprobe -r usb_f_rndis
modprobe -r usb_f_mass_storage
# configfsをアンマウント
umount /sys/kernel/config
挂载好用, 卸载也是干干净净的。
usb gadget configfs 验证: http://wowothink.com/a64c6a27/
按照上一篇文章对gadget_configfs.txt的翻译,以imx8qxp mek的板子做为验证,配置为mass storage进行验证。
内核打开对应的宏
1、必须打开CONFIG_CONFIGFS_FS和CONFIG_USB_LIBCOMPOSITE的宏,前者为用户空间提供访问配置内核驱动的configfs文件系统,后者提供usb gadget composite框架;
2、必须打开UDC(USB Device Controller)的配置,这个是配置硬件控制器。我这里使用CONFIG_USB_CHIPIDEA和CONFIG_USB_CHIPIDEA_UDC;
3、如果使用mass storage功能,需要打开USB_CONFIGFS_MASS_STORAGE和USB_F_MASS_STORAGE,对应于usb_f_mass_storage.ko驱动。
配置步骤
挂载configfs:mount -t configfs none /config/,在这之后,/configfs/目录下就会生成usb_gadget/目录;
创建gadget:mkdir usb_gadget/g1,创建g1/目录之后,该目录下会生成很多配置目录,这里的g1表示gadget 1,一个UDC对应一个gadget,如果你的SOC上有多个gadget,可以创建多个gx目录。
# ll usb_gadget/g1/
total 0
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 UDC
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 bDeviceClass
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 bDeviceProtocol
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 bDeviceSubClass
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 bMaxPacketSize0
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 bcdDevice
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 bcdUSB
drwxr-xr-x 2 root root 0 1999-11-30 00:02 configs
drwxr-xr-x 2 root root 0 1999-11-30 00:02 functions
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 idProduct
-rw-r--r-- 1 root root 4096 1999-11-30 00:02 idVendor
drwxr-xr-x 2 root root 0 1999-11-30 00:02 os_desc
drwxr-xr-x 2 root root 0 1999-11-30 00:02 strings
配置PID和VID
# echo 0x18d1 > usb_gadget/g1/idVendor
# echo 0x4ee2 > usb_gadget/g1/idProduct
创建并配置string字目录
# mkdir usb_gadget/g1/strings/0x409
# echo "123456789" > usb_gadget/g1/strings/0x409/serialnumber
# echo "xxx" > usb_gadget/g1/strings/0x409/manufacturer
# echo "xxx_product" > usb_gadget/g1/strings/0x409/product
创建configuration和字符串
# mkdir usb_gadget/g1/configs/c.1
# mkdir usb_gadget/g1/configs/c.1/strings/0x409
# echo "mass_storage" > usb_gadget/g1/configs/c.1/strings/0x409/configuration
创建functions
# mkdir usb_gadget/g1/functions/mass_storage.0
[ 108.582976] [1: mkdir: 1976] Mass Storage Function, version: 2009/09/11
[ 108.592679] [1: mkdir: 1976] LUN: removable file: (no medium)
这里的mass_storage的名字不能随便起,需要根据insmod的function驱动usb_f_mass_storage.ko来决定。否则会出现如下错误:
1|@android:/config # mkdir usb_gadget/g1/functions/msg.0
mkdir: 'usb_gadget/g1/functions/msg.0': No such file or directory
将functions和configuration关联起来
# ln -s usb_gadget/g1/functions/mass_storage.0 usb_gadget/g1/configs/c.1
上述配置之后,得到的结果为:
127|@android:/config # find .
.
./usb_gadget
./usb_gadget/g1
./usb_gadget/g1/os_desc
./usb_gadget/g1/os_desc/qw_sign
./usb_gadget/g1/os_desc/b_vendor_code
./usb_gadget/g1/os_desc/use
./usb_gadget/g1/strings
./usb_gadget/g1/strings/0x409
./usb_gadget/g1/strings/0x409/serialnumber
./usb_gadget/g1/strings/0x409/product
./usb_gadget/g1/strings/0x409/manufacturer
./usb_gadget/g1/configs
./usb_gadget/g1/configs/c.1
./usb_gadget/g1/configs/c.1/mass_storage.0
./usb_gadget/g1/configs/c.1/strings
./usb_gadget/g1/configs/c.1/strings/0x409
./usb_gadget/g1/configs/c.1/strings/0x409/configuration
./usb_gadget/g1/configs/c.1/bmAttributes
./usb_gadget/g1/configs/c.1/MaxPower
./usb_gadget/g1/functions
./usb_gadget/g1/functions/mass_storage.0
./usb_gadget/g1/functions/mass_storage.0/lun.0
./usb_gadget/g1/functions/mass_storage.0/lun.0/inquiry_string
./usb_gadget/g1/functions/mass_storage.0/lun.0/nofua
./usb_gadget/g1/functions/mass_storage.0/lun.0/cdrom
./usb_gadget/g1/functions/mass_storage.0/lun.0/removable
./usb_gadget/g1/functions/mass_storage.0/lun.0/ro
./usb_gadget/g1/functions/mass_storage.0/lun.0/file
./usb_gadget/g1/functions/mass_storage.0/stall
./usb_gadget/g1/UDC
./usb_gadget/g1/bcdUSB
./usb_gadget/g1/bcdDevice
./usb_gadget/g1/idProduct
./usb_gadget/g1/idVendor
./usb_gadget/g1/bMaxPacketSize0
./usb_gadget/g1/bDeviceProtocol
./usb_gadget/g1/bDeviceSubClass
./usb_gadget/g1/bDeviceClass
查看当前的UDC
可见当前的板子上有两个UDC,ci_hdrc.0和gadget-cdns3。
130|@android:/config # ll /sys/class/udc/
total 0
lrwxrwxrwx 1 root root 0 1999-11-30 00:09 ci_hdrc.0 -> ../../devices/platform/5b0d0000.usb/ci_hdrc.0/udc/ci_hdrc.0
lrwxrwxrwx 1 root root 0 1999-11-30 00:09 gadget-cdns3 -> ../../devices/platform/5b110000.usb3/gadget-cdns3/udc/gadget-cdns3
绑定到UDC,使能gadget
将UDC切换至device模式,这里使用OTG ID pin来实现切换。
# echo ci_hdrc.0 > usb_gadget/g1/UDC
# echo 1 > /sys/class/gpio/gpio358/value
验证结果
将配置好的开发板与ubuntu连接,从ubuntu上的串口可以看到如下信息,表示已将开发板配置成一个mass storage的设备了。
[95705.390004] usb 1-11: USB disconnect, device number 28
[95708.606717] usb 1-11: new high-speed USB device number 29 using xhci_hcd
[95708.756934] usb 1-11: New USB device found, idVendor=18d1, idProduct=4ee2
[95708.756941] usb 1-11: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[95708.756946] usb 1-11: Product: xxx_product
[95708.756950] usb 1-11: Manufacturer: xxx
[95708.756953] usb 1-11: SerialNumber: 123456789
[95708.766595] usb-storage 1-11:1.0: USB Mass Storage device detected
[95708.766798] scsi host6: usb-storage 1-11:1.0
当然,上述的结果是ubuntu只识别到一个mass storage的设备,但是没有识别看分区表,所以没有看到相应的磁盘信息。想要看到磁盘信息,可以更进一步的设置mass_storage的backen file属性。
定制分区
在上面创建functions步骤之后,执行以下的命令,为mass storage创建2个分区,分区的backing file是开发板上的/dev/block/mmcblk0p1和/dev/block/mmcblk0p2,也就是开发板上的system分区和data分区。
mkdir usb_gadget/g1/functions/mass_storage.0/partition.2
mkdir usb_gadget/g1/functions/mass_storage.0/lun.1
echo /dev/block/mmcblk0p1 > usb_gadget/g1/functions/mass_storage.0/lun.0/file
echo /dev/block/mmcblk0p2 > usb_gadget/g1/functions/mass_storage.0/lun.1/file
所有配置完成之后,插入到ubuntu后,可以看到能识别去新的分区信息:
130 victor@victor-HP:/mnt⟫ sudo dmesg -c
[40873.009026] EXT4-fs (sdc): mounted filesystem with ordered data mode. Opts: (null)
[41094.127318] usb 1-11: USB disconnect, device number 23
[41094.128072] print_req_error: I/O error, dev sdc, sector 0
[41094.131049] sd 6:0:0:0: [sdc] Synchronizing SCSI cache
[41094.131118] sd 6:0:0:0: [sdc] Synchronize Cache(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[41466.480635] usb 1-11: new high-speed USB device number 24 using xhci_hcd
[41466.630904] usb 1-11: New USB device found, idVendor=18d1, idProduct=4ee2
[41466.630911] usb 1-11: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[41466.630915] usb 1-11: Product: xxx_product
[41466.630919] usb 1-11: Manufacturer: xxx
[41466.630923] usb 1-11: SerialNumber: 123456789
[41466.640789] usb-storage 1-11:1.0: USB Mass Storage device detected
[41466.641062] scsi host7: usb-storage 1-11:1.0
[41467.645699] scsi 7:0:0:0: Direct-Access Linux File-Stor Gadget 0414 PQ: 0 ANSI: 2
[41467.646291] scsi 7:0:0:1: Direct-Access Linux File-Stor Gadget 0414 PQ: 0 ANSI: 2
[41467.646826] scsi 7:0:0:2: Direct-Access Linux File-Stor Gadget 0414 PQ: 0 ANSI: 2
[41467.647387] sd 7:0:0:0: Attached scsi generic sg2 type 0
[41467.647764] sd 7:0:0:1: Attached scsi generic sg3 type 0
[41467.648144] sd 7:0:0:0: Power-on or device reset occurred
[41467.648173] sd 7:0:0:2: Attached scsi generic sg4 type 0
[41467.649026] sd 7:0:0:1: Power-on or device reset occurred
[41467.649555] sd 7:0:0:2: Power-on or device reset occurred
[41467.650006] sd 7:0:0:0: [sdd] 1048576 512-byte logical blocks: (537 MB/512 MiB)
[41467.650766] sd 7:0:0:1: [sde] 524288 512-byte logical blocks: (268 MB/256 MiB)
[41467.651726] sd 7:0:0:0: [sdd] Write Protect is off
[41467.651731] sd 7:0:0:0: [sdd] Mode Sense: 0f 00 00 00
[41467.651929] sd 7:0:0:1: [sde] Write Protect is off
[41467.651933] sd 7:0:0:1: [sde] Mode Sense: 0f 00 00 00
[41467.652327] sd 7:0:0:2: [sdf] Attached SCSI removable disk
[41467.652581] sd 7:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[41467.652837] sd 7:0:0:1: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[41467.673305] sd 7:0:0:1: [sde] Attached SCSI removable disk
[41467.674915] sd 7:0:0:0: [sdd] Attached SCSI removable disk
参考
上述的配置过程太繁琐了,在Android上,基于configfs有专门的init.rc在启动过程中去配置对应的configuration和function,比如说init.usb.rc,里面包含了一系列gadget的配置方法。在后面的文章中,将详细讲述每条命令背后的实现原理。
on boot
write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
setprop sys.usb.configfs 1
# OS DESCRIPTORS
#===============
# OS STRING
#----------
write /config/usb_gadget/g1/os_desc/b_vendor_code 1
write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
# use os desc or not is up to each usb functions respectively
# write /config/usb_gadget/g1/os_desc/use 1
# MAKE b.1 THE ONE ASSOCIATED WITH OS DESCRIPTORS
#------------------------------------------------
symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b1
# ci_hdrc.0 is the fixed UDC name
setprop sys.usb.controller ci_hdrc.0
on fs
mkdir /dev/usb-ffs 0770 shell shell
mkdir /dev/usb-ffs/adb 0770 shell shell
# mount the configfs on /config
mount configfs none /config mode=0755
mkdir /config/usb_gadget/g1
mkdir /config/usb_gadget/g1/configs/b.1
# mkdir for functions needed
# this will call each gadget's alloc_inst()
mkdir /config/usb_gadget/g1/functions/ffs.adb
mkdir /config/usb_gadget/g1/functions/mtp.gs0
mkdir /config/usb_gadget/g1/functions/ptp.gs1
mkdir /config/usb_gadget/g1/functions/accessory.gs2
mkdir /config/usb_gadget/g1/functions/audio_source.gs3
mkdir /config/usb_gadget/g1/functions/rndis.gs4
mkdir /config/usb_gadget/g1/functions/midi.gs5
mkdir /config/usb_gadget/g1/strings/0x409
mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409
# The mount of functionfs for adb must be put AFTER the mkdir for functions in configfs
on property:sys.usb.config=none && property:sys.usb.configfs=1
write /config/usb_gadget/g1/os_desc/use 0
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1
write /config/usb_gadget/g1/idProduct 0x4ee7
write /config/usb_gadget/g1/idVendor 0x18d1
on property:sys.usb.config=mtp && property:sys.usb.configfs=1
write /config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP/compatible_id "MTP"
write /config/usb_gadget/g1/os_desc/use 1
write /config/usb_gadget/g1/idProduct 0x4ee1
write /config/usb_gadget/g1/idVendor 0x18d1
linux usb gadget驱动简直太好用, 随便配置一下就是一个复合USB设备, 这是我的 S5PV210 开发板。
https://www.kernel.org/doc/Documentation/usb/gadget_configfs.txt
mount -t configfs none /sys/kernel/config
modprobe libcomposite
modprobe usb_f_serial
modprobe usb_f_fs
modprobe usb_f_hid
modprobe usb_f_acm
sleep 2
cd /sys/kernel/config/usb_gadget/
if [ ! -d /sys/kernel/config/usb_gadget/g1 ]; then
mkdir g1
cd g1
echo 0x8087 > idVendor
echo 0x101e > idProduct
mkdir strings/0x409
echo 012345678 > strings/0x409/serialnumber
echo Intel > strings/0x409/manufacturer
echo IoTplatform > strings/0x409/product
mkdir functions/acm.GS0
mkdir functions/ffs.adb
mkdir functions/hid.usb0
# setup hid parameters for the keyboard function
echo 1 > functions/hid.usb0/protocol
echo 1 > functions/hid.usb0/subclass
echo 8 > functions/hid.usb0/report_length
echo -ne "\x05\x01\x09\x06\xA1\x01\x05\x07\x19\xE0\x29\xE7\x15\x00\x25\x01\x75\x01\x95\x08\x81\x02\x95\x01\x75\x08\x81\x03\x95\x05\x75\x01\x05\x08\x19\x01\x29\x05\x91\x02\x95\x01\x75\x03\x91\x03\x95\x06\x75\x08\x15\x00\x25\x65\x05\x07\x19\x00\x29\x65\x81\x00\xC0" > functions/hid.usb0/report_desc
mkdir configs/c.1
mkdir configs/c.1/strings/0x409
echo "adb+cdc" > configs/c.1/strings/0x409/configuration
echo 120 > configs/c.1/MaxPower
ln -s functions/acm.GS0 configs/c.1
ln -s functions/ffs.adb/ configs/c.1
ln -s functions/hid.usb0 configs/c.1/
mkdir /dev/usb-ffs
mkdir /dev/usb-ffs/adb
mount -t functionfs adb /dev/usb-ffs/adb
adbd &
fi
echo s3c-hsotg > UDC
https://lkcamp.gitlab.io/lkcamp_docs/unicamp_group/workshop-v4l/
关于 vivid ffplay 使用文章
Linux摄像头驱动学习第一篇,对虚拟视频驱动Virtual Video Driver(vivid)进行测试、分析、编写。
多谢分享,准备试试UVC
不用谢, 一起学习.
https://www.kernel.org/doc/Documentation/usb/gadget-testing.txt
# mkdir functions/uvc.usb0/control/header/h
# cd functions/uvc.usb0/control/
# ln -s header/h class/fs
# ln -s header/h class/ss
# mkdir -p functions/uvc.usb0/streaming/uncompressed/u/360p
# cat <<EOF > functions/uvc.usb0/streaming/uncompressed/u/360p/dwFrameInterval
666666
1000000
5000000
EOF
# cd $GADGET_CONFIGFS_ROOT
# mkdir functions/uvc.usb0/streaming/header/h
# cd functions/uvc.usb0/streaming/header/h
# ln -s ../../uncompressed/u
# cd ../../class/fs
# ln -s ../../header/h
# cd ../../class/hs
# ln -s ../../header/h
# cd ../../class/ss
# ln -s ../../header/h
Testing the UVC function
------------------------
device: run the gadget, modprobe vivid::
# uvc-gadget -u /dev/video<uvc video node #> -v /dev/video<vivid video node #>
where uvc-gadget is this program:
http://git.ideasonboard.org/uvc-gadget.git
with these patches:
http://www.spinics.net/lists/linux-usb/msg99220.html
host::
luvcview -f yuv
把板载摄像头转为USB摄像头.
仔细看: U-Boot的编译和填坑
https://www.spinics.net/lists/linux-usb/msg155033.html
mount -t debugfs debugfs /mnt/
echo "device" > /mnt/488d0000.usb/mode
modprobe -v configfs
modprobe -v libcomposite
sleep 2
cd /sys/kernel/config/usb_gadget
mkdir g1
cd g1
echo "0x1d6b" > idVendor
echo "0x0104" > idProduct
mkdir strings/0x409
echo "0123456789" > strings/0x409/serialnumber
echo "TI Inc." > strings/0x409/manufacturer
echo "MS+UVC gadget" > strings/0x409/product
modprobe -v usb_f_mass_storage
mkdir functions/mass_storage.ms0
# create backing store(s): in this example 2 LUN's 16MB each
dd bs=1M count=16 if=/dev/zero of=/tmp/lun0.img # 16MB
chmod 777 /tmp/lun0.img
modprobe -v usb_f_uvc
mkdir functions/uvc.usb0
mkdir configs/c.1
mkdir configs/c.1/strings/0x409
echo "mass-storage + uvc" > configs/c.1/strings/0x409/configuration
echo 120 > configs/c.1/MaxPower
mkdir functions/uvc.usb0/control/header/h
cd functions/uvc.usb0/control/
ln -s header/h class/fs
ln -s header/h class/ss
cd ../../../
mkdir -p functions/uvc.usb0/streaming/uncompressed/u/360p
cat <<EOF > functions/uvc.usb0/streaming/uncompressed/u/360p/dwFrameInterval
666666
1000000
5000000
EOF
mkdir functions/uvc.usb0/streaming/header/h
cd functions/uvc.usb0/streaming/header/h
ln -s ../../uncompressed/u
cd ../../class/fs
ln -s ../../header/h
cd ../../class/hs
ln -s ../../header/h
cd ../../../control
cd ../../../
echo /tmp/lun0.img > functions/mass_storage.ms0/lun.0/file
echo 1 > functions/mass_storage.ms0/lun.0/removable
ln -s functions/mass_storage.ms0 configs/c.1/
ln -s functions/uvc.usb0 configs/c.1/
echo "488d0000.usb" > UDC
mass_storage 和 uvc 摄像头的复合设备
实现两个独立的U盘:
# mount configfs
mount -t configfs none /sys/kernel/config
# load libcomposite module
modprobe libcomposite
# create a gadget
mkdir /sys/kernel/config/usb_gadget/g1
# cd to its configfs node
cd /sys/kernel/config/usb_gadget/g1
# configure it (vid/pid can be anything if USB Class is used for driver compat)
echo 0xabcd > idVendor
echo 0x1234 > idProduct
# configure its serial/mfg/product
mkdir strings/0x409
echo myserial > strings/0x409/serialnumber
echo mymfg > strings/0x409/manufacturer
echo myproduct > strings/0x409/product
# create configs
mkdir configs/c.1
mkdir configs/c.2
mkdir configs/c.3
# configure them with attributes if needed
echo 120 > configs/c.1/MaxPower
echo 120 > configs/c.2/MaxPower
echo 120 > configs/c.2/MaxPower
# ensure function is loaded
modprobe usb_f_mass_storage
# create the function (name must match a usb_f_<name> module such as 'acm')
mkdir functions/mass_storage.0
# create backing store(s): in this example 2 LUN's 16MB each
dd bs=1M count=16 if=/dev/zero of=/tmp/lun0.img # 16MB
dd bs=1M count=16 if=/dev/zero of=/tmp/lun1.img # 16MB
# associate with partitions
mkdir functions/mass_storage.0/lun.0
echo /tmp/lun0.img > functions/mass_storage.0/lun.0/file
mkdir functions/mass_storage.0/lun.1
echo /tmp/lun1.img > functions/mass_storage.0/lun.1/file
# associate function with config
ln -s functions/mass_storage.0 configs/c.1
# enable gadget by binding it to a UDC from /sys/class/udc
echo 0000:01:00.0 > UDC
# to unbind it: echo "" UDC; sleep 1; rm -rf /sys/kernel/config/usb_gadget/g1
emmm,不是很了解Saleae的逻辑分析仪,不过可以试试基于sigrok的PulseView?这个软件应该是可以分析SD card信号的,而且据说和Saleae的兼容性不错。
我佛了, 支持辣么多硬件 https://sigrok.org/wiki/Supported_hardware
下载一个试一试
貌似不能同时 装两个 gadget 驱动:
会出现一个错误:
# modprobe g_mass_storage file=/dev/mmcblk0 removable=1
[ 877.681949] udc-core: couldn't find an available UDC - added [g_mass_storage] to list of pending drivers
然后还不能动态卸载 g_ffs 驱动:
# rmmod g_ffs
rmmod: can't unload module 'g_ffs': Resource temporarily unavailable
即使 kill 了 adbd 也一样的错误.
请问楼主和各位大神,怎么解决呢?
难道我用了一个假的百毒 https://www.baidu.com/s?wd=littlevgl
stm32 多呢
刚刚试了一下安卓机, 用 adb shell 命令注入或者读取 event* 设备不需要 root, 可以直接操作, 怪不得那么多游戏外挂
可以试一试这个 https://stackoverflow.com/questions/4386449/send-touch-events-to-a-device-via-adb
https://stackoverflow.com/questions/688760/how-to-create-a-utf-8-string-literal-in-visual-c-2008
#pragma execution_character_set("utf-8")
这个挺好用的, 一般人我不告诉他, 斜眼笑.gif
https://github.com/ponty/framebuffer-vncserver
我现在用这个 demo 在 ubuntu 跑起来 demo
但是不能输入:
firstman@ubuntu:/opt/framebuffer-vncserver/build$ sudo ./framebuffer-vncserver
Initializing framebuffer device /dev/fb0...
xres=800, yres=600, xresv=2048, yresv=1920, xoffs=0, yoffs=0, bpp=32
offset:length red=16:8 green=8:8 blue=0:8
No touch device
Initializing VNC server:
width: 800
height: 600
bpp: 32
port: 5900
Initializing server...
24/08/2019 11:08:40 Listening for VNC connections on TCP port 5900
24/08/2019 11:08:40 Listening for VNC connections on TCP6 port 5900
24/08/2019 11:16:22 Got connection from client 192.168.1.189
24/08/2019 11:16:22 other clients:
24/08/2019 11:16:22 Normal socket connection
24/08/2019 11:16:22 Client Protocol Version 3.3
24/08/2019 11:16:22 Protocol version sent 3.3, using 3.3
24/08/2019 11:16:23 Pixel format for client 192.168.1.189:
24/08/2019 11:16:23 32 bpp, depth 32, little endian
24/08/2019 11:16:23 true colour: max r 31 g 31 b 31, shift r 0 g 5 b 10
24/08/2019 11:16:23 no translation needed
24/08/2019 11:16:23 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000003)
24/08/2019 11:16:23 Using hextile encoding for client 192.168.1.189
请问楼主, No touch device 如何解决?
代码在这里: https://github.com/ponty/framebuffer-vncserver/blob/master/src/framebuffer-vncserver.c
奇怪, rootfs 里面没有发现 run_adbd.sh
https://github.com/rockchip-linux/linux-adb/raw/master/run_adbd.sh
#! /bin/sh
UDC=`ls /sys/class/udc/| awk '{print $1}'`
mkdir /dev/usb-ffs -m 0770
mkdir /dev/usb-ffs/adb -m 0770
mkdir /sys/kernel/config/usb_gadget/g1 -m 0770
sleep 1
echo 0x2207 > /sys/kernel/config/usb_gadget/g1/idVendor
echo 0x0006 > /sys/kernel/config/usb_gadget/g1/idProduct
mkdir /sys/kernel/config/usb_gadget/g1/strings/0x409 -m 0770
sleep 1
echo "0123456789ABCDEF" > /sys/kernel/config/usb_gadget/g1/strings/0x409/serialnumber
echo "rockchip" > /sys/kernel/config/usb_gadget/g1/strings/0x409/manufacturer
echo "rk3xxx" > /sys/kernel/config/usb_gadget/g1/strings/0x409/product
sleep 1
mkdir /sys/kernel/config/usb_gadget/g1/functions/ffs.adb
mkdir /sys/kernel/config/usb_gadget/g1/configs/b.1 -m 0770
mkdir /sys/kernel/config/usb_gadget/g1/configs/b.1/strings/0x409 -m 0770
sleep 1
ln -s /sys/kernel/config/usb_gadget/g1/functions/ffs.adb /sys/kernel/config/usb_gadget/g1/configs/b.1
echo "adb" > /sys/kernel/config/usb_gadget/g1/configs/b.1/strings/0x409/configuration
mount -t functionfs adb /dev/usb-ffs/adb
adbd &
这个弄进去有问题,:
# run_adbd.sh
mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1': No such file or directory
/bin/run_adbd.sh: line 12: can't create /sys/kernel/config/usb_gadget/g1/idVendor: nonexistent directory
/bin/run_adbd.sh: line 13: can't create /sys/kernel/config/usb_gadget/g1/idProduct: nonexistent directory
mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1/strings/0x409': No such file or directory
/bin/run_adbd.sh: line 19: can't create /sys/kernel/config/usb_gadget/g1/strings/0x409/serialnumber: nonexistent directory
/bin/run_adbd.sh: line 20: can't create /sys/kernel/config/usb_gadget/g1/strings/0x409/manufacturer: nonexistent directory
/bin/run_adbd.sh: line 21: can't create /sys/kernel/config/usb_gadget/g1/strings/0x409/product: nonexistent directory
mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1/functions/ffs.adb': No such file or directory
mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1/configs/b.1': No such file or directory
mkdir: can't create directory '/sys/kernel/config/usb_gadget/g1/configs/b.1/strings/0x409': No such file or directory
ln: /sys/kernel/config/usb_gadget/g1/configs/b.1: No such file or directory
/bin/run_adbd.sh: line 32: can't create /sys/kernel/config/usb_gadget/g1/configs/b.1/strings/0x409/configuration: nonexistent directory
[ 952.353269] ------------[ cut here ]------------
[ 952.357969] WARNING: CPU: 0 PID: 143 at fs/filesystems.c:282 get_fs_type+0xf8/0x110
[ 952.365750] request_module fs-functionfs succeeded, but still no fs?
[ 952.372147] Modules linked in: usb_f_fs libcomposite
[ 952.377148] CPU: 0 PID: 143 Comm: mount Not tainted 4.14.0-licheepi-nano #7
[ 952.384130] Hardware name: Allwinner suniv Family
[ 952.388914] [<c010e8c0>] (unwind_backtrace) from [<c010ba10>] (show_stack+0x10/0x14)
[ 952.396730] [<c010ba10>] (show_stack) from [<c0116a74>] (__warn+0xd4/0xfc)
[ 952.403660] [<c0116a74>] (__warn) from [<c0116ad4>] (warn_slowpath_fmt+0x38/0x48)
[ 952.411202] [<c0116ad4>] (warn_slowpath_fmt) from [<c01e618c>] (get_fs_type+0xf8/0x110)
[ 952.419223] [<c01e618c>] (get_fs_type) from [<c01e9478>] (do_mount+0x1c0/0xb58)
[ 952.426589] [<c01e9478>] (do_mount) from [<c01ea148>] (SyS_mount+0x54/0xc0)
[ 952.433606] [<c01ea148>] (SyS_mount) from [<c0108060>] (ret_fast_syscall+0x0/0x44)
[ 952.441201] ---[ end trace 803250e82eace444 ]---
mount: /dev/usb-ffs/adb: unknown filesystem type 'functionfs'.
# install_listener('tcp:5037','*smartsocket*')
Using USB
有一个相关的讨论, 替换 cmd.exe ???
https://sourceforge.net/p/dev-cpp/discussion/48211/thread/74bf277a/
我这里不知道什么原因,Dev-C++默认生成的Makefike就能用。或许,你可以试试把最后那条命令拿出来?
最后那个命令单独拿出来放 mintty.exe (git 自带shell) 可以成功链接 ucgui.exe
找到晕哥这个相似问题的帖子了:
windows平台编译XBoot test-lvgl分支, 链接出错(error: CreateProcess)的原因
https://whycan.cn/t_995.html
gcc.exe Application/GUIDemo/GUIDEMO.o Application/GUIDemo/GUIDEMO_Automotive.o Application/GUIDemo/GUIDEMO_Bitmap.o Application/GUIDemo/GUIDEMO_Bitmap4bpp.o Application/GUIDemo/GUIDEMO_Circle.o Application/GUIDemo/GUIDEMO_ColorBar.o Application/GUIDemo/GUIDEMO_ColorList.o Application/GUIDemo/GUIDEMO_Cursor.o Application/GUIDemo/GUIDEMO_Dialog.o Application/GUIDemo/GUIDEMO_Font.o Application/GUIDemo/GUIDEMO_FrameWin.o Application/GUIDemo/GUIDEMO_Graph.o Application/GUIDemo/GUIDEMO_HardwareInfo.o Application/GUIDemo/GUIDEMO_Intro.o Application/GUIDemo/GUIDEMO_LUT.o Application/GUIDemo/GUIDEMO_MemDevB.o Application/GUIDemo/GUIDEMO_Messagebox.o Application/GUIDemo/GUIDEMO_Navi.o Application/GUIDemo/GUIDEMO_Polygon.o Application/GUIDemo/GUIDEMO_ProgBar.o Application/GUIDemo/GUIDEMO_Speed.o Application/GUIDemo/GUIDEMO_Touch.o Application/GUIDemo/GUIDEMO_WM.o Application/GUIDemo/MainTask.o Application/GUIDemo/MicriumLogo.o Application/GUIDemo/MicriumLogoWRed.o GUI/AntiAlias/GUIAAArc.o GUI/AntiAlias/GUIAAChar.o GUI/AntiAlias/GUIAAChar2.o GUI/AntiAlias/GUIAAChar4.o GUI/AntiAlias/GUIAACircle.o GUI/AntiAlias/GUIAALib.o GUI/AntiAlias/GUIAALine.o GUI/AntiAlias/GUIAAPoly.o GUI/AntiAlias/GUIAAPolyOut.o GUI/ConvertColor/LCDP111.o GUI/ConvertColor/LCDP222.o GUI/ConvertColor/LCDP233.o GUI/ConvertColor/LCDP323.o GUI/ConvertColor/LCDP332.o GUI/ConvertColor/LCDP444_12.o GUI/ConvertColor/LCDP444_12_1.o GUI/ConvertColor/LCDP444_16.o GUI/ConvertColor/LCDP555.o GUI/ConvertColor/LCDP556.o GUI/ConvertColor/LCDP565.o GUI/ConvertColor/LCDP655.o GUI/ConvertColor/LCDP666.o GUI/ConvertColor/LCDP888.o GUI/ConvertColor/LCDP8666.o GUI/ConvertColor/LCDP8666_1.o GUI/ConvertColor/LCDPM233.o GUI/ConvertColor/LCDPM323.o GUI/ConvertColor/LCDPM332.o GUI/ConvertColor/LCDPM444_12.o GUI/ConvertColor/LCDPM444_16.o GUI/ConvertColor/LCDPM555.o GUI/ConvertColor/LCDPM556.o GUI/ConvertColor/LCDPM565.o GUI/ConvertColor/LCDPM655.o GUI/ConvertColor/LCDPM666.o GUI/ConvertColor/LCDPM888.o GUI/ConvertMono/LCDP0.o GUI/ConvertMono/LCDP2.o GUI/ConvertMono/LCDP4.o GUI/Core/GUI__AddSpaceHex.o GUI/Core/GUI__Arabic.o GUI/Core/GUI__CalcTextRect.o GUI/Core/GUI__DivideRound.o GUI/Core/GUI__DivideRound32.o GUI/Core/GUI__DrawBitmap16bpp.o GUI/Core/GUI__GetCursorPos.o GUI/Core/GUI__GetFontSizeY.o GUI/Core/GUI__GetNumChars.o GUI/Core/GUI__HandleEOLine.o GUI/Core/GUI__IntersectRect.o GUI/Core/GUI__IntersectRects.o GUI/Core/GUI__memset.o GUI/Core/GUI__memset16.o GUI/Core/GUI__Read.o GUI/Core/GUI__ReduceRect.o GUI/Core/GUI__SetText.o GUI/Core/GUI__strcmp.o GUI/Core/GUI__strlen.o GUI/Core/GUI__Wrap.o GUI/Core/GUI_AddBin.o GUI/Core/GUI_AddDec.o GUI/Core/GUI_AddDecMin.o GUI/Core/GUI_AddDecShift.o GUI/Core/GUI_AddHex.o GUI/Core/GUI_AddKeyMsgHook.o GUI/Core/GUI_ALLOC_AllocInit.o GUI/Core/GUI_ALLOC_AllocZero.o GUI/Core/GUI_BMP.o GUI/Core/GUI_BMP_Serialize.o GUI/Core/GUI_CalcColorDist.o GUI/Core/GUI_ClearRectEx.o GUI/Core/GUI_Color2VisColor.o GUI/Core/GUI_CursorArrowL.o GUI/Core/GUI_CursorArrowLI.o GUI/Core/GUI_CursorArrowLPx.o GUI/Core/GUI_CursorArrowM.o GUI/Core/GUI_CursorArrowMI.o GUI/Core/GUI_CursorArrowMPx.o GUI/Core/GUI_CursorArrowS.o GUI/Core/GUI_CursorArrowSI.o GUI/Core/GUI_CursorArrowSPx.o GUI/Core/GUI_CursorCrossL.o GUI/Core/GUI_CursorCrossLI.o GUI/Core/GUI_CursorCrossLPx.o GUI/Core/GUI_CursorCrossM.o GUI/Core/GUI_CursorCrossMI.o GUI/Core/GUI_CursorCrossMPx.o GUI/Core/GUI_CursorCrossS.o GUI/Core/GUI_CursorCrossSI.o GUI/Core/GUI_CursorCrossSPx.o GUI/Core/GUI_CursorHeaderM.o GUI/Core/GUI_CursorHeaderMI.o GUI/Core/GUI_CursorHeaderMPx.o GUI/Core/GUI_CursorPal.o GUI/Core/GUI_CursorPalI.o GUI/Core/GUI_DispBin.o GUI/Core/GUI_DispCEOL.o GUI/Core/GUI_DispChar.o GUI/Core/GUI_DispChars.o GUI/Core/GUI_DispHex.o GUI/Core/GUI_DispString.o GUI/Core/GUI_DispStringAt.o GUI/Core/GUI_DispStringAtCEOL.o GUI/Core/GUI_DispStringHCenter.o GUI/Core/GUI_DispStringInRect.o GUI/Core/GUI_DispStringInRectEx.o GUI/Core/GUI_DispStringInRectWrap.o GUI/Core/GUI_DispStringLen.o GUI/Core/GUI_DrawBitmap.o GUI/Core/GUI_DrawBitmap_555.o GUI/Core/GUI_DrawBitmap_565.o GUI/Core/GUI_DrawBitmap_888.o GUI/Core/GUI_DrawBitmapEx.o GUI/Core/GUI_DrawBitmapExp.o GUI/Core/GUI_DrawBitmapMag.o GUI/Core/GUI_DrawFocusRect.o GUI/Core/GUI_DrawGraph.o GUI/Core/GUI_DrawGraphEx.o GUI/Core/GUI_DrawHLine.o GUI/Core/GUI_DrawLine.o GUI/Core/GUI_DrawPie.o GUI/Core/GUI_DrawPixel.o GUI/Core/GUI_DrawPoint.o GUI/Core/GUI_DrawPolygon.o GUI/Core/GUI_DrawPolyline.o GUI/Core/GUI_DrawRectEx.o GUI/Core/GUI_DrawVLine.o GUI/Core/GUI_ErrorOut.o GUI/Core/GUI_Exec.o GUI/Core/GUI_FillPolygon.o GUI/Core/GUI_FillRect.o GUI/Core/GUI_FillRectEx.o GUI/Core/GUI_GetBitmapPixelColor.o GUI/Core/GUI_GetBitmapPixelIndex.o GUI/Core/GUI_GetClientRect.o GUI/Core/GUI_GetColor.o GUI/Core/GUI_GetDispPos.o GUI/Core/GUI_GetDrawMode.o GUI/Core/GUI_GetFont.o GUI/Core/GUI_GetFontInfo.o GUI/Core/GUI_GetFontSizeY.o GUI/Core/GUI_GetLineStyle.o GUI/Core/GUI_GetOrg.o GUI/Core/GUI_GetStringDistX.o GUI/Core/GUI_GetTextAlign.o GUI/Core/GUI_GetTextExtend.o GUI/Core/GUI_GetTextMode.o GUI/Core/GUI_GetVersionString.o GUI/Core/GUI_GetYSizeOfFont.o GUI/Core/GUI_GIF.o GUI/Core/GUI_Goto.o GUI/Core/GUI_InitLUT.o GUI/Core/GUI_InvertRect.o GUI/Core/GUI_IsInFont.o GUI/Core/GUI_Log.o GUI/Core/GUI_MergeRect.o GUI/Core/GUI_MOUSE.o GUI/Core/GUI_MOUSE_DriverPS2.o GUI/Core/GUI_MoveRect.o GUI/Core/GUI_OnKey.o GUI/Core/GUI_Pen.o GUI/Core/GUI_PID.o GUI/Core/GUI_RectsIntersect.o GUI/Core/GUI_SaveContext.o GUI/Core/GUI_ScreenSize.o GUI/Core/GUI_SelectLayer.o GUI/Core/GUI_SelectLCD.o GUI/Core/GUI_SetClipRect.o GUI/Core/GUI_SetColor.o GUI/Core/GUI_SetColorIndex.o GUI/Core/GUI_SetDecChar.o GUI/Core/GUI_SetDefault.o GUI/Core/GUI_SetDrawMode.o GUI/Core/GUI_SetFont.o GUI/Core/GUI_SetLBorder.o GUI/Core/GUI_SetLineStyle.o GUI/Core/GUI_SetLUTColor.o GUI/Core/GUI_SetLUTColorEx.o GUI/Core/GUI_SetLUTEntry.o GUI/Core/GUI_SetOrg.o GUI/Core/GUI_SetPixelIndex.o GUI/Core/GUI_SetTextAlign.o GUI/Core/GUI_SetTextMode.o GUI/Core/GUI_SetTextStyle.o GUI/Core/GUI_SIF.o GUI/Core/GUI_SIF_Prop.o GUI/Core/GUI_TOUCH.o GUI/Core/GUI_TOUCH_DriverAnalog.o GUI/Core/GUI_TOUCH_StoreState.o GUI/Core/GUI_TOUCH_StoreUnstable.o GUI/Core/GUI_UC.o GUI/Core/GUI_UC_ConvertUC2UTF8.o GUI/Core/GUI_UC_ConvertUTF82UC.o GUI/Core/GUI_UC_DispString.o GUI/Core/GUI_UC_EncodeNone.o GUI/Core/GUI_UC_EncodeUTF8.o GUI/Core/GUI_WaitEvent.o GUI/Core/GUI_WaitKey.o GUI/Core/GUI_Warn.o GUI/Core/GUI2DLib.o GUI/Core/GUIAlloc.o GUI/Core/GUIArc.o GUI/Core/GUIChar.o GUI/Core/GUICharLine.o GUI/Core/GUICharM.o GUI/Core/GUICharP.o GUI/Core/GUICirc.o GUI/Core/GUIColor2Index.o GUI/Core/GUICore.o GUI/Core/GUICurs.o GUI/Core/GUIEncJS.o GUI/Core/GUIIndex2Color.o GUI/Core/GUIPolyE.o GUI/Core/GUIPolyM.o GUI/Core/GUIPolyR.o GUI/Core/GUIRealloc.o GUI/Core/GUIStream.o GUI/Core/GUITask.o GUI/Core/GUITime.o GUI/Core/GUITimer.o GUI/Core/GUIUC0.o GUI/Core/GUIVal.o GUI/Core/GUIValf.o GUI/Core/LCD.o GUI/Core/LCD_API.o GUI/Core/LCD_DrawVLine.o GUI/Core/LCD_GetColorIndex.o GUI/Core/LCD_GetEx.o GUI/Core/LCD_GetNumDisplays.o GUI/Core/LCD_GetPixelColor.o GUI/Core/LCD_Index2ColorEx.o GUI/Core/LCD_Mirror.o GUI/Core/LCD_MixColors256.o GUI/Core/LCD_ReadRect.o GUI/Core/LCD_Rotate180.o GUI/Core/LCD_RotateCCW.o GUI/Core/LCD_RotateCW.o GUI/Core/LCD_SelectLCD.o GUI/Core/LCD_SetAPI.o GUI/Core/LCD_SetClipRectEx.o GUI/Core/LCD_UpdateColorIndices.o GUI/Core/LCDAA.o GUI/Core/LCDColor.o GUI/Core/LCDGetP.o GUI/Core/LCDInfo.o GUI/Core/LCDInfo0.o GUI/Core/LCDInfo1.o GUI/Core/LCDL0Delta.o GUI/Core/LCDL0Mag.o GUI/Core/LCDP1.o GUI/Core/LCDP565_Index2Color.o GUI/Core/LCDP888_Index2Color.o GUI/Core/LCDPM565_Index2Color.o GUI/Core/LCDPM888_Index2Color.o GUI/Core/LCDRLE4.o GUI/Core/LCDRLE8.o GUI/Core/LCDRLE16.o GUI/Font/F4x6.o GUI/Font/F6x8.o GUI/Font/F08_1.o GUI/Font/F08_ASCII.o GUI/Font/F8x8.o GUI/Font/F8x10_ASCII.o GUI/Font/F8x12_ASCII.o GUI/Font/F8x13_1.o GUI/Font/F8x13_ASCII.o GUI/Font/F8x15B_1.o GUI/Font/F8x15B_ASCII.o GUI/Font/F8x16.o GUI/Font/F10_1.o GUI/Font/F10_ASCII.o GUI/Font/F10S_1.o GUI/Font/F10S_ASCII.o GUI/Font/F13_1.o GUI/Font/F13_ASCII.o GUI/Font/F13B_1.o GUI/Font/F13B_ASCII.o GUI/Font/F13H_1.o GUI/Font/F13H_ASCII.o GUI/Font/F13HB_1.o GUI/Font/F13HB_ASCII.o GUI/Font/F16_1.o GUI/Font/F16_1HK.o GUI/Font/F16_ASCII.o GUI/Font/F16_HK.o GUI/Font/F16B_1.o GUI/Font/F16B_ASCII.o GUI/Font/F24_1.o GUI/Font/F24_ASCII.o GUI/Font/F24B_1.o GUI/Font/F24B_ASCII.o GUI/Font/F32_1.o GUI/Font/F32_ASCII.o GUI/Font/F32B_1.o GUI/Font/F32B_ASCII.o GUI/Font/FComic18B_1.o GUI/Font/FComic18B_ASCII.o GUI/Font/FComic24B_1.o GUI/Font/FComic24B_ASCII.o GUI/Font/FD24x32.o GUI/Font/FD32.o GUI/Font/FD36x48.o GUI/Font/FD48.o GUI/Font/FD48x64.o GUI/Font/FD60x80.o GUI/Font/FD64.o GUI/Font/FD80.o GUI/LCDDriver/LCDWin.o GUI/MemDev/GUIDEV.o GUI/MemDev/GUIDEV_1.o GUI/MemDev/GUIDEV_8.o GUI/MemDev/GUIDEV_16.o GUI/MemDev/GUIDEV_AA.o GUI/MemDev/GUIDEV_Auto.o GUI/MemDev/GUIDEV_Banding.o GUI/MemDev/GUIDEV_Clear.o GUI/MemDev/GUIDEV_CmpWithLCD.o GUI/MemDev/GUIDEV_CopyFromLCD.o GUI/MemDev/GUIDEV_CreateFixed.o GUI/MemDev/GUIDEV_GetDataPtr.o GUI/MemDev/GUIDEV_GetXSize.o GUI/MemDev/GUIDEV_GetYSize.o GUI/MemDev/GUIDEV_Measure.o GUI/MemDev/GUIDEV_ReduceYSize.o GUI/MemDev/GUIDEV_SetOrg.o GUI/MemDev/GUIDEV_Usage.o GUI/MemDev/GUIDEV_UsageBM.o GUI/MemDev/GUIDEV_Write.o GUI/MemDev/GUIDEV_WriteAlpha.o GUI/MemDev/GUIDEV_WriteEx.o GUI/MemDev/GUIDEV_XY2PTR.o GUI/MultiLayer/LCD_1.o GUI/MultiLayer/LCD_2.o GUI/MultiLayer/LCD_3.o GUI/MultiLayer/LCD_4.o GUI/WM/WM.o GUI/WM/WM__ForEachDesc.o GUI/WM/WM__GetFirstSibling.o GUI/WM/WM__GetFocussedChild.o GUI/WM/WM__GetLastSibling.o GUI/WM/WM__GetOrg_AA.o GUI/WM/WM__GetPrevSibling.o GUI/WM/WM__IsAncestor.o GUI/WM/WM__IsChild.o GUI/WM/WM__IsEnabled.o GUI/WM/WM__NotifyVisChanged.o GUI/WM/WM__Screen2Client.o GUI/WM/WM__SendMessage.o GUI/WM/WM__SendMessageIfEnabled.o GUI/WM/WM__SendMessageNoPara.o GUI/WM/WM__UpdateChildPositions.o GUI/WM/WM_AttachWindow.o GUI/WM/WM_BringToBottom.o GUI/WM/WM_BringToTop.o GUI/WM/WM_Broadcast.o GUI/WM/WM_CheckScrollPos.o GUI/WM/WM_CriticalHandle.o GUI/WM/WM_DIAG.o GUI/WM/WM_EnableWindow.o GUI/WM/WM_ForEachDesc.o GUI/WM/WM_GetBkColor.o GUI/WM/WM_GetCallback.o GUI/WM/WM_GetClientRect.o GUI/WM/WM_GetClientWindow.o GUI/WM/WM_GetDesktopWindow.o GUI/WM/WM_GetDesktopWindowEx.o GUI/WM/WM_GetDiagInfo.o GUI/WM/WM_GetDialogItem.o GUI/WM/WM_GetFirstChild.o GUI/WM/WM_GetFlags.o GUI/WM/WM_GetFocussedWindow.o GUI/WM/WM_GetId.o GUI/WM/WM_GetInsideRect.o GUI/WM/WM_GetInsideRectExScrollbar.o GUI/WM/WM_GetInvalidRect.o GUI/WM/WM_GetNextSibling.o GUI/WM/WM_GetOrg.o GUI/WM/WM_GetParent.o GUI/WM/WM_GetPrevSibling.o GUI/WM/WM_GetScrollbar.o GUI/WM/WM_GetScrollPartner.o GUI/WM/WM_GetScrollPos.o GUI/WM/WM_GetScrollState.o GUI/WM/WM_GetWindowRect.o GUI/WM/WM_GetWindowSize.o GUI/WM/WM_HasCaptured.o GUI/WM/WM_HasFocus.o GUI/WM/WM_Hide.o GUI/WM/WM_InvalidateArea.o GUI/WM/WM_IsCompletelyVisible.o GUI/WM/WM_IsEnabled.o GUI/WM/WM_IsFocussable.o GUI/WM/WM_IsVisible.o GUI/WM/WM_IsWindow.o GUI/WM/WM_MakeModal.o GUI/WM/WM_Move.o GUI/WM/WM_MoveChildTo.o GUI/WM/WM_NotifyParent.o GUI/WM/WM_OnKey.o GUI/WM/WM_Paint.o GUI/WM/WM_PaintWindowAndDescs.o GUI/WM/WM_PID__GetPrevState.o GUI/WM/WM_ResizeWindow.o GUI/WM/WM_Screen2Win.o GUI/WM/WM_SendMessageNoPara.o GUI/WM/WM_SendToParent.o GUI/WM/WM_SetAnchor.o GUI/WM/WM_SetCallback.o GUI/WM/WM_SetCapture.o GUI/WM/WM_SetCaptureMove.o GUI/WM/WM_SetCreateFlags.o GUI/WM/WM_SetDesktopColor.o GUI/WM/WM_SetFocus.o GUI/WM/WM_SetFocusOnNextChild.o GUI/WM/WM_SetFocusOnPrevChild.o GUI/WM/WM_SetId.o GUI/WM/WM_SetpfPollPID.o GUI/WM/WM_SetScrollbar.o GUI/WM/WM_SetScrollPos.o GUI/WM/WM_SetScrollState.o GUI/WM/WM_SetSize.o GUI/WM/WM_SetTrans.o GUI/WM/WM_SetTransState.o GUI/WM/WM_SetUserClipRect.o GUI/WM/WM_SetWindowPos.o GUI/WM/WM_SetXSize.o GUI/WM/WM_SetYSize.o GUI/WM/WM_Show.o GUI/WM/WM_SIM.o GUI/WM/WM_StayOnTop.o GUI/WM/WM_Timer.o GUI/WM/WM_TimerExternal.o GUI/WM/WM_UpdateWindowAndDescs.o GUI/WM/WM_UserData.o GUI/WM/WM_Validate.o GUI/WM/WM_ValidateWindow.o GUI/WM/WMMemDev.o GUI/WM/WMTouch.o GUI/Widget/BUTTON.o GUI/Widget/BUTTON__SetBitmapObj.o GUI/Widget/BUTTON_Bitmap.o GUI/Widget/BUTTON_BMP.o GUI/Widget/BUTTON_Create.o GUI/Widget/BUTTON_CreateIndirect.o GUI/Widget/BUTTON_Default.o GUI/Widget/BUTTON_Get.o GUI/Widget/BUTTON_GetBitmap.o GUI/Widget/BUTTON_IsPressed.o GUI/Widget/BUTTON_SelfDraw.o GUI/Widget/BUTTON_SetFocusColor.o GUI/Widget/BUTTON_SetTextAlign.o GUI/Widget/BUTTON_StreamedBitmap.o GUI/Widget/CHECKBOX.o GUI/Widget/CHECKBOX_Create.o GUI/Widget/CHECKBOX_CreateIndirect.o GUI/Widget/CHECKBOX_Default.o GUI/Widget/CHECKBOX_GetState.o GUI/Widget/CHECKBOX_GetText.o GUI/Widget/CHECKBOX_Image.o GUI/Widget/CHECKBOX_IsChecked.o GUI/Widget/CHECKBOX_SetBkColor.o GUI/Widget/CHECKBOX_SetBoxBkColor.o GUI/Widget/CHECKBOX_SetDefaultImage.o GUI/Widget/CHECKBOX_SetFocusColor.o GUI/Widget/CHECKBOX_SetFont.o GUI/Widget/CHECKBOX_SetImage.o GUI/Widget/CHECKBOX_SetNumStates.o GUI/Widget/CHECKBOX_SetSpacing.o GUI/Widget/CHECKBOX_SetState.o GUI/Widget/CHECKBOX_SetText.o GUI/Widget/CHECKBOX_SetTextAlign.o GUI/Widget/CHECKBOX_SetTextColor.o GUI/Widget/DIALOG.o GUI/Widget/DROPDOWN.o GUI/Widget/DROPDOWN_AddString.o GUI/Widget/DROPDOWN_Create.o GUI/Widget/DROPDOWN_CreateIndirect.o GUI/Widget/DROPDOWN_Default.o GUI/Widget/DROPDOWN_DeleteItem.o GUI/Widget/DROPDOWN_GetNumItems.o GUI/Widget/DROPDOWN_InsertString.o GUI/Widget/DROPDOWN_ItemSpacing.o GUI/Widget/DROPDOWN_SetAutoScroll.o GUI/Widget/DROPDOWN_SetBkColor.o GUI/Widget/DROPDOWN_SetColor.o GUI/Widget/DROPDOWN_SetFont.o GUI/Widget/DROPDOWN_SetScrollbarColor.o GUI/Widget/DROPDOWN_SetScrollbarWidth.o GUI/Widget/DROPDOWN_SetTextAlign.o GUI/Widget/DROPDOWN_SetTextColor.o GUI/Widget/DROPDOWN_SetTextHeight.o GUI/Widget/EDIT.o GUI/Widget/EDIT_Create.o GUI/Widget/EDIT_CreateIndirect.o GUI/Widget/EDIT_Default.o GUI/Widget/EDIT_GetCursorPixelPos.o GUI/Widget/EDIT_GetCursorPos.o GUI/Widget/EDIT_GetNumChars.o GUI/Widget/EDIT_SetCursorAtChar.o GUI/Widget/EDIT_SetFocussable.o GUI/Widget/EDIT_SetInsertMode.o GUI/Widget/EDIT_SetpfAddKeyEx.o GUI/Widget/EDIT_SetpfUpdateBuffer.o GUI/Widget/EDIT_SetSel.o GUI/Widget/EDIT_SetTextMode.o GUI/Widget/EDITBin.o GUI/Widget/EDITDec.o GUI/Widget/EDITFloat.o GUI/Widget/EDITHex.o GUI/Widget/EDITUlong.o GUI/Widget/FRAMEWIN.o GUI/Widget/FRAMEWIN__UpdateButtons.o GUI/Widget/FRAMEWIN_AddMenu.o GUI/Widget/FRAMEWIN_Button.o GUI/Widget/FRAMEWIN_ButtonClose.o GUI/Widget/FRAMEWIN_ButtonMax.o GUI/Widget/FRAMEWIN_ButtonMin.o GUI/Widget/FRAMEWIN_Create.o GUI/Widget/FRAMEWIN_CreateIndirect.o GUI/Widget/FRAMEWIN_Default.o GUI/Widget/FRAMEWIN_Get.o GUI/Widget/FRAMEWIN_IsMinMax.o GUI/Widget/FRAMEWIN_MinMaxRest.o GUI/Widget/FRAMEWIN_SetBorderSize.o GUI/Widget/FRAMEWIN_SetColors.o GUI/Widget/FRAMEWIN_SetFont.o GUI/Widget/FRAMEWIN_SetResizeable.o GUI/Widget/FRAMEWIN_SetTitleHeight.o GUI/Widget/FRAMEWIN_SetTitleVis.o GUI/Widget/GRAPH.o GUI/Widget/GRAPH_CreateIndirect.o GUI/Widget/GRAPH_DATA_XY.o GUI/Widget/GRAPH_DATA_YT.o GUI/Widget/GRAPH_SCALE.o GUI/Widget/GUI_ARRAY.o GUI/Widget/GUI_ARRAY_DeleteItem.o GUI/Widget/GUI_ARRAY_InsertItem.o GUI/Widget/GUI_ARRAY_ResizeItem.o GUI/Widget/GUI_DRAW.o GUI/Widget/GUI_DRAW_BITMAP.o GUI/Widget/GUI_DRAW_BMP.o GUI/Widget/GUI_DRAW_Self.o GUI/Widget/GUI_DRAW_STREAMED.o GUI/Widget/GUI_EditBin.o GUI/Widget/GUI_EditDec.o GUI/Widget/GUI_EditFloat.o GUI/Widget/GUI_EditHex.o GUI/Widget/GUI_EditString.o GUI/Widget/GUI_HOOK.o GUI/Widget/HEADER.o GUI/Widget/HEADER__SetDrawObj.o GUI/Widget/HEADER_Bitmap.o GUI/Widget/HEADER_BMP.o GUI/Widget/HEADER_Create.o GUI/Widget/HEADER_CreateIndirect.o GUI/Widget/HEADER_GetSel.o GUI/Widget/HEADER_SetDragLimit.o GUI/Widget/HEADER_StreamedBitmap.o GUI/Widget/LISTBOX.o GUI/Widget/LISTBOX_Create.o GUI/Widget/LISTBOX_CreateIndirect.o GUI/Widget/LISTBOX_Default.o GUI/Widget/LISTBOX_DeleteItem.o GUI/Widget/LISTBOX_Font.o GUI/Widget/LISTBOX_GetItemText.o GUI/Widget/LISTBOX_GetNumItems.o GUI/Widget/LISTBOX_GetTextAlign.o GUI/Widget/LISTBOX_InsertString.o GUI/Widget/LISTBOX_ItemDisabled.o GUI/Widget/LISTBOX_ItemSpacing.o GUI/Widget/LISTBOX_MultiSel.o GUI/Widget/LISTBOX_ScrollStep.o GUI/Widget/LISTBOX_SetAutoScroll.o GUI/Widget/LISTBOX_SetBkColor.o GUI/Widget/LISTBOX_SetOwner.o GUI/Widget/LISTBOX_SetOwnerDraw.o GUI/Widget/LISTBOX_SetScrollbarColor.o GUI/Widget/LISTBOX_SetScrollbarWidth.o GUI/Widget/LISTBOX_SetString.o GUI/Widget/LISTBOX_SetTextAlign.o GUI/Widget/LISTBOX_SetTextColor.o GUI/Widget/LISTVIEW.o GUI/Widget/LISTVIEW_Create.o GUI/Widget/LISTVIEW_CreateIndirect.o GUI/Widget/LISTVIEW_Default.o GUI/Widget/LISTVIEW_DeleteAllRows.o GUI/Widget/LISTVIEW_DeleteColumn.o GUI/Widget/LISTVIEW_DeleteRow.o GUI/Widget/LISTVIEW_DisableRow.o GUI/Widget/LISTVIEW_GetBkColor.o GUI/Widget/LISTVIEW_GetFont.o GUI/Widget/LISTVIEW_GetHeader.o GUI/Widget/LISTVIEW_GetItemText.o GUI/Widget/LISTVIEW_GetNumColumns.o GUI/Widget/LISTVIEW_GetNumRows.o GUI/Widget/LISTVIEW_GetSel.o GUI/Widget/LISTVIEW_GetTextColor.o GUI/Widget/LISTVIEW_InsertRow.o GUI/Widget/LISTVIEW_SetAutoScroll.o GUI/Widget/LISTVIEW_SetBkColor.o GUI/Widget/LISTVIEW_SetColumnWidth.o GUI/Widget/LISTVIEW_SetFont.o GUI/Widget/LISTVIEW_SetGridVis.o GUI/Widget/LISTVIEW_SetItemColor.o GUI/Widget/LISTVIEW_SetItemText.o GUI/Widget/LISTVIEW_SetLBorder.o GUI/Widget/LISTVIEW_SetRBorder.o GUI/Widget/LISTVIEW_SetRowHeight.o GUI/Widget/LISTVIEW_SetSel.o GUI/Widget/LISTVIEW_SetSort.o GUI/Widget/LISTVIEW_SetTextAlign.o GUI/Widget/LISTVIEW_SetTextColor.o GUI/Widget/LISTVIEW_UserData.o GUI/Widget/MENU.o GUI/Widget/MENU__FindItem.o GUI/Widget/MENU_Attach.o GUI/Widget/MENU_CreateIndirect.o GUI/Widget/MENU_Default.o GUI/Widget/MENU_DeleteItem.o GUI/Widget/MENU_DisableItem.o GUI/Widget/MENU_EnableItem.o GUI/Widget/MENU_GetItem.o GUI/Widget/MENU_GetItemText.o GUI/Widget/MENU_GetNumItems.o GUI/Widget/MENU_InsertItem.o GUI/Widget/MENU_Popup.o GUI/Widget/MENU_SetBkColor.o GUI/Widget/MENU_SetBorderSize.o GUI/Widget/MENU_SetFont.o GUI/Widget/MENU_SetItem.o GUI/Widget/MENU_SetTextColor.o GUI/Widget/MESSAGEBOX.o GUI/Widget/MULTIEDIT.o GUI/Widget/MULTIEDIT_Create.o GUI/Widget/MULTIEDIT_CreateIndirect.o GUI/Widget/MULTIPAGE.o GUI/Widget/MULTIPAGE_Create.o GUI/Widget/MULTIPAGE_CreateIndirect.o GUI/Widget/MULTIPAGE_Default.o GUI/Widget/PROGBAR.o GUI/Widget/PROGBAR_Create.o GUI/Widget/PROGBAR_CreateIndirect.o GUI/Widget/PROGBAR_SetBarColor.o GUI/Widget/PROGBAR_SetFont.o GUI/Widget/PROGBAR_SetMinMax.o GUI/Widget/PROGBAR_SetText.o GUI/Widget/PROGBAR_SetTextAlign.o GUI/Widget/PROGBAR_SetTextColor.o GUI/Widget/PROGBAR_SetTextPos.o GUI/Widget/RADIO.o GUI/Widget/RADIO_Create.o GUI/Widget/RADIO_CreateIndirect.o GUI/Widget/RADIO_Default.o GUI/Widget/RADIO_GetText.o GUI/Widget/RADIO_Image.o GUI/Widget/RADIO_SetBkColor.o GUI/Widget/RADIO_SetDefaultImage.o GUI/Widget/RADIO_SetFocusColor.o GUI/Widget/RADIO_SetFont.o GUI/Widget/RADIO_SetGroupId.o GUI/Widget/RADIO_SetImage.o GUI/Widget/RADIO_SetText.o GUI/Widget/RADIO_SetTextColor.o GUI/Widget/SCROLLBAR.o GUI/Widget/SCROLLBAR_Create.o GUI/Widget/SCROLLBAR_CreateIndirect.o GUI/Widget/SCROLLBAR_Defaults.o GUI/Widget/SCROLLBAR_GetValue.o GUI/Widget/SCROLLBAR_SetColor.o GUI/Widget/SCROLLBAR_SetWidth.o GUI/Widget/SLIDER.o GUI/Widget/SLIDER_Create.o GUI/Widget/SLIDER_CreateIndirect.o GUI/Widget/SLIDER_Default.o GUI/Widget/SLIDER_SetFocusColor.o GUI/Widget/TEXT.o GUI/Widget/TEXT_Create.o GUI/Widget/TEXT_CreateIndirect.o GUI/Widget/TEXT_Default.o GUI/Widget/TEXT_SetBkColor.o GUI/Widget/TEXT_SetFont.o GUI/Widget/TEXT_SetText.o GUI/Widget/TEXT_SetTextAlign.o GUI/Widget/TEXT_SetTextColor.o GUI/Widget/TEXT_SetWrapMode.o GUI/Widget/WIDGET.o GUI/Widget/WIDGET_Effect_3D.o GUI/Widget/WIDGET_Effect_3D1L.o GUI/Widget/WIDGET_Effect_3D2L.o GUI/Widget/WIDGET_Effect_None.o GUI/Widget/WIDGET_Effect_Simple.o GUI/Widget/WIDGET_FillStringInRect.o GUI/Widget/WIDGET_SetEffect.o GUI/Widget/WIDGET_SetWidth.o GUI/Widget/WINDOW.o GUI/Widget/WINDOW_Default.o Simulation/GUI_X_Win.o Simulation/LCDSIM.o Simulation/WinMain.o -o ucgui.exe -L"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib32" -L"C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib32" -static-libgcc -mwindows -lwinmm -m32
编译正常, 链接出错, 看来是 windows shell 的黑锅了, 一条命令最懂只能8192 个字符:
gcc.exe: error: GU: No such file or directory
F:\ucGUI\uCGUI398\Makefile.win:25: recipe for target 'ucgui.exe' failed
mingw32-make.exe: *** [ucgui.exe] Error 1
我用 git 自带的 shell 就能接受这么长的字符串, 然后编译成功, 生成了 ucgui.exe
估计这个就是dev-c++的官网了: https://sourceforge.net/projects/orwelldevcpp/
算起来三年多没有更新了
楼主大神, 我还是接着到这里来问你合适一点
https://whycan.cn/t_2760.html#p22646
你首先要分清adb和adbd的区别。adbd是手机里面跑的那种,需要支持gadget,adb是主机模式下跑的,用来连接手机
firstman 说:https://whycan.cn/files/members/1574/QQ20190820223450.png
弄了一个 adb 执行程序进去, 然而, 并不能连到我的小米手机.
总觉得还有一个协议没有勾选.
如果我的 f1c100s 里面跑一个 adb, 用来连接手机(手机里面应该跑的是 adbd???)
我需要做哪些操作, 需要在 make menuconfig 里面勾选什么协议吗?
https://android.googlesource.com/kernel/msm/+/android-5.1.0_r0.6/drivers/usb/gadget/f_adb.c
https://android.googlesource.com/kernel/msm/+/android-5.1.0_r0.6/drivers/usb/gadget/f_mtp.c
https://android.googlesource.com/kernel/msm/+/android-5.1.0_r0.6/drivers/usb/gadget/android.c
应该就是这些文件了, 要 patch 进来才行, 改天继续.
貌似要打上这几个补丁才行:
In kernel .config, the Android gadget drivers are enabled:
CONFIG_USB_ANDROID=y
CONFIG_USB_ANDROID_ADB=y
CONFIG_USB_ANDROID_MASS_STORAGE=y
CONFIG_USB_ANDROID_RNDIS=y
CONFIG_USB_ANDROID_RNDIS_WCEIS=y
https://e2e.ti.com/support/processors/f/791/t/483508?UVC-camera-non-compliance-for-AM335x
This issue is platform independent, not related to AM335x. This camera is not compliant with UVC Specs - GET_DEF(PROBE) is not supported, so that the UVCVIDEO driver is unable to enumerate this camera.
My only advice is to try the latest AM335x Processor SDK 2.0 (http://software-dl.ti.com/processor-sw/esd/PROCESSOR-SDK-LINUX-AM335X/latest/index_FDS.html), which uses kernel v4.1. If the newer kernel had any quirk added in UVCVIDEO driver to support this particular camera, it might work. If not, the only option you have is to pick other UVC-compliant cameras, since this one is not supported in Linux kernel.
此问题与平台无关,与AM335x无关。本相机不符合UVC规格 - 不支持GET_DEF(PROBE),因此UVCVIDEO驱动程序无法枚举此相机。
我唯一的建议是尝试最新的AM335x处理器SDK 2.0(http://software-dl.ti.com/processor-sw/esd/PROCESSOR-SDK-LINUX-AM335X/latest/index_FDS.html),它使用内核v4 0.1。如果较新的内核在UVCVIDEO驱动程序中添加任何怪癖来支持这个特定的相机,它可能会工作。如果没有,您唯一的选择是选择其他符合UVC标准的摄像机,因为Linux内核不支持此摄像机。
搜了一圈, 搜到 TI 的 AM335x 资料: https://wiki.phytec.com/pages/viewpage.action?pageId=69503441
而如果要实现OTG的功能,自动在HOST和Device之间转换,则需要用这个引脚来控制电源的输出。
USBx_VBUS引脚用于检测5V电压,不管是HOST还是Device都需要接USB的5V电源,且如果做HOST,在底板上需要有一个5V电源来供这个引脚来检测,这个引脚(或者说USB的VBUS)要求有最少150uF的电容,以防止在插入USB设备时,瞬间拉低5V供电导致错误。
如果VBUS相关的上面两个引脚有问题时,则会报类似下面的错误:
[ 2.216291] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (89, <AValid), retry #1, port1 00000104 [ 2.368523] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #2, port1 00000104
USBx_ID引脚用于做HOST-Device判断,如果不需要则可以通过软件设为HOST或Device,则此时该引脚被bypass。
USBx_CE引脚用于使能外部充电器,主要当AM335x为被充电对象时,AM335x会对状况进行判断以配置是否要使能电池充电器,因为某些情况下使能充电器可能会拉垮主机使得usb通讯中断。不使用请悬空。
日志是这样的:
[ 1.585842] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.675173] EXT4-fs (mmcblk0p2): recovery complete
[ 1.683420] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.691754] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.699808] devtmpfs: mounted
[ 1.709940] Freeing unused kernel memory: 1024K
[ 1.900221] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
[ 4.579951] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 9.497489] g_serial gadget: Gadget Serial v2.4
[ 9.502134] g_serial gadget: g_serial ready
[ 53.893354] random: crng init done
[ 68.554535] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #1, port1 00000100
[ 568.494533] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #2, port1 00000100
[ 598.514529] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #3, port1 00000100
请问我哪位大佬遇到过吗?
感谢楼主热心分享!
参考链接1: http://nano.lichee.pro/build_sys/build_flash.html
参考链接2: 核心板原理图 Lichee_nano.pdf (第一版)
参考链接3: 核心板原理图 lichee_nano_new.pdf (第二版 ns2009)
参考链接4: 底板原理图 lpi-nano-dock.pdf
请问这种接口的 GT911 电容触摸屏哪里可以买到?
但是改成
serial9 = &uart2;
就不太正常了哦:
[ 0.410050] console [ttyS0] disabled
[ 0.430326] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 25, base_baud = 6250000) is a 16550A
[ 0.911293] console [ttyS0] enabled
[ 0.937658] 1c25800.serial: ttyS1 at MMIO 0x1c25800 (irq = 26, base_baud = 6250000) is a 16550A
再次测试, 改成
serial3 = &uart2;
也是正常的:
[ 0.410050] console [ttyS0] disabled
[ 0.430326] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 25, base_baud = 6250000) is a 16550A
[ 0.911293] console [ttyS0] enabled
[ 0.937658] 1c25800.serial: ttyS3 at MMIO 0x1c25800 (irq = 26, base_baud = 6250000) is a 16550A
aliases {
...
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
serial3 = &uart3;
serial4 = &uart4;
};理论上,我把这里的“serial2”改成“serial9”就可以了,但实际测试不行额,还是原来的一样,没有ttyS9这个节点呢。
参考资料: https://blog.csdn.net/kris_fei/article/details/75309163
我这里改是没有问题
改成这样:
aliases {
serial0 = &uart0;
serial2 = &uart2;
spi0 = &spi0;
};
日志就是这样:
[ 0.410101] console [ttyS0] disabled
[ 0.430375] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 25, base_baud = 6250000) is a 16550A
[ 0.911348] console [ttyS0] enabled
[ 0.937726] 1c25800.serial: ttyS2 at MMIO 0x1c25800 (irq = 26, base_baud = 6250000) is a 16550A
[ 0.954747] panel-simple panel: panel supply power not found, using dummy regulator
然后 echo "XXXXXXXXXX" > /dev/ttyS2 , 用串口工具在Windows 读 /dev/ttyS2 正常
顺便传一个控制荔枝派 nano 底板 三色LED 的脚本:
#########控制PE4 (绿) 4*32 + 4 = 132
echo 132 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio132/direction
#打开绿灯
echo 0 > /sys/class/gpio/gpio132/value
#关闭绿灯
echo 1 > /sys/class/gpio/gpio132/value
#########控制PE5 (蓝) 4*32 + 5 = 133
echo 133 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio133/direction
#打开蓝灯
echo 0 > /sys/class/gpio/gpio133/value
#关闭蓝灯
echo 1 > /sys/class/gpio/gpio133/value
#########控制PE6 (红) 4*32 + 6 = 134
echo 134 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio134/direction
#打开红灯
echo 0 > /sys/class/gpio/gpio134/value
#关闭红灯
echo 1 > /sys/class/gpio/gpio134/value
终于搞定, 感谢万能的晕哥.
# /mnt/sdcard/evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: 1c23400.lradc
/dev/input/event1: 1c24800.rtp
Select the device event number [0-1]: 0
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "1c23400.lradc"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 114 (KEY_VOLUMEDOWN)
Event code 115 (KEY_VOLUMEUP)
Event code 352 (KEY_OK)
Event code 353 (KEY_SELECT)
Properties:
Testing ... (interrupt to exit)
Event: time 26.366489, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
Event: time 26.366489, -------------- SYN_REPORT ------------
Event: time 26.539027, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0
Event: time 26.539027, -------------- SYN_REPORT ------------
Event: time 29.266293, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
Event: time 29.266293, -------------- SYN_REPORT ------------
Event: time 29.445736, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0
Event: time 29.445736, -------------- SYN_REPORT ------------
Event: time 29.957952, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
Event: time 29.957952, -------------- SYN_REPORT ------------
Event: time 30.121078, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 0
Event: time 30.121078, -------------- SYN_REPORT ------------
Event: time 30.447588, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1
Event: time 30.447588, -------------- SYN_REPORT ------------
Event: time 30.607447, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 0
Event: time 30.607447, -------------- SYN_REPORT ------------
Event: time 31.299260, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1
Event: time 31.299260, -------------- SYN_REPORT ------------
Event: time 31.459163, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 0
Event: time 31.459163, -------------- SYN_REPORT ------------
Event: time 31.883504, type 1 (EV_KEY), code 353 (KEY_SELECT), value 1
Event: time 31.883504, -------------- SYN_REPORT ------------
Event: time 32.076111, type 1 (EV_KEY), code 353 (KEY_SELECT), value 0
Event: time 32.076111, -------------- SYN_REPORT ------------
Event: time 32.539590, type 1 (EV_KEY), code 353 (KEY_SELECT), value 1
Event: time 32.539590, -------------- SYN_REPORT ------------
Event: time 32.699518, type 1 (EV_KEY), code 353 (KEY_SELECT), value 0
Event: time 32.699518, -------------- SYN_REPORT ------------
Event: time 33.156510, type 1 (EV_KEY), code 352 (KEY_OK), value 1
Event: time 33.156510, -------------- SYN_REPORT ------------
Event: time 33.322983, type 1 (EV_KEY), code 352 (KEY_OK), value 0
Event: time 33.322983, -------------- SYN_REPORT ------------
Event: time 34.149170, type 1 (EV_KEY), code 352 (KEY_OK), value 1
Event: time 34.149170, -------------- SYN_REPORT ------------
Event: time 34.328744, type 1 (EV_KEY), code 352 (KEY_OK), value 0
Event: time 34.328744, -------------- SYN_REPORT ------------
根据 https://whycan.cn/t_1916.html 的信息,中断号改成30/34,表现均一致。
手册写的中断不是应该改成 22 吗? 30/34 是怎么算出来的?
spi0: spi@1c05000 {
compatible = "allwinner,suniv-spi",
"allwinner,sun8i-h3-spi";
reg = <0x01c05000 0x1000>;
interrupts = <10>;
clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_BUS_SPI0>;
clock-names = "ahb", "mod";
resets = <&ccu RST_BUS_SPI0>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};spi1: spi@1c06000 {
compatible = "allwinner,suniv-spi",
"allwinner,sun8i-h3-spi";
reg = <0x01c06000 0x1000>;
interrupts = <11>;
clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_BUS_SPI1>;
clock-names = "ahb", "mod";
resets = <&ccu RST_BUS_SPI1>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};