-
Notifications
You must be signed in to change notification settings - Fork 7.6k
drivers: misc: ethos_u: support nuvoton numaker m55m1x #88941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
/* Address undefined _fini for the exit call | ||
* | ||
* With gcc command-line options -nostartfiles or -nostdlib, the gcc | ||
* built-in object files crti.o/crtn.o which implement _init/_fini | ||
* won't get linked in automatically and will cause undefined reference | ||
* to _fini error when exit is invoked. | ||
* | ||
* This is fixed by providing one dummey _fini to let linker pass. | ||
*/ | ||
__weak void _fini(void) | ||
{ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ccli8 maybe I missed something but how is this change related to this PR? did you face this issue while running the new samples?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. This sample modules/tflite-micro/tflm_ethosu
uses newlib and invokes exit()
, but meets compile failure with _fini
undefined.
Hi @ccli8, could you share your output log when running the |
Log of
|
drivers/misc/ethos_u/Kconfig
Outdated
@@ -0,0 +1,13 @@ | |||
# Copyright (c) 2025 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would you prefer to add this instead https://github.com/zephyrproject-rtos/zephyr/blob/6d9fecae447b6f5cf4175bef206142650d7bddd6/doc/contribute/guidelines.rst#copyrights-notices?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, updated copyright
|
||
if ARM_ETHOS_U | ||
|
||
config ETHOS_U_NUMAKER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the discussion here could influence this change so I would appreciate your feedback there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Besides, this PR will update according to result of #90787.
Added as collaborator of |
Add Chun-Chieh Li "ccli8" as collaborator for hal_ethos_u driver Signed-off-by: Chun-Chieh Li <[email protected]>
With gcc command-line options -nostartfiles or -nostdlib, the gcc built-in object files crti.o/crtn.o which implement _init/_fini won't get linked in automatically and will cause undefined reference to _fini error when exit is invoked. This is fixed by providing one dummey _fini to let linker pass. Signed-off-by: Chun-Chieh Li <[email protected]>
It is unsafe to pass raw buffer as thread stack. Instead, use canonical K_THREAD_STACK_DEFINE or friends to define thread stack. Signed-off-by: Chun-Chieh Li <[email protected]>
This addes frontend of arm ethos-u core driver for nuvoton numaker m55m1x. Special notes include: 1. Leaving application overriding dcache flush/invalidate weak functions for cacheable NPU buffer 2. Configuring macs_per_cc to 256 in arm ethos-u core driver to match m55m1x ethos-u RTL config Signed-off-by: Chun-Chieh Li <[email protected]>
Rebase on #90787 to integrate with |
CI test failure for not having needed access level |
Can you file a nomination for yourself? https://github.com/zephyrproject-rtos/zephyr/issues (New Issue -> Contributor Nomination) And there's an actual failure too https://github.com/zephyrproject-rtos/zephyr/actions/runs/15872619304/job/44753082706?pr=88941 |
Nominate for myself: #92205 |
This supports nuvoton numaker_m55m1 board, including: 1. Choosing NPU buffer as cacheable or non-cacheable, dependent on CONFIG_NOCACHE_MEMORY. When cachealbe is chosen, data cache flush/ invalidate weak functions (ethos-u core driver) are also overridden. 2. Add Vela-compiled model which matches this targets's NPU, Ethos-U55 with 256 macs_per_cc Besides, re-organize for new board support, including: 1. Refactor Vela-compiled models which must match target Ethos-U RTL config 2. Add non-Vela-compiled model for evaluation of no-Ethos-U platform Signed-off-by: Chun-Chieh Li <[email protected]>
|
Fixed |
This supports Nuvoton's M55M1 Ethos-U NPU. Besides, the
tflm_ethosu
sample is refined for this target's verification, including:_fini
symbol on invokingexit()
for newlib libcstdint.h
for e.g.uint8_t
typeK_THREAD_STACK_DEFINE
or friends instead of raw bufferNOTE: This PR covers #88218.