您尚未登录。

#1 Re: 全志 SOC » 有没有人在 V3S 上有 H264 硬件解码? » 2023-11-13 19:12:41

ookk303 说:

楼主,找到方法做硬件解码了吗?

是的,在V3S上,裸机H264解码。 在 F1Cxxx 上,它可能非常相似,但我最近没有研究

#3 Re: 全志 SOC » [F1C100S / F1C200S] Bare metal / RTOS hardware H264 effort » 2023-02-24 05:31:14

I am not sure what you guys want to make with DEFE which is not already implemented in the bare metal drivers floating around, as for the question of @f1c100s_ maybe that is the method you are looking for, i am not sure what you want to acheive and what is the problem
https://github.com/nminaylov/F1C100s_projects/blob/f4c5d0df11c8786a351ff7473bd2bd72a00e891e/_drivers_/src/f1c100s_de.c#L328

there are various functions belonging to DEFE implemented some bare metal drivers.

https://github.com/nminaylov/F1C100s_projects/blob/f4c5d0df11c8786a351ff7473bd2bd72a00e891e/_drivers_/src/f1c100s_de.c
https://github.com/hongxuyao/F1C100s_with_Keil_RTX4_emWin5/blob/c55397f01ecd8673ffc53d51abe43319f4ce2466/spl-separated/periph/fb-f1c100s.c
https://github.com/VeiLiang/BoloRTT/blob/3332e09121af23d19ab76b78a255841d330ccdf0/bsp/f1c/drivers/drv_fb.c

I have other sources which i cannot share here but i can look inside if you need some specific functions, let me know.
The quest for bare metal H264 is not finished yet so anyone with information is welcome to share, also in about 2 week i will get the h264 bare metal driver for v3s (not free though), it is expected to work on F1C100S, to be tested.

#5 Re: 全志 SOC » Baremetal hardware JPEG-decoder example (F1C100S) » 2023-02-17 21:41:29

@Ozelot
wow, that is a reality check, hard to realize what you are going through. With my best wishes for a fast resolution of this terrible situation and a fast recovery of the country.
I'll update here too if i have some news about the H264, i already started to port it months ago but there was just too many third party linux dependencies. I still have the Keil project though.

#7 全志 SOC » 有没有人在 V3S 上有 H264 硬件解码? » 2023-02-17 16:25:28

hoel
回复: 3

正在寻找 V3S(裸机或 RTOS)上的 H264 硬件解码,如果有人有请与我联系。

#8 Re: 全志 SOC » [F1C100S / F1C200S] Bare metal / RTOS hardware H264 effort » 2023-02-16 06:12:16

Ozelot 说:
hoel 说:

我在裸机中使用了 DEFE,所以,是的,我认为它可以在主线中完成。3265649676

Can you share an example of working with DEFE?

Sorry i missed the message, sure contact me on the QQ email and i'll share.

#9 Re: 全志 SOC » F1C00S MELIS MDK 运行时错误 0x6972 addr error » 2022-02-23 06:28:54

好吧,解决方案已经写好了,你可以阅读它

#10 Re: 全志 SOC » 开源自己的Openwrt衍生版 HandsomeMod 支持f1c100s/f1c200s v3s » 2021-10-20 01:13:43

安装缺少的依赖项,pppd 或使用日志中的标志禁用它
-Dppp=false

#11 Re: 全志 SOC » 开源自己的Openwrt衍生版 HandsomeMod 支持f1c100s/f1c200s v3s » 2021-10-10 06:18:34

unturned3 说:

哦,对了,还有个关于 video decoder、encoder 的问题:libcedar 是全志官方的库吗?是一个闭源的二进制包还是什么东西?gstreamer 又是怎么使用 libcedar的呢?麻烦大佬解释一下,多谢多谢

libcedar 是官方的 allwinner 驱动程序,它不再是真正接近的。 要获得不错的性能,您可能想要尝试 CedarXPlayerTest,它是一个只能作为二进制文件使用的可执行文件

#12 Re: 全志 SOC » [F1C100S / F1C200S] Bare metal / RTOS hardware H264 effort » 2021-09-20 20:39:14

@f1c100_
我在裸机中使用了 DEFE,所以,是的,我认为它可以在主线中完成。3265649676

#13 Re: 全志 SOC » [F1C100S / F1C200S] Bare metal / RTOS hardware H264 effort » 2021-09-20 15:58:53

f1c100_ 说:

我现在的问题是如何在主线上实现硬件YUV转RGB。我现在用主线5.2,自己写的播放器调用的CEDAR(不是ffmpeg的方式),800x480分辨率H264解码可以到24~30fps。如果可以实现硬件YUV转RGB的话1280x720@60fps也不是问题。

好吧,有可用的硬件转换,这是在 CEDAR 驱动程序中实现的,所以,这不是问题。
它被称为 DEFE (Display Engine Front End)  hard conversion MB32-YUV format to ARGB8888 format

你介意分享你的linux的源代码吗? 它可能会帮助需要在主线上获得流畅 mp4 的其他人。

#14 Re: 全志 SOC » [F1C100S / F1C200S] Bare metal / RTOS hardware H264 effort » 2021-09-20 00:20:08

unturned3 说:

@hoel

Thanks for the effort. I'm just waiting for the tech-competent people to get F1C100s stuff working on mainline Linux... Maybe I'll take a jab at this sometime later.

The MDK projects are not clean yet but i added the sources. Make sure to enable C99  and add --gnu flag in MDK project options.

The "official" Tina has hardware support, thought the sources are kept by agents to make money. Melis also have hardware support, but both these platforms are quite a pain to work with.

Mainline 5.4 has Cedar, but according to multiple reports the performance is so poor that it is not usable (10fps).

What some of us like is efficient development workflow (fast compile, instant flash, debug) clear MDK project with few sources files, very small binaries, full control over every bit of code. Quite the contrary of tina and Melis.

#15 全志 SOC » [F1C100S / F1C200S] Bare metal / RTOS hardware H264 effort » 2021-09-19 22:19:58

hoel
回复: 13

最近在仔细研究SUNIV家族(F1C100S)在裸机/RTOS上实现H264硬件解码的可行性。我会尽量在这里保留一些参考资料,并开始分享资源。

我对全志车手的理解如下。

VE
负责低层操作。主要由一个由VE引擎中断驱动的状态机组成,它使用两个定时器和一个任务列表。
我认为这个内核可以运行裸机(至少对于 PoC 而言),它没有什么特别之处。要与 RTOS 一起使用,只需实现互斥体包装器。我用直接函数替换了 ioctl。几个小时后,我能够将这部分集成到裸机 MDK 项目中,只需稍加努力,它应该可以正常工作。
这个核心是3个文件,cedar_ve_sl.c cedar_ve.h和list.h(linux双向链表实现)。
我使用了这些源代码: https://github.com/mirkerson/c600/tree/master/linux-3.10/drivers/media/cedar-ve
ve2.png
ve.zip

CedarX
负责所有数据处理,由各种块、FB、VB、vdecoder + plugins、OMX组成。
由于大量异步操作,这自然取决于互斥锁,但是,可能可以使用调度程序或其他技巧在裸机中运行它。
经过几个小时的工作,项目编译没有错误。必须修改各种东西。 RTOS 依赖包在 osal.c 中。 pixelformat.c 已经扩展了需要 ARMCC 6 的 inline asm,所以请注意 MDK 编译器版本。
我使用了这些来源: https://github.com/allwinner-zh/media-codec/tree/master/sunxi-cedarx/SOURCE
ve.png
cedarx.zip

allwinner的一篇关于LibVE架构的论文和其他一些文档
https://github.com/linux-sunxi/cedarx-libs/blob/master/doc/Libve%20User%20Guide-2011.7.6.pdf

这里是 MELIS 的 CEDAR 模块的非编译版本:
https://github.com/caochunjie45/test/tree/master/eMod/mod_cedar
遗憾的是,这仍然依赖于其他编译库,因此它不包含编写 h264 驱动程序所需的所有源代码,但它仍然很有帮助。

当然,如果我们能找到一个旧 MELIS 的完整来源,或者只是 H264 驱动程序的来源(也许一些前 Alwinner 员工可以帮助提供一个旧的 H264 PoC?或一个旧驱动程序?)可以随时自己尝试,总是很有趣。

稍加清理后,我将添加 MDK 项目







Recently, i have studied closely the feasability of implementing the H264 hardware decoding on bare metal / RTOS for the SUNIV familly (F1C100S). I will try to keep some references here, and start to share ressources.

My understanding of the allwinner driver is as follow.

VE
in charge of low level operations. Mainly consists of a state machine driven by the VE engine interrupt, it uses two timers and a tasklist.
I think this core can run bare metal (at least for PoC), there is nothing special about it. To use with RTOS only the mutexes wrapper have to be implemented. I replaced ioctl by direct functions. After few hours i was able to integrate this part into the bare metal MDK project, with few more efforts it should work OK.
This core is 3 files, cedar_ve_sl.c cedar_ve.h and list.h (linux doubly linked list implementation).
i used these source source: https://github.com/mirkerson/c600/tree/master/linux-3.10/drivers/media/cedar-ve
ve2.png
ve.zip


CedarX
in charge of all data handling, composed of various blocks, FB, VB, vdecoder + plugins, OMX.
Naturally this depends on mutexes due to numerous async operation, however, it is probably possible to run it in bare metal with scheduler or other trick.
After wfew hours of work the project compiles without error. Various things had to be modified. RTOS dependencies are wrapped in osal.c.  pixelformat.c has extended inline asm which requires ARMCC 6, so pay attention to the MDK compiler version.
I used these source : https://github.com/allwinner-zh/media-codec/tree/master/sunxi-cedarx/SOURCE
ve.png
cedarx.zip

A paper from allwinner about the architecture of LibVE and few other documents
https://github.com/linux-sunxi/cedarx-libs/blob/master/doc/Libve%20User%20Guide-2011.7.6.pdf

A non compiled version of CEDAR module of MELIS here:
https://github.com/caochunjie45/test/tree/master/eMod/mod_cedar
Sadly this still relies on other compiled libraries, so it does not contain all the sources required to write the h264 driver, but it is helpful nontheless.

Of course, it would be great if we can find the full sources of an old MELIS, or just the sources of H264 driver (maybe some former Alwinner employee can help to give an old H264 PoC? or an old driver?), anyway we can always try by ourselves, it is always interesting.

I will add the MDK projects after a little bit of cleaning

#16 Re: 全志 SOC » 全志官方tina linux sdk sys_config.fex 的 uart_debug_port 参数是如何影响uboot和linux » 2021-09-19 19:01:41

@歌以咏志
你好,你知道哪里可以买到你用的 TINA VIOLIN 吗? (Tina_rel)

#17 Re: 全志 SOC » 发一个 TINY200 开发板可以用的 TINA3.5 RTL8723BS 测试固件 » 2021-09-14 05:23:44

@无根浮萍
你好,你能分享一下tina 3.5吗? 我只想在 F1C100 上播放视频

#18 Re: 全志 SOC » F1c200s的全志Tina上,移植AWTK,闪烁严重啊,有谁知道怎么解决么 » 2021-09-14 05:21:17

staunchheart 说:

我的是V3S+TINA3.5
运行自带的DEMO正常,硬解MP4都流畅。
但运行AWTK的DEMO,屏是黑的,时不时闪闪。

有没有人解决过?

你好,你能分享一下tina 3.5吗? 我只想在 F1C100 上播放视频

#19 全志 SOC » F1C00S MELIS MDK 运行时错误 0x6972 addr error » 2021-09-10 20:59:51

hoel
回复: 2

我用MDK编译MELIS,编译没有错误,生成新镜像并烧录,但是我在循环中出现这个错误,有人知道这个问题吗?

BOOT0 is starting
DBG: init jtag OK
init dram , base        is 0x80000000
init dram , clk         is 120
init dram , access_mode is 1
init dram , cs_num      is 1
init dram , ddr8_remap  is 0
init dram , sdr_ddr     is 1
init dram , bwidth      is 16
init dram , col_width   is 10
init dram , row_width   is 13
init dram , bank_size   is 4
init dram , cas         is 3
init dram , size        is 0
dram init successed,size is 32
DBG: init heap OK, base address is 0x80000000, size is 0x00100000
DBG: load boot1 from spinor
DBG: init spinor OK
DBG: the size of BOOT1 is 71168
DBG: src_sum = 0x0x19c0ac68
DBG: sum = 0x0x19c0ac68
succeed in loading BOOT1
jump to BOOT1
DBG: boot1 starting!
DBG: init heap OK, base address is 0x80800000, size is 0x00100000
begin to init file system
DBG: init block device OK
DBG: init mini file system OK
DBG: mount c partition OK
0
jump to kernal
port=4,port_num=1,mul_sel=6 eint_num=1 trigger=2
hread running.....
partition [D] plug in..
Parts Thread work now.....
.Start Shell from partion 'c'..................................................................................
Mount Parts Thread work end....

x6969637765....
765 data fail....
&&&&&&&&&&&&0x6972 addr error&&&&&&&&&&
..
....
rror&&&&&&&&&&
37765....
ta fail....
 addr error&&&&&&&&&&
0x6969637765....
7765 data fail....
&0x6972 addr error&&&&&&&&&&
&&addr=0x6969637765....
x6969637765 data fail....
&&&&&&&&0x6972 addr error&&&&&&&&&&


&&&&&&&&&&
5....
ail....
r error&&&&&&&&&&
69637765....
 data fail....
972 addr error&&&&&&&&&&
dr=0x6969637765....
9637765 data fail....
&&&&0x6972 addr error&&&&&&&&&&

**0x6969637765 data fail....
&&&&&&&&&&&0x6972 addr error&&&&&&&&&&
.
...
set iic clock fail
969637765....
5 data fail....
6972 addr error&&&&&&&&&&
ddr=0x6969637765....
69637765 data fail....
&&&&&0x6972 addr error&&&&&&&&&&

***0x6969637765 data fail....
&&&&&&&&&&&&0x6972 addr error&&&&&&&&&&
..
....
rror&&&&&&&&&&
37765....
ta fail....
 addr error&&&&&&&&&&
0x6969637765....
7765 data fail....
&0x6972 addr error&&&&&&&&&&
&&addr=0x6969637765....
x6969637765 data fail....
&&&&&&&&0x6972 addr error&&&&&&&&&&


&&&&&&&&&&
5....
ail....
r error&&&&&&&&&&
69637765....
 data fail....
972 addr error&&&&&&&&&&
dr=0x6969637765....
9637765 data fail....
set iic clock fail
969637765....
5 data fail....
&&&&&&&&&&&&0x6972 addr error&&&&&&&&&&
..
....
rror&&&&&&&&&&
37765....
ta fail....
 addr error&&&&&&&&&&
0x6969637765....
7765 data fail....
&0x6972 addr error&&&&&&&&&&
&&addr=0x6969637765....
x6969637765 data fail....
&&&&&&&&0x6972 addr error&&&&&&&&&&


&&&&&&&&&&
5....
ail....
r error&&&&&&&&&&
69637765....
 data fail....
972 addr error&&&&&&&&&&
dr=0x6969637765....
9637765 data fail....
&&&&0x6972 addr error&&&&&&&&&&

**0x6969637765 data fail....
&&&&&&&&&&&0x6972 addr error&&&&&&&&&&
.
...
partition [E] plug in..
WRN:L27(osal_cache.c):he: Parameter of Length cannot be 0!
pend event sem overtime!
der=9

r_used=1 ret=0
.....................................................................................................................
press enter key(keypad or irkey) to continue!
..............................................................
.....................................................................................................
egin..............
.bin failed.

 fail

..
&&&&&&&&&&&&0x6972 addr error&&&&&&&&&&
..
....
rror&&&&&&&&&&
37765....
ta fail....
 addr error&&&&&&&&&&
0x6969637765....
7765 data fail....
&&&&&&&&&&&&0x6972 addr error&&&&&&&&&&
..
....
rror&&&&&&&&&&
37765....
ta fail....
 addr error&&&&&&&&&&
0x6969637765....
7765 data fail....
&0x6972 addr error&&&&&&&&&&
&&addr=0x6969637765....
x6969637765 data fail....
&&&&&&&&0x6972 addr error&&&&&&&&&&


&&&&&&&&&&&&0x6972 addr error&&&&&&&&&&
..
....
rror&&&&&&&&&&
37765....
ta fail....
2

enned!........................................................................................

6969637765....
65 data fail....
x6972 addr error&&&&&&&&&&
addr=0x6969637765....
969637765 data fail....
&&&&&&0x6972 addr error&&&&&&&&&&

****0x6969637765 data fail....
&&&&&&&&
...
l....
&&&&&&&&&&&&0x6972 addr error&&&&&&&&&&
..
....
rror&&&&&&&&&&
37765....
ta fail....
 addr error&&&&&&&&&&
0x6969637765....
7765 data fail....
&0x6972 addr error&&&&&&&&&&
&&addr=0x6969637765....
x6969637765 data fail....
&&&&&&&&0x6972 addr error&&&&&&&&&&


&&&&&&&&&&
5....
ail....
r error&&&&&&&&&&
69637765....
 data fail....
4
set iic clock fail
969637765....
5 data fail....
&&&&&& fail &&&&&&
969637765....
5 data fail....
&&&&&& fail &&&&&&
969637765....
5 data fail....
&&&&&& fail &&&&&&
969637765....
5 data fail....
&&&&&& fail &&&&&&
969637765....
5 data fail....
&&&&&& fail &&&&&&
969637765....
5 data fail....

.....


过了一会儿我发现了问题,2个文件路径错误,被默默忽略了。这导致了错误,在制作IMG之后和刻录之前确保检查UPDATE.TXT并确保这里没有文件复制错误,如果没有复制一个文件,请在update.bat中找到哪个文件并修复问题然后重新制作IMG和闪光


BOOT0 is starting
DBG: init jtag OK
init dram , base        is 0x80000000
init dram , clk         is 120
init dram , access_mode is 1
init dram , cs_num      is 1
init dram , ddr8_remap  is 0
init dram , sdr_ddr     is 1
init dram , bwidth      is 16
init dram , col_width   is 10
init dram , row_width   is 13
init dram , bank_size   is 4
init dram , cas         is 3
init dram , size        is 0
dram init successed,size is 32
DBG: init heap OK, base address is 0x80000000, size is 0x00100000
DBG: load boot1 from spinor
DBG: init spinor OK
DBG: the size of BOOT1 is 71168
DBG: src_sum = 0x0x19c0acb7
DBG: sum = 0x0x19c0acb7
succeed in loading BOOT1
jump to BOOT1
DBG: boot1 starting!
DBG: init heap OK, base address is 0x80800000, size is 0x00100000
begin to init file system
DBG: init block device OK
DBG: init mini file system OK
DBG: mount c partition OK
0
jump to kernal
port=4,port_num=1,mul_sel=6 eint_num=1 trigger=2
hread running.....
BOOT0 is starting
DBG: init jtag OK
init dram , base        is 0x80000000
init dram , clk         is 120
init dram , access_mode is 1
init dram , cs_num      is 1
init dram , ddr8_remap  is 0
init dram , sdr_ddr     is 1
init dram , bwidth      is 16
init dram , col_width   is 10
init dram , row_width   is 13
init dram , bank_size   is 4
init dram , cas         is 3
init dram , size        is 0
dram init successed,size is 32
DBG: init heap OK, base address is 0x80000000, size is 0x00100000
DBG: load boot1 from spinor
DBG: init spinor OK
DBG: the size of BOOT1 is 71168
DBG: src_sum = 0x0x19c0acb7
DBG: sum = 0x0x19c0acb7
succeed in loading BOOT1
jump to BOOT1
DBG: boot1 starting!
DBG: init heap OK, base address is 0x80800000, size is 0x00100000
begin to init file system
DBG: init block device OK
DBG: init mini file system OK
DBG: mount c partition OK
0
jump to kernal
port=4,port_num=1,mul_sel=6 eint_num=1 trigger=2
hread running.....

#20 全志 SOC » F1C100S/F1C200S Cedar Baremetal/RTOS H264 硬件 MP4 解码 » 2021-09-09 07:25:39

hoel
回复: 0

你好,
我梦想我们可以在裸机或 RTOS 中使用 H264 硬件,在搜索时我找到了这个实现。
https://github.com/jemk/cedrus/tree/master/common

有谁知道它是否适用于F1C00S,如果它不能适用,也许它可以在AODZIP完成的5.4主线移植中进行调整检查
https://github.com/aodzip/cedar

你怎么看?

#21 Re: 全志 SOC » 试一试用MDK ARMCC 编译全志官方f1c100s sdk --- melis » 2021-08-24 04:29:47

晕哥 说:

Q上发信息给我, 我发给你。

您好,能否请您分享 MDK 项目,我有兴趣尝试使用 MELIS 和 MDK 播放视频

#22 Re: 全志 SOC » F1C200s主线gstreamer使用openmax调用cedar硬解码 » 2021-08-20 03:27:54

@逸俊晨晖

你介意分享当前版本的来源吗? 所以我们可以直接从那里开始

#23 Re: 全志 SOC » 编解码引擎 CedarX for Mainline Linux v5.4 » 2021-08-20 03:09:13

@unturned3

同样的问题,有人解决了吗? 也有人试过播放mp4文件吗? 命令是什么?

#24 Re: 全志 SOC » F1C100S/F1C200S CEDAR / Libcedar 裸机 » 2021-08-19 03:28:02

微凉VeiLiang 说:

h264软解码移植了好几个,但是大都是base profile的。支持main profile的比较少。还有相关视频封装格式解析要移植,比较耗时

https://github.com/aodzip/cedar/tree/master/ve
是的,我并不是真的关心软件实现,我只是想知道让 VE 在裸机中工作会有多困难。 似乎一切都在这里,但我还没有清楚地了解它是如何工作的,它似乎写入了内存的特定区域,并且在中断中有一个大状态机,并且必须有一个系统 o 调度

#25 Re: 全志 SOC » F1C100S/F1C200S CEDAR / Libcedar 裸机 » 2021-08-18 14:00:33

varzhou 说:

下载来看了一下,很多so库依赖

是的,最后一个链接看起来像是针对 Windows 的,无论如何问题是存在的,有没有人在裸机中使用过 H264 硬件解码器?

#26 全志 SOC » F1C100S/F1C200S CEDAR / Libcedar 裸机 » 2021-08-18 06:36:04

hoel
回复: 5

有没有人用过裸机的 H264 解码器? 我想知道,因为它现在已集成到主线中,而且我还偶然发现了这个似乎不属于 linux 的库
https://github.com/huceke/libcedar/blob/master/src/CedarDecoder.cpp

#27 全志 SOC » F1C100S/F1C200S buildroot 建立在 macOS » 2021-08-18 05:35:36

hoel
回复: 1

你好,
有没有人在 macOS 下成功构建过这个? 当我尝试时,我在生成文件中遇到了 SED 和 SXRG 错误,因为 macOS 版本不处理生成文件中使用的某些参数。
https://github.com/aodzip/buildroot-tiny200
此版本包含 CEDAR,因此它应该能够使用硬件 h264 解码器读取 mp4。
https://github.com/aodzip/cedar

#28 Re: 全志 SOC » F1C200s主线gstreamer使用openmax调用cedar硬解码 » 2021-08-16 21:13:30

标准显示器 480x320 或 800x480 可以达到的最佳帧速率是多少?

#29 Re: 全志 SOC » f1c100s调用cedar 实现硬编码jpeg h.264 » 2021-08-16 20:39:52

f1c100_ 说:
微凉VeiLiang 说:

解码我确定是可以的(裸机)。感谢楼主分享的编码经验

对,官方tina,裸机代码都可以,但是tina linux我们这些diy的拿不到啊:(主线linux能跑就方便多了

你知道如何在裸机中进行h264解码吗?

#31 Re: 好钜润半导体(TIKY) » TKM32F499配4.0寸IPS屏在RGB888模式下截屏功能 » 2021-08-15 07:43:07

您是否能够以合适的帧率(26 或更高)播放 MP4

#32 Re: 全志 SOC » 为了精华特意制作F1c200s-MP4播放器,支持硬件H264(开源板子和原理给个精华) » 2021-08-15 07:00:10

webb_2002 说:
xfdr0805 说:

请教LZ一个问题,如何播放flac或APE的音频文件,谢谢!

我是用mplayer播放

你好,你需要多少钱,你提供来源吗? (之后我们需要为加速度计和蓝牙添加一些代码)

#34 全志 SOC » MCU/SoC/CPU,寻找最便宜的 MCU/CPU 在 480*320 或 480*800 LCD 上以 30fps 播放 MP4 » 2021-08-15 04:15:55

hoel
回复: 1

您好,
我想在 3.5 和 4 英寸 LCD(带 CTP)上显示小型 MP4 视频序列。最初的计划是使用 F1C100S,但我不太确定它是否可以以 26 或 30fps 的速度显示。还有价格和供应不稳定的问题。所以我想知道哪个非常便宜的 SoC 或 MCU 或旧的 CPU 可以完成这项工作。一些MCU可能能够在小屏幕(可能是340x480)上显示30fps,但通常使用快速SPI,不适用于更大的显示(480x800),因此RGB或MIPI接口更好。数据将从MicroSD卡读取,除了MCU / CPU只需通过I2C读取传感器并通过UART接收一些蓝牙数据,所以没有要求的工作,主要问题只是解码MP4并播放有声音显示。可以是裸机、RTOS 或 Linux。如果有人有想法,请告诉我。

#35 Re: Qt/MSVC/MINGW/C++/MFC/GTK+/Delphi/BCB » 代码超级精简的fft源码,无需移植,代码才80行 » 2021-08-15 04:05:22

nongxiaoming 说:

arm的dsp库也是源码的,不需要移植,直接用的

你可以运行它(修改后)但性能很糟糕,我测试了 800MHZ 的性能甚至低于 100MHz Cortex M4

#36 Re: 全志 SOC » F1C100S原理图PCB可直接打样 » 2021-08-10 00:29:58

建议研究 PCB 布局 dv/dt 信号完整性和 EMC 布局基本指南。

#37 Re: 全志 SOC » 也学习前辈们,画了个全志F1C100 or 全志F1C200S的mini pi! » 2021-08-10 00:01:54

什么是wifi芯片组? 您能否发布原理图的 PDF 或图片并说明测试是否成功?

#38 Re: 全志 SOC » V3s裸机usb otg host枚举成功,读数据异常 » 2020-06-26 00:18:59

myxiaonia 说:

请问能接收你的关于f1c100s usb host相关程序吗,我的qq543488289@qq.com
通过这几天逛论坛一点点搜集信息,我隐隐约约感觉这个代码应该就在uboot里面,奈何没有大神指点迷津


抱歉,我认为这是另一个主题。 我有一个适用于RTThread的USB HOST实现,但是由于RT-Thread堆栈的实现方式,因此性能不佳,但是如果您不需要高性能,那就可以了。

#39 Re: 全志 SOC » F1C100S裸机 Timer USB HOST » 2020-06-11 03:52:35

peterlin 说:

關注中....

我们拥有使用RTThread的主机,但它不使用DMA,因此性能很差
我已经转移到另一个平台(Nuvoton M484SIDAE),F1C100S不足以进行信号处理,没有硬件浮点(FPU),也没有SIMD指令

#40 Re: 全志 SOC » V3s裸机usb otg host枚举成功,读数据异常 » 2020-06-05 23:50:16

微凉VeiLiang 说:

已发。基于rtthread 的协议栈做的。只是移植实现了下底层接口


太强大了,我会尽快尝试

#41 Re: 全志 SOC » V3s裸机usb otg host枚举成功,读数据异常 » 2020-06-05 01:21:18

微凉VeiLiang 说:

V3S的不方便。F1C100s我也有调试好,是rtthread系统的,但是还没有时间整理。如果你需要,我可以先发参考代码文件给你,留下你的邮箱。希望能帮助你尽快调通

谢谢师父,我的信箱是3265649676[at]qq[dot]com,我可以向您发送到目前为止已完成的工作,起初我找到了Melis USB堆栈的来源,并将所有文件移植到裸机项目中,现在可以编译了,但是 文件和依赖关系太多,因此移植似乎不太可能(此USB堆栈使用ePos的某些RTOS功能)。 然后我从u-boot移植了Sunxi堆栈,文件较少但缺少较高级别的堆栈,因此尚不能直接实现主机。 还有另一种移植,它仅从u-boot中提取了很少的文件,这个文件可以枚举,仅此而已,我感到缺少太多高级堆栈来实现HOST功能。

USB_STACK_SUNXI.zip

USB_STACK.zip

F1C100S_USB_Driver_V1_1 (1).zip

#42 Re: 全志 SOC » V3s裸机usb otg host枚举成功,读数据异常 » 2020-06-04 23:25:41

微凉VeiLiang 说:

坑网开源还好吧。只是大家都在忙,只有等空闲了会整理分享下自己的成果

赞美

#43 Re: 全志 SOC » 自己做的V3s的板子,usb不识别怎么破? » 2020-06-04 22:45:32

ippen 说:

烧写了一半,就是前半部分已经写进去了,现在无法识别,是因为cpu识别出spi-flash中的启动程序,并且从spi-flash启动,所以再也无法出现设备了。
短接spi-flash 的cs脚和地线,然后上电,应该可以识别出usb设备

只需将闪光灯的CS-GND引脚短接即可解决问题

#44 Re: 全志 SOC » V3s裸机usb otg host枚举成功,读数据异常 » 2020-06-04 21:54:46

起个名字好难 说:

不知道你有没有"挤"过中国的公交车?

这个问题有点像挤公交车, 车还没来的时候盼着车快点到站,

要是上车了, 就想着快点关车门, 甚至恨不得把车门焊死.

哈哈哈哈.gif


是的,可悲的是,我了解

#45 Re: 全志 SOC » V3s裸机usb otg host枚举成功,读数据异常 » 2020-06-04 21:45:27

起个名字好难 说:

本站有好几个网友都实现了, 但是没有open source,

我记得有网友用的是 NXP 的 USB HOST 协议栈?

哦,我已经检查了NXP堆栈,但是低级驱动程序仅适用于它似乎所用的Kinnetis平台,我不明白它们如何实现以适应F1C100S。 为什么其他网民在这种集体努力中没有帮助? 我不是唯一希望在F1C100S上使用裸机USB HOST堆栈的人

#46 Re: 全志 SOC » V3s裸机usb otg host枚举成功,读数据异常 » 2020-06-04 21:38:40

起个名字好难 说:

u-boot 支持 S3/V3s 的 usb 吧, 或许可以从 u-boot 扣代码?

我见过这个uboot,问题是将u-boot的USB堆栈移植到裸机似乎很难实现,但是是的,这是目标。
我认为第一步是使U-boot与F1C100S的USB配合使用。 有人做到了吗? 我已经在F1C100S上尝试过USB引导V3S的u-boot,但它当然不起作用

#47 Re: 全志 SOC » V3s裸机usb otg host枚举成功,读数据异常 » 2020-06-04 21:28:25

田埂上的梦 说:

硬件环境:芯片v3s ,用的Lichee Nano开发板
软件环境:裸机
问题:
usb otg作host(地址:0x01C1 9000不是OHCI)的时候插入HID设备能够枚举成功并且获取设备的PID与VID,
但是枚举成功以后端点2会一直循环触发INT中断,无法接受HID发送过来的数据。

您可以分享您的代码吗? 也许会有助于集体的努力

#48 Re: 全志 SOC » USB HOST裸跑调试完成(小薏科技)___让您多一种选择 » 2020-06-04 21:25:30

九霄云外 说:

有需要可以发我私信聊

为什么不通过向其他人提供USB HOST裸机为社区做出贡献? 出售芯片很好,但是也可以帮助人们使用它,从而使更多的人可以使用F1C100S。 您拥有USB HOST裸机,但是如果没有人使用它,那就没用了。

#49 Re: 全志 SOC » V3s裸机usb otg host枚举成功,读数据异常 » 2020-06-04 21:22:13

chenshengwei 说:

谁有单独的USB OTG的代码?


九霄云外有裸机USB HOST的代码,但他拒绝分享。 我们都在努力使裸露的USB HOST成为现实,但目前没有任何进展(哭泣)
如果有人知道,请帮助我们,我们希望F1C100S上的裸机USB HOST造福所有人。

#50 Re: 全志 SOC » V3s裸机usb otg host枚举成功,读数据异常 » 2020-06-01 06:05:25

微凉VeiLiang 说:

已经和楼主解决
这里说一下全志musb的坑
_______________________________
usb otg 做主机发送请求到设备时候,地址设置分两个寄存器的
一个是端点0和TX类请求,设置地址用的寄存器是0x98偏移的FADDR
另外一个是数据端点RX也就是IN请求,设置地址用的寄存器是0x9C偏移的RXFADDR
_______________________________
楼主的问题是枚举成功后数据端点发送IN请求请求数据的时候,地址设置还是设置FADDR,导致地址不对,设备不响应然后进入ERROR中断

您好,
您可以共享V3S的USB-HOST吗? 我花了很多时间尝试为F1C100S移植USB HOST,但仍然无法正常工作。 我认为V3S应该差不多。 如果我改变低水平的领域,它应该工作。

#51 全志 SOC » F1C100S u-boot USB MSD » 2020-06-01 05:37:21

hoel
回复: 0

您好,
有人在F1C100S上通过u-boot使用USB MSD吗? 我看到一个版本可以在V3S上使用 https://whycan.cn/t_3651.html,但不适用于F1C100S,我尝试的u-boot显示为“No controllers found”。

#53 Re: 全志 SOC » 裸机F1C100S,USB HOST + DMA,Eclipse,链接器和启动文件需要帮助 » 2020-05-29 23:38:27

有梦的地方 说:

老板你的中文说得很6嘛,听口音不像是本地人啊?

哈哈,谢谢,我只是法国工程师,但我非常喜欢中国,而我的同事是中国人

#54 Re: 全志 SOC » 裸机F1C100S,USB HOST + DMA,Eclipse,链接器和启动文件需要帮助 » 2020-05-29 23:09:51

void xboot_main(void)
{
	/* Do initial memory */
	do_init_mem();

	/* Do initial scheduler */
	do_init_sched();

	/* Do initial vfs */
	do_init_vfs();

	/* Do all initial calls */
	do_initcalls();

	/* Do show logo */
	do_showlogo();

	/* Do auto mount */
	do_automount();

	/* Do auto boot */
	do_autoboot();

//#if defined(CONFIG_SHELL_TASK) && (CONFIG_SHELL_TASK > 0)
	/* Create shell task */
	struct task_t * task = task_create(scheduler_self(), "shell", shell_task, NULL, 0, 0);

	/* Resume shell task */
	task_resume(task);
//#endif

	/* Scheduler loop */
	scheduler_loop();

	/* Do all exit calls */
	do_exitcalls();
}

IT应该显示一个shell提示,但没有任何提示,因此显然不起作用。
我也不认为xboot在这里会有所帮助,这是一个旨在适合许多体系结构的完整系统,与裸机相反。 我既不想也不打算了解Xboot的详细信息,也不想打算为它编写驱动程序,因为我没有用过这种系统。
我想要的只是将USB HOST堆栈移植到裸机上,无论如何,中断例程已经包含在堆栈中,我认为Xboot对我来说是行不通的。 什么也不做时已经是4MB了。

#55 Re: 全志 SOC » 裸机F1C100S,USB HOST + DMA,Eclipse,链接器和启动文件需要帮助 » 2020-05-29 22:57:31

哇酷小二 说:

有一个 lua 的启动脚本,你看下readme.md 吧。

LUA实际上是我要在裸机系统中使用的最后一件事,这是胡说八道。

#56 Re: 全志 SOC » 裸机F1C100S,USB HOST + DMA,Eclipse,链接器和启动文件需要帮助 » 2020-05-29 22:48:39

哇酷小二 说:

搞定了?那可以为所欲为了。

坐等大神搞定usb host.

是的,一旦它正常工作,我将移植USB HOST堆栈

#57 Re: 全志 SOC » 裸机F1C100S,USB HOST + DMA,Eclipse,链接器和启动文件需要帮助 » 2020-05-29 22:47:53

那是我开机后得到的全部,还有更多期望吗?

       _                   _                     
 _  _ | |___ _____ _____ _| |_                   
\ \/ /|  _  |  _  |  _  |_   _|  (C) 2007-2020   
 )  ( | |_| | |_| | |_| | | |____JIANJUN.JIANG__ 
/_/\_\|_____|_____|_____| |_____________________|
V3.0.0 (May 29 2020 - 16:34:12) - [sast-kk131][SAST KK131 Digital Player Based On Allwinner F1C100S]
[    0.000000] Probe device 'blk-romdisk.0' with blk-romdisk

#58 Re: 全志 SOC » 裸机F1C100S,USB HOST + DMA,Eclipse,链接器和启动文件需要帮助 » 2020-05-29 22:31:42

最后

$(NAME) : $(OBJS)
	@echo [LD] Linking $@
	@$(CC) $(LDFLAGS) $(LIBDIRS) -Wl $^ -o $@ $(LIBS) 
hoel@iMac-de-Hoel-7 ~/Downloads/xboot-master/developments/mkz $ make 
[CC] ecdsa256.c
[CC] main.c
[CC] sha256.c
[CC] lz4/lz4.c
[CC] lz4/lz4frame.c
[CC] lz4/lz4hc.c
[CC] lz4/xxhash.c
[LD] Linking mkz
16:34:12 **** Incremental Build of configuration Default for project xboot ****
make all 
[ROMDISK] Packing romdisk
[CC] init/version.c
[AS] driver/block/romdisk.S
[LD] Linking ../output/xboot
[OC] Objcopying ../output/xboot.bin
copy from `../output/xboot' [elf32-littlearm] to `../output/xboot.bin' [binary]
Make header information for brom booting
bootloader size= 2200
The bootloader head has been fixed
Compressed 3990016 bytes into 2613615 bytes ==> 65.503873% [C][S]

16:34:15 Build Finished (took 2s.868ms)

#59 Re: 全志 SOC » 裸机F1C100S,USB HOST + DMA,Eclipse,链接器和启动文件需要帮助 » 2020-05-29 22:29:26

哇酷小二 说:

再把 --cref 删掉

$(NAME) : $(OBJS)
	@echo [LD] Linking $@
	@$(CC) $(LDFLAGS) $(LIBDIRS) -Wl,-Map=$@.map $^ -o $@ $(LIBS) 
hoel@iMac-de-Hoel-7 ~/Downloads/xboot-master/developments/mkz $ make 
[LD] Linking mkz
ld: unknown option: -Map=mkz.map
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mkz] Error 1

#60 Re: 全志 SOC » 裸机F1C100S,USB HOST + DMA,Eclipse,链接器和启动文件需要帮助 » 2020-05-29 22:22:11

哇酷小二 说:

自行编译mkz之类的工具,源码目录里有。

 
hoel@iMac-de-Hoel-7 ~/Downloads/xboot-master/developments/mkz $ make 
[LD] Linking mkz
ld: library not found for -lcrt0.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mkz] Error 1

无法在macOS上静态链接crt0.o

但是当我从生成文件中删除-static标志时,弹出另一个错误

 
hoel@iMac-de-Hoel-7 ~/Downloads/xboot-master/developments/mkz $ make 
[LD] Linking mkz
ld: unknown option: --cref
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mkz] Error 1

Try removing `-static` from LDFLAGS in the Makefile. The reason being is
that on macOS, there isn't a static version of the crt0.o library.

See
https://stackoverflow.com/questions/3801011/ld-library-not-found-for-lcrt0-o-on-osx-10-6-with-gcc-clang-static-flag
for details.

#61 Re: 全志 SOC » 裸机F1C100S,USB HOST + DMA,Eclipse,链接器和启动文件需要帮助 » 2020-05-29 21:18:28

哇酷小二 说:

改为:

PLATFORM ?=arm32-f1c100s

解决了第一个问题,我在macos上,所以我添加了mksunxi,但是仍然存在MKZ问题,提供的版本仅在linux上有效,无法在macos上执行,并且未提供源文件。 应该提供MKZ的源文件和makefile,以便我们至少可以在macOS上构建它


copy from `../output/xboot' [elf32-littlearm] to `../output/xboot.bin' [binary]
Make header information for brom booting
bootloader size= 2200
The bootloader head has been fixed
/bin/sh: arch/arm32/mach-f1c100s/tools/linux/mkz: cannot execute binary file
make[1]: *** [xend] Error 126
make: *** [all] Error 2

#62 Re: 全志 SOC » 裸机F1C100S,USB HOST + DMA,Eclipse,链接器和启动文件需要帮助 » 2020-05-29 21:09:09

哇酷小二 说:

改为:

PLATFORM ?=arm32-f1c100s


最终失败,我尝试了F1C100S上的二进制文件,它不起作用,UART上没有任何内容

Capture6.png

#64 Re: 全志 SOC » 裸机F1C100S,USB HOST + DMA,Eclipse,链接器和启动文件需要帮助 » 2020-05-29 18:57:57

哇酷小二 说:

以下是 xboot 在QQ群的回复:

主要问题是如何集成usb栈,然后中断不知道该如何用,
不知道minimal-f1c100s有没有移植xboot的中断框架,
如果有移植的话,那么支持中断也是很容易的一件事,
不过,可以建议你直接在xboot上,移植usb栈,所有组件都是完整的。

下载了官方文件,打开了Eclipse项目,设置PLATFORM和CROSS_COMPILE,甚至无法构建...

Capture5.png

#65 Re: 全志 SOC » 裸机F1C100S,USB HOST + DMA,Eclipse,链接器和启动文件需要帮助 » 2020-05-29 18:14:44

哇酷小二 说:

以下是 xboot 在QQ群的回复:

主要问题是如何集成usb栈,然后中断不知道该如何用,
不知道minimal-f1c100s有没有移植xboot的中断框架,
如果有移植的话,那么支持中断也是很容易的一件事,
不过,可以建议你直接在xboot上,移植usb栈,所有组件都是完整的。

The USB stack already has the interrupt framework. I fear It will take a lot of efforts to adapt the USB stack to xboot, i want to avoid that, the stack is already working standalone, the only adaptation is the f1c100s.ld linker file. I made good progress yesterday, now the Eclipse project can compile and produce the .hex and .bin, the only remaining problem is to adapt the linker file f1c100s.ld, because currently it includes some object fils (.0) and Eclipse is not happy about it ("multiple definition of ..." error).
If i comment the included .o files in f1c100s.ld then the linking is successful.


USB堆栈已具有中断框架。 恐怕要使USB堆栈适应xboot会花费很多精力,我想避免这种情况,该堆栈已经可以独立工作,唯一的适应是f1c100s.ld链接器文件。 我昨天取得了良好的进展,现在Eclipse项目可以编译并生成.hex和.bin,唯一剩下的问题是改编链接器文件f1c100s.ld,因为当前它包含一些对象fils(.0),而Eclipse没有。 很高兴(“ ...的多个定义”错误)。
如果我注释了包含的.o文件,则链接成功。

原始的f1c100s.ld
Capture4.png

带有.o的f1c100s.ld进行了评论
Capture3.png

项目设置
Capture2.png
Capture1.png

#66 全志 SOC » 裸机F1C100S,USB HOST + DMA,Eclipse,链接器和启动文件需要帮助 » 2020-05-29 00:43:54

hoel
回复: 24

Hello,
Follow-up to my previous attemps on getting a working bare metal USB stack with DMA on the F1C100S, at first i found the Melis USB stack sources and spent several hours to modify them in order to compile as a standalone stack, the files can be found here USB_STACK_MELIS.zip.
It can compile but there is some calls to external functions (replaced by dummy functions), mostly in ePos, the RTOS on which Melis is based. So i decided that this is not ideal because ultimately this USB stack seems to rely on the presence of an RTOS and i dont want any RTOS.


So i have finally ported a complete bare-metal USB stack with DMA, it is the Sunxi official USB stack, extracted from u-boot, i had to spend several hours to fix all include path and sources files so that it can be compiled. The files can be found here USB_STACK_SUNXI.zip. I used gcc-arm-none-eabi 5_2-2015q4 but it should work with any gcc-arm.

To do the transplant and avoid worries on the makefile and linker script i started from an empty cross-GCC project in Eclipse and used the internal builder.
After much struggle the stack finally compiles, all dependencies are satisfied and the linker is able to link, however to get an usable Eclipse project all this stack has to be integrated into the already working bare-metal template (minimal-f1c100s), which has a working makefile and linker script and deals with the bootloader.

In the USB stack i had to integrate two assembly files : vectors.S and start.S, these two files contain some references used in the USB stack initialisation, namely IRQ, FIQ and few other things. It is a problem because the template (minimal-f1c100s) already has it own start.S file and it will be in conflict, also the interrupt vector is already declared. I am sure it is possible to get rid of vector.S and start.S from the USB stack and integrate all the sources into minimal-f1c100s directly, but I am having troubles to achieve this and i need some help with this task.

Ultimately it would be great to make an Eclipse project template which can manage the makefile itself so we dont have to edit it by hand. Contrary to Keil, Eclipse is working on all OS (windows, MacOS and Linux) it is free to use and convenient with GCC and a debugger.
I think it would be profitable to all F1C100S bare-metal users if we can put together an Eclipse template with the existing source code minimal-f1c100s, all it drivers, the USB stack and automatic makefile management. So that everyone could develop bare-metal application easily without worry for makefile and linker file hand editing, and use a debugger if they want to.
If anyone is willing to help with this process, please share your knowlhedge for the benefit of all.


Why would someone need to run F1C100S without Linux or RTOS?
because all the CPU power available is needed for the realtime signal processing, the ARM926EJ-S is a little bit old and it doesnt have some more recent instructions like SIMD found on Cortex-M serie, so the DSP is less efficient, there is also no real hardware floating point, there is a FVP (vector floating point) but for some reason GCC seems to consider it as SoftFloat. I tried to run my signal processing on Linux (5.2, with USB+DMA) and the peformance was catastrophic, when i tried to run the exact same signal processing in bare metal the performance increase was over 250%, that is why i need bare metal.

Why would someone need bare-metal USB HOST?
The data acquisition is done with an external chipset which only provide USB 2.0 interface, there is no SPI or anything else.

Why would someone need USB HOST with DMA?
Quite a lot of data is acquired in realtime continuously, DMA is necessary to achieve data acquisition without loading and interrupting the CPU which does not have much free time due to the ongoing signal processing (double buffering).


你好,
在我以前尝试在F1C100S上获得具有DMA的可用裸机USB堆栈的尝试之后,我首先找到了Melis USB堆栈源,并花了几个小时对其进行修改,以便将其编译为独立的堆栈,在此处找到 USB_STACK.zip
它可以编译,但是有一些对外部函数的调用(由伪函数代替),主要是在ePos(Melis所基于的RTOS)中。因此,我认为这不是理想的选择,因为最终该USB堆栈似乎依赖于RTOS的存在,因此我不希望任何RTOS。


因此,我终于移植了带有DMA的完整裸机USB堆栈,它是从u-boot提取的Sunxi官方USB堆栈,我不得不花几个小时来修复所有包含路径和源文件,以便可以对其进行编译。可以在 USB_STACK_SUNXI.zip 中找到文件。我使用了gcc-arm-none-eabi 5_2-2015q4,但它应该可以与任何gcc-arm一起使用。

为了进行移植并避免对makefile和链接程序脚本的担心,我从Eclipse中一个空的跨GCC项目开始,并使用了内部生成器。
经过艰苦的努力,堆栈最终得以编译,所有的依赖关系都得到了满足,并且链接器可以链接,但是要获得可用的Eclipse项目,请将所有这些堆栈集成到已经工作的裸机模板(minimal-f1c100s)中,该模板具有一个工作的makefile和链接程序脚本,并处理引导程序。

在USB堆栈中,我必须集成两个程序集文件:vector.S和start.S,这两个文件包含USB堆栈初始化中使用的一些引用,即IRQ,FIQ和其他一些东西。这是一个问题,因为模板(minimal-f1c100s)已经具有其自己的start.S文件,并且将发生冲突,并且中断向量也已声明。我确信可以摆脱USB堆栈中的vector.S并启动.S并将所有源直接集成到minimal-f1c100s中,但是我在实现此目标方面遇到了麻烦,因此我需要一些帮助。

最终,制作一个可以管理makefile本身的Eclipse项目模板将是很棒的,因此我们不必手动对其进行编辑。与Keil相反,Eclipse可以在所有OS(Windows,MacOS和Linux)上使用,可以免费使用,并且可以与GCC和调试器一起使用。
我认为,如果我们可以将Eclipse模板与现有的源代码minimal-f1c100s,所有驱动程序,USB堆栈和自动makefile管理放在一起,对所有F1C100S裸机用户都是有利的。这样,每个人都可以轻松开发裸机应用程序,而不必担心makefile和linker文件的手工编辑,并在需要时使用调试器。
如果有人愿意在此过程中提供帮助,请分享您的知识以造福所有人


为什么有人需要在没有Linux或RTOS的情况下运行F1C100S?
因为实时信号处理需要所有可用的CPU能力,所以ARM926EJ-S有点旧,并且没有诸如Cortex-M系列上的SIMD之类的一些最新指令,因此DSP的效率较低,因此,没有真正的硬件浮点,有一个FVP(矢量浮点),但是由于某种原因,GCC似乎将其视为SoftFloat。我尝试在Linux(5.2,带有USB + DMA)上运行信号处理,而性能却是灾难性的,当我尝试在裸机上运行完全相同的信号处理时,性能提高了250%以上,这就是为什么我需要裸机的原因金属。

为什么有人需要裸机USB HOST?
数据采集是通过外部芯片组完成的,该芯片组仅提供USB 2.0接口,没有SPI或其他任何东西。

为什么有人需要带有DMA的USB HOST?
连续不断地实时采集大量数据,DMA是实现数据采集而不需要加载和中断CPU的必要条件,由于正在进行的信号处理(双重缓冲),CPU没有太多的空闲时间。

#67 Re: 全志 SOC » F1C100S裸机 Timer USB HOST » 2020-05-25 20:08:54

小丸子 说:

用NXP的STACK 怎么样

如果您知道为什么使用恩智浦堆栈,请告诉我,因为KHCI仅是FS,所以我需要具有DMA的HS

#68 Re: 全志 SOC » F1C100S裸机 Timer USB HOST » 2020-05-25 14:20:08

USB_STACK.zip

几个小时后,它可以编译,但是需要移植一些功能,请检查porting.c和usb-os-platform.h,我将USB_OS define设置为0,因此通常它不需要ePos内核中的函数。 您只需要在Eclipse项目中选择工具链路径和前缀,就可以编译

#69 Re: 全志 SOC » F1C100s看门狗失效bug » 2020-05-24 04:17:02

Quotation 说:

刚调了好几个小时的灵异bug,现象是启动后有时候会死机。这时候已经启动了看门狗,但狗没有起作用,系统一直卡在那不reset。
最后调出来是个空指针错误。空指针毕竟是编程比较常见的错误,空指针能导致看门狗无效,F1C100s的这个bug也是有点严重。

一番精简之后,找到了最小复现代码:
只要用一个基类指针,指向一块内容为0的区域,调用基类的第二个虚函数,就很容易使看门狗失效并死机。

这个bug可能跟编译器的具体实现(C++类对象内存布局)有关,我用的GCC,其他编译器不一定是这样。

    mdelay(10);  // 等待超过1500ms则不出bug,等待0ms也不出bug,这之间都会遇到bug

嗨,你能分享你的Delay()过程吗? 我从uboot移植了地雷,只有timer0在工作并且时基错误,timer1根本不工作

#70 Re: 全志 SOC » F1C100S做的串口屏硬件图纸分享,有需要的可以联系,坛友优惠价 » 2020-05-23 22:48:30

soulcoffee 说:

新做了8寸的 7寸新款的也做了 增加了USB座子和贴片SD nand

看起来非常不错,您能提供有关V133的更多详细信息吗? 速度是多少? 它有USB HOST吗?

#71 Re: 全志 SOC » F1C100S裸机 Timer USB HOST » 2020-05-23 20:24:39

Quotation 说:

XBoot里的timer可以用,在src/include/time/timer.h。使用方法参考src/driver/clocksource/clocksource.c。

哦,谢谢,我很痛苦地从u-boot移植了定时器,这很痛苦(中断),现在我会尝试这个

我想我已经找到了Melis USB HOST驱动程序的原始来源,其中包括USB驱动器和其他东西

#72 Re: 全志 SOC » F1C100S裸机 Timer USB HOST » 2020-05-22 21:08:16

LittleEndian 说:

stm32 的usb采用的dwc ,而 f1c100s用的是musb,估计不大方便移植吧

哦,我不能从STM32移植,我的意思是,一旦主机正常运行,我就可以为F1C100S设备编写驱动程序,因为我已经为STM32做过了。

#73 全志 SOC » F1C100S裸机 Timer USB HOST » 2020-05-22 19:44:15

hoel
回复: 14

您好,我正在使用裸机对F1C100S进行开发,因为该应用程序涉及到信号处理,而这是获得足够计算能力的唯一方法。我努力让USB HOST与裸机配合使用,尽管它现在功能还不完善,但我认为它已经有了很大的改进。基于另一篇文章的信息,我发现MELI的原始USB HOST驱动程序使用了旧3.1 linux中的设置文件,因此我将这些文件集成到裸机项目中并修复了错误,直到编译为止。现在用于USB HOST的基本环境应该没问题,有人知道如何实际使用这些文件访问外围设备吗?就我而言,我需要访问芯片组,配置一些寄存器并进行批量传输,我已经编写了STM32的驱动程序,因此可以轻松地将其调整为F1C100S支持,但我目前还不清楚如何使用usbc_host.c文件来实现我想要的功能,请问有人知道怎么操作吗?
还有一个问题,我想使用硬件计时器,在原始项目中,两个计时器文件来自XBOOT,分别是ce-f1c100s-timer.c和cs-f1c100s-timer.c,但是这两个文件依赖于XBOOT中目前项目不存在的功能。有没有人曾经在F1C100S上使用过计时器,或者知道我改如何实现我想要的功能?我只想一个时基做一些计时。
Archive.zip
QQ20180915165524.png

#74 Re: 全志 SOC » F1C100S USB HOST 裸机 » 2020-05-18 22:49:54

微凉VeiLiang 说:

应该并不是很难。KHCI的移植了,并且跑通了。然后后面又对接调通了rtthread的usb host协议栈。综合考虑,我建议用rtthread的usb host框架+sunxi hcd的bsp


您是否认为可以使用UBOOT的资源来完成? 它似乎比使用Linux的资源容易。
我曾经告诉过我,可以使用MELIS的来源来完成它,但是不幸的是,找不到MELIS USB HOST的来源

https://github.com/Lichee-Pi/u-boot/tree/master/drivers/usb/host

#75 全志 SOC » F1C100S MELIS OS » 2020-05-18 18:26:14

hoel
回复: 0

您好,有人可以使用F1C100S的MELIS OS吗?

#76 Re: 全志 SOC » F1C100S USB HOST 裸机 » 2020-05-18 13:46:34

微凉VeiLiang 说:

应该并不是很难。KHCI的移植了,并且跑通了。然后后面又对接调通了rtthread的usb host协议栈。综合考虑,我建议用rtthread的usb host框架+sunxi hcd的bsp

哦,我忽略了rtthread具有USB HOST实现,我需要研究一下

#77 Re: 全志 SOC » F1C100S USB HOST 裸机 » 2020-05-18 13:44:56

伍零壹 说:

您这是有偿吧

好吧,你的价格是多少?

#78 Re: 全志 SOC » F1C100S USB HOST 裸机 » 2020-05-18 08:09:28

我也找到了这两个堆栈,如果您认为其中两个堆栈合适,请告诉我,移植Linux USB HCD驱动程序似乎很难实现。

https://github.com/kylemanna/kinetis-sdk2/tree/master/middleware/usb_1.0.0

https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/usbps/src

#79 Re: 全志 SOC » F1C100S USB HOST 裸机 » 2020-05-17 23:55:02

微凉VeiLiang 说:

usb host协议栈

我没意识到,您是F1C100S裸机项目的原始作者,真是太好了。 关于USB HOST,NXP堆栈似乎不是可移植的,您是否认为我应该尝试直接移植linux HCD堆栈?

https://github.com/mirkerson/c600/tree/6e1e8f9bc5d6a8582143b098611bea72a2a5f4a7/linux-3.10/drivers/usb/sunxi_usb/hcd/include

#80 Re: 全志 SOC » F1C100S USB HOST 裸机 » 2020-05-17 23:01:57

微凉VeiLiang 说:

usb host协议栈

你穿了吗?

你的意思是这个堆栈吗? 好像很大
https://github.com/kylemanna/kinetis-sdk1/tree/master/usb/usb_core

"KHCI is a completely hardware-dependent set of routines that are responsible for queuing and processing USB transfers and searching"

至少根据NXP,这似乎根本不是便携式的

#81 Re: 全志 SOC » F1C100S USB HOST 裸机 » 2020-05-17 22:27:21

微凉VeiLiang 说:

可以移植nxp的khci

NXP? 你什么意思 ?

#82 Re: 全志 SOC » F1C100S USB HOST 裸机 » 2020-05-17 22:26:26

九霄云外 说:

有,邮件发我私信

信息已发送,谢谢

#84 全志 SOC » F1C100S USB HOST 裸机 » 2020-05-17 03:56:30

hoel
回复: 13

你好,
我正在使用F1C100S的裸机项目,因为我不需要Linux,并且只需要通过USB使用一个设备,但是在该项目中,只有USB_DEV和USB_HID的驱动程序,有人可以使用USB_HOST的裸机驱动程序吗?

#85 Re: 全志 SOC » F1C100S的Keil裸机USB+LCD+PWM+GPIO工程搞定,修复GNU工具链BUG » 2020-05-11 21:27:04

你好,
我想从USB读取RTL-SDR设备,有人知道Keil是否可能?

#86 Re: 全志 SOC » F1C100S modify OpenWRT to make 16M flash image instead of SDcard image » 2019-06-17 07:27:56

Also a .dtb file here :

hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/openwrt/build_dir/target-arm_arm926ej-s_musl_eabi/linux-sunxi_arm9/linux-4.14.63/arch/arm/boot/dts (licheepi-nano *=) $ find *.dtb
suniv-f1c100s-licheepi-nano-with-lcd.dtb
suniv-f1c100s-licheepi-nano.dtb

not sure if it is the right one tho.

One concern is that there is no jffs2 option when i check in OpenWRT menuconfig:
Capture-decran-2019-06-17-a-01_26_46.png

#87 Re: 全志 SOC » F1C100S modify OpenWRT to make 16M flash image instead of SDcard image » 2019-06-17 01:23:56

i presume the modification involve doing something along these lines :
http://nano.lichee.pro/build_sys/build_flash.html

dd if=/dev/zero of=flashimg.bin bs=1M count=16 &&\
dd if=$YOUR_UBOOT_FILE of=flashimg.bin bs=1K conv=notrunc &&\
dd if=$YOUR_DTB_FILE of=flashimg.bin bs=1K seek=1024  conv=notrunc &&\
dd if=$YOUR_KERNEL_FILE of=flashimg.bin bs=1K seek=1088  conv=notrunc &&\
mkdir rootfs
tar -xzvf $YOUR_ROOTFS_FILE -C ./rootfs &&\
cp -r $YOUR_MOD_FILE  rootfs/lib/modules/ &&\
# 为根文件系统制作jffs2镜像包
# --pad参数指定 jffs2大小
# 由此计算得到 0x1000000(16M)-0x10000(64K)-0x100000(1M)-0x400000(4M)=0xAF0000
mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -d rootfs/ -o jffs2.img &&\
dd if=jffs2.img of=$YOUR_IMG_FILE  bs=1K seek=5184  conv=notrunc &&\

but not sure how to achieve this, when i check the target bin directory there is nothing else that the SD card image:

hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/openwrt/bin/targets/sunxi/arm9 (licheepi-nano *=) $ ls
config.seed
openwrt-sunxi-arm9-device-suniv-f1c100s-licheepi-nano.manifest
openwrt-sunxi-arm9-suniv-f1c100s-licheepi-nano-ext4-sdcard.img.gz
openwrt-sunxi-arm9-suniv-f1c100s-licheepi-nano-squashfs-sdcard.img.gz
packages
sha256sums

No file for any of these:

$YOUR_UBOOT_FILE 
$YOUR_DTB_FILE 
$YOUR_KERNEL_FILE 
$YOUR_ROOTFS_FILE
$YOUR_MOD_FILE 

EDIT:
i found some u-boot image here :

hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/openwrt/build_dir/target-arm_arm926ej-s_musl_eabi/u-boot-licheepi_nano/u-boot-2017.11 (licheepi-nano *=) $ ls
Documentation			arch				dts				snapshot.commit			u-boot.bin
Kbuild				board				env				spl				u-boot.cfg
Kconfig				cmd				examples			test				u-boot.cfg.configs
Licenses			common				fs				tools				u-boot.dtb
MAINTAINERS			config.mk			include				u-boot				u-boot.img
Makefile			configs				lib				u-boot-dtb.bin			u-boot.lds
README				disk				net				u-boot-dtb.img			u-boot.map
System.map			doc				post				u-boot-nodtb.bin		u-boot.srec
api				drivers				scripts				u-boot-sunxi-with-spl.bin	u-boot.sym

and some other images here, which seem to be related to kernel / rootfs:

hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/openwrt/build_dir/target-arm_arm926ej-s_musl_eabi/linux-sunxi_arm9 (licheepi-nano *=) $ ls
backports-2017-11-01			linux-atm-2.5.2				root.ext4				vmlinux
base-files				mtd					root.squashfs				vmlinux.debug
iptables-1.6.2				opkg-2017-12-07-3b417b9f		suniv-f1c100s-licheepi-nano-kernel.bin	vmlinux.elf
linux-4.14.63				packages				tmp					zImage

#88 全志 SOC » F1C100S modify OpenWRT to make 16M flash image instead of SDcard image » 2019-06-17 00:16:39

hoel
回复: 3

Hello,
After some struggle i managed to get a working toolchain for F1C100S on OSX, thanks to the help and suggestions of Quotation, Mango and 晕哥 https://whycan.cn/t_2571.html#p20276, OpenWRT is also building and working fine, however there is stil a problem with it: this version was adjusted to create an SD card image instead of a flash image. It is a problem with the F1C100S since the wifi uses the SDIO interface so using an SD card to store OpenWRT and filesystem prevent wifi connectivity, which is really a problem in my opinion especially if you need to debug from an IDE (Eclipse or QT Editor) since network access is required.

The OpenWRT i use has been made by Qin Fengling and can be found here https://github.com/qinfengling/openwrt/tree/licheepi-nano some tweaking was required to get it working on OSX, i will detail these in new subject (step-by-step instruction to get everything working on OSX), once this image generation problem is fixed.

I checked the sources an found the SD card image generation is done by at least the makefile and the script gen_sunxi_sdcard_img.sh which can be found here : https://github.com/qinfengling/openwrt/tree/licheepi-nano/target/linux/sunxi/image, i am not sure if any other files are involved (.dts?). When i asked Qin Fengling about adjusting this OpenWRT to generate flash image instead he told i have to make a profile :

You need to add your own profile, if you want to support 16MB Flash, you can find some reference in the code:

https://github.com/openwrt/openwrt/tree/master/target/linux

I am not sure on how to remake a profile from scratch, i have worked on another target for a specific application (MT7628) and it generates a 16MB flash image which is what i need here for the F1C100S, i checked definition of this target, i am not sure i can just modify these files to make the F1C100S profile.

Does anyone know what steps should be taken to either adjust the current target profile for making 16MB flash image, or tailor another existing profile already generating 16MB flash image to the curent F1C00S target?
Thank you.


你好,
经过一番努力,我终于在OSX上找到了一个F1C100S的工作工具链,感谢报价的帮助和建议,Mango和晕哥https://whycan.cn/t_2571.html#p20276,OpenWRT也在构建和工作,但是它仍然有问题,这个版本被调整为创建SD卡图像而不是闪存。图像,这是F1C100的一个问题,因为WiFi使用SDIO接口,所以使用SD卡存储openwrt和文件系统会阻止WiFi连接,这在我看来确实是一个问题,特别是当您需要从IDE(Eclipse或Qt编辑器)调试时,因为这需要网络访问。

我使用的openwrt是由秦凤玲制作的,可以在这里找到https://github.com/qinfengling/openwrt/tree/licheepi-nano要使它在OSX上工作,需要进行一些调整,一旦解决了这个图像生成问题,我将在新主题中详细介绍这些内容(一步一步地说明如何使所有内容都在OSX上工作)。

我检查了来源,发现SD卡图像生成至少由makefile和脚本gen_sunxi_sdcard_img.sh完成,可以在这里找到:https://github.com/qinfengling/openwrt/tree/licheepi-nano/target/linux/sunxi/image,我不确定是否涉及其他文件(.dts?)当我问秦凤玲如何调整这个openwrt来生成flash image时,他告诉我必须做一个配置文件:

您需要添加自己的配置文件,如果您想支持16MB闪存,可以在代码中找到一些参考:

https://github.com/openwrt/openwrt/tree/master/target/linux

我不知道如何从头重新创建一个配置文件,我已经为一个特定的应用程序(MT7628)在另一个目标上工作,它生成一个16MB的闪存图像,这是我在这里需要的F1C100S,我检查了这个目标的定义,但我不确定我可以直接将这些文件用于F1C100S配置文件。

是否有人知道应该采取什么步骤来调整当前目标配置文件以生成16MB闪存图像,或者将16MB闪存image中已经生成的另一个现有配置文件调整为当前的f1c00s目标?
谢谢您。

#89 Re: 全志 SOC » Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置 » 2019-06-16 23:45:45

Hello,
update on the case, i tried the Mango suggestion, it turned out the resulting toolchain was not correct for F1C100S because MT7622 is AA64 but F1C100S is not (ARM926ej-s) however, i recalled that Qin Fengling made a OpenWRT port for F1C100S and i gave it a try. After few fixes mainly due to system headers incompatibilities with OSX:

1) two libfdt related headers had to be removed from usr/local/include (can probably be fixed in the makefile, much cleaner)

2) OSX specific definition has to be added in bch.c

你好,
更新案例,我尝试了芒果的建议,结果发现结果的工具链对于F1C100S是不正确的,因为MT7622是AA64,但F1C100S不是(ARM926EJ-S),但是,我记得秦凤玲为F1C100S做了一个openwrt端口,我尝试了一下。由于系统头文件与OSX不兼容,在进行了一些修复之后:

1)必须从usr/local/include中删除两个与libfdt相关的头文件(可能在makefile中修复,更干净)
2)必须在bch.c中添加OSX特定定义。

#ifdef __APPLE__
  #include <libkern/OSByteOrder.h>

  #define htobe16(x) OSSwapHostToBigInt16(x)
  #define htole16(x) OSSwapHostToLittleInt16(x)
  #define be16toh(x) OSSwapBigToHostInt16(x)
  #define le16toh(x) OSSwapLittleToHostInt16(x)

  #define htobe32(x) OSSwapHostToBigInt32(x)
  #define htole32(x) OSSwapHostToLittleInt32(x)
  #define be32toh(x) OSSwapBigToHostInt32(x)
  #define le32toh(x) OSSwapLittleToHostInt32(x)

  #define htobe64(x) OSSwapHostToBigInt64(x)
  #define htole64(x) OSSwapHostToLittleInt64(x)
  #define be64toh(x) OSSwapBigToHostInt64(x)
  #define le64toh(x) OSSwapLittleToHostInt64(x)
#endif  /* __APPLE__ */

The built was successful and now it compiles OpenWRT in about 4 minutes.

构建成功,现在它在大约4分钟内编译了openwrt。

hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/openwrt (licheepi-nano *=) $ make -j9
time: target/linux/prereq#0.10#0.07#0.28
 make[1] world
 make[2] package/cleanup
 make[2] target/compile
 make[3] -C target/linux compile
 make[2] diffconfig
 make[2] package/compile
 make[3] -C package/libs/libubox host-compile
 make[3] -C package/system/fwtool host-compile
 make[3] -C package/system/usign host-compile
 make[3] -C package/utils/e2fsprogs host-compile
 make[3] -C package/libs/ncurses host-compile
 make[3] -C package/libs/toolchain compile
 make[3] -C package/system/opkg host-compile
 make[3] -C package/system/fwtool compile
 make[3] -C package/libs/libnl-tiny compile
 make[3] -C package/firmware/linux-firmware compile
 make[3] -C package/libs/zlib compile
 make[3] -C package/libs/libjson-c compile
 make[3] -C package/firmware/prism54-firmware compile
 make[3] -C package/utils/lua compile
 make[3] -C package/system/openwrt-keyring compile
 make[3] -C package/boot/uboot-sunxi compile
 make[3] -C package/firmware/wireless-regdb compile
 make[3] -C package/firmware/b43legacy-firmware compile
 make[3] -C package/libs/mbedtls compile
 make[3] -C package/network/services/dropbear compile
 make[3] -C package/libs/libpcap compile
 make[3] -C package/network/utils/linux-atm compile
 make[3] -C package/network/utils/resolveip compile
 make[3] -C package/utils/busybox compile
 make[3] -C package/libs/libubox compile
 make[3] -C package/libs/ncurses compile
 make[3] -C package/network/utils/iw compile
 make[3] -C package/system/usign compile
 make[3] -C package/system/uci compile
 make[3] -C package/system/ubus compile
 make[3] -C package/utils/jsonfilter compile
 make[3] -C package/libs/ustream-ssl compile
 make[3] -C package/network/ipv6/odhcp6c compile
 make[3] -C package/system/mtd compile
 make[3] -C package/libs/uclient compile
 make[3] -C package/network/config/swconfig compile
 make[3] -C package/system/ubox compile
 make[3] -C package/network/config/netifd compile
 make[3] -C package/network/services/hostapd compile
 make[3] -C package/network/services/dnsmasq compile
 make[3] -C package/network/services/odhcpd compile
 make[3] -C package/network/utils/iwinfo compile
 make[3] -C package/system/opkg compile
 make[3] -C package/system/procd compile
 make[3] -C package/kernel/linux compile
 make[3] -C package/kernel/mac80211 compile
 make[3] -C package/network/utils/iptables compile
 make[3] -C package/network/services/ppp compile
 make[3] -C package/utils/util-linux compile
 make[3] -C package/utils/f2fs-tools compile
 make[3] -C package/utils/e2fsprogs compile
 make[3] -C package/system/fstools compile
 make[3] -C package/boot/uboot-envtools compile
 make[3] -C package/base-files compile
 make[3] -C package/network/config/firewall compile
 make[2] package/install
 make[2] target/install
 make[3] -C target/linux install
 make[2] package/index
 make[2] checksum
hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/openwrt (licheepi-nano *=) $

Of course i also end-up with a working toolchain for F1C100S on OSX !
So I made a template for Eclipse to test it, and as expected it works perfectly.

当然,我最后也得到了一个在OSX上用于F1C100的工作工具链!
所以我为Eclipse制作了一个模板来测试它,正如预期的那样,它工作得很好。

04:25:22 **** Incremental Build of configuration Debug for project F1C100S_TEMPLATE ****
make all 
Building target: F1C100S_TEMPLATE
Invoking: Cross GCC Linker
arm-openwrt-linux-muslgnueabi-gcc  -o "F1C100S_TEMPLATE"  ./src/termios_cdc_acm/epoll2.o  ./src/libs/gpio.o ./src/libs/gpiolib.o ./src/libs/spi.o ./src/libs/sqlite3.o  ./src/gsm_serial.o   
Finished building target: F1C100S_TEMPLATE
04:25:23 Build Finished (took 509ms)

Big thanks to @Quotation, @Mango and @晕哥 for the help with this, it very nice to have a working toolchain on OSX for this target.

非常感谢@Quotation, @Mango and @晕哥 的帮助,在OSX上为这个目标提供了一个工作的工具链。


Now there is still two issues to address : the first is that this OpenWRT has been modified to build an SD card image rather than a flash image and it is a problem with the Lichee Pi Nano because the only way to have netwrok connectivity (and so to debug conveniently from Eclipse / QT editor) is by using the Micro SD card wifi adapter, which of course cannot be plugged if we use SD card, i have opened a new subject for this matter : https://whycan.cn/t_2573.html#p20277

The other problem is that i did not manage to build the Lichee Pi Nano "official" linux (nano-4.14-exp) with this new toolchain. I tried to add the new toolchain to my PATH and .bash_profile, but when i add it to the bash profile :

现在仍然有两个问题需要解决:第一个问题是这个openwrt被修改为构建一个SD卡图像而不是一个flash图像,这是Lichee Pi Nano的一个问题,因为只有使用micro SD卡WiFi适配器才能实现网络连接(并从Eclipse/Qt编辑器方便地进行调试),而Micro SD卡WiFi适配器是如果我们使用SD卡,URSE就无法接通电源,我已经为此打开了一个新主题:https://whycan.cn/t_2573.html#p20277

另一个问题是,我没有用这个新的工具链构建Lichee Pi nano“官方”Linux(nano-4.14-exp)。我试图将新的工具链添加到我的路径和.bash_概要文件中,但当我将其添加到bash概要文件中时:

PATH="/Volumes/arm-linux-toolchain/openwrt/staging_dir/toolchain-arm_arm926ej-s_gcc-7.3.0_musl_eabi/bin"

the build fails directly, it doesnt even find make, so either i am doing something wrong with PATH or .bash_profile or something must be changed in the Linux makefile so that it uses this toolchain.

构建直接失败,甚至找不到make,所以要么我在路径或.bash_profile上做了一些错误的事情,要么必须在Linux makefile中更改一些内容,以便它使用这个工具链。

hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/linux $ make menuconfig
-bash: make: command not found
hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/linux $ make ARCH=arm menuconfig
-bash: make: command not found

When i remove this PATH from .bash_profile, then make menuconfig fail

当我从.bash_profile中删除此路径时,将使menuconfig失败

hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/linux (nano-4.14-exp *=) $ make ARCH=arm menuconfig
getconf: no such configuration parameter `LFS_CFLAGS'
getconf: no such configuration parameter `LFS_LDFLAGS'
getconf: no such configuration parameter `LFS_LIBS'
  HOSTLD  scripts/kconfig/mconf
Undefined symbols for architecture x86_64:
  "_acs_map", referenced from:
      _dialog_checklist in checklist.o
      _print_arrows in checklist.o
      _dialog_clear in util.o
      _draw_box in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _dialog_yesno in yesno.o
      ...
  "_cbreak", referenced from:
      _init_dialog in util.o
  "_delwin", referenced from:
      _dialog_checklist in checklist.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _dialog_yesno in yesno.o
      _dialog_menu in menubox.o
  "_doupdate", referenced from:
      _dialog_checklist in checklist.o
  "_endwin", referenced from:
      _init_dialog in util.o
      _end_dialog in util.o
  "_flash", referenced from:
      _dialog_inputbox in inputbox.o
  "_getcurx", referenced from:
      _init_dialog in util.o
      _print_autowrap in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _print_arrows in menubox.o
  "_getcury", referenced from:
      _init_dialog in util.o
      _print_autowrap in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _print_arrows in menubox.o
  "_getmaxx", referenced from:
      _conf in mconf.o
      _dialog_checklist in checklist.o
      _dialog_clear in util.o
      _init_dialog in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _refresh_text_box in textbox.o
      ...
  "_getmaxy", referenced from:
      _dialog_checklist in checklist.o
      _attr_clear in util.o
      _dialog_clear in util.o
      _init_dialog in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _refresh_text_box in textbox.o
      ...
  "_has_colors", referenced from:
      _init_dialog in util.o
      _draw_shadow in util.o
  "_init_pair", referenced from:
      _init_dialog in util.o
  "_initscr", referenced from:
      _init_dialog in util.o
  "_keypad", referenced from:
      _dialog_checklist in checklist.o
      _init_dialog in util.o
      _on_key_esc in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _dialog_yesno in yesno.o
      _dialog_menu in menubox.o
      ...
  "_newwin", referenced from:
      _dialog_checklist in checklist.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _dialog_yesno in yesno.o
      _dialog_menu in menubox.o
  "_nodelay", referenced from:
      _on_key_esc in util.o
  "_noecho", referenced from:
      _init_dialog in util.o
  "_scrollok", referenced from:
      _dialog_checklist in checklist.o
      _dialog_menu in menubox.o
  "_start_color", referenced from:
      _init_dialog in util.o
  "_stdscr", referenced from:
      _conf in mconf.o
      _dialog_checklist in checklist.o
      _dialog_clear in util.o
      _init_dialog in util.o
      _end_dialog in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      ...
  "_subwin", referenced from:
      _dialog_checklist in checklist.o
      _dialog_textbox in textbox.o
      _dialog_menu in menubox.o
  "_ungetch", referenced from:
      _on_key_esc in util.o
  "_waddch", referenced from:
      _dialog_checklist in checklist.o
      _print_item in checklist.o
      _print_arrows in checklist.o
      _attr_clear in util.o
      _dialog_clear in util.o
      _print_title in util.o
      _print_button in util.o
      ...
  "_waddnstr", referenced from:
      _print_item in checklist.o
      _print_arrows in checklist.o
      _dialog_clear in util.o
      _print_title in util.o
      _print_autowrap in util.o
      _print_button in util.o
      _dialog_inputbox in inputbox.o
      ...
  "_wattrset", referenced from:
      _dialog_checklist in checklist.o
      _print_item in checklist.o
      _print_arrows in checklist.o
      _attr_clear in util.o
      _dialog_clear in util.o
      _print_title in util.o
      _print_button in util.o
      ...
  "_wbkgdset", referenced from:
      _dialog_textbox in textbox.o
      _refresh_text_box in textbox.o
      _dialog_menu in menubox.o
  "_wclrtoeol", referenced from:
      _refresh_text_box in textbox.o
      _do_print_item in menubox.o
  "_wgetch", referenced from:
      _dialog_checklist in checklist.o
      _on_key_esc in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _dialog_yesno in yesno.o
      _dialog_menu in menubox.o
  "_winch", referenced from:
      _draw_shadow in util.o
  "_wmove", referenced from:
      _dialog_checklist in checklist.o
      _print_item in checklist.o
      _print_arrows in checklist.o
      _attr_clear in util.o
      _dialog_clear in util.o
      _end_dialog in util.o
      _print_title in util.o
      ...
  "_wnoutrefresh", referenced from:
      _dialog_checklist in checklist.o
      _dialog_clear in util.o
      _draw_shadow in util.o
      _dialog_textbox in textbox.o
      _refresh_text_box in textbox.o
      _dialog_menu in menubox.o
  "_wprintw", referenced from:
      _print_item in checklist.o
      _refresh_text_box in textbox.o
  "_wrefresh", referenced from:
      _dialog_checklist in checklist.o
      _print_item in checklist.o
      _end_dialog in util.o
      _dialog_inputbox in inputbox.o
      _refresh_text_box in textbox.o
      _dialog_yesno in yesno.o
      _dialog_menu in menubox.o
      ...
  "_wscrl", referenced from:
      _dialog_checklist in checklist.o
      _dialog_menu in menubox.o
  "_wtouchln", referenced from:
      _attr_clear in util.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [scripts/kconfig/mconf] Error 1
make: *** [menuconfig] Error 2

The issue seems to point out to ncurse, but i know ncurse is not the actual culprit because make menuconfig works fine with OpenWRT, so I guess the problem is : linux doesnt look / use the correct toolchain, maybe a makefile problem or something like that?

If i use make nconfig or make ARCH=arm nconfig, i got the menuconfig interface but the build fail afterwards anyway:

这个问题似乎指向了ncurse,但我知道ncurse并不是真正的罪魁祸首,因为make menuconfig在openwrt中工作得很好,所以我猜问题是:linux看起来/使用的工具链不正确,可能是makefile问题或类似的问题?

如果我使用make nconfig或make arch=arm nconfig,我得到了menuconfig接口,但是构建之后还是失败了:

hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/linux (nano-4.14-exp *=) $ make ARCH=arm CROSS_COMPILE=arm-openwrt-linux-muslgnueabi- -j9
getconf: no such configuration parameter `LFS_CFLAGS'
getconf: no such configuration parameter `LFS_LDFLAGS'
getconf: no such configuration parameter `LFS_LIBS'
getconf: no such configuration parameter `LFS_CFLAGS'
getconf: no such configuration parameter `LFS_LDFLAGS'
getconf: no such configuration parameter `LFS_LIBS'
scripts/kconfig/conf  --silentoldconfig Kconfig
getconf: no such configuration parameter `LFS_CFLAGS'
getconf: no such configuration parameter `LFS_LDFLAGS'
getconf: no such configuration parameter `LFS_LIBS'
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  WRAP    arch/arm/include/generated/uapi/asm/errno.h
  WRAP    arch/arm/include/generated/uapi/asm/bitsperlong.h
  WRAP    arch/arm/include/generated/uapi/asm/ioctl.h
  WRAP    arch/arm/include/generated/uapi/asm/msgbuf.h
  WRAP    arch/arm/include/generated/uapi/asm/ipcbuf.h
  WRAP    arch/arm/include/generated/uapi/asm/param.h
  WRAP    arch/arm/include/generated/uapi/asm/poll.h
  WRAP    arch/arm/include/generated/uapi/asm/resource.h
  WRAP    arch/arm/include/generated/uapi/asm/sembuf.h
  WRAP    arch/arm/include/generated/uapi/asm/shmbuf.h
  WRAP    arch/arm/include/generated/uapi/asm/siginfo.h
  WRAP    arch/arm/include/generated/uapi/asm/socket.h
  WRAP    arch/arm/include/generated/uapi/asm/sockios.h
  WRAP    arch/arm/include/generated/uapi/asm/termbits.h
  WRAP    arch/arm/include/generated/uapi/asm/termios.h
  WRAP    arch/arm/include/generated/asm/clkdev.h
  WRAP    arch/arm/include/generated/asm/current.h
  WRAP    arch/arm/include/generated/asm/early_ioremap.h
  WRAP    arch/arm/include/generated/asm/emergency-restart.h
  WRAP    arch/arm/include/generated/asm/exec.h
  WRAP    arch/arm/include/generated/asm/extable.h
  WRAP    arch/arm/include/generated/asm/irq_regs.h
  WRAP    arch/arm/include/generated/asm/kdebug.h
  WRAP    arch/arm/include/generated/asm/local.h
  WRAP    arch/arm/include/generated/asm/local64.h
  WRAP    arch/arm/include/generated/asm/mm-arch-hooks.h
  WRAP    arch/arm/include/generated/asm/msi.h
  WRAP    arch/arm/include/generated/asm/parport.h
  WRAP    arch/arm/include/generated/asm/preempt.h
  WRAP    arch/arm/include/generated/asm/rwsem.h
  WRAP    arch/arm/include/generated/asm/seccomp.h
  WRAP    arch/arm/include/generated/asm/segment.h
  WRAP    arch/arm/include/generated/asm/serial.h
  WRAP    arch/arm/include/generated/asm/simd.h
  WRAP    arch/arm/include/generated/asm/sizes.h
  WRAP    arch/arm/include/generated/asm/timex.h
  WRAP    arch/arm/include/generated/asm/trace_clock.h
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/sortextable
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  CC      scripts/mod/devicetable-offsets.s
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
scripts/sortextable.c:23:10: fatal error: 'elf.h' file not found
#include <elf.h>
         ^
scripts/mod/mk_elfconfig.c:5:10: fatal error: 'elf.h' file not found
#include <elf.h>
         ^
1 error generated.
make[2]: *** [scripts/mod/mk_elfconfig] Error 1
make[2]: *** Waiting for unfinished jobs....
  HOSTCC  scripts/dtc/fstree.o
1 error generated.
make[1]: *** [scripts/sortextable] Error 1
make[1]: *** Waiting for unfinished jobs....
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  SHIPPED scripts/dtc/dtc-lexer.lex.c
  SHIPPED scripts/dtc/dtc-parser.tab.h
  SHIPPED scripts/dtc/dtc-parser.tab.c
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/dtc/dtc
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
  UPD     include/config/kernel.release

If anyone has some ideas about what i should do to adjust OpenWRT image generation for 16M flash or to build the official Lichee Pi Nano with the new toolchain, please let me know. Once everything is working fine i will make a new subject that give all the steps to :
-get working toolchain for F1C100S on OSX
-get working OpenWRT for F1C100S on OSX (with flash image)
-get working Lichee Pi Nano linux on OSX
-setup Eclipse or another IDE to build and debug applications on F1C100S for linux directly from OSX (debug via wifi)
Thank you.

如果有人对我应该做些什么来调整16M闪存的openwrt图像生成或者用新的工具链构建官方的lichee pi nano有什么想法,请告诉我。一旦一切正常,我将提出一个新的主题,给出所有步骤:
-在OSX上获取F1C100S的工作工具链
-在OSX上获取F1C100S的工作openwrt(带Flash图像)
-在OSX上运行Lichee Pi Nano Linux
-设置Eclipse或其他IDE,以便直接从OSX(通过WiFi进行调试)在F1C100S上为Linux构建和调试应用程序。
谢谢您。

#90 Re: 全志 SOC » Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置 » 2019-06-16 07:57:59

@Mango,哦,谢谢你,我没想到用OpenWRT ARM版本stagging_dir在F1C100的OSX上获得一个有效的工具链,这实际上是一个聪明的主意,我现在就要尝试一下。

#91 Re: 全志 SOC » Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置 » 2019-06-15 22:21:42

我也运行过lvgl和zlg,它们都工作得很好,lvgl的性能似乎很差,可能是因为时钟很低(720MHz),并且没有使用2d加速,但是直接帧缓冲在f1c100s上已经过60fps的测试,所以可能只是lvgl没有性能(可能)。

我目前正在将GT911触摸屏移植到Xboot(Lichee Pi Nano),如果有人已经这样做了,请告诉我,因为我认为需要一些时间来纠正它。同时,我还在寻找一种在OSX上安装arm-none-linux-eabi工具链的方法,因为这个arm none eabi工具链只能在没有linux的情况下使用

#92 Re: 全志 SOC » Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置 » 2019-06-15 18:00:21

光滑如婴儿皮肤


hoel@iMac-de-Hoel-7 /Volumes/EABI $ cd /Volumes/EABI/minimal_f1c100s/tools/mksunxi/
hoel@iMac-de-Hoel-7 /Volumes/EABI/minimal_f1c100s/tools/mksunxi $ make
gcc -Wall -Wextra -O2    mksunxi.c   -o mksunxi
hoel@iMac-de-Hoel-7 /Volumes/EABI/minimal_f1c100s/tools/mksunxi $ cd ..
hoel@iMac-de-Hoel-7 /Volumes/EABI/minimal_f1c100s/tools $ cd ..
hoel@iMac-de-Hoel-7 /Volumes/EABI/minimal_f1c100s $ make
mkdir -p build
mkdir -p build/arch/arm32/lib
mkdir -p build/driver
mkdir -p build/lib
mkdir -p build/machine
CC main.c
(...)
arm-none-eabi-size build/firmware.elf
   text	   data	    bss	    dec	    hex	filename
  30276	     88	 524424	 554788	  87724	build/firmware.elf
arm-none-eabi-objcopy -v -O binary build/firmware.elf build/firmware.bin
copy from `build/firmware.elf' [elf32-littlearm] to `build/firmware.bin' [binary]
Make header information for brom booting
bootloader size= 1800
The bootloader head has been fixed
hoel@iMac-de-Hoel-7 /Volumes/EABI/minimal_f1c100s $ 

#93 Re: 全志 SOC » Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置 » 2019-06-15 17:35:42

@达克罗德  是的,让arm-linux工具链在OSX上工作的路径可能是漫长而痛苦的,但是由于我在OSX上成功地设置了ramips-linux工具链,并且它工作得很好,我认为在arm-linux上也应该可以实现(经过长期的斗争之后

@超级萌新  是的,100%同意,非常有用,从Quotation年起提出了全面的建议。

#94 Re: 全志 SOC » Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置 » 2019-06-15 17:28:51

@Quotation  Thank you very much for the detailed answer and steps to get a barebone toolchain working on OSX, much appreciated ! Ultimately the goal is to setup the toolchain for Linux and uboot, however for now i want to work on UI + touch + some peripheral so your suggestion is perfect. As a first step i am going to setup the barebone toolchain, run Xboot, try LittleVGL, QT (and maybe AWTK).

#96 全志 SOC » Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置 » 2019-06-15 06:57:39

hoel
回复: 15

Hello,
i would like to setup the toolchain for Sunxi F1C100S and F1C200S on OSX but i am struggling despite many attempts.
The reason why i want to install it on OSX rather that using Linux (Ubuntu/Debian) on a virtual machine (VirtualBox) is simple : the performance of Ubuntu on VirtualBox is too bad, so the compilation is too long, also my IDEs are all on OSX (Eclipse, QT Editor).

I have installed crosstool-ng with Homebrew, i also created an empty case sensitive volume (16GB) which is ready to use. I did not found a way yet to install the correct toolchain for F1C100S with crosstool-ng.

As a side note, i also installed a toolchain for MT7628 (RAMIPS) some time ago, everything is in a case sensitive volume and it works perfectly, it can build OpenWRT and compile C programs from Eclipse with no problem at all, it is very fast and convenient.
So the final goal is to do the same for F1C100S.
Does anyone succeed to do that or have any advce on how i should proceed?
N.B. the boards i use are the LicheePi Nano (with 5 inch LCD + capacitive touch) and the very nice F1C200S board from HQEmbed (with 5 inch LCD + capacitive touch).

Thank you !

你好,
我想在OSX上为Sunxi F1C100S和F1C200S设置工具链,但是尽管尝试了很多次,我还是在努力。
我想在OSX上安装它,而不是在虚拟机(virtualbox)上使用Linux(ubuntu/debian)的原因很简单:ubuntu在virtualbox上的性能太差,所以编译时间太长,而且我的IDE都在OSX上(eclipse,qt editor)。

我已经安装了Crosstool-ng和自制,还创建了一个空的大小写敏感卷(16GB),可以使用。我还没有找到使用Crosstool-ng为F1C100S安装正确工具链的方法。

顺便说一下,我之前也为MT7628(RAMIPS)安装了一个工具链,所有的东西都在一个区分大小写的卷中,并且工作得很好,它可以从Eclipse构建OpenWRT和编译C程序,一点问题都没有,它非常快速和方便。
所以最后的目标是对F1C100S做同样的事情。
是否有人成功地做到了这一点,或者有人对我应该如何继续工作有任何建议?
注意:我使用的是Licheepi Nano(带有5英寸LCD+电容式触摸)和HQEmbed(带有5英寸LCD+电容式触摸)的非常漂亮的F1C200S板。

谢谢您!

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn