pine64 / bl_iot_sdk

BL602 SDK (Pine64 fork)
https://pine64.github.io/bl602-docs/
Apache License 2.0
134 stars 58 forks source link

Workflow #56

Open schaecsn opened 3 years ago

schaecsn commented 3 years ago

I try to understand the workflow. Eventually a high level overview should be added to README.rst.

Development:

Development is done an intel PC. Communication with the evaluation board is done over an USB-A to Micro-B cable connection.

There is no operating system - what runs is a binary blob like the ones generated in customer_app/. Make yourself familiar with how they are built.

Flashing over the USB connection is done with bl_iot_sdk/tools/flash_tool/BLFlashEnv.

_FIXME: I grasp from the documention that we flash with bl_iot_sdk/tools/flashtool/BLFlashEnv, but I don't have that program. Do you?

Execution on the just flashed program:

Restart the board and connect a serial port terminal over the same USB connection.

FIXME: is that correct? At least the gtkterm screenshot shows /dev/ttyUSB0.

gamelaster commented 3 years ago

Well, PineCone have USB-C connector. About the program and all other things, I'm waiting at the moment for EVB too, so I can't verify, but it should come in near days, so will reply here with my discovery.

robertlipe commented 3 years ago

Prefer "cross build from a host computer" to "an intel PC". This could be done (with enough determination) from an ARM chromebook or an Apple Silicon Mac, when such things aren't covered by NDA. It could certainly be done on an AMD station today.

Confirmed: there is no BLFlashEnv in the tree. Maybe that's part of #25.

Yay for USB-C. The pictures I'd seen were USB-Micro B and that was a drag.

schaecsn commented 3 years ago

The Linux Binary from #25 is something else. I noticed that when building from Debian 9:

bl_iot_sdk/customer_app/bl602_demo_event$ ./genromap 
****** Please SET BL60X_SDK_PATH ******
****** Trying SDK PATH [/opt/bl_iot_sdk/customer_app/bl602_demo_event/../..]
use exsting version.txt file
[5519] Error loading Python lib '/tmp/_MEIcjzmxP/libpython3.7m.so.1.0': dlopen: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /tmp/_MEIcjzmxP/libpython3.7m.so.1.0)
/opt/bl_iot_sdk/customer_app/bl602_demo_event/../../make_scripts_riscv/project.mk:190: recipe for target 'all' failed
make: *** [all] Error 255

Apparently, it's needed for building and not flashing. It seems to be picky on the libc version. Because of that binary, I mentioned "intel PC", but I meant it in the broader sense.

Note, that's the command in ./genromap that bails out on old libcs:

$ cd bl_iot_sdk/image_conf; ./flash_build bl602_demo_event BL602
[15980] Error loading Python lib '/tmp/_MEIEMeqv3/libpython3.7m.so.1.0': dlopen: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /tmp/_MEIEMeqv3/libpython3.7m.so.1.0)