You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2022/02/25 14:52:02 UTC
[mynewt-core] 03/03: hw/mcu/nrf91: Add common startup code
This is an automated email from the ASF dual-hosted git repository.
andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 30670ac51690d9027017d046e568ad99eadf11ca
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Thu Feb 24 21:57:07 2022 +0100
hw/mcu/nrf91: Add common startup code
This adds common startup code to nRF91 package so it can be reused by
BSP. This avoids multiple duplicates of the same file in all BSPs.
Also proper configuration is added so standard and split startup code
is not included in build at the same time. This fixes issue when link
option -whole-archive is used.
---
hw/bsp/nordic_pca10090/syscfg.yml | 4 +++-
.../nordic/nrf91xx/src/arch/cortex_m33/gcc_startup_cm33.s} | 0
.../nordic/nrf91xx/src/arch/cortex_m33/gcc_startup_cm33_split.s} | 0
hw/mcu/nordic/nrf91xx/syscfg.yml | 6 ++++++
4 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/hw/bsp/nordic_pca10090/syscfg.yml b/hw/bsp/nordic_pca10090/syscfg.yml
index 0fd2cd5..cea2c68 100644
--- a/hw/bsp/nordic_pca10090/syscfg.yml
+++ b/hw/bsp/nordic_pca10090/syscfg.yml
@@ -28,8 +28,10 @@ syscfg.defs:
value: 0
syscfg.vals:
- # Enable nRF9160 MCU
+ # Enable nRF9160 MCU and common startup code
MCU_TARGET: nRF9160
+ MCU_COMMON_STARTUP: 1
+
# Set default pins for peripherals
# UART_0_PIN_TX: 5
# UART_0_PIN_RX: 3
diff --git a/hw/bsp/nordic_pca10090/src/arch/cortex_m33/gcc_startup_nrf9160.s b/hw/mcu/nordic/nrf91xx/src/arch/cortex_m33/gcc_startup_cm33.s
similarity index 100%
rename from hw/bsp/nordic_pca10090/src/arch/cortex_m33/gcc_startup_nrf9160.s
rename to hw/mcu/nordic/nrf91xx/src/arch/cortex_m33/gcc_startup_cm33.s
diff --git a/hw/bsp/nordic_pca10090/src/arch/cortex_m33/gcc_startup_nrf9160_split.s b/hw/mcu/nordic/nrf91xx/src/arch/cortex_m33/gcc_startup_cm33_split.s
similarity index 100%
rename from hw/bsp/nordic_pca10090/src/arch/cortex_m33/gcc_startup_nrf9160_split.s
rename to hw/mcu/nordic/nrf91xx/src/arch/cortex_m33/gcc_startup_cm33_split.s
diff --git a/hw/mcu/nordic/nrf91xx/syscfg.yml b/hw/mcu/nordic/nrf91xx/syscfg.yml
index e910202..be85881 100644
--- a/hw/mcu/nordic/nrf91xx/syscfg.yml
+++ b/hw/mcu/nordic/nrf91xx/syscfg.yml
@@ -63,6 +63,12 @@ syscfg.defs:
the breakpoint wherever it gets called, For example, reset and crash
value: 0
+ MCU_COMMON_STARTUP:
+ description: >
+ Enables generic startup code. This allows BSP to not include own
+ startup code.
+ value: 0
+
# MCU peripherals definitions
I2C_0:
description: 'Enable nRF91xx I2C 0'