-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Split into pinetime (default) and p8 target * Change LFCLK to LFRC to support devices without LF crystal * Support various SPI flash chips by ignoring JEDEC IDs * Use recent mynewt-core and mcu-tools
- Loading branch information
1 parent
2e1a66e
commit a4ee267
Showing
19 changed files
with
164 additions
and
41 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
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
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,7 +1,7 @@ | ||
:: Build Mynewt bootloader on Windows | ||
|
||
:: Build the bootloader. | ||
newt\newt.exe build nrf52_boot | ||
newt\newt.exe build pinetime | ||
|
||
:: Show the size. | ||
newt\newt.exe size -v nrf52_boot | ||
newt\newt.exe size -v pinetime |
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,35 @@ | ||
# | ||
# 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. | ||
|
||
# Target Settings | ||
pkg.name: targets/p8 | ||
pkg.type: target | ||
pkg.description: | ||
pkg.author: | ||
pkg.homepage: | ||
|
||
# Package Dependencies: MCUBoot is dependent on these drivers and libraries. | ||
pkg.deps: | ||
- "libs/semihosting_console" # Semihosting Console | ||
- "libs/pinetime_boot" # Render boot graphic and check for rollback. Comment out for Stub Bootloader. | ||
|
||
# C compiler flags | ||
pkg.cflags: | ||
- -DMCUBOOT_HAVE_LOGGING=1 # So that sysinit() will be run, needed for displaying boot graphic | ||
- -DDISABLE_SEMIHOSTING # Uncomment to disable Arm Semihosting. Must be uncommented for production. | ||
# - -Os # Optimise for smallest size |
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
File renamed without changes.
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,60 @@ | ||
# 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. | ||
|
||
# Target Settings | ||
|
||
syscfg.vals: | ||
BOOT_CUSTOM_START: 1 # Use custom boot function boot_custom_start() | ||
OS_MAIN_STACK_SIZE: 1024 # Small stack size: 4 KB | ||
MSYS_1_BLOCK_COUNT: 64 # Allocate MSYS buffers for Semihosting Console | ||
HAL_ENABLE_SOFTWARE_BREAKPOINTS: 0 # In case of assertion failure, don't breakpoint. Must be set to 0 so that bootloader will reboot and won't hang in case of assertion failures. | ||
MCU_DEBUG_IGNORE_BKPT: 1 | ||
|
||
########################################################################### | ||
# Hardware Settings | ||
|
||
SPIFLASH: 1 # Enable SPI Flash | ||
SPI_0_MASTER: 1 # Enable SPI port 0 for ST7789 display and SPI Flash | ||
I2C_1: 0 # Disable I2C port 1 for CST816S touch controller, BMA421 accelerometer, HRS3300 heart rate sensor | ||
UART_0: 0 # Disable UART port to reduce ROM size | ||
|
||
########################################################################### | ||
# Common Settings for minimal ROM size | ||
|
||
CONSOLE_COMPAT: 0 # Disable console input | ||
CONSOLE_RTT: 0 # Disable RTT Console | ||
CONSOLE_UART: 0 # Disable UART Console | ||
LOG_CLI: 0 # Disable logging command-line interface | ||
LOG_LEVEL: 255 # Disable logs | ||
SENSOR_CLI: 0 # Disable sensor command-line interface | ||
SENSOR_OIC: 0 # Disable sensor OIC functions | ||
SHELL_CMD_HELP: 0 # Disable shell help | ||
SHELL_OS_MODULE: 0 # Disable shell module | ||
SHELL_TASK: 0 # Disable shell task | ||
STATS_CLI: 0 # Disable statistics command-line interface | ||
OS_SYSVIEW_TRACE_CALLOUT: 0 # Disable trace of callouts | ||
OS_SYSVIEW_TRACE_EVENTQ: 0 # Disable trace of event queues | ||
OS_SYSVIEW_TRACE_MUTEX: 0 # Disable trace of mutex | ||
OS_SYSVIEW_TRACE_SEM: 0 # Disable trace of semaphores | ||
BOOTUTIL_FEED_WATCHDOG: 1 # Enable watchdog feeding while performing a swap upgrade | ||
SANITY_INTERVAL: 1000 # The interval (in milliseconds) at which the sanity checks should run, should be at least 200ms prior to watchdog | ||
WATCHDOG_INTERVAL: 2000 # The interval (in milliseconds) at which the watchdog should reset if not tickled, in ms | ||
|
||
# Specific target hardware config | ||
|
||
PUSH_BUTTON_IN: 13 | ||
PUSH_BUTTON_OUT: 15 |
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,12 @@ | ||
# Bootloader Target Settings | ||
|
||
# Bootloader will be based on MCUBoot. Select "apps/boot_stub" for the Stub Bootloader. | ||
target.app: "@mcuboot/boot/mynewt" # Use MCUBoot, which doesn't support debugging | ||
# target.app: "apps/boot_stub" # Use Stub Bootloader, which supports debugging | ||
|
||
# Board Support Package (BSP) for the target | ||
target.bsp: "hw/bsp/nrf52" | ||
|
||
# Build with debug support. Or select "optimized" to remove debug support. | ||
#target.build_profile: debug # For debugging | ||
target.build_profile: optimized # For production |