硬汉嵌入式论坛

 找回密码
 立即注册
查看: 1783|回复: 4
收起左侧

[ThreadX全家桶] 给guix提了下意见,期笔扩展没有映射功能的 spi flash 读资源

[复制链接]

15

主题

87

回帖

132

积分

初级会员

积分
132
发表于 2022-1-19 09:48:13 | 显示全部楼层 |阅读模式
Hello [color=var(--color-user-mention-fg)][backcolor=var(--color-user-mention-bg)]@yuntian365 ,
Thanks for your feedback. I want to be 100% sure we are on the same page. Depending on the hardware architecture, it might be possible to directly read external SPI flash through a pointer, or it may require invoking a hardware-specific routine to read the SPI flash data. So I want to know which situation you are requesting.
If the external flash data is directly accessible via a standard C pointer, I think that is well supported in GUIX today. You can generate binary resource file(s), and write that binary data file to your external SPI flash. You can then use APIs such as gx_binres_theme_load to dynamically build your resource table, and install this resource table using gx-display_theme_install. When you call gx_binres_theme_load, GUIX builds a table of pointers to your resource data, it doesn't copy your resource data (including your glyph data) to RAM or anything like that. So if your SPI flash is directly accessible I think this is a working solution.
If your SPI flash is not directly accessible, but requires a "ReadDataOverSPI()" type function to be invoked, that is the case that would require some work on our side (allow you to install data read callback functions) and probably also do some caching of the data so that we don't have to invoke ReadDataOverSPI() every time we want to render the glyph "e" (for example). Let me know if we are on the same page and I will write up a task for our dev backlog.



hi, [color=var(--color-fg-default)]@jdeere5220,
Thank you for your reply, yes, this requirement is applied to those spi flash that cannot be read directly through pointers. This kind of flash is not supported by MCU to read in a mapped way, and the resource data needs to be written by the user "ReadDataOverSPI()" to read, such as read_flash_byte(dev*, uint32_t adr, uint8_t *buf, uint16_t len) to read the required bytes, this read interface reserves a function pointer interface inside guix, if this If the pointer = null, it will be read by direct mapping, which is the current processing method of guix. If the user sets this pointer, then this function pointer will be used to read resource data from spi flash.
Similar applications such as: stm32f401rct, its internal flash has 256k, but the resource data of the application program will exceed 256k, and the space required by the code does not need to use up 256k, so the resource data must be put into the external spi flash, but unfortunately The thing is, this chip does not support the direct reading of the mapping mode by pointer, it requires the user to write a function to read the spi flash data, and currently guix does not support this method, similar chips such as some low-cost chips Such as stm32g0xx and the like, also do not have the mapping function, also need the user to write the spi flash function, as a product series, we certainly do not want to switch to other ui, if guix can provide this function, it is very worth looking forward to.
The user implements spi flash reading by himself, of course, it will be slower than the mapping method using pointer to read, but this application is originally used in projects with low requirements, and it is placed in the thread, the user will not feel too strong , the screen refresh rate is not high.

回复

使用道具 举报

1万

主题

7万

回帖

11万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
117568
QQ
发表于 2022-1-20 09:33:17 | 显示全部楼层
这个反馈非常有意义,感谢楼主分享。
回复

使用道具 举报

2

主题

79

回帖

85

积分

初级会员

积分
85
发表于 2022-1-20 09:44:20 | 显示全部楼层
应该还需要加密实时解密的需求,保护资源的机密性
回复

使用道具 举报

24

主题

133

回帖

205

积分

高级会员

积分
205
发表于 2022-1-20 17:52:34 来自手机 | 显示全部楼层
说两句
回复

使用道具 举报

24

主题

133

回帖

205

积分

高级会员

积分
205
发表于 2022-1-20 18:05:56 来自手机 | 显示全部楼层
说两句:跟类似lvgl这些gui环境比,很多人会找出这样那样的问题,以为lvgl 包治百病一样。  其实呢,guix有很多技术亮点,又有gui studio加持,没文件系统也没什么,自己加上 就是了。  guix提供了redraw和event两大回调函数,包治百病。各种窗体,模板可以自由发挥。  安卓gui开发其实也是类似模式,没啥诀窍。  至于标准组件不够时尚,尤其是那个combobox,即drop list 组件,大不了不用就是了,弹一个radiobox小窗体一样。  楼主说的直驱flash问题,可以考虑在回调ca。llback函数中自行实现。 你让官方实现,效率未必就是最高的
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2025-8-15 16:45 , Processed in 0.044091 second(s), 24 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表