You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2024/11/05 09:20:01 UTC
(mynewt-core) 07/10: hw/mcu/MK8xF: Use autogenerated linker script
This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 5e45350445aadb85fe681259c86d1f555871aa04
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Fri Oct 4 12:30:53 2024 +0200
hw/mcu/MK8xF: Use autogenerated linker script
This switches to autogenerated linker scripts for CortexM.
Signed-off-by: Jerzy Kasenberg <je...@codecoup.pl>
---
.rat-excludes | 1 -
hw/bsp/frdm-k82f/bsp.yml | 5 +-
hw/bsp/frdm-k82f/frdm-k82_debug.cmd | 22 ---
hw/bsp/frdm-k82f/frdm-k82_download.cmd | 22 ---
hw/bsp/frdm-k82f/pkg.yml | 1 +
hw/bsp/frdm-k82f/src/hal_bsp.c | 34 +---
hw/bsp/frdm-k82f/syscfg.yml | 5 +-
.../kinetis/MK8xF/MK82F/src/system_MK82F25615.c | 212 ---------------------
hw/mcu/nxp/kinetis/MK8xF/include/mcu/mcu_vectors.h | 24 +++
.../MK8xF/include/mcu/vectors/mk82f25615_vectors.h | 143 ++++++++++++++
hw/mcu/nxp/kinetis/src/hal_system_init.c | 28 +++
hw/mcu/nxp/mcux-sdk/pkg.yml | 1 +
12 files changed, 202 insertions(+), 296 deletions(-)
diff --git a/.rat-excludes b/.rat-excludes
index 6c490eda3..ffe4164e4 100644
--- a/.rat-excludes
+++ b/.rat-excludes
@@ -171,7 +171,6 @@ startup_MK64F12.S
MK82FN256xxx15_flash.ld
boot-MK82FN256xxx15_flash.ld
startup_MK82F25615.S
-system_MK82F25615.c
fsl_ftfx_controller.c
# LWIP - BSD License.
diff --git a/hw/bsp/frdm-k82f/bsp.yml b/hw/bsp/frdm-k82f/bsp.yml
index 24bf0a5e6..3bcc59fc2 100644
--- a/hw/bsp/frdm-k82f/bsp.yml
+++ b/hw/bsp/frdm-k82f/bsp.yml
@@ -22,12 +22,9 @@ bsp.url: https://www.nxp.com/design/design-center/development-boards-and-designs
bsp.maker: "NXP"
bsp.arch: cortex_m4
bsp.compiler: compiler/arm-none-eabi-m4
-bsp.linkerscript: "hw/bsp/frdm-k82f/MK82FN256xxx15_flash.ld"
-bsp.linkerscript.BOOT_LOADER.OVERWRITE: "hw/bsp/frdm-k82f/boot-MK82FN256xxx15_flash.ld"
+bsp.linkerscript: autogenerated
bsp.downloadscript: "hw/bsp/frdm-k82f/frdm-k82_download.sh"
bsp.debugscript: "hw/bsp/frdm-k82f/frdm-k82_debug.sh"
-bsp.downloadscript.WINDOWS.OVERWRITE: "hw/bsp/frdm-k82f/frdm-k82_download.cmd"
-bsp.debugscript.WINDOWS.OVERWRITE: "hw/bsp/frdm-k82f/frdm-k82_debug.cmd"
bsp.flash_map:
areas:
diff --git a/hw/bsp/frdm-k82f/frdm-k82_debug.cmd b/hw/bsp/frdm-k82f/frdm-k82_debug.cmd
deleted file mode 100755
index 96f0b2605..000000000
--- a/hw/bsp/frdm-k82f/frdm-k82_debug.cmd
+++ /dev/null
@@ -1,22 +0,0 @@
-@rem
-@rem Licensed to the Apache Software Foundation (ASF) under one
-@rem or more contributor license agreements. See the NOTICE file
-@rem distributed with this work for additional information
-@rem regarding copyright ownership. The ASF licenses this file
-@rem to you under the Apache License, Version 2.0 (the
-@rem "License"); you may not use this file except in compliance
-@rem with the License. You may obtain a copy of the License at
-@rem
-@rem http://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing,
-@rem software distributed under the License is distributed on an
-@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-@rem KIND, either express or implied. See the License for the
-@rem specific language governing permissions and limitations
-@rem under the License.
-@rem
-
-@rem Execute a shell with a script of the same name and .sh extension
-
-@bash "%~dp0%~n0.sh"
diff --git a/hw/bsp/frdm-k82f/frdm-k82_download.cmd b/hw/bsp/frdm-k82f/frdm-k82_download.cmd
deleted file mode 100755
index 96f0b2605..000000000
--- a/hw/bsp/frdm-k82f/frdm-k82_download.cmd
+++ /dev/null
@@ -1,22 +0,0 @@
-@rem
-@rem Licensed to the Apache Software Foundation (ASF) under one
-@rem or more contributor license agreements. See the NOTICE file
-@rem distributed with this work for additional information
-@rem regarding copyright ownership. The ASF licenses this file
-@rem to you under the Apache License, Version 2.0 (the
-@rem "License"); you may not use this file except in compliance
-@rem with the License. You may obtain a copy of the License at
-@rem
-@rem http://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing,
-@rem software distributed under the License is distributed on an
-@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-@rem KIND, either express or implied. See the License for the
-@rem specific language governing permissions and limitations
-@rem under the License.
-@rem
-
-@rem Execute a shell with a script of the same name and .sh extension
-
-@bash "%~dp0%~n0.sh"
diff --git a/hw/bsp/frdm-k82f/pkg.yml b/hw/bsp/frdm-k82f/pkg.yml
index 8f3b7974b..fbf96dc0a 100644
--- a/hw/bsp/frdm-k82f/pkg.yml
+++ b/hw/bsp/frdm-k82f/pkg.yml
@@ -44,6 +44,7 @@ pkg.cflags.HARDFLOAT:
pkg.deps:
- "@apache-mynewt-core/hw/mcu/nxp/kinetis/MK8xF/MK82F"
- "@apache-mynewt-core/libc"
+ - "@apache-mynewt-core/boot/startup"
pkg.deps.UART_0:
- "@apache-mynewt-core/hw/drivers/uart/uart_hal"
diff --git a/hw/bsp/frdm-k82f/src/hal_bsp.c b/hw/bsp/frdm-k82f/src/hal_bsp.c
index 973d5ba24..618d66020 100644
--- a/hw/bsp/frdm-k82f/src/hal_bsp.c
+++ b/hw/bsp/frdm-k82f/src/hal_bsp.c
@@ -23,6 +23,7 @@
#include <sys/types.h>
#include <stdio.h>
#include "os/mynewt.h"
+#include "mynewt_cm.h"
#include "bsp/bsp.h"
#include "hal/hal_bsp.h"
#include "hal/hal_flash_int.h"
@@ -191,38 +192,6 @@ hal_bsp_power_state(int state)
return (0);
}
-/*!
- * @brief Function to override ARMGCC default function _sbrk
- *
- * _sbrk is called by malloc. ARMGCC default _sbrk compares "SP" register and
- * heap end, if heap end is larger than "SP", then _sbrk returns error and
- * memory allocation failed. This function changes to compare __HeapLimit with
- * heap end.
- */
-void *
-_sbrk(int incr)
-{
- extern char end __asm("end");
- extern char heap_limit __asm("__HeapLimit");
- static char *heap_end;
- char *prev_heap_end;
-
- if (heap_end == NULL)
- heap_end = &end;
-
- prev_heap_end = heap_end;
-
- if (heap_end + incr > &heap_limit)
- {
- errno = ENOMEM;
- return (void *)-1;
- }
-
- heap_end += incr;
-
- return (void *)prev_heap_end;
-}
-
/**
* Returns the configured priority for the given interrupt. If no priority
* configured, return the priority passed in
@@ -352,4 +321,5 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
+ Cortex_DisableAll();
}
diff --git a/hw/bsp/frdm-k82f/syscfg.yml b/hw/bsp/frdm-k82f/syscfg.yml
index 3cb11043d..4292a94a0 100644
--- a/hw/bsp/frdm-k82f/syscfg.yml
+++ b/hw/bsp/frdm-k82f/syscfg.yml
@@ -23,6 +23,8 @@ syscfg.defs:
value: 1
syscfg.vals:
+ MCU_RAM_SIZE: 0x40000
+ MCU_RAM_START: 0x20000000
# Enabled by default, connected to CMSIS-DAP Interface
UART_4: 1
UART_4_PORT: PORTC
@@ -93,6 +95,3 @@ syscfg.vals:
CRYPTO_HW_AES_CTR: 1
BOOTUTIL_SWAP_USING_MOVE: 1
-
- # BSP uses private version of _sbrk
- HAL_SBRK: 0
diff --git a/hw/mcu/nxp/kinetis/MK8xF/MK82F/src/system_MK82F25615.c b/hw/mcu/nxp/kinetis/MK8xF/MK82F/src/system_MK82F25615.c
deleted file mode 100644
index 82ac6e8d6..000000000
--- a/hw/mcu/nxp/kinetis/MK8xF/MK82F/src/system_MK82F25615.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
-** ###################################################################
-** Processors: MK82FN256CAx15
-** MK82FN256VDC15
-** MK82FN256VLL15
-** MK82FN256VLQ15
-**
-** Compilers: Freescale C/C++ for Embedded ARM
-** GNU C Compiler
-** IAR ANSI C/C++ Compiler for ARM
-** Keil ARM C/C++ Compiler
-** MCUXpresso Compiler
-**
-** Reference manual: K82P121M150SF5RM, Rev. 0, May 2015
-** Version: rev. 1.2, 2015-07-29
-** Build: b181105
-**
-** Abstract:
-** Provides a system configuration function and a global variable that
-** contains the system frequency. It configures the device and initializes
-** the oscillator (PLL) that is part of the microcontroller device.
-**
-** Copyright 2016 Freescale Semiconductor, Inc.
-** Copyright 2016-2018 NXP
-** All rights reserved.
-**
-** SPDX-License-Identifier: BSD-3-Clause
-**
-** http: www.nxp.com
-** mail: support@nxp.com
-**
-** Revisions:
-** - rev. 1.0 (2015-04-09)
-** Initial version
-** - rev. 1.1 (2015-05-28)
-** Update according to the reference manual Rev. 0.
-** - rev. 1.2 (2015-07-29)
-** Correction of backward compatibility.
-**
-** ###################################################################
-*/
-
-/*!
- * @file MK82F25615
- * @version 1.2
- * @date 2015-07-29
- * @brief Device specific configuration file for MK82F25615 (implementation file)
- *
- * Provides a system configuration function and a global variable that contains
- * the system frequency. It configures the device and initializes the oscillator
- * (PLL) that is part of the microcontroller device.
- */
-
-#include <stdint.h>
-#include "fsl_device_registers.h"
-#include "mcu/cmsis_nvic.h"
-
-
-/* ----------------------------------------------------------------------------
- -- Core clock
- ---------------------------------------------------------------------------- */
-
-uint32_t SystemCoreClock = DEFAULT_SYSTEM_CLOCK;
-
-/* ----------------------------------------------------------------------------
- -- SystemInit()
- ---------------------------------------------------------------------------- */
-
-void SystemInit (void) {
-#if ((__FPU_PRESENT == 1) && (__FPU_USED == 1))
- SCB->CPACR |= ((3UL << 10*2) | (3UL << 11*2)); /* set CP10, CP11 Full Access */
-#endif /* ((__FPU_PRESENT == 1) && (__FPU_USED == 1)) */
-
-#if (DISABLE_WDOG)
- /* WDOG->UNLOCK: WDOGUNLOCK=0xC520 */
- WDOG->UNLOCK = WDOG_UNLOCK_WDOGUNLOCK(0xC520); /* Key 1 */
- /* WDOG->UNLOCK: WDOGUNLOCK=0xD928 */
- WDOG->UNLOCK = WDOG_UNLOCK_WDOGUNLOCK(0xD928); /* Key 2 */
- /* WDOG->STCTRLH: ?=0,DISTESTWDOG=0,BYTESEL=0,TESTSEL=0,TESTWDOG=0,?=0,?=1,WAITEN=1,STOPEN=1,DBGEN=0,ALLOWUPDATE=1,WINEN=0,IRQRSTEN=0,CLKSRC=1,WDOGEN=0 */
- WDOG->STCTRLH = WDOG_STCTRLH_BYTESEL(0x00) |
- WDOG_STCTRLH_WAITEN_MASK |
- WDOG_STCTRLH_STOPEN_MASK |
- WDOG_STCTRLH_ALLOWUPDATE_MASK |
- WDOG_STCTRLH_CLKSRC_MASK |
- 0x0100U;
-#endif /* (DISABLE_WDOG) */
- NVIC_Relocate();
- SystemInitHook();
-}
-
-/* ----------------------------------------------------------------------------
- -- SystemCoreClockUpdate()
- ---------------------------------------------------------------------------- */
-
-void SystemCoreClockUpdate (void) {
-
- uint32_t MCGOUTClock; /* Variable to store output clock frequency of the MCG module */
- uint16_t Divider;
- uint8_t tmpC7 = 0;
-
- if ((MCG->C1 & MCG_C1_CLKS_MASK) == 0x00U) {
- /* Output of FLL or PLL is selected */
- if ((MCG->C6 & MCG_C6_PLLS_MASK) == 0x00U) {
- /* FLL is selected */
- if ((MCG->C1 & MCG_C1_IREFS_MASK) == 0x00U) {
- /* External reference clock is selected */
- switch (MCG->C7 & MCG_C7_OSCSEL_MASK) {
- case 0x00U:
- MCGOUTClock = CPU_XTAL_CLK_HZ; /* System oscillator drives MCG clock */
- break;
- case 0x01U:
- MCGOUTClock = CPU_XTAL32k_CLK_HZ; /* RTC 32 kHz oscillator drives MCG clock */
- break;
- case 0x02U:
- default:
- MCGOUTClock = CPU_INT_IRC_CLK_HZ; /* IRC 48MHz oscillator drives MCG clock */
- break;
- }
- tmpC7 = MCG->C7;
- if (((MCG->C2 & MCG_C2_RANGE_MASK) != 0x00U) && ((tmpC7 & MCG_C7_OSCSEL_MASK) != 0x01U)) {
- switch (MCG->C1 & MCG_C1_FRDIV_MASK) {
- case 0x38U:
- Divider = 1536U;
- break;
- case 0x30U:
- Divider = 1280U;
- break;
- default:
- Divider = (uint16_t)(32LU << ((MCG->C1 & MCG_C1_FRDIV_MASK) >> MCG_C1_FRDIV_SHIFT));
- break;
- }
- } else {/* ((MCG->C2 & MCG_C2_RANGE_MASK) != 0x00U) */
- Divider = (uint16_t)(1LU << ((MCG->C1 & MCG_C1_FRDIV_MASK) >> MCG_C1_FRDIV_SHIFT));
- }
- MCGOUTClock = (MCGOUTClock / Divider); /* Calculate the divided FLL reference clock */
- } else { /* (!((MCG->C1 & MCG_C1_IREFS_MASK) == 0x00U)) */
- MCGOUTClock = CPU_INT_SLOW_CLK_HZ; /* The slow internal reference clock is selected */
- } /* (!((MCG->C1 & MCG_C1_IREFS_MASK) == 0x00U)) */
- /* Select correct multiplier to calculate the MCG output clock */
- switch (MCG->C4 & (MCG_C4_DMX32_MASK | MCG_C4_DRST_DRS_MASK)) {
- case 0x00U:
- MCGOUTClock *= 640U;
- break;
- case 0x20U:
- MCGOUTClock *= 1280U;
- break;
- case 0x40U:
- MCGOUTClock *= 1920U;
- break;
- case 0x60U:
- MCGOUTClock *= 2560U;
- break;
- case 0x80U:
- MCGOUTClock *= 732U;
- break;
- case 0xA0U:
- MCGOUTClock *= 1464U;
- break;
- case 0xC0U:
- MCGOUTClock *= 2197U;
- break;
- case 0xE0U:
- MCGOUTClock *= 2929U;
- break;
- default:
- MCGOUTClock *= 640U;
- break;
- }
- } else { /* (!((MCG->C6 & MCG_C6_PLLS_MASK) == 0x00U)) */
- /* PLL is selected */
- Divider = (((uint16_t)MCG->C5 & MCG_C5_PRDIV_MASK) + 0x01U);
- MCGOUTClock = (uint32_t)(CPU_XTAL_CLK_HZ / Divider); /* Calculate the PLL reference clock */
- Divider = (((uint16_t)MCG->C6 & MCG_C6_VDIV_MASK) + 16U);
- MCGOUTClock *= Divider; /* Calculate the VCO output clock */
- MCGOUTClock /= 2U; /* Calculate the MCG output clock */
- } /* (!((MCG->C6 & MCG_C6_PLLS_MASK) == 0x00U)) */
- } else if ((MCG->C1 & MCG_C1_CLKS_MASK) == 0x40U) {
- /* Internal reference clock is selected */
- if ((MCG->C2 & MCG_C2_IRCS_MASK) == 0x00U) {
- MCGOUTClock = CPU_INT_SLOW_CLK_HZ; /* Slow internal reference clock selected */
- } else { /* (!((MCG->C2 & MCG_C2_IRCS_MASK) == 0x00U)) */
- Divider = (uint16_t)(0x01LU << ((MCG->SC & MCG_SC_FCRDIV_MASK) >> MCG_SC_FCRDIV_SHIFT));
- MCGOUTClock = (uint32_t) (CPU_INT_FAST_CLK_HZ / Divider); /* Fast internal reference clock selected */
- } /* (!((MCG->C2 & MCG_C2_IRCS_MASK) == 0x00U)) */
- } else if ((MCG->C1 & MCG_C1_CLKS_MASK) == 0x80U) {
- /* External reference clock is selected */
- switch (MCG->C7 & MCG_C7_OSCSEL_MASK) {
- case 0x00U:
- MCGOUTClock = CPU_XTAL_CLK_HZ; /* System oscillator drives MCG clock */
- break;
- case 0x01U:
- MCGOUTClock = CPU_XTAL32k_CLK_HZ; /* RTC 32 kHz oscillator drives MCG clock */
- break;
- case 0x02U:
- default:
- MCGOUTClock = CPU_INT_IRC_CLK_HZ; /* IRC 48MHz oscillator drives MCG clock */
- break;
- }
- } else { /* (!((MCG->C1 & MCG_C1_CLKS_MASK) == 0x80U)) */
- /* Reserved value */
- return;
- } /* (!((MCG->C1 & MCG_C1_CLKS_MASK) == 0x80U)) */
- SystemCoreClock = (MCGOUTClock / (0x01U + ((SIM->CLKDIV1 & SIM_CLKDIV1_OUTDIV1_MASK) >> SIM_CLKDIV1_OUTDIV1_SHIFT)));
-}
-
-/* ----------------------------------------------------------------------------
- -- SystemInitHook()
- ---------------------------------------------------------------------------- */
-
-__attribute__ ((weak)) void SystemInitHook (void) {
- /* Void implementation of the weak function. */
-}
diff --git a/hw/mcu/nxp/kinetis/MK8xF/include/mcu/mcu_vectors.h b/hw/mcu/nxp/kinetis/MK8xF/include/mcu/mcu_vectors.h
new file mode 100644
index 000000000..34020b928
--- /dev/null
+++ b/hw/mcu/nxp/kinetis/MK8xF/include/mcu/mcu_vectors.h
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+#ifdef CPU_MK82FN256VLL15
+#include "vectors/mk82f25615_vectors.h"
+#else
+#error "Unknown device"
+#endif
diff --git a/hw/mcu/nxp/kinetis/MK8xF/include/mcu/vectors/mk82f25615_vectors.h b/hw/mcu/nxp/kinetis/MK8xF/include/mcu/vectors/mk82f25615_vectors.h
new file mode 100644
index 000000000..d0a455c71
--- /dev/null
+++ b/hw/mcu/nxp/kinetis/MK8xF/include/mcu/vectors/mk82f25615_vectors.h
@@ -0,0 +1,143 @@
+/*
+ * 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.
+ */
+
+INT_VECTOR_STACK_TOP(__StackTop)
+INT_VECTOR_RESET_HANDLER(Reset_Handler)
+INT_VECTOR_NMI_HANDLER(NMI_Handler)
+INT_VECTOR_HARDFAULT_HANDLER(HardFault_Handler)
+INT_VECTOR_MEMMANAGE_HANDLER(MemManage_Handler)
+INT_VECTOR_BUSFAULT_HANDLER(BusFault_Handler)
+INT_VECTOR_USAGEFAULT_HANDLER(UsageFault_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_SVC_HANDLER(SVC_Handler)
+INT_VECTOR_DEBUGMON_HANDLER(DebugMon_Handler)
+INT_VECTOR_UNUSED(0)
+INT_VECTOR_PENDSV_HANDLER(PendSV_Handler)
+INT_VECTOR_SYSTICK_HANDLER(SysTick_Handler)
+
+INT_VECTOR(DMA0_DMA16_IRQHandler)
+INT_VECTOR(DMA1_DMA17_IRQHandler)
+INT_VECTOR(DMA3_DMA19_IRQHandler)
+INT_VECTOR(DMA2_DMA18_IRQHandler)
+INT_VECTOR(DMA4_DMA20_IRQHandler)
+INT_VECTOR(DMA5_DMA21_IRQHandler)
+INT_VECTOR(DMA6_DMA22_IRQHandler)
+INT_VECTOR(DMA7_DMA23_IRQHandler)
+INT_VECTOR(DMA8_DMA24_IRQHandler)
+INT_VECTOR(DMA9_DMA25_IRQHandler)
+INT_VECTOR(DMA10_DMA26_IRQHandler)
+INT_VECTOR(DMA11_DMA27_IRQHandler)
+INT_VECTOR(DMA12_DMA28_IRQHandler)
+INT_VECTOR(DMA13_DMA29_IRQHandler)
+INT_VECTOR(DMA14_DMA30_IRQHandler)
+INT_VECTOR(DMA15_DMA31_IRQHandler)
+INT_VECTOR(DMA_Error_IRQHandler)
+INT_VECTOR(MCM_IRQHandler)
+INT_VECTOR(FTFA_IRQHandler)
+INT_VECTOR(Read_Collision_IRQHandler)
+INT_VECTOR(LVD_LVW_IRQHandler)
+INT_VECTOR(LLWU_IRQHandler)
+INT_VECTOR(WDOG_EWM_IRQHandler)
+INT_VECTOR(TRNG0_IRQHandler)
+INT_VECTOR(I2C0_IRQHandler)
+INT_VECTOR(I2C1_IRQHandler)
+INT_VECTOR(SPI0_IRQHandler)
+INT_VECTOR(SPI1_IRQHandler)
+INT_VECTOR(I2S0_Tx_IRQHandler)
+INT_VECTOR(I2S0_Rx_IRQHandler)
+INT_VECTOR(LPUART0_IRQHandler)
+INT_VECTOR(LPUART1_IRQHandler)
+INT_VECTOR(LPUART2_IRQHandler)
+INT_VECTOR(LPUART3_IRQHandler)
+INT_VECTOR(LPUART4_IRQHandler)
+INT_VECTOR(Reserved51_IRQHandler)
+INT_VECTOR(Reserved52_IRQHandler)
+INT_VECTOR(EMVSIM0_IRQHandler)
+INT_VECTOR(EMVSIM1_IRQHandler)
+INT_VECTOR(ADC0_IRQHandler)
+INT_VECTOR(CMP0_IRQHandler)
+INT_VECTOR(CMP1_IRQHandler)
+INT_VECTOR(FTM0_IRQHandler)
+INT_VECTOR(FTM1_IRQHandler)
+INT_VECTOR(FTM2_IRQHandler)
+INT_VECTOR(CMT_IRQHandler)
+INT_VECTOR(RTC_IRQHandler)
+INT_VECTOR(RTC_Seconds_IRQHandler)
+INT_VECTOR(PIT0CH0_IRQHandler)
+INT_VECTOR(PIT0CH1_IRQHandler)
+INT_VECTOR(PIT0CH2_IRQHandler)
+INT_VECTOR(PIT0CH3_IRQHandler)
+INT_VECTOR(PDB0_IRQHandler)
+INT_VECTOR(USB0_IRQHandler)
+INT_VECTOR(USBDCD_IRQHandler)
+INT_VECTOR(Reserved71_IRQHandler)
+INT_VECTOR(DAC0_IRQHandler)
+INT_VECTOR(MCG_IRQHandler)
+INT_VECTOR(LPTMR0_LPTMR1_IRQHandler)
+INT_VECTOR(PORTA_IRQHandler)
+INT_VECTOR(PORTB_IRQHandler)
+INT_VECTOR(PORTC_IRQHandler)
+INT_VECTOR(PORTD_IRQHandler)
+INT_VECTOR(PORTE_IRQHandler)
+INT_VECTOR(SWI_IRQHandler)
+INT_VECTOR(SPI2_IRQHandler)
+INT_VECTOR(Reserved82_IRQHandler)
+INT_VECTOR(Reserved83_IRQHandler)
+INT_VECTOR(Reserved84_IRQHandler)
+INT_VECTOR(Reserved85_IRQHandler)
+INT_VECTOR(FLEXIO0_IRQHandler)
+INT_VECTOR(FTM3_IRQHandler)
+INT_VECTOR(Reserved88_IRQHandler)
+INT_VECTOR(Reserved89_IRQHandler)
+INT_VECTOR(I2C2_IRQHandler)
+INT_VECTOR(Reserved91_IRQHandler)
+INT_VECTOR(Reserved92_IRQHandler)
+INT_VECTOR(Reserved93_IRQHandler)
+INT_VECTOR(Reserved94_IRQHandler)
+INT_VECTOR(Reserved95_IRQHandler)
+INT_VECTOR(Reserved96_IRQHandler)
+INT_VECTOR(SDHC_IRQHandler)
+INT_VECTOR(Reserved98_IRQHandler)
+INT_VECTOR(Reserved99_IRQHandler)
+INT_VECTOR(Reserved100_IRQHandler)
+INT_VECTOR(Reserved101_IRQHandler)
+INT_VECTOR(Reserved102_IRQHandler)
+INT_VECTOR(TSI0_IRQHandler)
+INT_VECTOR(TPM1_IRQHandler)
+INT_VECTOR(TPM2_IRQHandler)
+INT_VECTOR(Reserved106_IRQHandler)
+INT_VECTOR(I2C3_IRQHandler)
+INT_VECTOR(Reserved108_IRQHandler)
+INT_VECTOR(Reserved109_IRQHandler)
+INT_VECTOR(Reserved110_IRQHandler)
+INT_VECTOR(Reserved111_IRQHandler)
+INT_VECTOR(Reserved112_IRQHandler)
+INT_VECTOR(Reserved113_IRQHandler)
+INT_VECTOR(Reserved114_IRQHandler)
+INT_VECTOR(Reserved115_IRQHandler)
+INT_VECTOR(QuadSPI0_IRQHandler)
+INT_VECTOR(Reserved117_IRQHandler)
+INT_VECTOR(Reserved118_IRQHandler)
+INT_VECTOR(Reserved119_IRQHandler)
+INT_VECTOR(LTC0_IRQHandler)
+INT_VECTOR(Reserved121_IRQHandler)
+INT_VECTOR(Reserved122_IRQHandler)
diff --git a/hw/mcu/nxp/kinetis/src/hal_system_init.c b/hw/mcu/nxp/kinetis/src/hal_system_init.c
new file mode 100644
index 000000000..2d6348b83
--- /dev/null
+++ b/hw/mcu/nxp/kinetis/src/hal_system_init.c
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+#include "os/mynewt.h"
+#include <mynewt_cm.h>
+
+void
+hal_system_init(void)
+{
+ /* Relocate the vector table */
+ NVIC_Relocate();
+}
diff --git a/hw/mcu/nxp/mcux-sdk/pkg.yml b/hw/mcu/nxp/mcux-sdk/pkg.yml
index f4ba93120..953abeede 100644
--- a/hw/mcu/nxp/mcux-sdk/pkg.yml
+++ b/hw/mcu/nxp/mcux-sdk/pkg.yml
@@ -80,6 +80,7 @@ pkg.include_dirs.MCU_MK82F25615:
- "@nxp-mcux-sdk/devices/MK82F25615/drivers"
pkg.src_dirs.MCU_MK82F25615:
- "@nxp-mcux-sdk/devices/MK82F25615/drivers"
+ - "@nxp-mcux-sdk/devices/MK82F25615"
pkg.ign_files.MCU_MK82F25615:
# Modified mynewt version exists
- "drivers/flash/fsl_ftfx_controller.c"