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.c
pull/3841/head
Andrzej Puzdrowski 2017-01-04 11:48:38 +01:00
parent 46f72777dc
commit 5649eef980
6 changed files with 49 additions and 12 deletions

View File

@ -2,12 +2,12 @@
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x1c000;
define symbol __ICFEDIT_intvec_start__ = 0x21000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x1c000;
define symbol __ICFEDIT_region_ROM_end__ = 0x7ffff;
define symbol __ICFEDIT_region_ROM_start__ = 0x21000;
define symbol __ICFEDIT_region_ROM_end__ = 0xfffff;
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_end__;
/*-Sizes-*/

View File

@ -118,7 +118,13 @@ __vector_table
DCD RTC2_IRQHandler_v
DCD I2S_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 EQU __vector_table
@ -375,6 +381,36 @@ I2S_IRQHandler_v
FPU_IRQHandler_v
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

View File

@ -45,7 +45,7 @@ static NRF_GPIO_Type * const m_ports[] = GPIO_REG_LIST;
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)

View File

@ -37,6 +37,7 @@
*/
#include "ble_radio_notification.h"
#include "nrf_nvic.h"
#include <stdlib.h>

View File

@ -611,8 +611,8 @@ void nrf_drv_spi_abort(nrf_drv_spi_t const * p_instance)
CODE_FOR_SPIM
(
nrf_spim_task_trigger(p_instance, NRF_SPIM_TASK_STOP);
while (!nrf_spim_event_check(p_instance, NRF_SPIM_EVENT_STOPPED)) {}
nrf_spim_task_trigger(p_instance->p_registers, NRF_SPIM_TASK_STOP);
while (!nrf_spim_event_check(p_instance->p_registers, NRF_SPIM_EVENT_STOPPED)) {}
p_cb->transfer_in_progress = false;
)
CODE_FOR_SPI

View File

@ -283,9 +283,9 @@ void serial_init(serial_t *obj, PinName tx, PinName rx) {
nrf_uart_enable(UART_INSTANCE);
}
else {
UART_CB.baudrate = UART_DEFAULT_BAUDRATE;
UART_CB.parity = UART_DEFAULT_PARITY;
UART_CB.hwfc = UART_DEFAULT_HWFC;
UART_CB.baudrate = (nrf_uart_baudrate_t)UART_DEFAULT_BAUDRATE;
UART_CB.parity = (nrf_uart_parity_t)UART_DEFAULT_PARITY;
UART_CB.hwfc = (nrf_uart_hwfc_t)UART_DEFAULT_HWFC;
UART_CB.pselcts = UART_DEFAULT_CTS;
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);
}
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_hwfc_pins_set(UART_INSTANCE, UART_CB.pselrts, UART_CB.pselcts);