Comments (12)
Hi, @polarvid
It would be great if you could fix the compiling of bsp/allwinner/d1s/ on Master, to keep D1 BSP updated in Master. Thank you for interest.
(I think bsp/allwinner/d1/ folder - looks very old and I believe it can be deleted, bsp/allwinner/d1s/ can be one folder for D1s and D1H)
About sdhci yes looks like needs experts, but with my dirty fix it works, I can do PR.
Want to say actually right now I achieved working LCD RGB and MIPI DCI Display with D1H and RTT, but completely stuck on how to up USB Host function. Host driver initiated but the thread is suspended and nothing happens.
from rt-thread.
Thank you for updating me on your progress. I'm truly impressed by the amount of work you've accomplished👍
I think bsp/allwinner/d1/ folder - looks very old and I believe it can be deleted, bsp/allwinner/d1s/ can be one folder for D1s and D1H
Agree
Host driver initiated but the thread is suspended and nothing happens.
you could try the backtrace() to find out where thread suspended or dump more status on it for debugging
Besides,
please feel free to share any details or updates whenever you can. And I do believe that will be valuable to any others who are interested in it.
from rt-thread.
Hi 😄@ylyamin
I tested the bringup and filesystem in sd on my D1s board, with the branch forked from the latest kernel (on #9142). And to summarize, besides the compiling failure, the sd driver works just fine with me.
My log is here:
\ | /
- RT - Thread Smart Operating System
/ | \ 5.2.0 build Jul 6 2024 13:41:01
2006 - 2024 Copyright by RT-Thread team
hal_sdc_create 0
card_detect insert
Initial card success. capacity :121MB
sdmmc bytes_per_secotr:200, sector count:3c800
found part[0], begin: 8388608, size: 90.0MB
found partition:sd0 of mbr at offset 0x0000000000004000, size:0x000000000002d000
found part[1], begin: 102760448, size: 23.0MB
found partition:sd1 of mbr at offset 0x0000000000031000, size:0x000000000000b800
hal_sdc_create 1
card_detect insert
Initial card success. capacity :29818MB
sdmmc bytes_per_secotr:200, sector count:3a3d000
found part[0], begin: 4194304, size: 256.0MB
found partition:sd0 of mbr at offset 0x0000000000002000, size:0x0000000000080000
found part[1], begin: 272629760, size: 1.716GB
found partition:sd1 of mbr at offset 0x0000000000082000, size:0x0000000000366000
found part[2], begin: 2097152000, size: 27.169GB
part_count1:2
found partition:sd2 of mbr at offset 0x00000000003e8000, size:0x0000000003654800
[D/FAL] (fal_flash_init:47) Flash device | sdcard0 | addr: 0x00000000 | len: 0x07900000 | blk_size: 0x00000200 |initialized finish.
[I/FAL] ==================== FAL partition table ====================
[I/FAL] | name | flash_dev | offset | length |
[I/FAL] -------------------------------------------------------------
[I/FAL] | download | sdcard0 | 0x00800000 | 0x00800000 |
[I/FAL] | easyflash | sdcard0 | 0x01000000 | 0x00100000 |
[I/FAL] | filesystem | sdcard0 | 0x01100000 | 0x00c00000 |
[I/FAL] =============================================================
[I/FAL] RT-Thread Flash Abstraction Layer initialize success.
Hello RISC-V
msh />[W/time] Cannot find a RTC device!
Mount "sd0p0" on "/" success
[E/DFS.fs] mount point (/) already mounted!
Mount "sd0p1" on "/data" fail
hal_sdc_create 1
[os E] OS_MutexCreate():42, handle 0x4055c040
card_detect insert
card_detect not eixst
sdmmc bytes_per_secotr:200, sector count:3a3d000
found part[0], begin: 4194304, size: 256.0MB
found partition:sd0 of mbr at offset 0x0000000000002000, size:0x0000000000080000
found part[1], begin: 272629760, size: 1.716GB
found partition:sd1 of mbr at offset 0x0000000000082000, size:0x0000000000366000
found part[2], begin: 2097152000, size: 27.169GB
part_count1:2
found partition:sd2 of mbr at offset 0x00000000003e8000, size:0x0000000003654800
Mount "sd1p0" on "/mnt" success
msh />
msh />ls
Directory /:
system <DIR>
download <DIR>
mnt <DIR>
data <DIR>
entries.log 110303
smart-ksymtbl.txt 154545
dev <DIR>
msh />
msh />cat smart-ksymtbl.txt
0x00000000404033e6 hal_hw_pin_init
0x0000000040403410 hal_pin_irq_enable
0x0000000040403496 hal_pin_detach_irq
0x000000004040350e hal_pin_attach_irq
0x00000000404035aa hal_pin_read
0x00000000404035d6 hal_pin_write
0x00000000404035f4 hal_pin_mode
0x0000000040403688 _uart_putc
0x00000000404036cc _uart_getc
from rt-thread.
And I read your notes on https://github.com/ylyamin/RT-Thread-on-Allwinner-D1H/blob/master/documentation/Code_changes.md, which is incredibly insightful to me. They can be edited and posted to the forum to benefit others in the community if you would love to 😃
from rt-thread.
Understand and agree, thank you for your support!
from rt-thread.
This BSP has been unmaintained since v5.0.0 I believe 😢
Recent works focused more on milk-v(https://github.com/RT-Thread/rt-thread/tree/master/bsp/cvitek) according to the git log.
from rt-thread.
Hi @polarvid, thank you for your response.
I can maintain D1 bsp, can create pull requests.
But since I’m not an expert in RTT, someone needs to review it. My current solution to just replace thread_delay to hw_delay doesn't seem quite right.
from rt-thread.
I have a D1s board to help with the kernel compiling issue on master branch and do some testing on it.
While I'm not an expert in sdhci driver, Im afraid there's not much I can do... 🤔Or you could submit your modification as a PR and wait for more experienced contributors to review it.
from rt-thread.
Thank you for the nice words @polarvid .
you could try the backtrace() to find out where thread suspended or dump more status on it for debugging
Yes, I tried backtrace() still can't understand what happened. Thinking maybe instead RTT driver try TinyUSB. Believe I need to create a separate git issue for this topic.
please feel free to share any details or updates whenever you can
I believe now all that was done required a big blog article, maybe I do it someday. Don't know how many people are interested in D1 drivers. Right now I have rough notes: https://github.com/ylyamin/RT-Thread-on-Allwinner-D1H/blob/master/documentation/Code_changes.md
from rt-thread.
Hi, @polarvid
Amazing work, thank you very much for your efforts ! I hope PR will be approved. I am happy that D1 bsp became alive in RTT.
Could you tell me how you handled the compilation failure, it is known how to fix it?
from rt-thread.
Hi @polarvid,
Great, so your solve D1S compilation is very good, thanks !
About D1H support, maybe need to suggest RTT masters to use the common D1s-D1H folder. I can create PR to delete old folders and add bootloaders, uart etc. Or you can do PR, I'm a newbie in this. After this, this original issue will be completely solved.
By the way, in your PR proposal to delete rt_hw_us_delay(), I used this function to solve LCD driver frize in my platform, need to think about it.
About Code_changes.md. Yes I want to add more human explanations and pictures and can be published in forum, hope to work with it after fighting with USB.
from rt-thread.
delete rt_hw_us_delay()
It seems that API has been implemented on libcpu/risc-v/t-head/c906, so that won't be a problem for your modifications. But with my test on master, the sd seems fine. I am not sure if that will also work with you on d1h board. You could try it on later on master if possible.
the common D1s-D1H folder
I think it could be better if you open a PR on it. Since the proporsal came from you. And I'm willing to help if there is any problem.
from rt-thread.
Related Issues (20)
- [Feature] rtt进入临界区直接粗暴的关掉全局中断,为何不像FreeRtos那样,只关闭受操作系统管理的中断,而不关闭不受操作系统管理的中断 HOT 4
- [Bug] cvitek 驱动初始化改成 INIT_DEVICE_EXPORT HOT 1
- [Bug] Failed to bringup with ARCH_KERNEL_REMAP & ARCH_USING_ASID enabled
- [Bug] counting of vsz on ps/top commands is not correct
- [Feature] 内核中是否可以去掉结构体typedef定义的可行性 HOT 1
- [Bug] GD32303系列BSP移植过程遇到问题 HOT 2
- [Feature] 整理 libcpu 下的 Kconfig 文件 | Separate Kconfig under libcpu to each architectures
- [Feature] _serial_fifo_rx in serial.c can be better
- [Bug] cvitek adc spi wdt 驱动中,局部函数收敛 HOT 3
- [Bug] components/fal/samples/porting /fal_flash_stm32f2_port.c erase
- [Bug] bsp/cvitek aarch64 failed to build HOT 5
- [Feature] PR #9194 存在问题 | Unresolved thread on PR #9194 HOT 1
- [Bug] bsp/cvitek/drivers pinmux driver can not support cv18xx_aarch64
- [Bug] USB UAC1 is not working with smartphone. HOT 2
- [Bug] bsp/cvitek documentation needs cleanup HOT 4
- [Bug] bsp/cvitek/drivers gpio driver can not support cv18xx_aarch64 HOT 1
- [Bug] bsp/cvitek/drivers uart driver can not support cv18xx_aarch64 HOT 1
- [Bug] Could not compile the rt-thread\bsp\stm32\stm32f429-fire-challenger in
- [Feature] bsp/cvitek: drivers_path_prefix can be optimized
- [Bug] bsp/qemu-virt64-riscv/SConstruct 中的 stack_size 问题 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rt-thread.