Closed cjacker closed 1 year ago
Update: Already upstreamed.
wget https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource//1663142243961/Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1-20220906.tar.gz sudo mkdir -p /opt/xuantie-riscv64-embed-toolchain sudo tar xf Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1-20220906.tar.gz -C /opt/xuantie-riscv64-embed-toolchain --strip-components=1
And add /opt/xuantie-riscv64-embed-toolchain/bin to PATH env according to your shell.
/opt/xuantie-riscv64-embed-toolchain/bin
Update already upstreamed
Enter 'bl_mcu_sdk/examples/bl808_triplecore', and type 'make'
After build successfully, these firmware files will be generated:
Since BLDevCube GUI tool not support Group2 in BL808 MCU page, you can not program these firmwares in one time.
I suggest to program it one by one by BLFlashCommand, you may need to activate UART programming mode every time.
BLFlashCommand
Here use Sipeed M1S Dock as example.
M1S Dock will enter UART programming mode.
Then:
cd helloworld_m0 make flash BL_SDK_BASE=$(HOME)/bl_mcu_sdk
After programmed, you need re-power M1S Dock and continue programming firmwares for d0 and lp core as above steps.
After all three firmware programmed, Wire 3 USB2TTL adapter as:
UART0 for D0 core
UART1 for M0 core
UART2 for LP core
For M1S Dock, since it already have 2 UARTs connect to D0 and M0, you only need wire another USB2TTL adapter to GPIO 18 and GPIO 19 for LP core.
For my env, the 3 serial devices are :
Check it according to your env.
Use any serial terminal such as tio / minicom / picocom / cutecom, etc. Set baudrate to 2000000, 8N1, and open 3 serial devices.
tio
minicom
picocom
cutecom
You will receive "hello world" from 3 cores.
Use these scripts and firmware to restore the factory firmwares for Sipeed M1S Dock:
https://github.com/cjacker/opensource-toolchain-bouffalo-lab/tree/main/m1s_dock_factory_firmware
bsp/board/bl808dk/board.c
helloworld_lp/flash_prog_cfg.ini
Nice Try!
Update: Already upstreamed.
Install XuanTie RISC-V toolchain
And add
/opt/xuantie-riscv64-embed-toolchain/bin
to PATH env according to your shell.Apply patch to bl_mcu_sdkUpdate already upstreamed
Build this triplecore demo
Enter 'bl_mcu_sdk/examples/bl808_triplecore', and type 'make'
After build successfully, these firmware files will be generated:
Program to bl808
Since BLDevCube GUI tool not support Group2 in BL808 MCU page, you can not program these firmwares in one time.
I suggest to program it one by one by
BLFlashCommand
, you may need to activate UART programming mode every time.Here use Sipeed M1S Dock as example.
M1S Dock will enter UART programming mode.
Then:
After programmed, you need re-power M1S Dock and continue programming firmwares for d0 and lp core as above steps.
Wire up USB2TTL adapters
After all three firmware programmed, Wire 3 USB2TTL adapter as:
UART0 for D0 core
UART1 for M0 core
UART2 for LP core
For M1S Dock, since it already have 2 UARTs connect to D0 and M0, you only need wire another USB2TTL adapter to GPIO 18 and GPIO 19 for LP core.
For my env, the 3 serial devices are :
Check it according to your env.
Receive hello world from 3 cores
Use any serial terminal such as
tio
/minicom
/picocom
/cutecom
, etc. Set baudrate to 2000000, 8N1, and open 3 serial devices.You will receive "hello world" from 3 cores.
To restore factory firmwares for Sipeed M1S Dock
Use these scripts and firmware to restore the factory firmwares for Sipeed M1S Dock:
https://github.com/cjacker/opensource-toolchain-bouffalo-lab/tree/main/m1s_dock_factory_firmware
More
bsp/board/bl808dk/board.c
, you can change it as you like.helloworld_lp/flash_prog_cfg.ini
forBLFlashCommand