mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Add Nano 2040 to release build.
This commit is contained in:
parent
21f4c0e0da
commit
626440713e
40
.travis.yml
40
.travis.yml
@ -1,5 +1,5 @@
|
||||
os: linux
|
||||
dist: xenial
|
||||
dist: bionic
|
||||
sudo: required
|
||||
language: c
|
||||
stage: build
|
||||
@ -21,21 +21,25 @@ cache:
|
||||
- "${HOME}/persist"
|
||||
|
||||
script:
|
||||
# update submodules
|
||||
# Update submodules.
|
||||
- git submodule update --init --depth=1 --no-single-branch
|
||||
- git -C src/micropython/ submodule update --init --depth=1
|
||||
# install ARM GCC
|
||||
- pushd .
|
||||
- cd ~ && mkdir gcc && cd gcc
|
||||
- GCC_URL="https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2"
|
||||
- wget -O gcc.tar.bz2 ${GCC_URL}
|
||||
- tar -jxf gcc.tar.bz2 --strip 1
|
||||
- exportline="export PATH=\$HOME/gcc/bin:\$PATH"
|
||||
- if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
|
||||
- . ~/.profile
|
||||
- popd
|
||||
# Install ARM GCC.
|
||||
- |
|
||||
mkdir ${HOME}/gcc
|
||||
GCC_URL="https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2"
|
||||
wget --no-check-certificate -O - ${GCC_URL} | tar --strip-components=1 -jx -C ${HOME}/gcc
|
||||
export PATH=${HOME}/gcc/bin:${PATH}
|
||||
- arm-none-eabi-gcc --version
|
||||
# build firmware
|
||||
# Install recent cmake if needed.
|
||||
- |
|
||||
if [[ ${TARGET} == ARDUINO_NANO_RP2040_CONNECT ]]; then
|
||||
mkdir ${HOME}/cmake
|
||||
CMAKE_URL="https://cmake.org/files/v3.20/cmake-3.20.0-linux-x86_64.tar.gz"
|
||||
wget --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${HOME}/cmake
|
||||
export PATH=${HOME}/cmake/bin:${PATH}
|
||||
fi
|
||||
# Build the firmware.
|
||||
- make -j$(nproc) -C src/micropython/mpy-cross
|
||||
- make -j$(nproc) TARGET=$TARGET -C src
|
||||
- mkdir ~/build/$TARGET
|
||||
@ -92,6 +96,13 @@ jobs:
|
||||
name: NANO33_WORKSPACE # workspace names are escaped.
|
||||
paths: ~/build/$TARGET
|
||||
|
||||
- stage: build
|
||||
env: TARGET=ARDUINO_NANO_RP2040_CONNECT
|
||||
workspaces:
|
||||
create:
|
||||
name: ARDUINO_NANO_RP2040_CONNECT_WORKSPACE # workspace names are escaped.
|
||||
paths: ~/build/$TARGET
|
||||
|
||||
- stage: build
|
||||
env: TARGET=WINC1500
|
||||
workspaces:
|
||||
@ -122,10 +133,11 @@ jobs:
|
||||
- PORTENTA_WORKSPACE
|
||||
- OPENMVPT_WORKSPACE
|
||||
- NANO33_WORKSPACE
|
||||
- ARDUINO_NANO_RP2040_CONNECT_WORKSPACE
|
||||
- WINC1500_WORKSPACE
|
||||
- CYW4343_WORKSPACE
|
||||
script:
|
||||
- zip -r firmware_${TRAVIS_TAG}.zip OPENMV2 OPENMV3 OPENMV4 OPENMV4P PORTENTA OPENMVPT NANO33 WINC1500 CYW4343
|
||||
- zip -r firmware_${TRAVIS_TAG}.zip OPENMV2 OPENMV3 OPENMV4 OPENMV4P PORTENTA OPENMVPT NANO33 ARDUINO_NANO_RP2040_CONNECT WINC1500 CYW4343
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 1ebfb96b1ae3acd8d8aecf08339403f9016d6cc2
|
||||
Subproject commit ade673c7e1acaf50ff8d2b68fed61b1468fea764
|
||||
@ -2,8 +2,8 @@
|
||||
set(TOP_DIR $ENV{TOP_DIR})
|
||||
set(TARGET $ENV{TARGET})
|
||||
set(PORT rp2)
|
||||
set(BUILD ${TOP_DIR}/build)
|
||||
set(FW_DIR ${BUILD}/bin)
|
||||
set(BUILD ${TOP_DIR}/build/rp2)
|
||||
set(BIN_DIR ${TOP_DIR}/build/bin)
|
||||
set(OMV_DIR omv)
|
||||
set(UVC_DIR uvc)
|
||||
set(CM4_DIR cm4)
|
||||
@ -34,28 +34,20 @@ target_compile_definitions(${MICROPY_TARGET} PRIVATE
|
||||
${OMV_BOARD_MODULES_DEFINITIONS}
|
||||
)
|
||||
|
||||
#target_compile_options(${MICROPY_TARGET} PRIVATE
|
||||
#)
|
||||
|
||||
# Generate DCMI PIO header
|
||||
pico_generate_pio_header(${MICROPY_TARGET}
|
||||
${TOP_DIR}/${OMV_DIR}/ports/${PORT}/dcmi.pio
|
||||
)
|
||||
|
||||
# Linker script
|
||||
add_custom_command(
|
||||
OUTPUT ${FW_DIR}/rp2.ld
|
||||
OUTPUT ${BUILD}/rp2.ld
|
||||
COMMENT "Preprocessing linker script"
|
||||
COMMAND "${CMAKE_C_COMPILER}" -P -E -I ${OMV_BOARD_CONFIG_DIR} -DLINKER_SCRIPT ${PORT_DIR}/rp2.ld.S > ${FW_DIR}/rp2.ld
|
||||
COMMAND "${CMAKE_C_COMPILER}" -P -E -I ${OMV_BOARD_CONFIG_DIR} -DLINKER_SCRIPT ${PORT_DIR}/rp2.ld.S > ${BUILD}/rp2.ld
|
||||
DEPENDS ${OMV_BOARD_CONFIG_DIR}/omv_boardconfig.h ${PORT_DIR}/rp2.ld.S
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(
|
||||
LinkerScript
|
||||
ALL DEPENDS ${FW_DIR}/rp2.ld
|
||||
ALL DEPENDS ${BUILD}/rp2.ld
|
||||
VERBATIM
|
||||
)
|
||||
pico_set_linker_script(${MICROPY_TARGET} ${FW_DIR}/rp2.ld)
|
||||
pico_set_linker_script(${MICROPY_TARGET} ${BUILD}/rp2.ld)
|
||||
|
||||
# Add OMV qstr sources
|
||||
file(GLOB OMV_SRC_QSTR1 ${TOP_DIR}/${OMV_DIR}/modules/*.c)
|
||||
@ -188,6 +180,11 @@ if(MICROPY_PY_SENSOR)
|
||||
target_compile_definitions(${MICROPY_TARGET} PRIVATE
|
||||
MICROPY_PY_SENSOR=1
|
||||
)
|
||||
|
||||
# Generate DCMI PIO header
|
||||
pico_generate_pio_header(${MICROPY_TARGET}
|
||||
${TOP_DIR}/${OMV_DIR}/ports/${PORT}/dcmi.pio
|
||||
)
|
||||
endif()
|
||||
|
||||
if(MICROPY_PY_AUDIO)
|
||||
@ -251,3 +248,10 @@ if(MICROPY_PY_ULAB)
|
||||
ULAB_CONFIG_FILE="${OMV_BOARD_CONFIG_DIR}/ulab_config.h"
|
||||
)
|
||||
endif()
|
||||
|
||||
add_custom_command(TARGET ${MICROPY_TARGET}
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${BIN_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy firmware.elf firmware.bin firmware.uf2 ${BIN_DIR}
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
@ -11,16 +11,15 @@
|
||||
export PORT
|
||||
export TARGET
|
||||
export TOP_DIR
|
||||
export CC=
|
||||
export CXX=
|
||||
|
||||
MICROPY_ARGS += BOARD=$(TARGET) BUILD=$(FW_DIR) OMV_CMAKE=$(TOP_DIR)/$(OMV_DIR)/ports/$(PORT)/omv_portconfig.cmake
|
||||
MICROPY_ARGS += BOARD=$(TARGET) BUILD=$(BUILD)/rp2 OMV_CMAKE=$(TOP_DIR)/$(OMV_DIR)/ports/$(PORT)/omv_portconfig.cmake
|
||||
|
||||
###################################################
|
||||
all: $(OPENMV)
|
||||
|
||||
$(BUILD):
|
||||
$(MKDIR) -p $@
|
||||
|
||||
$(FIRMWARE): | $(BUILD)
|
||||
$(FIRMWARE):
|
||||
$(MAKE) -C $(MICROPY_DIR)/ports/$(PORT) $(MICROPY_ARGS)
|
||||
|
||||
# This target generates the firmware image.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user