sipeed / M0P_BL618_examples

M0P_BL618_examples
5 stars 1 forks source link

building the example doesn't work #2

Open berkutta opened 12 months ago

berkutta commented 12 months ago
➜  pt git:(main) ✗ make CHIP=bl618 BOARD=m0pdock
/home/user/boufallo/M0P_BL618_examples/bouffalo_sdk/tools/cmake/bin/cmake -S . -B build -G "Unix Makefiles" -DCROSS_COMPILE=riscv64-unknown-elf- -DCHIP=bl618 -DCPU_ID= -DBOARD=m0pdock -DBOARD_DIR=/home/user/boufallo/M0P_BL618_examples/bouffalo_sdk/../sipeed_support/boards -DCONFIG_DEBUG=y -DCONFIG_ROMAPI=y -DCONFIG_USB_HS=y -DCONFIG_COMX=COM5 -DCMAKE_EXPORT_COMPILE_COMMANDS=OFF -DCONFIG_TLSF=y
-- [register library : fatfs], path:/home/user/boufallo/M0P_BL618_examples/bouffalo_sdk/components/fs/fatfs
-- [register library : lvgl], path:/home/user/boufallo/M0P_BL618_examples/bouffalo_sdk/components/graphics/lvgl
-- [register library : libc], path:/home/user/boufallo/M0P_BL618_examples/bouffalo_sdk/components/libc
-- [register library : mm], path:/home/user/boufallo/M0P_BL618_examples/bouffalo_sdk/components/mm
-- [register library : utils], path:/home/user/boufallo/M0P_BL618_examples/bouffalo_sdk/components/utils
-- [register library : lhal], path:/home/user/boufallo/M0P_BL618_examples/bouffalo_sdk/drivers/lhal
-- [register extern library : libpka], path:/home/user/boufallo/M0P_BL618_examples/bouffalo_sdk/drivers/lhal
CMake Error at /home/user/boufallo/M0P_BL618_examples/bouffalo_sdk/CMakeLists.txt:6 (add_subdirectory):
  add_subdirectory given source "drivers/soc/bl618/std" which is not an
  existing directory.

-- Configuring incomplete, errors occurred!
See also "/home/user/boufallo/M0P_BL618_examples/sipeed_support/examples/m0pdock/pt/build/CMakeFiles/CMakeOutput.log".
make: *** [/home/user/boufallo/M0P_BL618_examples/bouffalo_sdk/project.build:49: build] Error 1
➜  pt git:(main) ✗ ls /home/user/boufallo/M0P_BL618_examples/bouffalo_sdk/drivers/soc
bl602  bl616  bl702  bl808
marchingband commented 10 months ago

Same here, i am trying to run the /blink example if I run make and make flash COMX=COM3 it flashes, but immediately crashes

flash init fail!!!
=========== flash cfg ==============
jedec id   0x000000
mid            0xC8
iomode         0x11
clk delay      0x00
clk invert     0x03
read reg cmd0  0x05
read reg cmd1  0x35
write reg cmd0 0x01
write reg cmd1 0x31
qe write len   0x01
cread support  0x00
cread code     0x20
burst wrap cmd 0x77
=====================================
dynamic memory init success, ocram heap size = 188 Kbyte, psram heap size = 4096 Kbyte
sig1:ffffffff
sig2:0000f32f
cgen1:9f7ffffd
exception_entry
mcause=38000005
mepc:a0003c7e
mtval:00000001
Load access fault

I noticed that in board.c // ret = bflb_flash_init(); Why is this commented out?

gamelaster commented 10 months ago

@marchingband because due to lack of enough of pins M0P uses specific SPI Flash configuration, which is overriden by bflb_flash_init

marchingband commented 10 months ago

@gamelaster any ideas what causes the crash?