mirror of https://github.com/ARMmbed/mbed-os.git
Enabled nRF52840_DK's compilation for IAR IDE:
- corected scater & startup file for IAR EW - fix warnings caused by port_api.c, ble_radio_notification.c, nrf_drv_spi.c (for IAR it was error), serial_api.cpull/3841/head
parent
46f72777dc
commit
5649eef980
|
@ -2,12 +2,12 @@
|
||||||
/*-Editor annotation file-*/
|
/*-Editor annotation file-*/
|
||||||
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
|
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
|
||||||
/*-Specials-*/
|
/*-Specials-*/
|
||||||
define symbol __ICFEDIT_intvec_start__ = 0x1c000;
|
define symbol __ICFEDIT_intvec_start__ = 0x21000;
|
||||||
/*-Memory Regions-*/
|
/*-Memory Regions-*/
|
||||||
define symbol __ICFEDIT_region_ROM_start__ = 0x1c000;
|
define symbol __ICFEDIT_region_ROM_start__ = 0x21000;
|
||||||
define symbol __ICFEDIT_region_ROM_end__ = 0x7ffff;
|
define symbol __ICFEDIT_region_ROM_end__ = 0xfffff;
|
||||||
define symbol __ICFEDIT_region_RAM_start__ = 0x20002ef8;
|
define symbol __ICFEDIT_region_RAM_start__ = 0x20002ef8;
|
||||||
define symbol __ICFEDIT_region_RAM_end__ = 0x2000ffff;
|
define symbol __ICFEDIT_region_RAM_end__ = 0x2003ffff;
|
||||||
export symbol __ICFEDIT_region_RAM_start__;
|
export symbol __ICFEDIT_region_RAM_start__;
|
||||||
export symbol __ICFEDIT_region_RAM_end__;
|
export symbol __ICFEDIT_region_RAM_end__;
|
||||||
/*-Sizes-*/
|
/*-Sizes-*/
|
||||||
|
|
|
@ -118,7 +118,13 @@ __vector_table
|
||||||
DCD RTC2_IRQHandler_v
|
DCD RTC2_IRQHandler_v
|
||||||
DCD I2S_IRQHandler_v
|
DCD I2S_IRQHandler_v
|
||||||
DCD FPU_IRQHandler_v
|
DCD FPU_IRQHandler_v
|
||||||
|
DCD USBD_IRQHandler_v
|
||||||
|
DCD UARTE1_IRQHandler_v
|
||||||
|
DCD QSPI_IRQHandler_v
|
||||||
|
DCD CRYPTOCELL_IRQHandler_v
|
||||||
|
DCD SPIM3_IRQHandler_v
|
||||||
|
DCD 0 /*Reserved */
|
||||||
|
DCD PWM3_IRQHandler_v
|
||||||
|
|
||||||
__Vectors_End
|
__Vectors_End
|
||||||
__Vectors EQU __vector_table
|
__Vectors EQU __vector_table
|
||||||
|
@ -375,6 +381,36 @@ I2S_IRQHandler_v
|
||||||
FPU_IRQHandler_v
|
FPU_IRQHandler_v
|
||||||
B .
|
B .
|
||||||
|
|
||||||
|
PUBWEAK USBD_IRQHandler_v
|
||||||
|
SECTION .text:CODE:NOROOT(1)
|
||||||
|
USBD_IRQHandler_v
|
||||||
|
B .
|
||||||
|
|
||||||
|
PUBWEAK UARTE1_IRQHandler_v
|
||||||
|
SECTION .text:CODE:NOROOT(1)
|
||||||
|
UARTE1_IRQHandler_v
|
||||||
|
B .
|
||||||
|
|
||||||
|
PUBWEAK QSPI_IRQHandler_v
|
||||||
|
SECTION .text:CODE:NOROOT(1)
|
||||||
|
QSPI_IRQHandler_v
|
||||||
|
B .
|
||||||
|
|
||||||
|
PUBWEAK CRYPTOCELL_IRQHandler_v
|
||||||
|
SECTION .text:CODE:NOROOT(1)
|
||||||
|
CRYPTOCELL_IRQHandler_v
|
||||||
|
B .
|
||||||
|
|
||||||
|
PUBWEAK SPIM3_IRQHandler_v
|
||||||
|
SECTION .text:CODE:NOROOT(1)
|
||||||
|
SPIM3_IRQHandler_v
|
||||||
|
B .
|
||||||
|
|
||||||
|
PUBWEAK PWM3_IRQHandler_v
|
||||||
|
SECTION .text:CODE:NOROOT(1)
|
||||||
|
PWM3_IRQHandler_v
|
||||||
|
B .
|
||||||
|
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ static NRF_GPIO_Type * const m_ports[] = GPIO_REG_LIST;
|
||||||
|
|
||||||
PinName port_pin(PortName port, int pin_n)
|
PinName port_pin(PortName port, int pin_n)
|
||||||
{
|
{
|
||||||
return NRF_GPIO_PIN_MAP(port, pin_n);
|
return (PinName)NRF_GPIO_PIN_MAP(port, pin_n);
|
||||||
}
|
}
|
||||||
|
|
||||||
void port_init(port_t *obj, PortName port, int mask, PinDirection dir)
|
void port_init(port_t *obj, PortName port, int mask, PinDirection dir)
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ble_radio_notification.h"
|
#include "ble_radio_notification.h"
|
||||||
|
#include "nrf_nvic.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -611,8 +611,8 @@ void nrf_drv_spi_abort(nrf_drv_spi_t const * p_instance)
|
||||||
|
|
||||||
CODE_FOR_SPIM
|
CODE_FOR_SPIM
|
||||||
(
|
(
|
||||||
nrf_spim_task_trigger(p_instance, NRF_SPIM_TASK_STOP);
|
nrf_spim_task_trigger(p_instance->p_registers, NRF_SPIM_TASK_STOP);
|
||||||
while (!nrf_spim_event_check(p_instance, NRF_SPIM_EVENT_STOPPED)) {}
|
while (!nrf_spim_event_check(p_instance->p_registers, NRF_SPIM_EVENT_STOPPED)) {}
|
||||||
p_cb->transfer_in_progress = false;
|
p_cb->transfer_in_progress = false;
|
||||||
)
|
)
|
||||||
CODE_FOR_SPI
|
CODE_FOR_SPI
|
||||||
|
|
|
@ -283,9 +283,9 @@ void serial_init(serial_t *obj, PinName tx, PinName rx) {
|
||||||
nrf_uart_enable(UART_INSTANCE);
|
nrf_uart_enable(UART_INSTANCE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
UART_CB.baudrate = UART_DEFAULT_BAUDRATE;
|
UART_CB.baudrate = (nrf_uart_baudrate_t)UART_DEFAULT_BAUDRATE;
|
||||||
UART_CB.parity = UART_DEFAULT_PARITY;
|
UART_CB.parity = (nrf_uart_parity_t)UART_DEFAULT_PARITY;
|
||||||
UART_CB.hwfc = UART_DEFAULT_HWFC;
|
UART_CB.hwfc = (nrf_uart_hwfc_t)UART_DEFAULT_HWFC;
|
||||||
UART_CB.pselcts = UART_DEFAULT_CTS;
|
UART_CB.pselcts = UART_DEFAULT_CTS;
|
||||||
UART_CB.pselrts = UART_DEFAULT_RTS;
|
UART_CB.pselrts = UART_DEFAULT_RTS;
|
||||||
|
|
||||||
|
@ -554,7 +554,7 @@ static void internal_set_hwfc(FlowControl type,
|
||||||
nrf_gpio_cfg_input(UART_CB.pselcts, NRF_GPIO_PIN_NOPULL);
|
nrf_gpio_cfg_input(UART_CB.pselcts, NRF_GPIO_PIN_NOPULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
UART_CB.hwfc = (type == FlowControlNone)? NRF_UART_HWFC_DISABLED : UART_DEFAULT_CONFIG_HWFC;
|
UART_CB.hwfc = (nrf_uart_hwfc_t)((type == FlowControlNone)? NRF_UART_HWFC_DISABLED : UART_DEFAULT_CONFIG_HWFC);
|
||||||
|
|
||||||
nrf_uart_configure(UART_INSTANCE, UART_CB.parity, UART_CB.hwfc);
|
nrf_uart_configure(UART_INSTANCE, UART_CB.parity, UART_CB.hwfc);
|
||||||
nrf_uart_hwfc_pins_set(UART_INSTANCE, UART_CB.pselrts, UART_CB.pselcts);
|
nrf_uart_hwfc_pins_set(UART_INSTANCE, UART_CB.pselrts, UART_CB.pselcts);
|
||||||
|
|
Loading…
Reference in New Issue