軟硬體共同設計期末作業.md
HW1
用Kruskal–Wallis求圓周率前800有效位 程式碼來自 Computing Pi in C Computing Pi in C
|
|
很明顯是line_24(),我想做記憶體線性存取加速。
HW2
本機編譯
本來不知道.h.c檔只有單向include,一直在嘗試-I -L
直接傳給gcc秒解。 我還是搞不懂gcc target file 跟 -I的差別
讀寫SD
先上結論
|
|
好像有實作disk_write??? 但mmc.c裡沒有write
vivado會提醒你mmc裡沒有disk_write()
:::danger
所以src裡的FileIo不能用
:::
在google了前5頁多是xilinx 教你自己刻的3年前的論壇之後,我絕望的跑去看xilinx user meue
,發現xilinx做完了
p158 LibXil FFS
本來以為是救贖,結果
二頁XD
後來發現
FatFs
是他的最頂層接口
|
|
只讀
|
|
:::info
D:\10510129\hw2_0\lab5.sdk\digcam\Debug/../src/sd.c:140: multiple definition of SDAccess' ./src/helloworld.o:D:\10510129\hw2_0\lab5.sdk\digcam\Debug/../src/sd.c:140: first defined here ./src/sd.o: In function
ReleaseSD’:
D:\10510129\hw2_0\lab5.sdk\digcam\Debug/../src/sd.c:176: multiple definition of `ReleaseSD'
./src/helloworld.o:D:\10510129\hw2_0\lab5.sdk\digcam\Debug/../src/sd.c:176: first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [digcam.elf] Error 1
22:34:45 Build Finished (took 377ms)
:::
好像一定要.h
讀寫
|
|
|
|
|
|
|
|
換順序