页次: 1
应该支持C++11:
root@jimmy:/opt/LVGLBuilder# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.4.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
楼主在什么平台用什么Qt 版本编译的, 我用Ubuntu18.04 Qt5.9.5 一堆错误
这样修正了一些:
diff --git a/LVGLObject.cpp b/LVGLObject.cpp
index 57bca92..2e28b13 100644
--- a/LVGLObject.cpp
+++ b/LVGLObject.cpp
@@ -3,6 +3,7 @@
#include "LVGLCore.h"
#include <QJsonArray>
+#include <assert.h>
LVGLObject::LVGLObject(const LVGLWidget *widgetClass, QString name, LVGLObject *parent)
: m_obj(widgetClass->newObject(parent->obj())), m_widgetClass(widgetClass)
diff --git a/LVGLProject.cpp b/LVGLProject.cpp
index b2ba85c..e9ce218 100644
--- a/LVGLProject.cpp
+++ b/LVGLProject.cpp
@@ -6,6 +6,7 @@
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
+#include <assert.h>
#include "LVGLCore.h"
#include "LVGLObject.h"
diff --git a/freetype/builds/unix/ftsystem.c b/freetype/builds/unix/ftsystem.c
index 826713f..8ba5600 100644
--- a/freetype/builds/unix/ftsystem.c
+++ b/freetype/builds/unix/ftsystem.c
@@ -19,6 +19,9 @@
#include <ft2build.h>
/* we use our special ftconfig.h file, not the standard one */
#include <ftconfig.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
#include FT_INTERNAL_DEBUG_H
#include FT_SYSTEM_H
#include FT_ERRORS_H
diff --git a/freetype/freetype.pri b/freetype/freetype.pri
index 52a036a..a3f8a46 100644
--- a/freetype/freetype.pri
+++ b/freetype/freetype.pri
@@ -57,3 +57,5 @@ win32 {
}
DEFINES += FT2_BUILD_LIBRARY
+
+INCLUDEPATH += $$PWD/include/freetype/config/
但是还是有一个错误, 不知道如何解决:
root@jimmy:/opt/LVGLBuilder# make
g++ -c -pipe -O2 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DFT_CONFIG_OPTION_ERROR_STRINGS -DFT2_BUILD_LIBRARY -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -Ilvgl -Ifreetype/include -Ifreetype/builds/unix -Ifreetype/include/freetype/config -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Ibuild/moc -isystem /usr/include/libdrm -Ibuild/ui -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o build/obj/LVGLProject.o LVGLProject.cpp
LVGLProject.cpp: In static member function ‘static LVGLProject* LVGLProject::load(const QString&)’:
LVGLProject.cpp:42:27: error: no match for ‘operator[]’ (operand types are ‘QJsonDocument’ and ‘const char [5]’)
QJsonObject lvglObj = doc["lvgl"].toObject();
^
LVGLProject.cpp:46:27: error: no match for ‘operator[]’ (operand types are ‘QJsonDocument’ and ‘const char [7]’)
QJsonArray imageArr = doc["images"].toArray();
^
LVGLProject.cpp:52:26: error: no match for ‘operator[]’ (operand types are ‘QJsonDocument’ and ‘const char [6]’)
QJsonArray fontArr = doc["fonts"].toArray();
^
Makefile:6064: recipe for target 'build/obj/LVGLProject.o' failed
make: *** [build/obj/LVGLProject.o] Error 1
root@jimmy:/opt/LVGLBuilder#
看下晕哥这个帖子: https://whycan.cn/t_397.html
終於解決registered sensor subdev 同找到OV5640 sensor.
但還有新問題 [VFE_WARN] Nobody is waiting on this video buffer,buf = xxxx. 是什麼問題?
前面那个问题是怎么解决的?
硬件IO中断的 demo: https://whycan.cn/t_1261.html
/usr/bin/make all-recursive
make[10]: Entering directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver/build-gnulib-gdbserver/import'
make[11]: Entering directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver/build-gnulib-gdbserver/import'
/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/host/bin/arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../.././../gnulib/import -I.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 -c ../.././../gnulib/import/dirname-lgpl.c
/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/host/bin/arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../.././../gnulib/import -I.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 -c ../.././../gnulib/import/basename-lgpl.c
/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/host/bin/arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../.././../gnulib/import -I.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 -c ../.././../gnulib/import/stripslash.c
/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/host/bin/arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../.././../gnulib/import -I.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 -c ../.././../gnulib/import/localcharset.c
/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/host/bin/arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../.././../gnulib/import -I.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 -c ../.././../gnulib/import/malloca.c
../.././../gnulib/import/localcharset.c: In function 'get_charset_aliases':
../.././../gnulib/import/localcharset.c:172:34: error: 'HAVE_WORKING_O_NOFOLLOW' undeclared (first use in this function)
O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0));
^
../.././../gnulib/import/localcharset.c:172:34: note: each undeclared identifier is reported only once for each function it appears in
make[11]: *** [localcharset.o] Error 1
make[11]: *** Waiting for unfinished jobs....
make[11]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver/build-gnulib-gdbserver/import'
make[10]: *** [all-recursive] Error 1
make[10]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver/build-gnulib-gdbserver/import'
make[9]: *** [all] Error 2
make[9]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver/build-gnulib-gdbserver/import'
make[8]: *** [subdir_do] Error 1
make[8]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver/build-gnulib-gdbserver'
make[7]: *** [all] Error 2
make[7]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver/build-gnulib-gdbserver'
make[6]: *** [subdir_do] Error 1
make[6]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver'
make[5]: *** [all-lib] Error 2
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb/gdbserver'
make[4]: *** [subdir_do] Error 1
make[4]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/gdb'
make[2]: *** [all-gdb] Error 2
make[2]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1'
make: *** [/opt/lichee-nano-one-key-package/buildroot-2017.08/buildroot-2017.08/output/build/gdb-7.11.1/.stamp_built] Error 2
请教这个错误是什么问题造成的呢?
localcharset.c:172:34: error: 'HAVE_WORKING_O_NOFOLLOW' undeclared (first use in this function)
先把 wifi 账号密码硬编码到固件吧
RT-Thread已率先发布GD32V BSP:
https://github.com/RT-Thread/rt-thread/tree/master/bsp/gd32vf103v-eval
我觉得可以忽略证书吧:
https://blog.csdn.net/bytxl/article/details/46989667
curl wget 不验证证书进行https请求:
wget 'https://x.x.x.x/get_ips' --no-check-certificate
curl 'https://x.x.x.x/get_ips' -k
谢谢, 有空我用 JLINK 试一试!
这类题目可以先考虑交点的数值。设所有点横向顺序为a到h。
首先可以确定,第一行中间的点有三条线,则必有三组数满足x+y=14-b,枚举后可以发现只有5和7满足要求。
进一步可以验证b=5时三组数分别是(1,8),(2,7),(3,6),g为4。
b=7时三组数分别是(1,6),(2,5),(3,4),g为8。
之后考虑剩下的三个交点。把所有可能的情况加起来,可以得到
(a+b+c)+(b+d+f)+(b+e+h)+(a+d+g)+(c+e+g)
=(a+b+c+d+e+f+g+h)+(a+2*b+c+d+e+g)
=(1+2+3+4+5+6+7+8)+(a+b+c)+(b+e)+(d+e)
=36+14+(b+e)+(d+e)=14*5=70
因此(b+e)+(d+e)=20,代入可以求出所有解。
点赞点赞
debounce-delay-ms 这个去抖延迟时间 100ms 感觉有点太大了, 改小试一试了。
https://e2echina.ti.com/question_answer/dsp_arm/sitara_arm/f/25/t/134142
这个才 5ms
晕哥 说:605364021 说:https://github.com/tinyalsa/tinyalsa
这个是tinyalsa源码?把头文件和C文件加入到QT程序中一起编译吗?对的,就是这个!
晕哥能简单说下怎么把源码加进QT项目一起编译吗?谢谢
直接把源码加进去,
见错改错,应该只会有很少错.
设置好声卡参数, 然后调用 play_sample() 播放内存数据即可。
https://github.com/tinyalsa/tinyalsa/blob/master/utils/tinyplay.c
移植到zero上跑起来了,播放完全没杂音,也没丢包情况,分包发送应该是sbc配置的问题。
使用正常!!
ubuntu使用cp2102转串口连接,出现杂音,可能是cp2102的问题导致丢包出现杂音
厉害厉害
是用 73 楼这代码搞定的吗?
晕哥有没试过rtl8723bs,3Mbps速率的情况
上传一下portaudio播放的代码,解压到/port/posix-h5/目录下,直接make就行
需要安装portaudio
不会是我连接的杜邦线太长了吧(捂脸.jpg)
test.rar
再请教一下, portaudio 在 V3s 是作为一个独立进程运行, 还是静态链接到你的app ?
底层还是一样调用 alsalib ?
#include "N76E003.h"
#include "Common.h"
#include "Delay.h"
#include "SFR_Macro.h"
#include "Function_define.h"
#define T1_INIT 670
UINT8 u8TH0_Tmp,u8TL0_Tmp,u8TH1_Tmp,u8TL1_Tmp;
UINT16 t = 0;
/************************************************************************************************************
* TIMER 1 interrupt subroutine
************************************************************************************************************/
void Timer1_ISR (void) interrupt 3 //interrupt address is 0x001B
{
TH1 = u8TH1_Tmp;
TL1 = u8TL1_Tmp;
t++;
//P15 = ~P15; //P0.3 toggle when interrupt
}
/************************************************************************************************************
* Main function
************************************************************************************************************/
void main (void)
{
Set_All_GPIO_Quasi_Mode;
TIMER1_MODE1_ENABLE;
clr_T1M;
u8TH1_Tmp = (65535-T1_INIT)/256;
u8TL1_Tmp = (65535-T1_INIT)%256;
TH1 = u8TH1_Tmp;
TL1 = u8TL1_Tmp;
set_ET1; //enable Timer1 interrupt
set_EA; //enable interrupts
t = 0;
set_TR1; //Timer1 run
while(1)
{
if (t >= 2000)
{
clr_TR1;
t = 0;
P15 = ~P15; //P1.5 toggle when interrupt
set_TR1;
}
}
}
几行代码搞定 一个 1秒翻转 IO 的Demo
test -f /opt/buildroot-2018.08.2/output/target/etc/ld.so.conf && \
{ echo "ERROR: we shouldn't have a /etc/ld.so.conf file"; exit 1; } || true
test -d /opt/buildroot-2018.08.2/output/target/etc/ld.so.conf.d && \
{ echo "ERROR: we shouldn't have a /etc/ld.so.conf.d directory"; exit 1; } || true
mkdir -p /opt/buildroot-2018.08.2/output/target/etc
( \
echo "NAME=Buildroot"; \
echo "VERSION=2018.08.2"; \
echo "ID=buildroot"; \
echo "VERSION_ID=2018.08.2"; \
echo "PRETTY_NAME=\"Buildroot 2018.08.2\"" \
) > /opt/buildroot-2018.08.2/output/target/usr/lib/os-release
ln -sf ../usr/lib/os-release /opt/buildroot-2018.08.2/output/target/etc
>>> Sanitizing RPATH in target tree
/opt/buildroot-2018.08.2/support/scripts/fix-rpath target
Error: can't execute patchelf utility '/opt/buildroot-2018.08.2/output/host/bin/patchelf'
make: *** [target-finalize] Error 1
单独执行:
root@ubuntu:/opt/buildroot-2018.08.2# /opt/buildroot-2018.08.2/output/host/bin/patchelf
/opt/buildroot-2018.08.2/output/host/bin/patchelf: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /opt/buildroot-2018.08.2/output/host/bin/patchelf)
/opt/buildroot-2018.08.2/output/host/bin/patchelf: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /opt/buildroot-2018.08.2/output/host/bin/patchelf)
jimmy 说:MELIS 吧, 全志自己出的小系统, 基本提供的是 lib 文件, 外设驱动齐全, 你上面列的这些外设都驱动了。
视频解码也有。Melis谁知道怎么跑起来?
用晕哥的方法: https://whycan.cn/t_1823.html
用MDK编译倒是没问题,
打包就懵了
理论上直接加到 MDK 工程里面跑就可以了
https://github.com/u-boot/u-boot/blob/master/cmd/mtdparts.c
u-boot 如同 Linux一样,也支持 mtd 分区, 估计是通过partition(分区首地址) + offset(偏移) 方式访问flash地址.
https://patents.google.com/patent/CN104185294A/zh
手机热点的识别方法与识别装置
Abstract
本发明公开了一种手机热点的识别方法与识别装置,根据手机虚拟的热点所分配的IP地址在固定范围内的特点,判断当前热点是否是手机热点,方法简单易行,快速有效,便于用户决定是否继续连接当前热点。
OPPO 的专利, 用分配到的IP和加密方式等判断是手机热点.
你用的sunxi-fel是哪里的代码?从代码里看,似乎没有对大于24bit的地址做特殊处理。
https://whycan.cn/t_500.html
https://whycan.cn/t_444.html#p1560
抓了一下 写 16M 字节区的协议, 先写扩展寄存器为1, 然后再操作.
Linux驱动的做法是用 4B 地址模式(线性模式).
https://github.com/torvalds/linux/blob/master/drivers/mtd/spi-nor/spi-nor.c
https://github.com/torvalds/linux/blob/master/drivers/mtd/devices/m25p80.c
https://github.com/torvalds/linux/blob/master/drivers/mtd/spi-nor/spi-nor.c
https://github.com/torvalds/linux/blob/master/drivers/mtd/devices/m25p80.c
Linux驱动写得真好, 把市场上那么多 spi flash 的 4B 模式都兼容了。
qinxiongxu 说:晕哥 说:主线u-boot + 主线linux的话,只要改 u-boot 的配置参数就可以了,
V3s 也是这样。
主线u-boot + 官方Bsp Linux的话,是需要同时修改u-boot & kernel ?
只需要修改Uboot就可以了
如果你是修改尺寸 可能那个fbuffer会报错 就是因为如果是启动出现CONFIG_SUNXI_MAX_FB_SIZE的内存不够修改u-boot/include/configs/sunxi-common.h/CONFIG_SUNXI_MAX_FB_SIZE的中的大小 uboot默认设置为2M 我已修改为4M(在309 行)
#ifndef CONFIG_MACH_SUN8I_V3S
#define CONFIG_SUNXI_MAX_FB_SIZE (16 << 20)
#else
#define CONFIG_SUNXI_MAX_FB_SIZE (2 << 20)
#endif缓冲区不够,还有在代码里面修改为4M就可以了https://whycan.cn/files/members/1116/2_20181219-0500.png就是在这里修改
感谢分享经验!
http://arduboy.net/bbs/forum.php?mod=viewthread&tid=3643&extra=&page=1
找了很久, 原来原创的帖子在这里, 终于跟上司徒的节奏了.
随便用 USB 读卡器测了一下 XTSD01GLGEAG 读写速度:
jimmy@ubuntu:/$ sudo dd if=/dev/sdg of=/mnt/hgfs/D/xxx.bin
245760+0 records in
245760+0 records out
125829120 bytes (126 MB) copied, 39.4397 s, 3.2 MB/sjimmy@ubuntu:/$ sudo dd of=/dev/sdg if=/mnt/hgfs/D/xxx.bin
245760+0 records in
245760+0 records out
125829120 bytes (126 MB) copied, 221.29 s, 569 kB/s
读速度 3.2 MB/s, 写速度569 kB/s
这个测试结果仅供参考, 因为我是操作虚拟机外面的host文件.
新唐的芯片 Demo 都很全的,基本有所有外设的demo,当然包括 GPIO,你仔细找找
是的。
M0518 SDK 这里下载:
https://www.nuvoton.com/hq/products/microcontrollers/arm-cortex-m0-mcus/m0518-series/m0518lc2ae?__locale=zh
http://www.nuvoton.com/resource-files/NUTINY-SDK-M0518_V2.0.zip
jimmy 说:看着转换后有部分丝印像是错位了吗?
用 egale 脚本转出来的, 估计是要改改才能用吧。
看来摄像头就是用这个了
ov7670:
https://item.szlcsc.com/334780.html
ov2640:
https://item.szlcsc.com/334779.html
淘宝售价更便宜:
下载这些 eagle 转 AD 脚本, 勉勉强强搞定
https://github.com/Altium-Designer-addons/scripts-libraries/tree/master/EagleToAD/02_with_polygons
@jimmy
_sdcc_external_startup会在启动后调用,里面可以做一些初始化的操作,其中的汇编是直接从keil n76e003 bsp的启动文件里面扣出来的,作用是关闭POR功能
翻了一下手册, 涨知识了:
重要说明:
由于N76E003 POR侦测电压落在1.3V 至 1.5 V范围IE之间,当N76E003进入掉电模式后,再次唤醒
时,N76E003的内核电压可能低于1.5 V,此时可能会触发POR 动作,造成芯片复位。为避免这种现
象,建议当每次电源上电正常运行程序之后,关闭POR模块。解决方法:
由于POR是用于判断VDD上电状态,当上电状态结束后由LVR来判断电源状态,故建议当稳定上电后,
关闭POR,下面说明如何关闭POR功能。
寄存器PORDIS(FDH)可以用于关闭POR功能。关闭POR
对PORDIS寄存器先写入5AH,再写入A5H可以关闭POR功能请严格按照如下步骤关闭POR功能:
sfr PORDIS = 0XFD; TA =0XAA; TA= 0X55; PORDIS = 0X5A; TA=0XAA; TA=0X55; PORDIS = 0XA5;
以下为是写时效保护寄存器的正确和错误范例:
Example 1,
MOV TA,#0AAH ;3 clock cycles
MOV TA,#55H ;3 clock cycles
ORL WDCON,#data ;4 clock cyclesExample 2,
MOV TA,#0AAH ;3 clock cycles
MOV TA,#55H ;3 clock cycles
NOP ;1 clock cycle
ANL BODCON0,#data ;4 clock cyclesExample 3,
MOV TA,#0AAH ;3 clock cycles
MOV TA,#55H ;3 clock cycles
MOV WDCON,#data1 ;3 clock cycles
ORL BODCON0,#data2 ;4 clock cyclesExample 4,
MOV TA,#0AAH ;3 clock cycles
NOP ;1 clock cycle
MOV TA,#55H ;3 clock cycles
ANL BODCON0,#data ;4 clock cycles在第一个例子中,写保护位在三个时钟周期窗口关闭之前完成。然而,在例2中,BODCON0的写入并
没有在时效访问窗口打开时完成,操作完这些指令后,BODCON0的值不会有变化。示例3中,WDCON
写入成功,但对BODCON0访问超过三个机器周期窗口,因此BODCON0值不会改变。例4,第二次写
55H对应第一个AAH写入时间超过了3个机器周期,时效访问窗口打开失败,所以后面的写入全部无效。
新唐这寄存器保护也是到位
乐趣在于折腾,sdcc编译问题已解决。
原因是sdcc编译|=运算的时候会编译出3条指令,而对于某些受写保护SFR,打开TA保护后只有4个时钟周期是可以写的。
解决方法是通过peep-file来做指令替换,测试pwm例子已正常。集成sdcc&makefilekeil c51编译结果
mov TA, #0xAA ; TA = 0xAA mov TA, #0x55 ; TA = 0x55 {'U'} orl SFRS, #0x01 ; SFRS |= 0x01
未修正前SDCC编译结果
mov TA, #0xAA ; TA = 0xAA mov TA, #0x55 ; TA = 0x55 {'U'} mov R6, SFRS ; R6 = SFRS orl 0x06, #0x01 ; 0x06 |= 0x01 mov SFRS, R6 ; SFRS = R6
我比较了一下源码:
就 Common.c 多了一个函数:
unsigned char
_sdcc_external_startup (void)
{
__asm
mov 0xC7, #0xAA ; [0xC7] = 0xAA
mov 0xC7, #0x55 ; [0xC7] = 0x55 {'U'}
mov 0xFD, #0x5A ; [0xFD] = 0x5A {'Z'}
mov 0xC7, #0xAA ; [0xC7] = 0xAA
mov 0xC7, #0x55 ; [0xC7] = 0x55 {'U'}
mov 0xFD, #0xA5 ; [0xFD] = 0xA5
__endasm;
return 0;
}
请问这个是解决什么问题呢?
好奇去u-boot的gayhub和官网上看了一下,
https://github.com/u-boot/u-boot
https://www.denx.de/wiki/U-Boot/ReleaseCycle
v2018.05现在还是rc1状态,
也就是候选发行版本(Release Candidate 1)
可能还会有rc2, rc3,最终才会在5月份推出 v2018.05
HWND GUIAPI CreateWindowEx( const char * spClassName,
const char * spCaption,
DWORD dwStyle,
DWORD dwExStyle,
int id,
int x,
int y,
int w,
int h,
HWND hParentWnd,
DWORD dwAddData
)
HWND hwnd1 = CreateWindow("mybutton1", "1", WS_VISIBLE|WS_CHILD, IDC_MYBUTTON0, 95, 350, 105, 55, hWnd, 0);
HWND hwnd2 = CreateWindow("mybutton2", "2", WS_VISIBLE|WS_CHILD, IDC_MYBUTTON0, 270, 350, 105, 55, hWnd, 0);
static int MybuttonWindowPro(HWND, hWnd ...)
{
if(hWnd == hwnd1)
{
....
}
else if(hWnd == hwnd2)
{
....
}
}
进入 下载页面 scratch.mit.edu/download 下载 Windows版本软件.
请先安装 air.exe 软件, 再安装Scratch-458.0.1.exe.
air安装:
scratch安装:
读出正在播放杂音时所有I2S寄存器:
root@Widora:~# devmem 0x10000a00
0xE1014040
root@Widora:~# devmem 0x10000a04
0x00000000
root@Widora:~# devmem 0x10000a08
0x00000000
root@Widora:~# devmem 0x10000a0c
0x00001003
root@Widora:~# devmem 0x10000a0c
0x00001003
root@Widora:~# devmem 0x10000a0c
0x00001003
root@Widora:~# devmem 0x10000a10
0x00001003
root@Widora:~# devmem 0x10000a14
0x00000000
root@Widora:~# devmem 0x10000a18
0x00000000
root@Widora:~# devmem 0x10000a20
0x00000000
root@Widora:~# devmem 0x10000a28
0x00000000
页次: 1