forked from kendryte/kendryte-openmv
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First openmv version with 8.2.0 toolchain
- Loading branch information
1 parent
ef6ab6d
commit cb85cef
Showing
76 changed files
with
3,511 additions
and
558 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* Copyright 2018 Canaan Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Kendryte-standalone-opemv build steps: | ||
1. download V8.2.0 toolchain from https://kendryte.com/downloads/ | ||
2. export PATH=/opt/maix-toolchain/bin/:$PATH (riscv toolchain path for micropython build) | ||
3. mkdir build | ||
4. cd build | ||
5. cmake .. -DPROJ=openmv -DTOOLCHAIN=/opt/maix-toolchain/bin (riscv toolchain path for kendryte sdk build) | ||
6. make | ||
|
||
The default example is face detect, you can change src/openmv/src/micropython/ports/k210-standalone/buildin-py/boot.py to implement other openmv functions. |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
message("") | ||
message("Project: ${PROJECT_NAME}") | ||
message(" LIST_FILE=${CMAKE_PARENT_LIST_FILE}") | ||
message(" TOOLCHAIN=${TOOLCHAIN}") | ||
message(" KENDRYTE IDE=${KENDRYTE_IDE}") | ||
message(" KENDRYTE_IDE=${KENDRYTE_IDE}") | ||
message(" BUILDING_SDK=${BUILDING_SDK}") | ||
message("") | ||
message(" CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}") | ||
message(" CMAKE_C_COMPILER=${CMAKE_C_COMPILER}") | ||
message(" CMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}") | ||
message(" CMAKE_LINKER=${CMAKE_LINKER}") | ||
message(" CMAKE_OBJCOPY=${CMAKE_OBJCOPY}") | ||
message(" CMAKE_OBJDUMP=${CMAKE_OBJDUMP}") | ||
message(" CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}") | ||
message("") | ||
message(" CMAKE_C_FLAGS=${CMAKE_C_FLAGS}") | ||
message(" CMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}") | ||
message(" LDFLAGS=${LDFLAGS}") | ||
message(" CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR}") | ||
message("Makefile created.") | ||
message("") | ||
message("") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,40 @@ | ||
if (NOT BUILDING_SDK) | ||
add_library(kendryte STATIC IMPORTED) | ||
set_property(TARGET kendryte PROPERTY IMPORTED_LOCATION ${SDK_ROOT}/libmaix.a) | ||
set_property(TARGET kendryte PROPERTY IMPORTED_LOCATION ${SDK_ROOT}/libkendryte.a) | ||
include_directories(${SDK_ROOT}/include/) | ||
endif () | ||
|
||
removeDuplicateSubstring(${CMAKE_C_FLAGS} CMAKE_C_FLAGS) | ||
removeDuplicateSubstring(${CMAKE_CXX_FLAGS} CMAKE_CXX_FLAGS) | ||
|
||
message("SOURCE_FILES=${SOURCE_FILES}") | ||
add_executable(${PROJECT_NAME} ${SOURCE_FILES}) | ||
# add_dependencies(${PROJECT_NAME} kendryte) # TODO: third_party | ||
# target_link_libraries(${PROJECT_NAME} kendryte) # TODO: third_party | ||
# link_directories(${CMAKE_BINARY_DIR}) | ||
|
||
target_link_libraries(${PROJECT_NAME} | ||
${SDK_ROOT}/src/openmv/src/micropython/ports/k210-standalone/micropython.a | ||
) | ||
|
||
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE C) | ||
|
||
target_link_libraries(${PROJECT_NAME} | ||
-Wl,--start-group | ||
gcc m c kendryte | ||
gcc m c | ||
-Wl,--whole-archive | ||
kendryte | ||
-Wl,--no-whole-archive | ||
-Wl,--end-group | ||
) | ||
|
||
IF(SUFFIX) | ||
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SUFFIX ${SUFFIX}) | ||
ENDIF() | ||
|
||
#message("CMAKE_OBJCOPY=${CMAKE_OBJCOPY}") | ||
|
||
# Build target | ||
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | ||
COMMAND ${CMAKE_OBJCOPY} --output-format=binary ${CMAKE_BINARY_DIR}/${PROJECT_NAME}${SUFFIX} ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.bin | ||
DEPENDS ${PROJECT_NAME} | ||
COMMENT "Generating .bin file ...") | ||
|
||
|
||
add_custom_target(firmware DEPENDS ${PROJECT_NAME}.firmware.bin) | ||
|
||
# show information | ||
include(${CMAKE_CURRENT_LIST_DIR}/dump-config.cmake) |
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
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
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
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
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
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
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
Oops, something went wrong.