Commit 1a2e41ae authored by Fabio Utzig's avatar Fabio Utzig Committed by David Brown
Browse files

Fix serial boot functionality for Mynewt

Signed-off-by: default avatarFabio Utzig <utzig@apache.org>
parent fe9dd965
Loading
Loading
Loading
Loading
+8 −8
Changes for boot/boot_serial/pkg.yml: 8 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -26,14 +26,14 @@ pkg.keywords:
    - bootloader

pkg.deps:
    - hw/hal
    - kernel/os
    - boot/bootutil
    - encoding/tinycbor
    - encoding/cborattr
    - encoding/base64
    - sys/flash_map
    - util/crc
    - "@apache-mynewt-core/hw/hal"
    - "@apache-mynewt-core/kernel/os"
    - "@apache-mynewt-core/encoding/tinycbor"
    - "@apache-mynewt-core/encoding/cborattr"
    - "@apache-mynewt-core/encoding/base64"
    - "@apache-mynewt-core/sys/flash_map"
    - "@apache-mynewt-core/util/crc"

pkg.req_apis:
    - console
    - bootloader
+3 −3
Changes for boot/boot_serial/src/boot_serial.c: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -24,6 +24,9 @@

#include "sysflash/sysflash.h"

#define BOOT_LOG_LEVEL BOOT_LOG_LEVEL_INFO
#include "bootutil/bootutil_log.h"

#ifdef __ZEPHYR__
#include <misc/reboot.h>
#include <misc/byteorder.h>
@@ -31,9 +34,6 @@
#include <flash.h>
#include <crc16.h>
#include <serial_adapter/serial_adapter.h>

#define BOOT_LOG_LEVEL BOOT_LOG_LEVEL_INFO
#include "bootutil/bootutil_log.h"
#include "mbedtls/base64.h"
#else
#include <bsp/bsp.h>
+47
Changes for boot/boot_serial/syscfg.yml: 47 added lines, 0 removed lines.
Original line number Diff line number Diff line
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you 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.
#

syscfg.defs:
    BOOT_SERIAL_DETECT_PIN:
        description: >
            Start the serial boot loader if this pin is asserted at boot time.
        value:
        restrictions:
            - '$notnull'

    BOOT_SERIAL_DETECT_PIN_CFG:
        description: >
            GPIO configuration for the serial boot loader detect pin.
        value: 'HAL_GPIO_PULL_UP'

    BOOT_SERIAL_DETECT_PIN_VAL:
        description: >
            The value the detect pin must be set to for the serial boot loader
            to start.
        value: 0

    BOOT_SERIAL_REPORT_PIN:
        description: >
            The GPIO to toggle while the serial boot loader is running.  Set to
            -1 to disable reporting.
        value: 'LED_BLINK_PIN'

    BOOT_SERIAL_REPORT_FREQ:
        description: >
            The toggle rate, in Hz, of the serial boot loader report pin.
        value: 4
+1 −1
Changes for boot/boot_serial/test/pkg.yml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ pkg.homepage: "http://mynewt.apache.org/"
pkg.keywords:

pkg.deps:
    - boot/boot_serial
    - "@mcuboot/boot/boot_serial"
    - test/testutil

pkg.deps.SELFTEST:
+4 −2
Changes for boot/mynewt/pkg.yml: 4 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -25,12 +25,14 @@ pkg.homepage: "http://mynewt.apache.org/"
pkg.keywords:
    - loader

pkg.cflags:
    - "-DMCUBOOT_MYNEWT"

pkg.deps:
    - "@mcuboot/boot/mynewt/mcuboot_config"
    - "@mcuboot/boot/bootutil"
    - "@apache-mynewt-core/kernel/os"
    - "@apache-mynewt-core/sys/console/stub"
    - "@apache-mynewt-core/sys/console/minimal"

pkg.deps.BOOT_SERIAL.OVERWRITE:
    - "@apache-mynewt-core/sys/console/full"
    - "@mcuboot/boot/boot_serial"
Loading