Samsung / ONE

On-device Neural Engine
Other
429 stars 152 forks source link

[luci-micro] Revise CMake #8754

Open seanshpark opened 2 years ago

seanshpark commented 2 years ago

Current task of ARM32 cross build of compiler modules has some difference in existing luci-micro cross build for Cortex-M7 MCUs.

Let's revise the make procedure after ARM32 build refactoring is finished.

seanshpark commented 2 years ago

@lucenticus , @binarman , I'm working on to support compiler with cross build for ARM32. As I know, current luci-micro landed with it's own way of cross build as there was no support in compiler build back then. I'd like to revise this or if someone else wants to work then could you please discuss in your team? I'm not sure you have plans this year with related area so it is OK if I work on this.

CC @lemmaa @chunseoklee

SlavikMIPT commented 2 years ago

@seanshpark I could work on this after ARM32 build refactoring is finished.

binarman commented 2 years ago

@seanshpark Could you share what is the class of arm32 device you are working on? Is it linux/Tizen single board computer?

I'd like to revise this

Do you want to remove separation of "host" and "micro" compilation and build everything using one compiler?

seanshpark commented 2 years ago

Could you share what is the class of arm32 device you are working on? Is it linux/Tizen single board computer?

Yes, it's basically targeted for ARM32/Tizen but as build system itself has much difference so this ARM32/Linux is for intermediate step, but this itself can be used someday. My test device is Raspberry Pi 3 with Ubuntu 18.04.

@chunseoklee is working on ARM32/Tizen build with GBS (#8480)

Do you want to remove separation of "host" and "micro" compilation and build everything using one compiler?

Ah, I would like to revise to cross build like in runtime.

I've prepared a sample Makefile.arm32 to make build simple, like;

# in host
make -f infra/nncc/Makefile.arm32 cfg debug test_prep
# run test in target device
make -f infra/nncc/Makefile.arm32 cfg debug test

As I understand, current micro compilation is just to drop luci-interpreter so only target compilation maybe need. (current ARM32 build has also host build to produce host tools that needs to execute like flatc)

What I want to revise is provide something like in building runtime, that is to add like infra/nncc/cmake/buildtool/config/config_armv7l-none.cmake and infra/nncc/cmake/buildtool/cross/toolchain_armv7l-none.cmake for luci-micro.

seanshpark commented 2 years ago

I could work on this after ARM32 build refactoring is finished.

@SlavikMIPT, thank you!

seanshpark commented 2 years ago

@SlavikMIPT, I think you can start luci-micro build for cortex-m7