-
Notifications
You must be signed in to change notification settings - Fork 74k
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
Riscv 32 mcu #36118
Merged
Merged
Riscv 32 mcu #36118
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ers. The default Makefile target `all` is compiled if there's no command-line arguments.
Fix the ld error: undefined references to `__wrap_puts` for build commands like `make -f tensorflow/lite/micro/tools/make/Makefile TARGET=riscv32_mcu hello_world_bin` The related issue is tensorflow#32041 Refactoring, suggested by Nick Kreeger(nick.kreeger@gmail.com): The targets/mcu_riscv_makefile.inc should only include the bare-bones parts for building for this platform. So move platform specific items from targets/mcu_riscv_makefile.inc to the actual example folder. Create a riscv32_mcu folder in each example directory. In those directories, create a new Makefile.inc that adds these rules moved out. The bug's original reasons: The Makefile variables XXX_TEST_SRCS/XXX_SRCS in targets/mcu_riscv_makefile.inc are overridden by the the examples's respective makefile.inc (eg. hello_world/Makefile.inc), which leads to the architecture special __wrap__funs are not included correctly.
For arduino sketch in riscv_mcu examples, this patch fix by declare the global variable `void* __dso_handle;`.
Closed
gbaned
added
comp:lite
TF Lite related issues
comp:micro
Related to TensorFlow Lite Microcontrollers
labels
Jan 22, 2020
petewarden
approved these changes
Jul 14, 2020
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.
Sorry for the slow response, this looks good, thanks!
google-ml-butler
bot
added
kokoro:force-run
Tests on submitted change
ready to pull
PR ready for merge process
labels
Jul 14, 2020
gbaned
added
ready to pull
PR ready for merge process
and removed
awaiting review
Pull request awaiting review
ready to pull
PR ready for merge process
labels
Jul 15, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cla: yes
comp:lite
TF Lite related issues
comp:micro
Related to TensorFlow Lite Microcontrollers
ready to pull
PR ready for merge process
size:M
CL Change Size: Medium
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update for this pull request(reviewed by @nkreeger before):
#33680 (Will close)
#36095 (by @jpienaar before)
related issues:
#32041
#33677
If possible, pls review as soon as possible, the tensorflow repo is very easy to get conflict because update so quickly. Thanks,
About the three patches for review:
The default Makefile target
all
is compiled if there's no command-line arguments.lite:micro:riscv32_mcu:Fix build failure of undefined references.
Fix the ld error:
undefined references to
__wrap_puts
for build commands likemake -f tensorflow/lite/micro/tools/make/Makefile TARGET=riscv32_mcu hello_world_bin
The related issue is tensorflow#32041
Refactoring, suggested by Nick Kreeger(nick.kreeger@gmail.com):
The targets/mcu_riscv_makefile.inc should only include the bare-bones parts for building for this platform.
So move platform specific items from targets/mcu_riscv_makefile.inc to the actual example folder.
Create a riscv32_mcu folder in each example directory. In those directories, create a new Makefile.inc that adds these rules moved out.
The bug's original reasons:
The Makefile variables XXX_TEST_SRCS/XXX_SRCS in targets/mcu_riscv_makefile.inc are overridden by the the examples's respective makefile.inc (eg. hello_world/Makefile.inc), which leads to the architecture special __wrap__funs are not included correctly.
lite:micro:riscv32_mcu: Fix hidden symbol
__dso_handle' isn't defined. For arduino sketch in riscv_mcu examples, this patch fix by declare the global variable
void* __dso_handle;`.