Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NVIC_DisableAll and Cortex_DisableAll functions #3318

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
1 change: 0 additions & 1 deletion .rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/ada_feather_nrf52/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <stddef.h>
#include <assert.h>
#include "os/mynewt.h"
#include "mynewt_cm.h"
#include "nrfx.h"
#include "flash_map/flash_map.h"
#include "hal/hal_bsp.h"
Expand Down Expand Up @@ -105,4 +106,5 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}
2 changes: 2 additions & 0 deletions hw/bsp/ada_feather_stm32f405/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "bsp/bsp.h"
#include "os/mynewt.h"
#include "mynewt_cm.h"

#include <hal/hal_bsp.h>
#include <hal/hal_flash_int.h>
Expand Down Expand Up @@ -309,4 +310,5 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}
2 changes: 2 additions & 0 deletions hw/bsp/apollo2_evb/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <bsp/bsp.h>
#include <hal/hal_spi.h>
#include <mcu/hal_apollo2.h>
#include "mynewt_cm.h"

#if MYNEWT_VAL(UART_0)
#include "uart/uart.h"
Expand Down Expand Up @@ -184,6 +185,7 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}

int
Expand Down
2 changes: 0 additions & 2 deletions hw/bsp/apollo2_evb/src/system_apollo2.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,5 @@ SystemInit(void)
CLKGEN->CLKKEY = 0; // Disable write to CCTRL

SystemCoreClockUpdate();

NVIC_Relocate();
}

2 changes: 2 additions & 0 deletions hw/bsp/apollo3_evb/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <assert.h>

#include "os/mynewt.h"
#include "mynewt_cm.h"

#include "flash_map/flash_map.h"

Expand Down Expand Up @@ -70,6 +71,7 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}

int
Expand Down
2 changes: 0 additions & 2 deletions hw/bsp/apollo3_evb/src/system_apollo3.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,5 @@ SystemInit(void)
CLKGEN->CLKKEY = 0; // Disable write to CCTRL

SystemCoreClockUpdate();

NVIC_Relocate();
}

2 changes: 2 additions & 0 deletions hw/bsp/arduino_primo_nrf52/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <stddef.h>
#include <assert.h>
#include "os/mynewt.h"
#include "mynewt_cm.h"
#include "nrfx.h"
#include "bsp/bsp.h"
#include "hal/hal_bsp.h"
Expand Down Expand Up @@ -104,4 +105,5 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}
3 changes: 2 additions & 1 deletion hw/bsp/arduino_zero/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "sysinit/sysinit.h"
#include "mcu/samd21.h"
#include "bsp/bsp.h"
#include "mynewt_cm.h"

/*
* hw/mcu/atmel/samd21xx/src/sam0/drivers/tc/tc.h
Expand Down Expand Up @@ -213,5 +214,5 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{

Cortex_DisableAll();
}
2 changes: 2 additions & 0 deletions hw/bsp/b-l072z-lrwan1/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "bsp/bsp.h"
#include "os/mynewt.h"
#include "mynewt_cm.h"

#include <hal/hal_bsp.h>
#include <hal/hal_flash_int.h>
Expand Down Expand Up @@ -136,6 +137,7 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}

/**
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/b-l475e-iot01a/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "bsp/bsp.h"
#include "os/mynewt.h"
#include "mynewt_cm.h"

#include <hal/hal_bsp.h>
#include <hal/hal_flash_int.h>
Expand Down Expand Up @@ -173,6 +174,7 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}

/**
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/bbc_microbit/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <stddef.h>
#include <assert.h>
#include "os/mynewt.h"
#include "mynewt_cm.h"
#include "nrfx.h"
#include "hal/hal_system.h"
#include "bsp/bsp.h"
Expand Down Expand Up @@ -226,4 +227,5 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}
3 changes: 3 additions & 0 deletions hw/bsp/black_vet6/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "bsp/bsp.h"
#include "os/mynewt.h"
#include "mynewt_cm.h"

#include <hal/hal_bsp.h>
#include <hal/hal_flash_int.h>
Expand Down Expand Up @@ -352,6 +353,8 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();

RCC->AHB1ENR = RCC_AHB1ENR_CCMDATARAMEN;
RCC->AHB2ENR = 0x0;
RCC->AHB3ENR = 0x0;
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/ble400/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <stddef.h>
#include <assert.h>
#include "os/mynewt.h"
#include "mynewt_cm.h"
#include "hal/hal_bsp.h"
#include "hal/hal_system.h"
#include "mcu/nrf51_hal.h"
Expand Down Expand Up @@ -228,4 +229,5 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}
3 changes: 3 additions & 0 deletions hw/bsp/bluepill/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "bsp/bsp.h"
#include "os/mynewt.h"
#include "mynewt_cm.h"

#include <hal/hal_bsp.h>
#include <hal/hal_flash_int.h>
Expand Down Expand Up @@ -95,6 +96,8 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();

RCC->AHBENR = RCC_AHBENR_FLITFEN | RCC_AHBENR_SRAMEN;
RCC->APB1ENR = 0;
RCC->APB2ENR = 0;
Expand Down
2 changes: 2 additions & 0 deletions hw/bsp/bmd200/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <stddef.h>
#include <assert.h>
#include "os/mynewt.h"
#include "mynewt_cm.h"
#include "hal/hal_bsp.h"
#include "hal/hal_system.h"
#include "mcu/nrf51_hal.h"
Expand Down Expand Up @@ -228,4 +229,5 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}
2 changes: 2 additions & 0 deletions hw/bsp/bmd300eval/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <stddef.h>
#include <assert.h>
#include "os/mynewt.h"
#include "mynewt_cm.h"
#include "nrfx.h"
#include "flash_map/flash_map.h"
#include "hal/hal_bsp.h"
Expand Down Expand Up @@ -105,4 +106,5 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}
2 changes: 2 additions & 0 deletions hw/bsp/calliope_mini/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <stddef.h>
#include <assert.h>
#include "os/mynewt.h"
#include "mynewt_cm.h"
#include "nrfx.h"
#include "hal/hal_system.h"
#include "bsp/bsp.h"
Expand Down Expand Up @@ -228,4 +229,5 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}
2 changes: 2 additions & 0 deletions hw/bsp/dialog_da14695-dk-usb/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "hal/hal_flash.h"
#include "hal/hal_system.h"
#include "mcu/mcu.h"
#include "mynewt_cm.h"
#include "mcu/da1469x_hal.h"
#include "mcu/da1469x_periph.h"
#include "bsp/bsp.h"
Expand Down Expand Up @@ -109,4 +110,5 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}
2 changes: 2 additions & 0 deletions hw/bsp/dialog_da1469x-dk-pro/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "hal/hal_flash.h"
#include "hal/hal_system.h"
#include "mcu/mcu.h"
#include "mynewt_cm.h"
#include "mcu/da1469x_hal.h"
#include "mcu/da1469x_periph.h"
#include "bsp/bsp.h"
Expand Down Expand Up @@ -110,4 +111,5 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}
2 changes: 2 additions & 0 deletions hw/bsp/dwm1001-dev/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <stddef.h>
#include <assert.h>
#include "os/mynewt.h"
#include "mynewt_cm.h"
#include "nrfx.h"
#include "flash_map/flash_map.h"
#include "hal/hal_bsp.h"
Expand Down Expand Up @@ -106,4 +107,5 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}
2 changes: 2 additions & 0 deletions hw/bsp/fanstel-ev-bt840/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <stddef.h>
#include <assert.h>
#include "os/mynewt.h"
#include "mynewt_cm.h"
#include "nrfx.h"
#include "flash_map/flash_map.h"
#include "hal/hal_bsp.h"
Expand Down Expand Up @@ -90,4 +91,5 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}
2 changes: 2 additions & 0 deletions hw/bsp/frdm-k64f/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -270,4 +271,5 @@ hal_bsp_init(void)
void
hal_bsp_deinit(void)
{
Cortex_DisableAll();
}
5 changes: 1 addition & 4 deletions hw/bsp/frdm-k82f/bsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
22 changes: 0 additions & 22 deletions hw/bsp/frdm-k82f/frdm-k82_debug.cmd

This file was deleted.

22 changes: 0 additions & 22 deletions hw/bsp/frdm-k82f/frdm-k82_download.cmd

This file was deleted.

1 change: 1 addition & 0 deletions hw/bsp/frdm-k82f/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading
Loading