Closed cjacker closed 1 year ago
Hi, @cjacker thank you for your effort, you do the same code as mine, could you please pr this patch into master?
OK, I will send a PR.
By the way, could you update BLDevCube for various platforms to add 'Group2' support to MCU page? After that, these firmwares can be programmed in one time.
There still is a issue with overlapping RAM regions in the linker scripts for M0/LP
If M0 uses more than 16K ram, it will walk over the memory for LP
There still is a issue with overlapping RAM regions in the linker scripts for M0/LP
If M0 uses more than 16K ram, it will walk over the memory for LP
This depends on user code, it is variable.
Update: too quick response from upstream developer, my work already upstreamed.
Here is a demo 'tripplecore' for it: https://github.com/cjacker/opensource-toolchain-bouffalo-lab/tree/main/triplecore_bl808Install 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: it's already upstreamed.
Build this triplecore demo
Enter 'bl_mcu_sdk/examples/bl808_triplecore' dir and type
make
directly.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 (emulated by BL702) 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
GPIO 18 (TX) and GPIO 19 (RX) for LP core UART is defined in
bsp/board/bl808dk/board.c
, you can change it as you like.LP core is boot by M0 core, and boot from 0x58020000, FW addr set to 0x20000 in
helloworld_lp/flash_prog_cfg.ini
forBLFlashCommand