页次: 1
楼主,gitee 链接不好用了
下载页面只有linux和macos的64bit版本,没有win10 64bit的版本
1:ESC32
MCU:STM32F103 AD检测过零 支持开环模式,速度闭环,推力模式 ,软件硬件全部开源,支持MDK或者gcc开发
代码解析文档:https://download.csdn.net/download/u013636775/12587238
2:Blheli-s
MCU:EFM8BB10/21 8位单片机 比较器过零 支持众多市面电调硬件,也是目前商业性做的比较好的。
代码传送门https://gitee.com/BLDC/BLHeli
代码解析文档链接:https://download.csdn.net/download/u013636775/12596759
3:vesc
mcu:STM32F4 支持FOC和方波,广泛用于网友自制电动滑板驱动,代码功能和上位机比较完善,
代码传送门https://github.com/vedderb/bldc.git
你好,我移植awtk到f1c+rtthread上,编译的时候没有问题,链接的时候遇见问题
省略n行
CC build\AWTK\awtk-port\lcd_f1cxx.o
CC build\AWTK\awtk-port\main_loop_f1cxx.o
CC build\AWTK\awtk-port\platform.o
LINK rtthread.elf
Error in calling command:arm-none-eabi-g++
Exception: Invalid argument
scons: *** [rtthread.elf] Error 22
scons: building terminated because of errors.
还有个问题awtk-port里面的和f1c显示对接的那几个函数怎么写?
编译出错是什么情况?有遇到过么
littlevGL7.1.0\lvgl\src\lv_draw\lv_draw_rect.c:104:1: internal compiler error: in extract_constrain_insn, at recog.c:2246
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
scons: *** [build\littlevGL7.1.0\lvgl\src\lv_draw\lv_draw_rect.o] Error 1
升级下交叉编译器,下载地址
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads
我用的是
上代码:https://gitee.com/tiny200s/lv7_rtthread_f1c100s.git
使用说明参考Readme。
番外篇相关文档:https://littlevgl.readthedocs.io/en/latest/#
截图如下:
硬件平台:F1C100S 系统主频 408M
软件平台:用的WhyCan 网友staunchheart提供的代码,码云地址https://gitee.com/zhangheyang/f1c100s_rt-thread
改动地方:
只改了800*480的屏幕参数和gt911芯片的中断和复位脚,为了适配自己的板子
问题:
系统跑起来后启动了个littlevGL的titleView的demo,切换界面的时候卡的不行,已经把动画时间设置为0了
还是卡
littlevGL关键代码:
刷新函数
lvgl_rtt_lcd_flush_cb
{
……
uint32_t w = lv_area_get_width(area);
uint32_t *fbp32 = (uint32_t*) info.framebuffer; // 是我的info.framebuffer
for (y = area->y1; y <= area->y2 && y < disp_drv->ver_res; y++)
{
memcpy(&fbp32[y * info.width + area->x1], color_p, w * sizeof(lv_color_t));
color_p += w;
}
……
}
lv缓存初始化函数
rt_err_t lvgl_rtt_init(const char *name)
{
……
static lv_color_t buffer[LV_HOR_RES_MAX * LV_VER_RES_MAX];
static lv_disp_buf_t disp_buf;
lv_disp_buf_init(&disp_buf, buffer, NULL, LV_HOR_RES_MAX * LV_VER_RES_MAX);
/* littlevGL Display device interface */
lv_disp_drv_t disp_drv;
lv_disp_drv_init(&disp_drv);
……
}
lv tick函数 lvgl_rtt_tick_run是一个rtt的线程任务函数,在里面进行lv_tick_inc(1);
static void lvgl_rtt_tick_run(void *p)
{
while (1)
{
lv_tick_inc(1);
rt_thread_delay(1);
}
}
lv_task_handler函数 :lvgl_demo_run也是自己开启的一个rtt的任务函数,在里面进行lv_task_handler()调用
void lvgl_demo_run(void *p)
{
/* 新建个样式 */
static lv_style_t style_desktop;
static lv_style_t style_tabview;
static lv_style_t style_label;
lv_style_copy(&style_desktop, &lv_style_scr);
style_desktop.body.main_color = LV_COLOR_WHITE; /* 设置底色 */
style_desktop.body.grad_color = LV_COLOR_WHITE; /* 设置渐变色 */
lv_obj_t *scr = lv_disp_get_scr_act(NULL); /* 获取当前屏幕 */
lv_obj_set_style(scr, &style_desktop); /* 设置样式 */
static lv_point_t valid_pos1[] = { { 0, 0 }, { 1, 0 } ,{ 2, 0 } };
lv_obj_t *tileview;
tileview = lv_tileview_create(scr, NULL); // 父亲是main_title
lv_tileview_set_valid_positions(tileview, valid_pos1, 3);
lv_tileview_set_edge_flash(tileview, true);
lv_tileview_set_anim_time(tileview,10);
lv_tileview_set_tile_act(tileview, 1, 0, LV_ANIM_ON);
/*
* left title
*/
lv_obj_t * left_title = lv_obj_create(tileview, NULL);
lv_obj_set_size(left_title, LV_HOR_RES, LV_VER_RES);
//lv_obj_set_pos(left_title, -LV_HOR_RES, 0);
lv_obj_set_style(left_title, &lv_style_pretty);
lv_tileview_add_element(tileview, left_title);
lv_obj_t * left_label = lv_label_create(left_title, NULL);
lv_label_set_text(left_label, "left title");
lv_obj_align(left_label, NULL, LV_ALIGN_CENTER, 0, 0);
/*
* mid title
*/
lv_obj_t * mid_title = lv_obj_create(tileview, NULL);
lv_obj_set_size(mid_title, LV_HOR_RES, LV_VER_RES);
lv_obj_set_pos(mid_title, LV_HOR_RES, 0);
lv_obj_set_style(mid_title, &lv_style_pretty);
lv_tileview_add_element(tileview, mid_title);
lv_obj_t * mid_label = lv_label_create(mid_title, NULL);
lv_label_set_text(mid_label, "mid title");
lv_obj_align(mid_label, NULL, LV_ALIGN_CENTER, 0, 0);
/*
* right title
*/
lv_obj_t * right_title = lv_obj_create(tileview, NULL);
lv_obj_set_size(right_title, LV_HOR_RES, LV_VER_RES);
lv_obj_set_pos(right_title, LV_HOR_RES*2, 0);
lv_obj_set_style(right_title, &lv_style_pretty);
lv_tileview_add_element(tileview, right_title);
lv_obj_t * right_label = lv_label_create(right_title, NULL);
lv_label_set_text(right_label, "right title");
lv_obj_align(right_label, NULL, LV_ALIGN_CENTER, 0, 0);
while (1)
{
rt_thread_delay(RT_TICK_PER_SECOND / 100);
lv_task_handler(); // 这里进行lv task任务函数
}
}
运行效果如下:
手滑动的时候,界面都是慢慢的切过去的。好慢。
https://whycan.cn/files/members/4433/QQ%E7%9F%AD%E8%A7%86%E9%A2%9120200718232506.mp4
达克大神,请问你先前不是整理过rtthread+f1c100s+littlevgl吗,这个官方自带的Tp整理到rtthread+littlevgl代码里面了吗,应该怎么加里面呢。
楼主能否分享下固件的的源码,可以上传到git,共同学习下
固件下载: tiny200_rtt_awtk_800x480_w25q128_ns2009.rar
Copy Flash offset 1M to RAM 0x8000000 size:2508352 Copy Flash Ok! Check Image Crc32:3055548643 Image OK, Goto 0x80000000 ... \ | / - RT - Thread Operating System / | \ 4.0.2 build Jan 14 2020 2006 - 2019 Copyright by rt-thread team [SFUD] Find a Winbond flash chip. Size is 16777216 bytes. [SFUD] W25Q128 flash device is initialize success. clk_divider_set_rate 0 198000000 0 clk_divider_set_rate 0 198000000 0 [I/I2C] I2C bus [i2c0] registered periph_get_pll_clk:600000000 cpu_get_clk:408000000 ahb_get_clk:200000000 apb_get_clk:100000000 [D/FAL] (fal_flash_init:61) Flash device | W25Q128 | addr: 0x00000000 | len: 0x01000000 | blk_size: 0x00001000 |initialized finish. [I/FAL] ==================== FAL partition table ==================== [I/FAL] | name | flash_dev | offset | length | [I/FAL] ------------------------------------------------------------- [I/FAL] | Littlefs | W25Q128 | 0x00600000 | 0x00a00000 | [I/FAL] ============================================================= [I/FAL] RT-Thread Flash Abstraction Layer (V0.4.0) initialize success. [I/FAL] The FAL MTD NOR device (Littlefs) created successfully msh />[E/MMC] [err]:0x00000100, RTO [E/MMC] mmc cmd 5 err [I/SDIO] SD card capacity 1931264 KB. msh />ls Directory /: flash <DIR> mmc <DIR> usb <DIR> info.txt 41 msh /> msh />ls /mmc Directory /mmc: INFO.TXT 41 bcm.bin 80896 ip.bin 252176 f1c200 <DIR> msh />ls /flash Directory /flash: ts_lib.dat 105 msh /> msh />ps thread pri status sp stack size max used left tick error -------- --- ------- ---------- ---------- ------ ---------- --- aw_lp 6 suspend 0x00000138 0x00000800 23% 0x00000014 000 awtk 7 suspend 0x00000100 0x00010000 14% 0x00000007 000 tshell 20 running 0x00000210 0x00002000 14% 0x00000002 000 mmcsd_de 22 suspend 0x0000009c 0x00000400 49% 0x00000005 000 tidle0 31 ready 0x00000050 0x00000100 34% 0x00000013 000 msh />free total memory: 53512944 used memory : 3151892 maximum allocated memory: 3160312 msh />list_device device type ref count -------- -------------------- ---------- sd0 Block Device 1 Littlefs MTD Device 1 i2c0 I2C Bus 1 gpio Miscellaneous Device 0 lcd Graphic Device 0 W25Q128 Block Device 0 spi00 SPI Device 0 spi0 SPI Bus 0 uart2 Character Device 0 uart0 Character Device 2 msh /> msh />
上电后先进行屏幕校准,校准完成后自动运行awtk的图表demo, enjoy it !!!
文档说的另外两个工程是不是码云上没有,没有开源?
在哇酷网在线时间并不算长,但却很快就能找到合适的学习资料。这是因为有大量热爱分享的网友给哇酷添砖加瓦,也是由于哇酷提供了
https://whycan.cn/files/members/1592/AllwinnerSoC说明_页面_1.png
https://whycan.cn/files/members/1592/AllwinnerSoC说明_页面_2.png
我好想也碰见了这样的错误
你的flash是什么型号,我的是xt25f128b
大佬,开机好多错误提示,这是什么意思?
msh />[31m[E/MMC] [err]:0x00000100, RTO[0m
[31m[E/MMC] mmc cmd 8 err[0m
[31m[E/MMC] [err]:0x00000100, RTO[0m
[31m[E/MMC] mmc cmd 5 err[0m
[31m[E/MMC] [err]:0x00000100, RTO[0m
[31m[E/MMC] mmc cmd 55 err[0m
[31m[E/MMC] [err]:0x00000100, RTO[0m
[31m[E/MMC] mmc cmd 55 err[0m
[31m[E/MMC] [err]:0x00000100, RTO[0m
[31m[E/MMC] mmc cmd 55 err[0m
[31m[E/MMC] [err]:0x00000100, RTO[0m
[31m[E/MMC] mmc cmd 55 err[0m
[31m[E/MMC] [err]:0x00000100, RTO[0m
[31m[E/MMC] mmc cmd 1 err[0m
[31m[E/MMC] [err]:0x00000100, RTO[0m
[31m[E/MMC] mmc cmd 1 err[0m
[31m[E/MMC] [err]:0x00000100, RTO[0m
[31m[E/MMC] mmc cmd 1 err[0m
我这日志算是成功了还是失败了,怎么有[E/MMC] [err]错误
硬件是荔枝派Nano flash芯片是xt25f128b
\ | /
- RT - Thread Operating System
/ | \ 4.0.3 build Jul 2 2020
2006 - 2020 Copyright by rt-thread team
[W/SFUD] [SFUD] Warning: The OS tick(100) is less than 1000. So the flash write will take more time.
[I/SFUD] Find a flash chip. Size is 16777216 bytes.
[I/SFUD] gd25qxx flash device is initialize success.
[I/SFUD] Probe SPI flash gd25qxx by SPI device spi00 success.
periph_get_pll_clk:600000000
cpu_get_clk:408000000
ahb_get_clk:200000000
apb_get_clk:100000000
msh />[E/MMC] [err]:0x00000100, RTO
[E/MMC] mmc cmd 8 err
[E/MMC] [err]:0x00000100, RTO
[E/MMC] mmc cmd 5 err
[E/MMC] [err]:0x00000100, RTO
[E/MMC] mmc cmd 55 err
[E/MMC] [err]:0x00000100, RTO
[E/MMC] mmc cmd 55 err
[E/MMC] [err]:0x00000100, RTO
[E/MMC] mmc cmd 55 err
[E/MMC] [err]:0x00000100, RTO
[E/MMC] mmc cmd 55 err
[E/MMC] [err]:0x00000100, RTO
[E/MMC] mmc cmd 1 err
[E/MMC] [err]:0x00000100, RTO
[E/MMC] mmc cmd 1 err
[E/MMC] [err]:0x00000100, RTO
[E/MMC] mmc cmd 1 err
msh />
请问按照你的步骤,我编译出来的文件系统怎么是94M
荔枝派Nano官方wiki http://nano.lichee.pro/build_sys/rootfs.html 里面说要下载个.config 然后放到buildroot的根目录下,
我是按照它的操作的,编译出来94M
看楼主发的帖子没有执行这个操作,
5 编译根文件系统
5.1 安装依赖
apt-get install linux-headers-$(uname -r)
5.2 使用buildroot编译根文件系统
(1)获取buildroot源码
wget https://buildroot.org/downloads/buildroot-2017.08.tar.gz
tar xvf buildroot-2017.08.tar.gz
cd buildroot-2017.08/
(2) 配置bulidroot
make menuconfig
-----------------------------------------------
Target options --->
Target Architecture Variant (arm926t) ---> // arm926ejs架构
Enable VFP extension support // Nano 没有 VFP单元,勾选会导致某些应用无法运行
Target ABI (EABI) --->
Floating point strategy (Soft float) ---> // 软浮点
(2)下载依赖工具包
https://pan.baidu.com/s/1_tBdX9K7fOkH9JdXZ_MdiQ
下载完之后,解压后复制到"buildroot-2017.08/dl/"下,没有dl文件夹可自行创建。也可以不下载此工具包,但是buildroot自动更具需求下载这些工具包也许很慢。
(3)编译
make
-----------------------------------------------
出现错误:
make[2]: g++: Command not found
安装G++工具:
sudo apt-get install g++
-----------------------------------------------
继续编译:
编译成功!
-----------------------------------------------(4)查看rootfs文件的大小
ls -l output/images/rootfs.tar
硬件平台:nano
软件 :楼主提供的buildroot
问题:
编译完成后,执行烧录到spiflash的脚本ok,确定烧录成功了,上电重启后,提示如下错误:
U-Boot SPL 2018.01 (Jun 18 2020 - 08:59:07)
DRAM: 32 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 22
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI
U-Boot 2018.01 (Jun 18 2020 - 08:59:07 +0800) Allwinner Technology
CPU: Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM: 32 MiB
MMC: SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: 0b, 40, 18
*** Warning - spi_flash_probe_bus_cs() failed, using default environment
In: serial@1c25000
Out: serial@1c25000
Err: serial@1c25000
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: unrecognized JEDEC id bytes: 0b, 40, 18
Failed to initialize SPI flash at 0:0 (error -2)
No SPI flash selected. Please run `sf probe'
No SPI flash selected. Please run `sf probe'
=>
页次: 1