Merge pull request #595 from iabdalkader/master

Travis Updates.
This commit is contained in:
Ibrahim Abd Elkader 2019-09-30 00:36:27 +02:00 committed by GitHub
commit 934846d2dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
53 changed files with 80 additions and 32 deletions

View File

@ -1,11 +1,17 @@
os: linux
dist: trusty dist: trusty
sudo: required sudo: required
language: c language: c
stage: build
notifications: notifications:
email: email:
on_success: never on_success: never
stages:
- build
- deploy
branches: branches:
only: only:
- master - master
@ -14,30 +20,82 @@ cache:
directories: directories:
- "${HOME}/persist" - "${HOME}/persist"
matrix: script:
include:
- env: TARGET=OPENMV2
- env: TARGET=OPENMV3
- env: TARGET=OPENMV4
- env: TARGET=OPENMV4R
before_install:
# update submodules # update submodules
- git submodule update --init --recursive - git submodule update --init --recursive
# install ARM GCC # install ARM GCC
- pushd . - pushd .
- cd ~ && mkdir gcc && cd gcc - cd ~ && mkdir gcc && cd gcc
- GCC_URL="https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2017q4/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2" - GCC_URL="https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2"
- wget -O gcc.tar.bz2 ${GCC_URL} - wget -O gcc.tar.bz2 ${GCC_URL}
- tar -jxf gcc.tar.bz2 --strip 1 - tar -jxf gcc.tar.bz2 --strip 1
- exportline="export PATH=\$HOME/gcc/bin:\$PATH" - exportline="export PATH=\$HOME/gcc/bin:\$PATH"
- if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi - if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
- . ~/.profile - . ~/.profile
- popd - popd
before_script:
- arm-none-eabi-gcc --version - arm-none-eabi-gcc --version
# build firmware
script:
- make -j5 TARGET=$TARGET -C src - make -j5 TARGET=$TARGET -C src
- mkdir ~/build/$TARGET
- cp -r src/build/bin/* ~/build/$TARGET
jobs:
include:
- stage: build
env: TARGET=OPENMV2
workspaces:
create:
name: OPENMV2_WORKSPACE # workspace names are escaped.
paths: ~/build/$TARGET
- stage: build
env: TARGET=OPENMV3
workspaces:
create:
name: OPENMV3_WORKSPACE # workspace names are escaped.
paths: ~/build/$TARGET
- stage: build
env: TARGET=OPENMV4
workspaces:
create:
name: OPENMV4_WORKSPACE # workspace names are escaped.
paths: ~/build/$TARGET
- stage: build
env: TARGET=OPENMV4R
workspaces:
create:
name: OPENMV4R_WORKSPACE # workspace names are escaped.
paths: ~/build/$TARGET
- stage: build
env: TARGET=WINC1500
workspaces:
create:
name: WINC1500_WORKSPACE # workspace names are escaped.
paths: ~/build/$TARGET
script:
- cp -rf src/winc1500/firmware ~/build/$TARGET
- stage: deploy
git:
clone: false
workspaces:
use:
- OPENMV2_WORKSPACE
- OPENMV3_WORKSPACE
- OPENMV4_WORKSPACE
- OPENMV4R_WORKSPACE
- WINC1500_WORKSPACE
script:
- zip -r firmware.zip OPENMV2 OPENMV3 OPENMV4 OPENMV4R WINC1500
deploy:
provider: releases
api_key:
secure: "$GH_TOKEN"
file: firmware.zip
skip_cleanup: true
on:
tags: true
draft: true

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,11 +0,0 @@
To update the firmware using the IDE follow these steps:
* Plug in the OpenMV Cam to a USB port.
* Use the IDE built-in dfu tool to update the firmware.
To update the firmware manually follow these steps:
* Connect BOOT0 to VCC on the debugging header.
* Plug in the OpenMV Cam to a USB port.
* Type make flash, wait until it's done.
* Remove the jumper and reset the board.

View File

@ -34,6 +34,7 @@ MAKE = $(Q)make
CAT = $(Q)cat CAT = $(Q)cat
# Targets # Targets
TARGET ?= OPENMV3
OPENMV = openmv OPENMV = openmv
BOOTLOADER = bootloader BOOTLOADER = bootloader
UVC = uvc UVC = uvc
@ -42,6 +43,7 @@ FIRMWARE = firmware
# Directories # Directories
TOP_DIR=$(shell pwd) TOP_DIR=$(shell pwd)
BUILD=$(TOP_DIR)/build BUILD=$(TOP_DIR)/build
FW_DIR=$(BUILD)/bin
CMSIS_DIR=cmsis CMSIS_DIR=cmsis
STUSB_DIR=stusb STUSB_DIR=stusb
MICROPY_DIR=micropython MICROPY_DIR=micropython
@ -51,16 +53,12 @@ MLX_DIR=mlx
WINC1500_DIR=winc1500 WINC1500_DIR=winc1500
BOOTLDR_DIR=bootloader BOOTLDR_DIR=bootloader
UVC_DIR=uvc UVC_DIR=uvc
OMV_BOARD_CONFIG_DIR=$(TOP_DIR)/$(OMV_DIR)/boards/$(TARGET)/
MP_BOARD_CONFIG_DIR=$(TOP_DIR)/$(MICROPY_DIR)/ports/stm32/boards/$(TARGET)/
# Additional qstr definitions for OpenMV # Additional qstr definitions for OpenMV
OMV_QSTR_DEFS = $(TOP_DIR)/$(OMV_DIR)/py/qstrdefsomv.h OMV_QSTR_DEFS = $(TOP_DIR)/$(OMV_DIR)/py/qstrdefsomv.h
# Target
TARGET ?= OPENMV3
FW_DIR=$(TOP_DIR)/../firmware/$(TARGET)
OMV_BOARD_CONFIG_DIR=$(TOP_DIR)/$(OMV_DIR)/boards/$(TARGET)/
MP_BOARD_CONFIG_DIR=$(TOP_DIR)/$(MICROPY_DIR)/ports/stm32/boards/$(TARGET)/
# Debugging/Optimization # Debugging/Optimization
ifeq ($(DEBUG), 1) ifeq ($(DEBUG), 1)
CFLAGS += -O0 -ggdb3 -DPENDSV_DEBUG CFLAGS += -O0 -ggdb3 -DPENDSV_DEBUG
@ -514,6 +512,9 @@ all: $(OPENMV)
$(BUILD): $(BUILD):
$(MKDIR) -p $@ $(MKDIR) -p $@
$(FW_DIR):
$(MKDIR) -p $@
BOOTLOADER_OBJS: FIRMWARE_OBJS BOOTLOADER_OBJS: FIRMWARE_OBJS
$(MAKE) -C $(BOOTLDR_DIR) BUILD=$(BUILD)/$(BOOTLDR_DIR) CFLAGS="$(BOOTLDR_CFLAGS) -MMD" $(MAKE) -C $(BOOTLDR_DIR) BUILD=$(BUILD)/$(BOOTLDR_DIR) CFLAGS="$(BOOTLDR_CFLAGS) -MMD"
@ -554,7 +555,7 @@ $(UVC): FIRMWARE_OBJS UVC_OBJS
$(PYTHON) $(MKDFU) -b $(MAIN_APP_ADDR):$(FW_DIR)/$(UVC).bin $(FW_DIR)/$(UVC).dfu $(PYTHON) $(MKDFU) -b $(MAIN_APP_ADDR):$(FW_DIR)/$(UVC).bin $(FW_DIR)/$(UVC).dfu
# This target generates a combined bootloader+main firmware image. # This target generates a combined bootloader+main firmware image.
$(OPENMV): $(BOOTLOADER) $(UVC) $(FIRMWARE) | $(BUILD) $(OPENMV): $(BOOTLOADER) $(UVC) $(FIRMWARE) | $(BUILD) $(FW_DIR)
$(CAT) $(FW_DIR)/$(BOOTLOADER).bin $(FW_DIR)/$(FIRMWARE).bin > $(FW_DIR)/$(OPENMV).bin $(CAT) $(FW_DIR)/$(BOOTLOADER).bin $(FW_DIR)/$(FIRMWARE).bin > $(FW_DIR)/$(OPENMV).bin
$(PYTHON) $(MKDFU) -b 0x08000000:$(FW_DIR)/$(BOOTLOADER).bin -b $(MAIN_APP_ADDR):$(FW_DIR)/$(FIRMWARE).bin $(FW_DIR)/$(OPENMV).dfu $(PYTHON) $(MKDFU) -b 0x08000000:$(FW_DIR)/$(BOOTLOADER).bin -b $(MAIN_APP_ADDR):$(FW_DIR)/$(FIRMWARE).bin $(FW_DIR)/$(OPENMV).dfu
$(SIZE) $(FW_DIR)/$(BOOTLOADER).elf $(SIZE) $(FW_DIR)/$(BOOTLOADER).elf