Skip to content

Instantly share code, notes, and snippets.

@MartinRGB
Last active November 14, 2023 06:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MartinRGB/6f56089f16acf86013e96eb7a473c1f3 to your computer and use it in GitHub Desktop.
Save MartinRGB/6f56089f16acf86013e96eb7a473c1f3 to your computer and use it in GitHub Desktop.
@MartinRGB
Copy link
Author

IO Board

https://milkv.io/docs/duo/io-board/usb-ethernet-iob

** Note that when using the IO-Board, the USB network (RNDIS) is not available, Please use the Ethernet interface on the IO-Board**

@MartinRGB
Copy link
Author

@MartinRGB
Copy link
Author

MartinRGB commented Nov 10, 2023

duo st7789

image

run git clone https://github.com/milkv-duo/duo-buildroot-sdk.git

follow instructions in the repo.

Hardware Connection:

Duo       |       st7789
GND       |         GND
3.3v(out) |         VCC
GPIO23    |         SCL
GPIO22    |         SDA
GPIOA23   |         RES
GPIOA24   |         DC
GPIO18    |         CS

Follow this Guide:

https://community.milkv.io/t/milk-v-duo-spi-st7789/131

@MartinRGB
Copy link
Author

cross-compile in Ubuntu

unset LD_LIBRARY_PATH

after compile

set LD_LIBRARY_PATH

@MartinRGB
Copy link
Author

MartinRGB commented Nov 12, 2023

build riscv-gnu-toolchain

https://github.com/riscv-collab/riscv-gnu-toolchain

make linux:

./configure --prefix=/opt/riscv
make linux

make musl:

./configure --prefix=/opt/riscv
make musl

export PATH="$PATH:/opt/riscv/bin"


Upside not work for me,so I refer https://community.milkv.io/t/opencv-4-5-4/82

wget https://sophon-file.sophon.cn/sophon-prod-s3/drive/23/03/07/16/host-tools.tar.gz
tar xvf host-tools.tar.gz
cd host-tools 
touch riscv-crosstool-env-init 
nano riscv-crosstool-env-init 

content is:

HOST_TOOL_PATH=/xxx/xxx/xxx/host-tools

export PATH="$HOST_TOOL_PATH/gcc/riscv64-linux-x86_64/bin:$HOST_TOOL_PATH/gcc/riscv64-linux-musl-x86_64/bin:$HOST_TOOL_PATH/gcc/riscv64-elf-x86_64/bin:$PATH"

echo -e "\033[33;1mriscv交叉编译工具链环境配置完成!\033[0m"

in sdk root folder

source /xxx/xxx/xxx/host-tools/riscv-crosstool-env-init 

then you can compile the code

@MartinRGB
Copy link
Author

MartinRGB commented Nov 12, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment