mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-27 20:59:00 +08:00
Make mongoose compile for nRF51
PUBLISHED_FROM=6af3ed56802d2619f673c36059370440a0c06397
This commit is contained in:
parent
717e872fdd
commit
c04e3f80b9
@ -3,7 +3,7 @@
|
||||
|
||||
# `wildcard ./*/` works in both linux and linux/wine, while `wildcard */` enumerates nothing under wine
|
||||
SUBDIRS = $(sort $(dir $(wildcard ./*/)))
|
||||
SUBDIRS:=$(filter-out ./ ./CC3200/ ./ESP8266_RTOS/ ./MSP432/ ./NXP_K64/ ./PIC32/ ./STM32F4_CC3100/ ./mbed/ ./nRF52/, $(SUBDIRS))
|
||||
SUBDIRS:=$(filter-out ./ ./CC3200/ ./ESP8266_RTOS/ ./MSP432/ ./NXP_K64/ ./PIC32/ ./STM32F4_CC3100/ ./mbed/ ./nRF51/ ./nRF52/, $(SUBDIRS))
|
||||
|
||||
ifeq ($(OS), Windows_NT)
|
||||
SUBDIRS:=$(filter-out ./load_balancer/ ./netcat/ ./raspberry_pi_mjpeg_led/ ./captive_dns_server/, $(SUBDIRS))
|
||||
|
569
examples/nRF51/http/bleconfig.c
Normal file
569
examples/nRF51/http/bleconfig.c
Normal file
@ -0,0 +1,569 @@
|
||||
/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
|
||||
*
|
||||
* The information contained herein is property of Nordic Semiconductor ASA.
|
||||
* Terms and conditions of usage are described in detail in NORDIC
|
||||
* SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
|
||||
*
|
||||
* Licensees are granted free, non-transferable use of the information. NO
|
||||
* WARRANTY of ANY KIND is provided. This heading must NOT be removed from
|
||||
* the file.
|
||||
*
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/** @file
|
||||
*
|
||||
* @defgroup iot_sdk_tcp_server main.c
|
||||
* @{
|
||||
* @ingroup iot_sdk_app_lwip
|
||||
* @brief This file contains the source code for LwIP TCP Server sample application.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "boards.h"
|
||||
#include "app_timer_appsh.h"
|
||||
#include "app_scheduler.h"
|
||||
#include "app_button.h"
|
||||
#include "nordic_common.h"
|
||||
#include "softdevice_handler_appsh.h"
|
||||
#include "ble_advdata.h"
|
||||
#include "ble_srv_common.h"
|
||||
#include "ble_ipsp.h"
|
||||
#include "ble_6lowpan.h"
|
||||
#include "mem_manager.h"
|
||||
#include "app_trace.h"
|
||||
#include "lwip/init.h"
|
||||
#include "lwip/inet6.h"
|
||||
#include "lwip/ip6.h"
|
||||
#include "lwip/ip6_addr.h"
|
||||
#include "lwip/netif.h"
|
||||
/*lint -save -e607 */
|
||||
#include "lwip/tcp.h"
|
||||
/*lint -restore */
|
||||
#include "lwip/timers.h"
|
||||
#include "nrf_platform_port.h"
|
||||
#include "app_util_platform.h"
|
||||
|
||||
#define DEVICE_NAME "LwIPTCPServer" /**< Device name used in BLE undirected advertisement. */
|
||||
|
||||
#define APP_TIMER_PRESCALER NRF51_DRIVER_TIMER_PRESCALER /**< Value of the RTC1 PRESCALER register. */
|
||||
#define APP_TIMER_MAX_TIMERS 1 /**< Maximum number of simultaneously created timers. */
|
||||
#define APP_TIMER_OP_QUEUE_SIZE 1
|
||||
#define LWIP_SYS_TIMER_INTERVAL APP_TIMER_TICKS(250, APP_TIMER_PRESCALER) /**< Interval for timer used as trigger to send. */
|
||||
|
||||
#define SCHED_MAX_EVENT_DATA_SIZE 128 /**< Maximum size of scheduler events. */
|
||||
#define SCHED_QUEUE_SIZE 12 /**< Maximum number of events in the scheduler queue. */
|
||||
|
||||
#define ADVERTISING_LED BSP_LED_0_MASK /**< Is on when device is advertising. */
|
||||
#define CONNECTED_LED BSP_LED_1_MASK /**< Is on when device is connected. */
|
||||
#define TCP_CONNECTED_LED BSP_LED_2_MASK /**< Is on when device is connected. */
|
||||
#define DISPLAY_LED_0 BSP_LED_0_MASK /**< LED used for displaying mod 4 of data payload received on UDP port. */
|
||||
#define DISPLAY_LED_1 BSP_LED_1_MASK /**< LED used for displaying mod 4 of data payload received on UDP port. */
|
||||
#define DISPLAY_LED_2 BSP_LED_2_MASK /**< LED used for displaying mod 4 of data payload received on UDP port. */
|
||||
#define DISPLAY_LED_3 BSP_LED_3_MASK /**< LED used for displaying mod 4 of data payload received on UDP port. */
|
||||
#define ALL_APP_LED (BSP_LED_0_MASK | BSP_LED_1_MASK | \
|
||||
BSP_LED_2_MASK | BSP_LED_3_MASK) /**< Define used for simultaneous operation of all application LEDs. */
|
||||
|
||||
#define APP_ADV_TIMEOUT 0 /**< Time for which the device must be advertising in non-connectable mode (in seconds). 0 disables timeout. */
|
||||
#define APP_ADV_ADV_INTERVAL MSEC_TO_UNITS(100, UNIT_0_625_MS) /**< The advertising interval. This value can vary between 100ms to 10.24s). */
|
||||
|
||||
#define DEAD_BEEF 0xDEADBEEF /**< Value used as error code on stack dump, can be used to identify stack location on stack unwind. */
|
||||
|
||||
#define APPL_LOG app_trace_log /**< Macro for logging application messages on UART, in case ENABLE_DEBUG_LOG_SUPPORT is not defined, no logging occurs. */
|
||||
#define APPL_DUMP app_trace_dump /**< Macro for dumping application data on UART, in case ENABLE_DEBUG_LOG_SUPPORT is not defined, no logging occurs. */
|
||||
|
||||
#define TCP_SERVER_PORT 9000 /**< TCP server listen port number. */
|
||||
#define TCP_DATA_SIZE 8 /**< UDP Data size sent on remote. */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TCP_STATE_IDLE,
|
||||
TCP_STATE_REQUEST_CONNECTION,
|
||||
TCP_STATE_CONNECTED,
|
||||
TCP_STATE_DATA_TX_IN_PROGRESS,
|
||||
TCP_STATE_DISCONNECTED
|
||||
}tcp_state_t;
|
||||
|
||||
eui64_t eui64_local_iid; /**< Local EUI64 value that is used as the IID for*/
|
||||
static ble_gap_adv_params_t m_adv_params; /**< Parameters to be passed to the stack when starting advertising. */
|
||||
static app_timer_id_t m_sys_timer_id; /**< System Timer used to service LwIP timers periodically. */
|
||||
static struct tcp_pcb * mp_tcp_port; /**< TCP Port to listen on. */
|
||||
static tcp_state_t m_tcp_state; /**< TCP State information. */
|
||||
|
||||
|
||||
|
||||
|
||||
/**@brief Function for error handling, which is called when an error has occurred.
|
||||
*
|
||||
* @warning This handler is an example only and does not fit a final product. You need to analyse
|
||||
* how your product is supposed to react in case of error.
|
||||
*
|
||||
* @param[in] error_code Error code supplied to the handler.
|
||||
* @param[in] line_num Line number where the handler is called.
|
||||
* @param[in] p_file_name Pointer to the file name.
|
||||
*/
|
||||
void app_error_handler(uint32_t error_code, uint32_t line_num, const uint8_t * p_file_name)
|
||||
{
|
||||
//Halt the application and notify of error using the LEDs.
|
||||
APPL_LOG("[** ASSERT **]: Error 0x%08lX, Line %ld, File %s\r\n",error_code, line_num, p_file_name);
|
||||
LEDS_ON(ALL_APP_LED);
|
||||
for(;;)
|
||||
{
|
||||
}
|
||||
|
||||
// @note: In case on assert, it is desired to only recover and reset, uncomment the line below.
|
||||
//NVIC_SystemReset();
|
||||
}
|
||||
|
||||
|
||||
/**@brief Callback function for asserts in the SoftDevice.
|
||||
*
|
||||
* @details This function will be called in case of an assert in the SoftDevice.
|
||||
*
|
||||
* @warning This handler is an example only and does not fit a final product. You need to analyse
|
||||
* how your product is supposed to react in case of Assert.
|
||||
* @warning On assert from the SoftDevice, the system can only recover on reset.
|
||||
*
|
||||
* @param[in] line_num Line number of the failing ASSERT call.
|
||||
* @param[in] file_name File name of the failing ASSERT call.
|
||||
*/
|
||||
void assert_nrf_callback(uint16_t line_num, const uint8_t * p_file_name)
|
||||
{
|
||||
app_error_handler(DEAD_BEEF, line_num, p_file_name);
|
||||
}
|
||||
|
||||
|
||||
/**@brief Function for the LEDs initialization.
|
||||
*
|
||||
* @details Initializes all LEDs used by this application.
|
||||
*/
|
||||
static void leds_init(void)
|
||||
{
|
||||
// Configure application LED pins.
|
||||
LEDS_CONFIGURE(ALL_APP_LED);
|
||||
|
||||
// Turn off all LED on initialization.
|
||||
LEDS_OFF(ALL_APP_LED);
|
||||
}
|
||||
|
||||
|
||||
/**@brief Function for initializing the Advertising functionality.
|
||||
*
|
||||
* @details Encodes the required advertising data and passes it to the stack.
|
||||
* Also builds a structure to be passed to the stack when starting advertising.
|
||||
*/
|
||||
static void advertising_init(void)
|
||||
{
|
||||
uint32_t err_code;
|
||||
ble_advdata_t advdata;
|
||||
uint8_t flags = BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED;
|
||||
ble_gap_conn_sec_mode_t sec_mode;
|
||||
ble_gap_addr_t my_addr;
|
||||
|
||||
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sec_mode);
|
||||
|
||||
err_code = sd_ble_gap_device_name_set(&sec_mode,
|
||||
(const uint8_t *)DEVICE_NAME,
|
||||
strlen(DEVICE_NAME));
|
||||
APP_ERROR_CHECK(err_code);
|
||||
|
||||
err_code = sd_ble_gap_address_get(&my_addr);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
|
||||
my_addr.addr[5] = 0x00;
|
||||
my_addr.addr_type = BLE_GAP_ADDR_TYPE_PUBLIC;
|
||||
|
||||
err_code = sd_ble_gap_address_set(&my_addr);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
|
||||
IPV6_EUI64_CREATE_FROM_EUI48(eui64_local_iid.identifier,
|
||||
my_addr.addr,
|
||||
my_addr.addr_type);
|
||||
|
||||
ble_uuid_t adv_uuids[] =
|
||||
{
|
||||
{BLE_UUID_IPSP_SERVICE, BLE_UUID_TYPE_BLE}
|
||||
};
|
||||
|
||||
//Build and set advertising data.
|
||||
memset(&advdata, 0, sizeof(advdata));
|
||||
|
||||
advdata.name_type = BLE_ADVDATA_FULL_NAME;
|
||||
advdata.flags = flags;
|
||||
advdata.uuids_complete.uuid_cnt = sizeof(adv_uuids) / sizeof(adv_uuids[0]);
|
||||
advdata.uuids_complete.p_uuids = adv_uuids;
|
||||
|
||||
err_code = ble_advdata_set(&advdata, NULL);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
|
||||
//Initialize advertising parameters (used when starting advertising).
|
||||
memset(&m_adv_params, 0, sizeof(m_adv_params));
|
||||
|
||||
m_adv_params.type = BLE_GAP_ADV_TYPE_ADV_IND;
|
||||
m_adv_params.p_peer_addr = NULL; // Undirected advertisement.
|
||||
m_adv_params.fp = BLE_GAP_ADV_FP_ANY;
|
||||
m_adv_params.interval = APP_ADV_ADV_INTERVAL;
|
||||
m_adv_params.timeout = APP_ADV_TIMEOUT;
|
||||
}
|
||||
|
||||
|
||||
/**@brief Function for starting advertising.
|
||||
*/
|
||||
static void advertising_start(void)
|
||||
{
|
||||
uint32_t err_code;
|
||||
|
||||
err_code = sd_ble_gap_adv_start(&m_adv_params);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
|
||||
LEDS_ON(ADVERTISING_LED);
|
||||
}
|
||||
|
||||
|
||||
/**@brief Function for handling the Application's BLE Stack events.
|
||||
*
|
||||
* @param[in] p_ble_evt Bluetooth stack event.
|
||||
*/
|
||||
static void on_ble_evt(ble_evt_t * p_ble_evt)
|
||||
{
|
||||
switch (p_ble_evt->header.evt_id)
|
||||
{
|
||||
case BLE_GAP_EVT_CONNECTED:
|
||||
APPL_LOG ("[APPL]: Connected.\r\n");
|
||||
break;
|
||||
case BLE_GAP_EVT_DISCONNECTED:
|
||||
APPL_LOG ("[APPL]: Disconnected.\r\n");
|
||||
advertising_start();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**@brief Function for dispatching a BLE stack event to all modules with a BLE stack event handler.
|
||||
*
|
||||
* @details This function is called from the BLE Stack event interrupt handler after a BLE stack
|
||||
* event has been received.
|
||||
*
|
||||
* @param[in] p_ble_evt Bluetooth stack event.
|
||||
*/
|
||||
static void ble_evt_dispatch(ble_evt_t * p_ble_evt)
|
||||
{
|
||||
ble_ipsp_evt_handler(p_ble_evt);
|
||||
on_ble_evt(p_ble_evt);
|
||||
}
|
||||
|
||||
|
||||
/**@brief Function for initializing the BLE stack.
|
||||
*
|
||||
* @details Initializes the SoftDevice and the BLE event interrupt.
|
||||
*/
|
||||
static void ble_stack_init(void)
|
||||
{
|
||||
uint32_t err_code;
|
||||
|
||||
// Initialize the SoftDevice handler module.
|
||||
SOFTDEVICE_HANDLER_APPSH_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, true);
|
||||
|
||||
// Register with the SoftDevice handler module for BLE events.
|
||||
err_code = softdevice_ble_evt_handler_set(ble_evt_dispatch);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
}
|
||||
|
||||
|
||||
/**@brief Function for the Event Scheduler initialization.
|
||||
*/
|
||||
static void scheduler_init(void)
|
||||
{
|
||||
APP_SCHED_INIT(SCHED_MAX_EVENT_DATA_SIZE, SCHED_QUEUE_SIZE);
|
||||
}
|
||||
|
||||
|
||||
/**@brief Function to TCP port.
|
||||
*
|
||||
* @details Function to close the TCP port and reset any information on the port.
|
||||
*/
|
||||
static void tcp_port_close(struct tcp_pcb * p_pcb)
|
||||
{
|
||||
m_tcp_state = TCP_STATE_REQUEST_CONNECTION;
|
||||
|
||||
//Reset all information set on and/or callback registered for the port.
|
||||
tcp_arg(p_pcb, NULL);
|
||||
tcp_sent(p_pcb, NULL);
|
||||
tcp_recv(p_pcb, NULL);
|
||||
tcp_err(p_pcb, NULL);
|
||||
tcp_poll(p_pcb, NULL, 0);
|
||||
|
||||
UNUSED_VARIABLE(tcp_close(p_pcb));
|
||||
|
||||
LEDS_OFF((DISPLAY_LED_0 | DISPLAY_LED_1 | DISPLAY_LED_2 | DISPLAY_LED_3));
|
||||
LEDS_ON(CONNECTED_LED);
|
||||
}
|
||||
|
||||
|
||||
/**@brief TCP Port Write complete callback.
|
||||
*
|
||||
* @details Calbback registered to be notified of the write complete event on the TCP port.
|
||||
* In case write complete is notified with 'zero' length, port is closed.
|
||||
*
|
||||
* @param[in] p_arg Receive argument set on the port.
|
||||
* @param[in] p_pcb PCB identifier of the port.
|
||||
* @param[in] len Length of data written successfully.
|
||||
*
|
||||
* @retval ERR_OK.
|
||||
*/
|
||||
static err_t tcp_write_complete(void * p_arg,
|
||||
struct tcp_pcb * p_pcb,
|
||||
u16_t len)
|
||||
{
|
||||
UNUSED_PARAMETER(p_arg);
|
||||
UNUSED_PARAMETER(p_pcb);
|
||||
|
||||
if (len != 0)
|
||||
{
|
||||
//Write complete, reset the state to connected from transmit pending.
|
||||
m_tcp_state = TCP_STATE_CONNECTED;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Something is not right on the port, close the port.
|
||||
tcp_port_close(mp_tcp_port);
|
||||
}
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
|
||||
/**@brief Send test data on the port.
|
||||
*
|
||||
* @details Sends TCP data in Request of size 8 in format described in description above.
|
||||
*
|
||||
* @param[in] p_pcb PCB identifier of the port.
|
||||
*/
|
||||
static void tcp_send_data(struct tcp_pcb * p_pcb, uint32_t sequence_number)
|
||||
{
|
||||
err_t err = ERR_OK;
|
||||
|
||||
if (m_tcp_state != TCP_STATE_DATA_TX_IN_PROGRESS)
|
||||
{
|
||||
//Register callback to get notification of data reception is complete.
|
||||
tcp_sent(p_pcb, tcp_write_complete);
|
||||
uint8_t tcp_data[TCP_DATA_SIZE];
|
||||
|
||||
tcp_data[0] = (uint8_t )((sequence_number >> 24) & 0x000000FF);
|
||||
tcp_data[1] = (uint8_t )((sequence_number >> 16) & 0x000000FF);
|
||||
tcp_data[2] = (uint8_t )((sequence_number >> 8) & 0x000000FF);
|
||||
tcp_data[3] = (uint8_t )(sequence_number & 0x000000FF);
|
||||
|
||||
tcp_data[4] = 'P';
|
||||
tcp_data[5] = 'o';
|
||||
tcp_data[6] = 'n';
|
||||
tcp_data[7] = 'g';
|
||||
|
||||
//Enqueue data for transmission.
|
||||
err = tcp_write(p_pcb, tcp_data, TCP_DATA_SIZE, 1);
|
||||
|
||||
if (err != ERR_OK)
|
||||
{
|
||||
APPL_LOG ("[APPL]: Failed to send TCP packet, reason %d\r\n", err);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_tcp_state = TCP_STATE_DATA_TX_IN_PROGRESS;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Wait for tx to be complete.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**@brief Callback registered for receiving data on the TCP Port.
|
||||
*
|
||||
* @param[in] p_arg Receive argument set on the TCP port.
|
||||
* @param[in] p_pcb TCP PCB on which data is received.
|
||||
* @param[in] p_buffer Buffer with received data.
|
||||
* @param[in] err Event result indicating error associated with the receive,
|
||||
* if any, else ERR_OK.
|
||||
*/
|
||||
err_t tcp_recv_data_handler(void * p_arg,
|
||||
struct tcp_pcb * p_pcb,
|
||||
struct pbuf * p_buffer,
|
||||
err_t err)
|
||||
{
|
||||
APPL_LOG ("[APPL]: >> TCP Data.\r\n");
|
||||
|
||||
//Check event result before proceeding.
|
||||
if (err == ERR_OK)
|
||||
{
|
||||
uint8_t *p_data = p_buffer->payload;
|
||||
|
||||
if (p_buffer->len == TCP_DATA_SIZE)
|
||||
{
|
||||
uint32_t sequence_number = 0;
|
||||
|
||||
sequence_number = ((p_data[0] << 24) & 0xFF000000);
|
||||
sequence_number |= ((p_data[1] << 16) & 0x00FF0000);
|
||||
sequence_number |= ((p_data[2] << 8) & 0x0000FF00);
|
||||
sequence_number |= (p_data[3] & 0x000000FF);
|
||||
|
||||
LEDS_OFF(ALL_APP_LED);
|
||||
|
||||
if (sequence_number & 0x00000001)
|
||||
{
|
||||
LEDS_ON(DISPLAY_LED_0);
|
||||
}
|
||||
if (sequence_number & 0x00000002)
|
||||
{
|
||||
LEDS_ON(DISPLAY_LED_1);
|
||||
}
|
||||
if (sequence_number & 0x00000004)
|
||||
{
|
||||
LEDS_ON(DISPLAY_LED_2);
|
||||
}
|
||||
if (sequence_number & 0x00000008)
|
||||
{
|
||||
LEDS_ON(DISPLAY_LED_3);
|
||||
}
|
||||
|
||||
//Send Response
|
||||
tcp_send_data(p_pcb, sequence_number);
|
||||
}
|
||||
else
|
||||
{
|
||||
APPL_LOG ("[APPL]: TCP data received in incorrect format.\r\n");
|
||||
}
|
||||
// All is good with the data received, process it.
|
||||
tcp_recved(p_pcb, p_buffer->tot_len);
|
||||
UNUSED_VARIABLE(pbuf_free(p_buffer));
|
||||
}
|
||||
else
|
||||
{
|
||||
//Free the buffer in case its not NULL.
|
||||
if (p_buffer != NULL)
|
||||
{
|
||||
UNUSED_VARIABLE(pbuf_free(p_buffer));
|
||||
}
|
||||
|
||||
//Something is not right with the port, close the port.
|
||||
tcp_port_close(mp_tcp_port);
|
||||
}
|
||||
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**@brief Function for initializing IP stack.
|
||||
*
|
||||
* @details Initialize the IP Stack and its driver.
|
||||
*/
|
||||
static void ip_stack_init(void)
|
||||
{
|
||||
uint32_t err_code = nrf51_sdk_mem_init();
|
||||
APP_ERROR_CHECK(err_code);
|
||||
|
||||
//Initialize LwIP stack.
|
||||
lwip_init();
|
||||
|
||||
//Initialize LwIP stack driver.
|
||||
err_code = nrf51_driver_init();
|
||||
APP_ERROR_CHECK(err_code);
|
||||
}
|
||||
|
||||
|
||||
/**@brief Timer callback used for periodic servicing of LwIP protocol timers.
|
||||
*
|
||||
* @details Timer callback used for periodic servicing of LwIP protocol timers.
|
||||
*
|
||||
* @param[in] p_context Pointer used for passing context. No context used in this application.
|
||||
*/
|
||||
static void system_timer_callback(void * p_context)
|
||||
{
|
||||
UNUSED_VARIABLE(p_context);
|
||||
sys_check_timeouts();
|
||||
}
|
||||
|
||||
|
||||
/**@brief Function for the Timer initialization.
|
||||
*
|
||||
* @details Initializes the timer module. This creates and starts application timers.
|
||||
*/
|
||||
static void timers_init(void)
|
||||
{
|
||||
uint32_t err_code;
|
||||
|
||||
// Initialize timer module.
|
||||
APP_TIMER_APPSH_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, true);
|
||||
|
||||
// Create timers.
|
||||
err_code = app_timer_create(&m_sys_timer_id,
|
||||
APP_TIMER_MODE_REPEATED,
|
||||
system_timer_callback);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
}
|
||||
|
||||
|
||||
/**@brief Function to handle interface up event. */
|
||||
void nrf51_driver_interface_up(void)
|
||||
{
|
||||
uint32_t err_code;
|
||||
|
||||
APPL_LOG ("[APPL]: IPv6 interface up.\r\n");
|
||||
|
||||
sys_check_timeouts();
|
||||
|
||||
m_tcp_state = TCP_STATE_REQUEST_CONNECTION;
|
||||
|
||||
err_code = app_timer_start(m_sys_timer_id, LWIP_SYS_TIMER_INTERVAL, NULL);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
|
||||
LEDS_OFF(ADVERTISING_LED);
|
||||
LEDS_ON(CONNECTED_LED);
|
||||
}
|
||||
|
||||
|
||||
/**@brief Function to handle interface down event. */
|
||||
void nrf51_driver_interface_down(void)
|
||||
{
|
||||
uint32_t err_code;
|
||||
|
||||
APPL_LOG ("[APPL]: IPv6 interface down.\r\n");
|
||||
|
||||
err_code = app_timer_stop(m_sys_timer_id);
|
||||
APP_ERROR_CHECK(err_code);
|
||||
|
||||
LEDS_OFF((DISPLAY_LED_0 | DISPLAY_LED_1 | DISPLAY_LED_2 | DISPLAY_LED_3));
|
||||
LEDS_ON(ADVERTISING_LED);
|
||||
|
||||
m_tcp_state = TCP_STATE_DISCONNECTED;
|
||||
}
|
||||
|
||||
void bleconfig_init(void) {
|
||||
//Initialize.
|
||||
app_trace_init();
|
||||
leds_init();
|
||||
timers_init();
|
||||
ble_stack_init();
|
||||
advertising_init();
|
||||
ip_stack_init ();
|
||||
scheduler_init();
|
||||
|
||||
APPL_LOG ("\r\n");
|
||||
APPL_LOG ("[APPL]: Init done.\r\n");
|
||||
|
||||
//Start execution.
|
||||
advertising_start();
|
||||
}
|
||||
|
||||
void bleconfig_poll(void) {
|
||||
//Execute event schedule.
|
||||
app_sched_execute();
|
||||
}
|
||||
|
8
examples/nRF51/http/bleconfig.h
Normal file
8
examples/nRF51/http/bleconfig.h
Normal file
@ -0,0 +1,8 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2016 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
void bleconfig_init(void);
|
||||
void bleconfig_poll(void);
|
||||
|
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<ProjectGui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_guix.xsd">
|
||||
|
||||
<SchemaVersion>-5.1</SchemaVersion>
|
||||
|
||||
<Header>### uVision Project, (C) Keil Software</Header>
|
||||
|
||||
<ViewPool/>
|
||||
|
||||
<MDIGroups>
|
||||
<Orientation>1</Orientation>
|
||||
<ActiveMDIGroup>0</ActiveMDIGroup>
|
||||
<MDIGroup>
|
||||
<Size>100</Size>
|
||||
<ActiveTab>0</ActiveTab>
|
||||
<Doc>
|
||||
<Name>..\..\..\..\..\..\..\components\softdevice\s1xx_iot\doc\s1xx-iot-prototype2_licence_agreement.txt</Name>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>1</CurrentLine>
|
||||
<Folding>1</Folding>
|
||||
<ContractedFolders></ContractedFolders>
|
||||
<PaneID>0</PaneID>
|
||||
</Doc>
|
||||
</MDIGroup>
|
||||
</MDIGroups>
|
||||
|
||||
</ProjectGui>
|
@ -0,0 +1,665 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_optx.xsd">
|
||||
|
||||
<SchemaVersion>1.0</SchemaVersion>
|
||||
|
||||
<Header>### uVision Project, (C) Keil Software</Header>
|
||||
|
||||
<Extensions>
|
||||
<cExt>*.c</cExt>
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
</Extensions>
|
||||
|
||||
<DaveTm>
|
||||
<dwLowDateTime>0</dwLowDateTime>
|
||||
<dwHighDateTime>0</dwHighDateTime>
|
||||
</DaveTm>
|
||||
|
||||
<Target>
|
||||
<TargetName>nrf51422_xxac_s1xx_iot</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<TargetOption>
|
||||
<CLKADS>16000000</CLKADS>
|
||||
<OPTTT>
|
||||
<gFlags>1</gFlags>
|
||||
<BeepAtEnd>1</BeepAtEnd>
|
||||
<RunSim>0</RunSim>
|
||||
<RunTarget>1</RunTarget>
|
||||
</OPTTT>
|
||||
<OPTHX>
|
||||
<HexSelection>1</HexSelection>
|
||||
<FlashByte>65535</FlashByte>
|
||||
<HexRangeLowAddress>0</HexRangeLowAddress>
|
||||
<HexRangeHighAddress>0</HexRangeHighAddress>
|
||||
<HexOffset>0</HexOffset>
|
||||
</OPTHX>
|
||||
<OPTLEX>
|
||||
<PageWidth>79</PageWidth>
|
||||
<PageLength>66</PageLength>
|
||||
<TabStop>8</TabStop>
|
||||
<ListingPath>.\_build\</ListingPath>
|
||||
</OPTLEX>
|
||||
<ListingPage>
|
||||
<CreateCListing>1</CreateCListing>
|
||||
<CreateAListing>1</CreateAListing>
|
||||
<CreateLListing>1</CreateLListing>
|
||||
<CreateIListing>0</CreateIListing>
|
||||
<AsmCond>1</AsmCond>
|
||||
<AsmSymb>1</AsmSymb>
|
||||
<AsmXref>0</AsmXref>
|
||||
<CCond>1</CCond>
|
||||
<CCode>0</CCode>
|
||||
<CListInc>0</CListInc>
|
||||
<CSymb>0</CSymb>
|
||||
<LinkerCodeListing>0</LinkerCodeListing>
|
||||
</ListingPage>
|
||||
<OPTXL>
|
||||
<LMap>1</LMap>
|
||||
<LComments>1</LComments>
|
||||
<LGenerateSymbols>1</LGenerateSymbols>
|
||||
<LLibSym>1</LLibSym>
|
||||
<LLines>1</LLines>
|
||||
<LLocSym>1</LLocSym>
|
||||
<LPubSym>1</LPubSym>
|
||||
<LXref>0</LXref>
|
||||
<LExpSel>0</LExpSel>
|
||||
</OPTXL>
|
||||
<OPTFL>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<IsCurrentTarget>1</IsCurrentTarget>
|
||||
</OPTFL>
|
||||
<CpuCode>5</CpuCode>
|
||||
<DebugOpt>
|
||||
<uSim>0</uSim>
|
||||
<uTrg>1</uTrg>
|
||||
<sLdApp>1</sLdApp>
|
||||
<sGomain>1</sGomain>
|
||||
<sRbreak>1</sRbreak>
|
||||
<sRwatch>1</sRwatch>
|
||||
<sRmem>1</sRmem>
|
||||
<sRfunc>1</sRfunc>
|
||||
<sRbox>1</sRbox>
|
||||
<tLdApp>1</tLdApp>
|
||||
<tGomain>1</tGomain>
|
||||
<tRbreak>1</tRbreak>
|
||||
<tRwatch>1</tRwatch>
|
||||
<tRmem>1</tRmem>
|
||||
<tRfunc>0</tRfunc>
|
||||
<tRbox>1</tRbox>
|
||||
<tRtrace>0</tRtrace>
|
||||
<sRSysVw>1</sRSysVw>
|
||||
<tRSysVw>1</tRSysVw>
|
||||
<sRunDeb>0</sRunDeb>
|
||||
<sLrtime>0</sLrtime>
|
||||
<nTsel>6</nTsel>
|
||||
<sDll></sDll>
|
||||
<sDllPa></sDllPa>
|
||||
<sDlgDll></sDlgDll>
|
||||
<sDlgPa></sDlgPa>
|
||||
<sIfile></sIfile>
|
||||
<tDll></tDll>
|
||||
<tDllPa></tDllPa>
|
||||
<tDlgDll></tDlgDll>
|
||||
<tDlgPa></tDlgPa>
|
||||
<tIfile></tIfile>
|
||||
<pMon>Segger\JL2CM3.dll</pMon>
|
||||
</DebugOpt>
|
||||
<TargetDriverDllRegistry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>JL2CM3</Key>
|
||||
<Name>-U408001579 -O78 -S0 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nrf51xxx.flm -FS00 -FL0200000 -FP0($$Device:nRF51822_xxAA$Flash\nrf51xxx.flm)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>UL2CM3</Key>
|
||||
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0nrf51xxx -FS00 -FL0200000 -FP0($$Device:nRF51822_xxAA$Flash\nrf51xxx.flm))</Name>
|
||||
</SetRegEntry>
|
||||
</TargetDriverDllRegistry>
|
||||
<Breakpoint/>
|
||||
<Tracepoint>
|
||||
<THDelay>0</THDelay>
|
||||
</Tracepoint>
|
||||
<DebugFlag>
|
||||
<trace>0</trace>
|
||||
<periodic>0</periodic>
|
||||
<aLwin>0</aLwin>
|
||||
<aCover>0</aCover>
|
||||
<aSer1>0</aSer1>
|
||||
<aSer2>0</aSer2>
|
||||
<aPa>0</aPa>
|
||||
<viewmode>0</viewmode>
|
||||
<vrSel>0</vrSel>
|
||||
<aSym>0</aSym>
|
||||
<aTbox>0</aTbox>
|
||||
<AscS1>0</AscS1>
|
||||
<AscS2>0</AscS2>
|
||||
<AscS3>0</AscS3>
|
||||
<aSer3>0</aSer3>
|
||||
<eProf>0</eProf>
|
||||
<aLa>0</aLa>
|
||||
<aPa1>0</aPa1>
|
||||
<AscS4>0</AscS4>
|
||||
<aSer4>0</aSer4>
|
||||
<StkLoc>0</StkLoc>
|
||||
<TrcWin>0</TrcWin>
|
||||
<newCpu>0</newCpu>
|
||||
<uProt>0</uProt>
|
||||
</DebugFlag>
|
||||
<LintExecutable></LintExecutable>
|
||||
<LintConfigFile></LintConfigFile>
|
||||
</TargetOption>
|
||||
</Target>
|
||||
|
||||
<Group>
|
||||
<GroupName>Application</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>1</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\main.c</PathWithFileName>
|
||||
<FilenameWithoutPath>main.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>2</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\bleconfig.c</PathWithFileName>
|
||||
<FilenameWithoutPath>bleconfig.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>3</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\bleconfig.h</PathWithFileName>
|
||||
<FilenameWithoutPath>bleconfig.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>4</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\myboard.h</PathWithFileName>
|
||||
<FilenameWithoutPath>myboard.h</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
<GroupName>Documentation</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>5</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\Abstract.txt</PathWithFileName>
|
||||
<FilenameWithoutPath>Abstract.txt</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>6</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\license.txt</PathWithFileName>
|
||||
<FilenameWithoutPath>license.txt</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
<GroupName>Third Parties</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>7</FileNumber>
|
||||
<FileType>4</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\external\lwip\lib\liblwip.lib</PathWithFileName>
|
||||
<FilenameWithoutPath>liblwip.lib</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>8</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\external\lwip\src\port\nrf_platform_port.c</PathWithFileName>
|
||||
<FilenameWithoutPath>nrf_platform_port.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
<GroupName>nRF_BLE</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>9</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\ble\common\ble_advdata.c</PathWithFileName>
|
||||
<FilenameWithoutPath>ble_advdata.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>10</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\ble\common\ble_srv_common.c</PathWithFileName>
|
||||
<FilenameWithoutPath>ble_srv_common.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
<GroupName>nRF_Drivers</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>5</GroupNumber>
|
||||
<FileNumber>11</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\drivers_nrf\uart\app_uart_fifo.c</PathWithFileName>
|
||||
<FilenameWithoutPath>app_uart_fifo.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>5</GroupNumber>
|
||||
<FileNumber>12</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\drivers_nrf\hal\nrf_delay.c</PathWithFileName>
|
||||
<FilenameWithoutPath>nrf_delay.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>5</GroupNumber>
|
||||
<FileNumber>13</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\drivers_nrf\common\nrf_drv_common.c</PathWithFileName>
|
||||
<FilenameWithoutPath>nrf_drv_common.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>5</GroupNumber>
|
||||
<FileNumber>14</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\drivers_nrf\gpiote\nrf_drv_gpiote.c</PathWithFileName>
|
||||
<FilenameWithoutPath>nrf_drv_gpiote.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
<GroupName>nRF_IoT</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>6</GroupNumber>
|
||||
<FileNumber>15</FileNumber>
|
||||
<FileType>4</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\iot\ble_6lowpan\lib\ble_6lowpan.lib</PathWithFileName>
|
||||
<FilenameWithoutPath>ble_6lowpan.lib</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>6</GroupNumber>
|
||||
<FileNumber>16</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\iot\context_manager\iot_context_manager.c</PathWithFileName>
|
||||
<FilenameWithoutPath>iot_context_manager.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
<GroupName>nRF_Libraries</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>17</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\libraries\button\app_button.c</PathWithFileName>
|
||||
<FilenameWithoutPath>app_button.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>18</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\libraries\util\app_error.c</PathWithFileName>
|
||||
<FilenameWithoutPath>app_error.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>19</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\libraries\fifo\app_fifo.c</PathWithFileName>
|
||||
<FilenameWithoutPath>app_fifo.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>20</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\libraries\scheduler\app_scheduler.c</PathWithFileName>
|
||||
<FilenameWithoutPath>app_scheduler.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>21</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\libraries\timer\app_timer.c</PathWithFileName>
|
||||
<FilenameWithoutPath>app_timer.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>22</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\libraries\timer\app_timer_appsh.c</PathWithFileName>
|
||||
<FilenameWithoutPath>app_timer_appsh.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>23</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\libraries\trace\app_trace.c</PathWithFileName>
|
||||
<FilenameWithoutPath>app_trace.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>24</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\libraries\mem_manager\mem_manager.c</PathWithFileName>
|
||||
<FilenameWithoutPath>mem_manager.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>25</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\libraries\util\nrf_assert.c</PathWithFileName>
|
||||
<FilenameWithoutPath>nrf_assert.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>26</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\libraries\uart\retarget.c</PathWithFileName>
|
||||
<FilenameWithoutPath>retarget.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
<GroupName>nRF_SoftDevice</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>27</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\softdevice\s1xx_iot\doc\s1xx-iot-prototype2_licence_agreement.txt</PathWithFileName>
|
||||
<FilenameWithoutPath>s1xx-iot-prototype2_licence_agreement.txt</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>28</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\softdevice\common\softdevice_handler\softdevice_handler.c</PathWithFileName>
|
||||
<FilenameWithoutPath>softdevice_handler.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>8</GroupNumber>
|
||||
<FileNumber>29</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\nrf51_iot_sdk\components\softdevice\common\softdevice_handler\softdevice_handler_appsh.c</PathWithFileName>
|
||||
<FilenameWithoutPath>softdevice_handler_appsh.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
<GroupName>Mongoose</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>9</GroupNumber>
|
||||
<FileNumber>30</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\..\..\..\..\mongoose.c</PathWithFileName>
|
||||
<FilenameWithoutPath>mongoose.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
<GroupName>::CMSIS</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>1</RteFlg>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
<GroupName>::Device</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>1</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>11</GroupNumber>
|
||||
<FileNumber>31</FileNumber>
|
||||
<FileType>2</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>RTE\Device\nRF51422_xxAC\arm_startup_nrf51.s</PathWithFileName>
|
||||
<FilenameWithoutPath>arm_startup_nrf51.s</FilenameWithoutPath>
|
||||
<RteFlg>1</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>11</GroupNumber>
|
||||
<FileNumber>32</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>RTE\Device\nRF51422_xxAC\system_nrf51.c</PathWithFileName>
|
||||
<FilenameWithoutPath>system_nrf51.c</FilenameWithoutPath>
|
||||
<RteFlg>1</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
</ProjectOpt>
|
@ -0,0 +1,676 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_projx.xsd">
|
||||
|
||||
<SchemaVersion>2.1</SchemaVersion>
|
||||
|
||||
<Header>### uVision Project, (C) Keil Software</Header>
|
||||
|
||||
<Targets>
|
||||
<Target>
|
||||
<TargetName>nrf51422_xxac_s1xx_iot</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
<Device>nRF51422_xxAC</Device>
|
||||
<Vendor>Nordic Semiconductor</Vendor>
|
||||
<PackID>NordicSemiconductor.nRF_DeviceFamilyPack.8.0.5</PackID>
|
||||
<PackURL>http://developer.nordicsemi.com/nRF51_SDK/pieces/nRF_DeviceFamilyPack/</PackURL>
|
||||
<Cpu>IROM(0x00000000,0x40000) IRAM(0x20000000,0x8000) CPUTYPE("Cortex-M0") CLOCK(16000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-UM0049BUE -O4175 -S0 -C0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0nRF5Prog -FS00 -FL08000)</FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>core.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
<Cmp></Cmp>
|
||||
<Asm></Asm>
|
||||
<Linker></Linker>
|
||||
<OHString></OHString>
|
||||
<InfinionOptionDll></InfinionOptionDll>
|
||||
<SLE66CMisc></SLE66CMisc>
|
||||
<SLE66AMisc></SLE66AMisc>
|
||||
<SLE66LinkerMisc></SLE66LinkerMisc>
|
||||
<SFDFile>..\..\..\..\..\..\..\SVD\nrf51.xml</SFDFile>
|
||||
<bCustSvd>0</bCustSvd>
|
||||
<UseEnv>0</UseEnv>
|
||||
<BinPath></BinPath>
|
||||
<IncludePath></IncludePath>
|
||||
<LibPath></LibPath>
|
||||
<RegisterFilePath></RegisterFilePath>
|
||||
<DBRegisterFilePath></DBRegisterFilePath>
|
||||
<TargetStatus>
|
||||
<Error>0</Error>
|
||||
<ExitCodeStop>0</ExitCodeStop>
|
||||
<ButtonStop>0</ButtonStop>
|
||||
<NotGenerated>0</NotGenerated>
|
||||
<InvalidFlash>1</InvalidFlash>
|
||||
</TargetStatus>
|
||||
<OutputDirectory>.\_build\</OutputDirectory>
|
||||
<OutputName>nrf51422_xxac_s1xx_iot</OutputName>
|
||||
<CreateExecutable>1</CreateExecutable>
|
||||
<CreateLib>0</CreateLib>
|
||||
<CreateHexFile>1</CreateHexFile>
|
||||
<DebugInformation>1</DebugInformation>
|
||||
<BrowseInformation>1</BrowseInformation>
|
||||
<ListingPath>.\_build\</ListingPath>
|
||||
<HexFormatSelection>1</HexFormatSelection>
|
||||
<Merge32K>0</Merge32K>
|
||||
<CreateBatchFile>0</CreateBatchFile>
|
||||
<BeforeCompile>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<UserProg1Name></UserProg1Name>
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopU1X>0</nStopU1X>
|
||||
<nStopU2X>0</nStopU2X>
|
||||
</BeforeCompile>
|
||||
<BeforeMake>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<UserProg1Name></UserProg1Name>
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopB1X>0</nStopB1X>
|
||||
<nStopB2X>0</nStopB2X>
|
||||
</BeforeMake>
|
||||
<AfterMake>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<UserProg1Name></UserProg1Name>
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
</AfterMake>
|
||||
<SelectedForBatchBuild>0</SelectedForBatchBuild>
|
||||
<SVCSIdString></SVCSIdString>
|
||||
</TargetCommonOption>
|
||||
<CommonProperty>
|
||||
<UseCPPCompiler>0</UseCPPCompiler>
|
||||
<RVCTCodeConst>0</RVCTCodeConst>
|
||||
<RVCTZI>0</RVCTZI>
|
||||
<RVCTOtherData>0</RVCTOtherData>
|
||||
<ModuleSelection>0</ModuleSelection>
|
||||
<IncludeInBuild>1</IncludeInBuild>
|
||||
<AlwaysBuild>0</AlwaysBuild>
|
||||
<GenerateAssemblyFile>0</GenerateAssemblyFile>
|
||||
<AssembleAssemblyFile>0</AssembleAssemblyFile>
|
||||
<PublicsOnly>0</PublicsOnly>
|
||||
<StopOnExitCode>3</StopOnExitCode>
|
||||
<CustomArgument></CustomArgument>
|
||||
<IncludeLibraryModules></IncludeLibraryModules>
|
||||
<ComprImg>1</ComprImg>
|
||||
</CommonProperty>
|
||||
<DllOption>
|
||||
<SimDllName></SimDllName>
|
||||
<SimDllArguments></SimDllArguments>
|
||||
<SimDlgDll></SimDlgDll>
|
||||
<SimDlgDllArguments></SimDlgDllArguments>
|
||||
<TargetDllName>SARMCM3.DLL</TargetDllName>
|
||||
<TargetDllArguments></TargetDllArguments>
|
||||
<TargetDlgDll>TARMCM1.DLL</TargetDlgDll>
|
||||
<TargetDlgDllArguments>-pCM0</TargetDlgDllArguments>
|
||||
</DllOption>
|
||||
<DebugOption>
|
||||
<OPTHX>
|
||||
<HexSelection>1</HexSelection>
|
||||
<HexRangeLowAddress>0</HexRangeLowAddress>
|
||||
<HexRangeHighAddress>0</HexRangeHighAddress>
|
||||
<HexOffset>0</HexOffset>
|
||||
<Oh166RecLen>16</Oh166RecLen>
|
||||
</OPTHX>
|
||||
<Simulator>
|
||||
<UseSimulator>0</UseSimulator>
|
||||
<LoadApplicationAtStartup>1</LoadApplicationAtStartup>
|
||||
<RunToMain>1</RunToMain>
|
||||
<RestoreBreakpoints>1</RestoreBreakpoints>
|
||||
<RestoreWatchpoints>1</RestoreWatchpoints>
|
||||
<RestoreMemoryDisplay>1</RestoreMemoryDisplay>
|
||||
<RestoreFunctions>1</RestoreFunctions>
|
||||
<RestoreToolbox>1</RestoreToolbox>
|
||||
<LimitSpeedToRealTime>0</LimitSpeedToRealTime>
|
||||
<RestoreSysVw>1</RestoreSysVw>
|
||||
</Simulator>
|
||||
<Target>
|
||||
<UseTarget>1</UseTarget>
|
||||
<LoadApplicationAtStartup>1</LoadApplicationAtStartup>
|
||||
<RunToMain>1</RunToMain>
|
||||
<RestoreBreakpoints>1</RestoreBreakpoints>
|
||||
<RestoreWatchpoints>1</RestoreWatchpoints>
|
||||
<RestoreMemoryDisplay>1</RestoreMemoryDisplay>
|
||||
<RestoreFunctions>0</RestoreFunctions>
|
||||
<RestoreToolbox>1</RestoreToolbox>
|
||||
<RestoreTracepoints>0</RestoreTracepoints>
|
||||
<RestoreSysVw>1</RestoreSysVw>
|
||||
</Target>
|
||||
<RunDebugAfterBuild>0</RunDebugAfterBuild>
|
||||
<TargetSelection>6</TargetSelection>
|
||||
<SimDlls>
|
||||
<CpuDll></CpuDll>
|
||||
<CpuDllArguments></CpuDllArguments>
|
||||
<PeripheralDll></PeripheralDll>
|
||||
<PeripheralDllArguments></PeripheralDllArguments>
|
||||
<InitializationFile></InitializationFile>
|
||||
</SimDlls>
|
||||
<TargetDlls>
|
||||
<CpuDll></CpuDll>
|
||||
<CpuDllArguments></CpuDllArguments>
|
||||
<PeripheralDll></PeripheralDll>
|
||||
<PeripheralDllArguments></PeripheralDllArguments>
|
||||
<InitializationFile></InitializationFile>
|
||||
<Driver>Segger\JL2CM3.dll</Driver>
|
||||
</TargetDlls>
|
||||
</DebugOption>
|
||||
<Utilities>
|
||||
<Flash1>
|
||||
<UseTargetDll>1</UseTargetDll>
|
||||
<UseExternalTool>0</UseExternalTool>
|
||||
<RunIndependent>0</RunIndependent>
|
||||
<UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>
|
||||
<Capability>1</Capability>
|
||||
<DriverSelection>4099</DriverSelection>
|
||||
</Flash1>
|
||||
<bUseTDR>1</bUseTDR>
|
||||
<Flash2>Segger\JL2CM3.dll</Flash2>
|
||||
<Flash3></Flash3>
|
||||
<Flash4></Flash4>
|
||||
<pFcarmOut></pFcarmOut>
|
||||
<pFcarmGrp></pFcarmGrp>
|
||||
<pFcArmRoot></pFcArmRoot>
|
||||
<FcArmLst>0</FcArmLst>
|
||||
</Utilities>
|
||||
<TargetArmAds>
|
||||
<ArmAdsMisc>
|
||||
<GenerateListings>0</GenerateListings>
|
||||
<asHll>1</asHll>
|
||||
<asAsm>1</asAsm>
|
||||
<asMacX>1</asMacX>
|
||||
<asSyms>1</asSyms>
|
||||
<asFals>1</asFals>
|
||||
<asDbgD>1</asDbgD>
|
||||
<asForm>1</asForm>
|
||||
<ldLst>0</ldLst>
|
||||
<ldmm>1</ldmm>
|
||||
<ldXref>1</ldXref>
|
||||
<BigEnd>0</BigEnd>
|
||||
<AdsALst>1</AdsALst>
|
||||
<AdsACrf>1</AdsACrf>
|
||||
<AdsANop>0</AdsANop>
|
||||
<AdsANot>0</AdsANot>
|
||||
<AdsLLst>1</AdsLLst>
|
||||
<AdsLmap>1</AdsLmap>
|
||||
<AdsLcgr>1</AdsLcgr>
|
||||
<AdsLsym>1</AdsLsym>
|
||||
<AdsLszi>1</AdsLszi>
|
||||
<AdsLtoi>1</AdsLtoi>
|
||||
<AdsLsun>1</AdsLsun>
|
||||
<AdsLven>1</AdsLven>
|
||||
<AdsLsxf>1</AdsLsxf>
|
||||
<RvctClst>0</RvctClst>
|
||||
<GenPPlst>0</GenPPlst>
|
||||
<AdsCpuType>"Cortex-M0"</AdsCpuType>
|
||||
<RvctDeviceName></RvctDeviceName>
|
||||
<mOS>0</mOS>
|
||||
<uocRom>0</uocRom>
|
||||
<uocRam>0</uocRam>
|
||||
<hadIROM>1</hadIROM>
|
||||
<hadIRAM>1</hadIRAM>
|
||||
<hadXRAM>0</hadXRAM>
|
||||
<uocXRam>0</uocXRam>
|
||||
<RvdsVP>0</RvdsVP>
|
||||
<hadIRAM2>0</hadIRAM2>
|
||||
<hadIROM2>0</hadIROM2>
|
||||
<StupSel>8</StupSel>
|
||||
<useUlib>1</useUlib>
|
||||
<EndSel>0</EndSel>
|
||||
<uLtcg>0</uLtcg>
|
||||
<RoSelD>3</RoSelD>
|
||||
<RwSelD>5</RwSelD>
|
||||
<CodeSel>0</CodeSel>
|
||||
<OptFeed>0</OptFeed>
|
||||
<NoZi1>0</NoZi1>
|
||||
<NoZi2>0</NoZi2>
|
||||
<NoZi3>0</NoZi3>
|
||||
<NoZi4>0</NoZi4>
|
||||
<NoZi5>0</NoZi5>
|
||||
<Ro1Chk>0</Ro1Chk>
|
||||
<Ro2Chk>0</Ro2Chk>
|
||||
<Ro3Chk>0</Ro3Chk>
|
||||
<Ir1Chk>1</Ir1Chk>
|
||||
<Ir2Chk>0</Ir2Chk>
|
||||
<Ra1Chk>0</Ra1Chk>
|
||||
<Ra2Chk>0</Ra2Chk>
|
||||
<Ra3Chk>0</Ra3Chk>
|
||||
<Im1Chk>1</Im1Chk>
|
||||
<Im2Chk>0</Im2Chk>
|
||||
<OnChipMemories>
|
||||
<Ocm1>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm1>
|
||||
<Ocm2>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm2>
|
||||
<Ocm3>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm3>
|
||||
<Ocm4>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm4>
|
||||
<Ocm5>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm5>
|
||||
<Ocm6>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</Ocm6>
|
||||
<IRAM>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x20000000</StartAddress>
|
||||
<Size>0x8000</Size>
|
||||
</IRAM>
|
||||
<IROM>
|
||||
<Type>1</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x40000</Size>
|
||||
</IROM>
|
||||
<XRAM>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</XRAM>
|
||||
<OCR_RVCT1>
|
||||
<Type>1</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT1>
|
||||
<OCR_RVCT2>
|
||||
<Type>1</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT2>
|
||||
<OCR_RVCT3>
|
||||
<Type>1</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT3>
|
||||
<OCR_RVCT4>
|
||||
<Type>1</Type>
|
||||
<StartAddress>0x18000</StartAddress>
|
||||
<Size>0x28000</Size>
|
||||
</OCR_RVCT4>
|
||||
<OCR_RVCT5>
|
||||
<Type>1</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT5>
|
||||
<OCR_RVCT6>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT6>
|
||||
<OCR_RVCT7>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT7>
|
||||
<OCR_RVCT8>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT8>
|
||||
<OCR_RVCT9>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x20002000</StartAddress>
|
||||
<Size>0x6000</Size>
|
||||
</OCR_RVCT9>
|
||||
<OCR_RVCT10>
|
||||
<Type>0</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x0</Size>
|
||||
</OCR_RVCT10>
|
||||
</OnChipMemories>
|
||||
<RvctStartVector></RvctStartVector>
|
||||
</ArmAdsMisc>
|
||||
<Cads>
|
||||
<interw>1</interw>
|
||||
<Optim>4</Optim>
|
||||
<oTime>0</oTime>
|
||||
<SplitLS>0</SplitLS>
|
||||
<OneElfS>1</OneElfS>
|
||||
<Strict>0</Strict>
|
||||
<EnumInt>0</EnumInt>
|
||||
<PlainCh>0</PlainCh>
|
||||
<Ropi>0</Ropi>
|
||||
<Rwpi>0</Rwpi>
|
||||
<wLevel>0</wLevel>
|
||||
<uThumb>0</uThumb>
|
||||
<uSurpInc>0</uSurpInc>
|
||||
<uC99>0</uC99>
|
||||
<useXO>0</useXO>
|
||||
<VariousControls>
|
||||
<MiscControls>--c99</MiscControls>
|
||||
<Define>__HEAP_SIZE=1024 BOARD_PCA10028 BLE_STACK_SUPPORT_REQD S110 BSP_DEFINES_ONLY NRF51 SOFTDEVICE_PRESENT SWI_DISABLE0 MG_DISABLE_HTTP_DIGEST_AUTH MG_DISABLE_MD5 MG_DISABLE_HTTP_KEEP_ALIVE MG_ENABLE_HTTP_SSI=0 MG_ENABLE_HTTP_STREAMING_MULTIPART MG_NO_BSD_SOCKETS CS_PLATFORM=CS_P_NRF51 CS_ENABLE_STDIO</Define>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath>..\..\..\config;..\..\..;..\..\..\..\nrf51_iot_sdk\examples\bsp;..\..\..\..\nrf51_iot_sdk\components\softdevice\s1xx_iot\headers;..\..\..\..\nrf51_iot_sdk\components\ble\common;..\..\..\..\nrf51_iot_sdk\components\drivers_nrf\uart;..\..\..\..\nrf51_iot_sdk\components\libraries\timer;..\..\..\..\nrf51_iot_sdk\components\softdevice\common\softdevice_handler;..\..\..\..\nrf51_iot_sdk\components\libraries\scheduler;..\..\..\..\nrf51_iot_sdk\components\libraries\button;..\..\..\..\nrf51_iot_sdk\external\lwip\src\include;..\..\..\..\nrf51_iot_sdk\external\lwip\src\include\netif;..\..\..\..\nrf51_iot_sdk\external\lwip\src\port;..\..\..\..\nrf51_iot_sdk\external\lwip\src\port\arch;..\..\..\..\nrf51_iot_sdk\components\iot\ble_6lowpan;..\..\..\..\nrf51_iot_sdk\components\device;..\..\..\..\nrf51_iot_sdk\components\toolchain;..\..\..\..\nrf51_iot_sdk\components\libraries\util;..\..\..\..\nrf51_iot_sdk\components\libraries\fifo;..\..\..\..\nrf51_iot_sdk\components\drivers_nrf\gpiote;..\..\..\..\nrf51_iot_sdk\components\drivers_nrf\config;..\..\..\..\nrf51_iot_sdk\components\drivers_nrf\common;..\..\..\..\nrf51_iot_sdk\components\drivers_nrf\hal;..\..\..\..\nrf51_iot_sdk\components\libraries\mem_manager;..\..\..\..\nrf51_iot_sdk\components\iot\include;..\..\..\..\nrf51_iot_sdk\components\iot\context_manager;..\..\..\..\nrf51_iot_sdk\components\iot\ble_ipsp;..\..\..\..\nrf51_iot_sdk\components\libraries\trace;..\..\..\..\..\..</IncludePath>
|
||||
</VariousControls>
|
||||
</Cads>
|
||||
<Aads>
|
||||
<interw>1</interw>
|
||||
<Ropi>0</Ropi>
|
||||
<Rwpi>0</Rwpi>
|
||||
<thumb>0</thumb>
|
||||
<SplitLS>0</SplitLS>
|
||||
<SwStkChk>0</SwStkChk>
|
||||
<NoWarn>0</NoWarn>
|
||||
<uSurpInc>0</uSurpInc>
|
||||
<useXO>0</useXO>
|
||||
<VariousControls>
|
||||
<MiscControls></MiscControls>
|
||||
<Define> __HEAP_SIZE=1024 BOARD_PCA10028 BLE_STACK_SUPPORT_REQD S110 BSP_DEFINES_ONLY NRF51 SOFTDEVICE_PRESENT SWI_DISABLE0</Define>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath></IncludePath>
|
||||
</VariousControls>
|
||||
</Aads>
|
||||
<LDads>
|
||||
<umfTarg>1</umfTarg>
|
||||
<Ropi>0</Ropi>
|
||||
<Rwpi>0</Rwpi>
|
||||
<noStLib>0</noStLib>
|
||||
<RepFail>1</RepFail>
|
||||
<useFile>0</useFile>
|
||||
<TextAddressRange>0x00000000</TextAddressRange>
|
||||
<DataAddressRange>0x00000000</DataAddressRange>
|
||||
<pXoBase></pXoBase>
|
||||
<ScatterFile></ScatterFile>
|
||||
<IncludeLibs></IncludeLibs>
|
||||
<IncludeLibsPath></IncludeLibsPath>
|
||||
<Misc></Misc>
|
||||
<LinkerInputFile></LinkerInputFile>
|
||||
<DisabledWarnings></DisabledWarnings>
|
||||
</LDads>
|
||||
</TargetArmAds>
|
||||
</TargetOption>
|
||||
<Groups>
|
||||
<Group>
|
||||
<GroupName>Application</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>main.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\main.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>bleconfig.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\bleconfig.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>bleconfig.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\..\bleconfig.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>myboard.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\..\myboard.h</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>Documentation</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>Abstract.txt</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\..\Abstract.txt</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>license.txt</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\..\license.txt</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>Third Parties</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>liblwip.lib</FileName>
|
||||
<FileType>4</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\external\lwip\lib\liblwip.lib</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>nrf_platform_port.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\external\lwip\src\port\nrf_platform_port.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>nRF_BLE</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>ble_advdata.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\ble\common\ble_advdata.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>ble_srv_common.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\ble\common\ble_srv_common.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>nRF_Drivers</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>app_uart_fifo.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\drivers_nrf\uart\app_uart_fifo.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>nrf_delay.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\drivers_nrf\hal\nrf_delay.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>nrf_drv_common.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\drivers_nrf\common\nrf_drv_common.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>nrf_drv_gpiote.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\drivers_nrf\gpiote\nrf_drv_gpiote.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>nRF_IoT</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>ble_6lowpan.lib</FileName>
|
||||
<FileType>4</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\iot\ble_6lowpan\lib\ble_6lowpan.lib</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>iot_context_manager.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\iot\context_manager\iot_context_manager.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>nRF_Libraries</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>app_button.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\libraries\button\app_button.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>app_error.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\libraries\util\app_error.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>app_fifo.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\libraries\fifo\app_fifo.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>app_scheduler.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\libraries\scheduler\app_scheduler.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>app_timer.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\libraries\timer\app_timer.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>app_timer_appsh.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\libraries\timer\app_timer_appsh.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>app_trace.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\libraries\trace\app_trace.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>mem_manager.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\libraries\mem_manager\mem_manager.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>nrf_assert.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\libraries\util\nrf_assert.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>retarget.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\libraries\uart\retarget.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>nRF_SoftDevice</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>s1xx-iot-prototype2_licence_agreement.txt</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\softdevice\s1xx_iot\doc\s1xx-iot-prototype2_licence_agreement.txt</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>softdevice_handler.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\softdevice\common\softdevice_handler\softdevice_handler.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>softdevice_handler_appsh.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\nrf51_iot_sdk\components\softdevice\common\softdevice_handler\softdevice_handler_appsh.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>Mongoose</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>mongoose.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\..\..\..\mongoose.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>::CMSIS</GroupName>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>::Device</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>arm_startup_nrf51.s</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>RTE\Device\nRF51422_xxAC\arm_startup_nrf51.s</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>system_nrf51.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>RTE\Device\nRF51422_xxAC\system_nrf51.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
</Groups>
|
||||
</Target>
|
||||
</Targets>
|
||||
|
||||
<RTE>
|
||||
<packages>
|
||||
<filter>
|
||||
<targetInfos/>
|
||||
</filter>
|
||||
<package name="CMSIS" schemaVersion="1.2" url="http://www.keil.com/pack/" vendor="ARM" version="4.2.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="nrf51422_xxac_s1xx_iot"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="nRF_DeviceFamilyPack" schemaVersion="1.0" url="http://developer.nordicsemi.com/nRF51_SDK/pieces/nRF_DeviceFamilyPack/" vendor="NordicSemiconductor" version="7.2.1">
|
||||
<targetInfos>
|
||||
<targetInfo name="nrf51422_xxac_s1xx_iot"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
</packages>
|
||||
<apis/>
|
||||
<components>
|
||||
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="3.40.0" condition="CMSIS Core">
|
||||
<package name="CMSIS" schemaVersion="1.2" url="http://www.keil.com/pack/" vendor="ARM" version="4.2.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="nrf51422_xxac_s1xx_iot"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cclass="Device" Cgroup="Startup" Cvendor="NordicSemiconductor" Cversion="7.2.1" condition="nRF51 Series CMSIS Device">
|
||||
<package name="nRF_DeviceFamilyPack" schemaVersion="1.0" url="http://developer.nordicsemi.com/nRF51_SDK/pieces/nRF_DeviceFamilyPack/" vendor="NordicSemiconductor" version="7.2.1"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="nrf51422_xxac_s1xx_iot"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
</components>
|
||||
<files>
|
||||
<file attr="config" category="source" condition="ARM Compiler" name="Device\Source\arm\arm_startup_nrf51.s">
|
||||
<instance index="0">RTE\Device\nRF51422_xxAC\arm_startup_nrf51.s</instance>
|
||||
<component Cclass="Device" Cgroup="Startup" Cvendor="NordicSemiconductor" Cversion="8.0.5" condition="nRF51 Series CMSIS Device"/>
|
||||
<package license="License\license.txt" name="nRF_DeviceFamilyPack" schemaVersion="1.3" url="http://developer.nordicsemi.com/nRF51_SDK/pieces/nRF_DeviceFamilyPack/" vendor="NordicSemiconductor" version="8.0.5"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="nrf51422_xxac_s1xx_iot"/>
|
||||
</targetInfos>
|
||||
</file>
|
||||
<file attr="config" category="source" name="Device\Source\system_nrf51.c">
|
||||
<instance index="0">RTE\Device\nRF51422_xxAC\system_nrf51.c</instance>
|
||||
<component Cclass="Device" Cgroup="Startup" Cvendor="NordicSemiconductor" Cversion="8.0.5" condition="nRF51 Series CMSIS Device"/>
|
||||
<package license="License\license.txt" name="nRF_DeviceFamilyPack" schemaVersion="1.3" url="http://developer.nordicsemi.com/nRF51_SDK/pieces/nRF_DeviceFamilyPack/" vendor="NordicSemiconductor" version="8.0.5"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="nrf51422_xxac_s1xx_iot"/>
|
||||
</targetInfos>
|
||||
</file>
|
||||
</files>
|
||||
</RTE>
|
||||
|
||||
</Project>
|
236
examples/nRF51/http/boards/pca10028/armgcc/Makefile
Normal file
236
examples/nRF51/http/boards/pca10028/armgcc/Makefile
Normal file
@ -0,0 +1,236 @@
|
||||
PROJECT_NAME := iot_lwip_tcp_server_pca10028
|
||||
|
||||
export OUTPUT_FILENAME
|
||||
#MAKEFILE_NAME := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||
MAKEFILE_NAME := $(MAKEFILE_LIST)
|
||||
MAKEFILE_DIR := $(dir $(MAKEFILE_NAME) )
|
||||
|
||||
TEMPLATE_PATH = ../../../../nrf51_iot_sdk/components/toolchain/gcc
|
||||
ifeq ($(OS),Windows_NT)
|
||||
include $(TEMPLATE_PATH)/Makefile.windows
|
||||
else
|
||||
include $(TEMPLATE_PATH)/Makefile.posix
|
||||
endif
|
||||
|
||||
MK := mkdir
|
||||
RM := rm -rf
|
||||
|
||||
#echo suspend
|
||||
ifeq ("$(VERBOSE)","1")
|
||||
NO_ECHO :=
|
||||
else
|
||||
NO_ECHO := @
|
||||
endif
|
||||
|
||||
# Toolchain commands
|
||||
CC := "$(GNU_INSTALL_ROOT)/bin/$(GNU_PREFIX)-gcc"
|
||||
AS := "$(GNU_INSTALL_ROOT)/bin/$(GNU_PREFIX)-as"
|
||||
AR := "$(GNU_INSTALL_ROOT)/bin/$(GNU_PREFIX)-ar" -r
|
||||
LD := "$(GNU_INSTALL_ROOT)/bin/$(GNU_PREFIX)-ld"
|
||||
NM := "$(GNU_INSTALL_ROOT)/bin/$(GNU_PREFIX)-nm"
|
||||
OBJDUMP := "$(GNU_INSTALL_ROOT)/bin/$(GNU_PREFIX)-objdump"
|
||||
OBJCOPY := "$(GNU_INSTALL_ROOT)/bin/$(GNU_PREFIX)-objcopy"
|
||||
SIZE := "$(GNU_INSTALL_ROOT)/bin/$(GNU_PREFIX)-size"
|
||||
|
||||
#function for removing duplicates in a list
|
||||
remduplicates = $(strip $(if $1,$(firstword $1) $(call remduplicates,$(filter-out $(firstword $1),$1))))
|
||||
|
||||
#source common to all targets
|
||||
C_SOURCE_FILES += \
|
||||
../../../../nrf51_iot_sdk/components/libraries/button/app_button.c \
|
||||
../../../../nrf51_iot_sdk/components/libraries/util/app_error.c \
|
||||
../../../../nrf51_iot_sdk/components/libraries/fifo/app_fifo.c \
|
||||
../../../../nrf51_iot_sdk/components/libraries/scheduler/app_scheduler.c \
|
||||
../../../../nrf51_iot_sdk/components/libraries/timer/app_timer.c \
|
||||
../../../../nrf51_iot_sdk/components/libraries/timer/app_timer_appsh.c \
|
||||
../../../../nrf51_iot_sdk/components/libraries/trace/app_trace.c \
|
||||
../../../../nrf51_iot_sdk/components/libraries/mem_manager/mem_manager.c \
|
||||
../../../../nrf51_iot_sdk/components/libraries/util/nrf_assert.c \
|
||||
../../../../nrf51_iot_sdk/components/libraries/uart/retarget.c \
|
||||
../../../../nrf51_iot_sdk/external/lwip/src/port/nrf_platform_port.c \
|
||||
../../../../nrf51_iot_sdk/components/drivers_nrf/uart/app_uart_fifo.c \
|
||||
../../../../nrf51_iot_sdk/components/drivers_nrf/hal/nrf_delay.c \
|
||||
../../../../nrf51_iot_sdk/components/drivers_nrf/common/nrf_drv_common.c \
|
||||
../../../../nrf51_iot_sdk/components/drivers_nrf/gpiote/nrf_drv_gpiote.c \
|
||||
../../../main.c \
|
||||
../../../../nrf51_iot_sdk/components/ble/common/ble_advdata.c \
|
||||
../../../../nrf51_iot_sdk/components/ble/common/ble_srv_common.c \
|
||||
../../../../nrf51_iot_sdk/components/iot/context_manager/iot_context_manager.c \
|
||||
../../../../nrf51_iot_sdk/components/toolchain/system_nrf51.c \
|
||||
../../../../nrf51_iot_sdk/components/softdevice/common/softdevice_handler/softdevice_handler.c \
|
||||
../../../../nrf51_iot_sdk/components/softdevice/common/softdevice_handler/softdevice_handler_appsh.c \
|
||||
|
||||
#assembly files common to all targets
|
||||
ASM_SOURCE_FILES = ../../../../nrf51_iot_sdk/components/toolchain/gcc/gcc_startup_nrf51.s
|
||||
|
||||
#assembly files common to all targets
|
||||
LIBS = ../../../../nrf51_iot_sdk/external/lwip/lib/liblwip.a
|
||||
LIBS += ../../../../nrf51_iot_sdk/components/iot/ble_6lowpan/lib/ble_6lowpan.a
|
||||
|
||||
#includes common to all targets
|
||||
INC_PATHS = -I../../../config
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/softdevice/s1xx_iot/headers
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/drivers_nrf/common
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/softdevice/common/softdevice_handler
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/external/lwip/src/include
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/iot/ble_6lowpan
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/drivers_nrf/hal
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/ble/common
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/external/lwip/src/port
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/libraries/fifo
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/libraries/trace
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/device
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/drivers_nrf/config
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/libraries/mem_manager
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/drivers_nrf/uart
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/iot/ble_ipsp
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/libraries/scheduler
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/external/lwip/src/include/netif
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/iot/include
|
||||
INC_PATHS += -I../../..
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/iot/context_manager
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/toolchain/gcc
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/drivers_nrf/gpiote
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/libraries/timer
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/external/lwip/src/port/arch
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/libraries/button
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/libraries/util
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/examples/bsp
|
||||
INC_PATHS += -I../../../../nrf51_iot_sdk/components/toolchain
|
||||
|
||||
OBJECT_DIRECTORY = _build
|
||||
LISTING_DIRECTORY = $(OBJECT_DIRECTORY)
|
||||
OUTPUT_BINARY_DIRECTORY = $(OBJECT_DIRECTORY)
|
||||
|
||||
# Sorting removes duplicates
|
||||
BUILD_DIRECTORIES := $(sort $(OBJECT_DIRECTORY) $(OUTPUT_BINARY_DIRECTORY) $(LISTING_DIRECTORY) )
|
||||
|
||||
#flags common to all targets
|
||||
CFLAGS = -D__HEAP_SIZE=512
|
||||
CFLAGS += -DSWI_DISABLE0
|
||||
CFLAGS += -DBOARD_PCA10028
|
||||
CFLAGS += -DSOFTDEVICE_PRESENT
|
||||
CFLAGS += -DNRF51
|
||||
CFLAGS += -DS110
|
||||
CFLAGS += -DBLE_STACK_SUPPORT_REQD
|
||||
CFLAGS += -DBSP_DEFINES_ONLY
|
||||
CFLAGS += -mcpu=cortex-m0
|
||||
CFLAGS += -mthumb -mabi=aapcs --std=gnu99
|
||||
CFLAGS += -Wall -Werror -O3
|
||||
CFLAGS += -mfloat-abi=soft
|
||||
# keep every function in separate section. This will allow linker to dump unused functions
|
||||
CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||
CFLAGS += -fno-builtin --short-enums
|
||||
|
||||
# keep every function in separate section. This will allow linker to dump unused functions
|
||||
LDFLAGS += -Xlinker -Map=$(LISTING_DIRECTORY)/$(OUTPUT_FILENAME).map
|
||||
LDFLAGS += -mthumb -mabi=aapcs -L $(TEMPLATE_PATH) -T$(LINKER_SCRIPT)
|
||||
LDFLAGS += -mcpu=cortex-m0
|
||||
# let linker to dump unused sections
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
# use newlib in nano version
|
||||
LDFLAGS += --specs=nano.specs -lc -lnosys
|
||||
|
||||
# Assembler flags
|
||||
ASMFLAGS += -x assembler-with-cpp
|
||||
ASMFLAGS += -D__HEAP_SIZE=512
|
||||
ASMFLAGS += -DSWI_DISABLE0
|
||||
ASMFLAGS += -DBOARD_PCA10028
|
||||
ASMFLAGS += -DSOFTDEVICE_PRESENT
|
||||
ASMFLAGS += -DNRF51
|
||||
ASMFLAGS += -DS110
|
||||
ASMFLAGS += -DBLE_STACK_SUPPORT_REQD
|
||||
ASMFLAGS += -DBSP_DEFINES_ONLY
|
||||
#default target - first one defined
|
||||
default: clean nrf51422_xxac_s1xx_iot
|
||||
|
||||
#building all targets
|
||||
all: clean
|
||||
$(NO_ECHO)$(MAKE) -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e cleanobj
|
||||
$(NO_ECHO)$(MAKE) -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e nrf51422_xxac_s1xx_iot
|
||||
|
||||
#target for printing all targets
|
||||
help:
|
||||
@echo following targets are available:
|
||||
@echo nrf51422_xxac_s1xx_iot
|
||||
|
||||
|
||||
C_SOURCE_FILE_NAMES = $(notdir $(C_SOURCE_FILES))
|
||||
C_PATHS = $(call remduplicates, $(dir $(C_SOURCE_FILES) ) )
|
||||
C_OBJECTS = $(addprefix $(OBJECT_DIRECTORY)/, $(C_SOURCE_FILE_NAMES:.c=.o) )
|
||||
|
||||
ASM_SOURCE_FILE_NAMES = $(notdir $(ASM_SOURCE_FILES))
|
||||
ASM_PATHS = $(call remduplicates, $(dir $(ASM_SOURCE_FILES) ))
|
||||
ASM_OBJECTS = $(addprefix $(OBJECT_DIRECTORY)/, $(ASM_SOURCE_FILE_NAMES:.s=.o) )
|
||||
|
||||
vpath %.c $(C_PATHS)
|
||||
vpath %.s $(ASM_PATHS)
|
||||
|
||||
OBJECTS = $(C_OBJECTS) $(ASM_OBJECTS)
|
||||
|
||||
nrf51422_xxac_s1xx_iot: OUTPUT_FILENAME := nrf51422_xxac_s1xx_iot
|
||||
nrf51422_xxac_s1xx_iot: LINKER_SCRIPT=iot_lwip_tcp_server_gcc_nrf51.ld
|
||||
nrf51422_xxac_s1xx_iot: $(BUILD_DIRECTORIES) $(OBJECTS)
|
||||
@echo Linking target: $(OUTPUT_FILENAME).out
|
||||
$(NO_ECHO)$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out
|
||||
$(NO_ECHO)$(MAKE) -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e finalize
|
||||
|
||||
## Create build directories
|
||||
$(BUILD_DIRECTORIES):
|
||||
echo $(MAKEFILE_NAME)
|
||||
$(MK) $@
|
||||
|
||||
# Create objects from C SRC files
|
||||
$(OBJECT_DIRECTORY)/%.o: %.c
|
||||
@echo Compiling file: $(notdir $<)
|
||||
$(NO_ECHO)$(CC) $(CFLAGS) $(INC_PATHS) -c -o $@ $<
|
||||
|
||||
# Assemble files
|
||||
$(OBJECT_DIRECTORY)/%.o: %.s
|
||||
@echo Compiling file: $(notdir $<)
|
||||
$(NO_ECHO)$(CC) $(ASMFLAGS) $(INC_PATHS) -c -o $@ $<
|
||||
|
||||
|
||||
# Link
|
||||
$(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out: $(BUILD_DIRECTORIES) $(OBJECTS)
|
||||
@echo Linking target: $(OUTPUT_FILENAME).out
|
||||
$(NO_ECHO)$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out
|
||||
|
||||
|
||||
## Create binary .bin file from the .out file
|
||||
$(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).bin: $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out
|
||||
@echo Preparing: $(OUTPUT_FILENAME).bin
|
||||
$(NO_ECHO)$(OBJCOPY) -O binary $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).bin
|
||||
|
||||
## Create binary .hex file from the .out file
|
||||
$(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).hex: $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out
|
||||
@echo Preparing: $(OUTPUT_FILENAME).hex
|
||||
$(NO_ECHO)$(OBJCOPY) -O ihex $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).hex
|
||||
|
||||
finalize: genbin genhex echosize
|
||||
|
||||
genbin:
|
||||
@echo Preparing: $(OUTPUT_FILENAME).bin
|
||||
$(NO_ECHO)$(OBJCOPY) -O binary $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).bin
|
||||
|
||||
## Create binary .hex file from the .out file
|
||||
genhex:
|
||||
@echo Preparing: $(OUTPUT_FILENAME).hex
|
||||
$(NO_ECHO)$(OBJCOPY) -O ihex $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).hex
|
||||
|
||||
echosize:
|
||||
-@echo ""
|
||||
$(NO_ECHO)$(SIZE) $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out
|
||||
-@echo ""
|
||||
|
||||
clean:
|
||||
$(RM) $(BUILD_DIRECTORIES)
|
||||
|
||||
cleanobj:
|
||||
$(RM) $(BUILD_DIRECTORIES)/*.o
|
||||
|
||||
flash: $(MAKECMDGOALS)
|
||||
@echo Flashing: $(OUTPUT_BINARY_DIRECTORY)/$<.hex
|
||||
nrfjprog --reset --program $(OUTPUT_BINARY_DIRECTORY)/$<.hex
|
||||
|
||||
## Flash softdevice
|
@ -0,0 +1,12 @@
|
||||
/* Linker script to configure memory regions. */
|
||||
|
||||
SEARCH_DIR(.)
|
||||
GROUP(-lgcc -lc -lnosys)
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x18000, LENGTH = 0x28000
|
||||
RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 0x6000
|
||||
}
|
||||
|
||||
INCLUDE "gcc_nrf51_common.ld"
|
139
examples/nRF51/http/config/nrf_drv_config.h
Normal file
139
examples/nRF51/http/config/nrf_drv_config.h
Normal file
@ -0,0 +1,139 @@
|
||||
/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved.
|
||||
*
|
||||
* The information contained herein is property of Nordic Semiconductor ASA.
|
||||
* Terms and conditions of usage are described in detail in NORDIC
|
||||
* SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
|
||||
*
|
||||
* Licensees are granted free, non-transferable use of the information. NO
|
||||
* WARRANTY of ANY KIND is provided. This heading must NOT be removed from
|
||||
* the file.
|
||||
*
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
#ifndef NRF_DRV_CONFIG_H
|
||||
#define NRF_DRV_CONFIG_H
|
||||
|
||||
/* CLOCK */
|
||||
#define CLOCK_CONFIG_XTAL_FREQ NRF_CLOCK_XTALFREQ_16MHz
|
||||
#define CLOCK_CONFIG_LF_SRC NRF_CLOCK_LF_SRC_Xtal
|
||||
#define CLOCK_CONFIG_LF_RC_CAL_INTERVAL RC_2000MS_CALIBRATION_INTERVAL
|
||||
#define CLOCK_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW
|
||||
|
||||
/* GPIOTE */
|
||||
#define GPIOTE_ENABLED 1
|
||||
|
||||
#if (GPIOTE_ENABLED == 1)
|
||||
#define GPIOTE_CONFIG_USE_SWI_EGU false
|
||||
#define GPIOTE_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_HIGH
|
||||
#define GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS 6
|
||||
#endif
|
||||
|
||||
/* TIMER */
|
||||
#define TIMER0_ENABLED 0
|
||||
|
||||
#if (TIMER0_ENABLED == 1)
|
||||
#define TIMER0_CONFIG_FREQUENCY NRF_TIMER_FREQ_16MHz
|
||||
#define TIMER0_CONFIG_MODE TIMER_MODE_MODE_Timer
|
||||
#define TIMER0_CONFIG_BIT_WIDTH TIMER_BITMODE_BITMODE_32Bit
|
||||
#define TIMER0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW
|
||||
|
||||
#define TIMER0_INSTANCE_INDEX 0
|
||||
#endif
|
||||
|
||||
#define TIMER1_ENABLED 0
|
||||
|
||||
#if (TIMER1_ENABLED == 1)
|
||||
#define TIMER1_CONFIG_FREQUENCY NRF_TIMER_FREQ_16MHz
|
||||
#define TIMER1_CONFIG_MODE TIMER_MODE_MODE_Timer
|
||||
#define TIMER1_CONFIG_BIT_WIDTH TIMER_BITMODE_BITMODE_16Bit
|
||||
#define TIMER1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW
|
||||
|
||||
#define TIMER1_INSTANCE_INDEX (TIMER0_ENABLED)
|
||||
#endif
|
||||
|
||||
#define TIMER2_ENABLED 0
|
||||
|
||||
#if (TIMER2_ENABLED == 1)
|
||||
#define TIMER2_CONFIG_FREQUENCY NRF_TIMER_FREQ_16MHz
|
||||
#define TIMER2_CONFIG_MODE TIMER_MODE_MODE_Timer
|
||||
#define TIMER2_CONFIG_BIT_WIDTH TIMER_BITMODE_BITMODE_16Bit
|
||||
#define TIMER2_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW
|
||||
|
||||
#define TIMER2_INSTANCE_INDEX (TIMER1_ENABLED+TIMER0_ENABLED)
|
||||
#endif
|
||||
|
||||
#define TIMER_COUNT (TIMER0_ENABLED + TIMER1_ENABLED + TIMER2_ENABLED)
|
||||
|
||||
/* RTC */
|
||||
#define RTC0_ENABLED 0
|
||||
|
||||
#if (RTC0_ENABLED == 1)
|
||||
#define RTC0_CONFIG_FREQUENCY 32678
|
||||
#define RTC0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW
|
||||
#define RTC0_CONFIG_RELIABLE false
|
||||
|
||||
#define RTC0_INSTANCE_INDEX 0
|
||||
#endif
|
||||
|
||||
#define RTC1_ENABLED 0
|
||||
|
||||
#if (RTC1_ENABLED == 1)
|
||||
#define RTC1_CONFIG_FREQUENCY 32768
|
||||
#define RTC1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW
|
||||
#define RTC1_CONFIG_RELIABLE false
|
||||
|
||||
#define RTC1_INSTANCE_INDEX (RTC0_ENABLED)
|
||||
#endif
|
||||
|
||||
#define RTC_COUNT (RTC0_ENABLED+RTC1_ENABLED)
|
||||
|
||||
#define NRF_MAXIMUM_LATENCY_US 2000
|
||||
|
||||
/* RNG */
|
||||
#define RNG_ENABLED 0
|
||||
|
||||
#if (RNG_ENABLED == 1)
|
||||
#define RNG_CONFIG_ERROR_CORRECTION true
|
||||
#define RNG_CONFIG_POOL_SIZE 8
|
||||
#define RNG_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW
|
||||
#endif
|
||||
|
||||
|
||||
/* QDEC */
|
||||
#define QDEC_ENABLED 0
|
||||
|
||||
#if (QDEC_ENABLED == 1)
|
||||
#define QDEC_CONFIG_REPORTPER NRF_QDEC_REPORTPER_10
|
||||
#define QDEC_CONFIG_SAMPLEPER NRF_QDEC_SAMPLEPER_16384us
|
||||
#define QDEC_CONFIG_PIO_A 1
|
||||
#define QDEC_CONFIG_PIO_B 2
|
||||
#define QDEC_CONFIG_PIO_LED 3
|
||||
#define QDEC_CONFIG_LEDPRE 511
|
||||
#define QDEC_CONFIG_LEDPOL NRF_QDEC_LEPOL_ACTIVE_HIGH
|
||||
#define QDEC_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW
|
||||
#define QDEC_CONFIG_DBFEN false
|
||||
#define QDEC_CONFIG_SAMPLE_INTEN false
|
||||
#endif
|
||||
|
||||
/* LPCOMP */
|
||||
#define LPCOMP_ENABLED 0
|
||||
|
||||
#if (LPCOMP_ENABLED == 1)
|
||||
#define LPCOMP_CONFIG_REFERENCE NRF_LPCOMP_REF_SUPPLY_FOUR_EIGHT
|
||||
#define LPCOMP_CONFIG_DETECTION NRF_LPCOMP_DETECT_DOWN
|
||||
#define LPCOMP_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW
|
||||
#define LPCOMP_CONFIG_INPUT NRF_LPCOMP_INPUT_0
|
||||
#endif
|
||||
|
||||
/* WDT */
|
||||
#define WDT_ENABLED 0
|
||||
|
||||
#if (WDT_ENABLED == 1)
|
||||
#define WDT_CONFIG_BEHAVIOUR NRF_WDT_BEHAVIOUR_RUN_SLEEP
|
||||
#define WDT_CONFIG_RELOAD_VALUE 2000
|
||||
#define WDT_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_HIGH
|
||||
#endif
|
||||
|
||||
#endif // NRF_DRV_CONFIG_H
|
92
examples/nRF51/http/main.c
Normal file
92
examples/nRF51/http/main.c
Normal file
@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2016 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
#include "bleconfig.h"
|
||||
#include "myboard.h"
|
||||
|
||||
#include "mongoose.h"
|
||||
|
||||
/*
|
||||
* This is a callback invoked by Mongoose to signal that a poll is needed soon.
|
||||
* Since we're in a tight polling loop anyway (see below), we don't need to do anything.
|
||||
*/
|
||||
void mg_lwip_mgr_schedule_poll(struct mg_mgr *mgr) {
|
||||
}
|
||||
|
||||
|
||||
// Define an event handler function
|
||||
void ev_handler(struct mg_connection *nc, int ev, void *ev_data) {
|
||||
if (ev == MG_EV_POLL) return;
|
||||
/* printf("ev %d\r\n", ev); */
|
||||
switch (ev) {
|
||||
case MG_EV_ACCEPT: {
|
||||
char addr[32];
|
||||
mg_sock_addr_to_str(&nc->sa, addr, sizeof(addr),
|
||||
MG_SOCK_STRINGIFY_IP | MG_SOCK_STRINGIFY_PORT);
|
||||
printf("%p: Connection from %s\r\n", nc, addr);
|
||||
break;
|
||||
}
|
||||
case MG_EV_HTTP_REQUEST: {
|
||||
struct http_message *hm = (struct http_message *) ev_data;
|
||||
char addr[32];
|
||||
mg_sock_addr_to_str(&nc->sa, addr, sizeof(addr),
|
||||
MG_SOCK_STRINGIFY_IP | MG_SOCK_STRINGIFY_PORT);
|
||||
printf("%p: %.*s %.*s\r\n", nc, (int) hm->method.len, hm->method.p,
|
||||
(int) hm->uri.len, hm->uri.p);
|
||||
mg_send_response_line(nc, 200,
|
||||
"Content-Type: text/html\r\n"
|
||||
"Connection: close");
|
||||
mg_printf(nc,
|
||||
"\r\n<h1>Hello, %s!</h1>\r\n"
|
||||
"You asked for %.*s\r\n",
|
||||
addr, (int) hm->uri.len, hm->uri.p);
|
||||
nc->flags |= MG_F_SEND_AND_CLOSE;
|
||||
LEDS_INVERT(LED_THREE);
|
||||
break;
|
||||
}
|
||||
case MG_EV_CLOSE: {
|
||||
printf("%p: Connection closed\r\n", nc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Function for application main entry.
|
||||
*/
|
||||
int main(void)
|
||||
{
|
||||
|
||||
cs_log_set_file(stdout);
|
||||
|
||||
bleconfig_init();
|
||||
|
||||
{
|
||||
struct mg_mgr mgr;
|
||||
|
||||
mg_mgr_init(&mgr, NULL); // Initialize event manager object
|
||||
|
||||
// Note that many connections can be added to a single event manager
|
||||
// Connections can be created at any point, e.g. in event handler function
|
||||
const char *err;
|
||||
struct mg_bind_opts opts;
|
||||
struct mg_connection *nc = NULL;
|
||||
memset(&opts, 0x00, sizeof(opts));
|
||||
opts.error_string = &err;
|
||||
nc = mg_bind_opt(&mgr, "80", ev_handler, opts); // Create listening connection and add it to the event manager
|
||||
if (nc == NULL) {
|
||||
printf("Failed to create listener: %s\n", err);
|
||||
return 1;
|
||||
}
|
||||
mg_set_protocol_http_websocket(nc);
|
||||
|
||||
for (;;) { // Start infinite event loop
|
||||
bleconfig_poll();
|
||||
mg_mgr_poll(&mgr, 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
21
examples/nRF51/http/myboard.h
Normal file
21
examples/nRF51/http/myboard.h
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2016 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
#include "boards.h"
|
||||
|
||||
#define LED_ONE BSP_LED_0_MASK /**< Is on when device is advertising. */
|
||||
#define LED_TWO BSP_LED_1_MASK /**< Is on when device is connected. */
|
||||
#define LED_THREE BSP_LED_2_MASK
|
||||
#define LED_FOUR BSP_LED_3_MASK
|
||||
#define TCP_CONNECTED_LED BSP_LED_2_MASK /**< Is on when a TCP connection is established. */
|
||||
#define DISPLAY_LED_0 BSP_LED_0_MASK /**< LED used for displaying mod 4 of data payload received on UDP port. */
|
||||
#define DISPLAY_LED_1 BSP_LED_1_MASK /**< LED used for displaying mod 4 of data payload received on UDP port. */
|
||||
#define DISPLAY_LED_2 BSP_LED_2_MASK /**< LED used for displaying mod 4 of data payload received on UDP port. */
|
||||
#define DISPLAY_LED_3 BSP_LED_3_MASK /**< LED used for displaying mod 4 of data payload received on UDP port. */
|
||||
#define ALL_APP_LED (BSP_LED_0_MASK | BSP_LED_1_MASK | \
|
||||
BSP_LED_2_MASK | BSP_LED_3_MASK) /**< Define used for simultaneous operation of all application LEDs. */
|
||||
|
204
examples/nRF51/http/sdk_config.h
Normal file
204
examples/nRF51/http/sdk_config.h
Normal file
@ -0,0 +1,204 @@
|
||||
/* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
|
||||
*
|
||||
* The information contained herein is property of Nordic Semiconductor ASA.
|
||||
* Terms and conditions of usage are described in detail in NORDIC
|
||||
* SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
|
||||
*
|
||||
* Licensees are granted free, non-transferable use of the information. NO
|
||||
* WARRANTY of ANY KIND is provided. This heading must NOT be removed from
|
||||
* the file.
|
||||
*
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
#ifndef SDK_CONFIG_H__
|
||||
#define SDK_CONFIG_H__
|
||||
|
||||
/**
|
||||
* @defgroup sdk_config SDK Configuration
|
||||
* @{
|
||||
* @ingroup sdk_common
|
||||
* @{
|
||||
* @details All parameters that allow configuring/tuning the SDK based on application/ use case
|
||||
* are defined here.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup mem_manager_config Memory Manager Configuration
|
||||
* @{
|
||||
* @addtogroup sdk_config
|
||||
* @{
|
||||
* @details This section defines configuration of memory manager module.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Maximum memory blocks identified as 'small' blocks.
|
||||
*
|
||||
* @details Maximum memory blocks identified as 'small' blocks.
|
||||
* Minimum value : 0 (Setting to 0 disables all 'small' blocks)
|
||||
* Maximum value : 255
|
||||
* Dependencies : None.
|
||||
*/
|
||||
#define MEMORY_MANAGER_SMALL_BLOCK_COUNT 8
|
||||
|
||||
/**
|
||||
* @brief Size of each memory blocks identified as 'small' block.
|
||||
*
|
||||
* @details Size of each memory blocks identified as 'small' block.
|
||||
* Memory block are recommended to be word-sized.
|
||||
* Minimum value : 32
|
||||
* Maximum value : A value less than the next pool size. If only small pool is used, this
|
||||
* can be any value based on availability of RAM.
|
||||
* Dependencies : MEMORY_MANAGER_SMALL_BLOCK_COUNT is non-zero.
|
||||
*/
|
||||
#define MEMORY_MANAGER_SMALL_BLOCK_SIZE 128
|
||||
|
||||
/**
|
||||
* @brief Maximum memory blocks identified as 'medium' blocks.
|
||||
*
|
||||
* @details Maximum memory blocks identified as 'medium' blocks.
|
||||
* Minimum value : 0 (Setting to 0 disables all 'medium' blocks)
|
||||
* Maximum value : 255
|
||||
* Dependencies : None.
|
||||
*/
|
||||
#define MEMORY_MANAGER_MEDIUM_BLOCK_COUNT 4
|
||||
|
||||
/**
|
||||
* @brief Size of each memory blocks identified as 'medium' block.
|
||||
*
|
||||
* @details Size of each memory blocks identified as 'medium' block.
|
||||
* Memory block are recommended to be word-sized.
|
||||
* Minimum value : A value greater than the small pool size if defined, else 32.
|
||||
* Maximum value : A value less than the next pool size. If only medium pool is used, this
|
||||
* can be any value based on availability of RAM.
|
||||
* Dependencies : MEMORY_MANAGER_MEDIUM_BLOCK_COUNT is non-zero.
|
||||
*/
|
||||
#define MEMORY_MANAGER_MEDIUM_BLOCK_SIZE 256
|
||||
|
||||
/**
|
||||
* @brief Maximum memory blocks identified as 'medium' blocks.
|
||||
*
|
||||
* @details Maximum memory blocks identified as 'medium' blocks.
|
||||
* Minimum value : 0 (Setting to 0 disables all 'large' blocks)
|
||||
* Maximum value : 255
|
||||
* Dependencies : None.
|
||||
*/
|
||||
#define MEMORY_MANAGER_LARGE_BLOCK_COUNT 3
|
||||
|
||||
/**
|
||||
* @brief Size of each memory blocks identified as 'medium' block.
|
||||
*
|
||||
* @details Size of each memory blocks identified as 'medium' block.
|
||||
* Memory block are recommended to be word-sized.
|
||||
* Minimum value : A value greater than the small &/ medium pool size if defined, else 32.
|
||||
* Maximum value : Any value based on availability of RAM.
|
||||
* Dependencies : MEMORY_MANAGER_MEDIUM_BLOCK_COUNT is non-zero.
|
||||
*/
|
||||
#define MEMORY_MANAGER_LARGE_BLOCK_SIZE 1024
|
||||
|
||||
/**
|
||||
* @brief Disable debug trace in the module.
|
||||
*
|
||||
* @details Set this define to 1 to enable debug trace in the module, else set to 0.
|
||||
* Possible values : 0 or 1.
|
||||
* Dependencies : ENABLE_DEBUG_LOG_SUPPORT. If this flag is not defined, no
|
||||
* trace is observed even if this define is set to 1.
|
||||
*/
|
||||
#define MEM_MANAGER_DISABLE_LOGS 1
|
||||
|
||||
/**
|
||||
* @brief Disables API parameter checks in the module.
|
||||
*
|
||||
* @details Set this define to 1 to disable checks on API parameters in the module.
|
||||
* API parameter checks are added to ensure right parameters are passed to the
|
||||
* module. These checks are useful during development phase but be redundant
|
||||
* once application is developed. Disabling this can result in some code saving.
|
||||
* Possible values : 0 or 1.
|
||||
* Dependencies : None.
|
||||
*/
|
||||
#define MEM_MANAGER_DISABLE_API_PARAM_CHECK 0
|
||||
/** @} */
|
||||
/** @} */
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup iot_context_manager Context Manager Configurations.
|
||||
* @{
|
||||
* @addtogroup iot_config
|
||||
* @{
|
||||
* @details This section defines configuration of Context Manager.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Disable debug trace in the module.
|
||||
*
|
||||
* @details Set this define to 1 to enable debug trace in the module, else set to 0.
|
||||
* Possible values : 0 or 1.
|
||||
* Dependencies : ENABLE_DEBUG_LOG_SUPPORT. If this flag is not defined, no
|
||||
* trace is observed even if this define is set to 1.
|
||||
*/
|
||||
#define IOT_CONTEXT_MANAGER_DISABLE_LOGS 1
|
||||
|
||||
/**
|
||||
* @brief Disables API parameter checks in the module.
|
||||
*
|
||||
* @details Set this define to 1 to disable checks on API parameters in the module.
|
||||
* API parameter checks are added to ensure right parameters are passed to the
|
||||
* module. These checks are useful during development phase but be redundant
|
||||
* once application is developed. Disabling this can result in some code saving.
|
||||
* Possible values : 0 or 1.
|
||||
* Dependencies : None.
|
||||
*/
|
||||
#define IOT_CONTEXT_MANAGER_DISABLE_API_PARAM_CHECK 0
|
||||
|
||||
/**
|
||||
* @brief Maximum number of supported context identifiers.
|
||||
*
|
||||
* @details Maximum value of 16 is preferable to correct decompression.
|
||||
* Minimum value : 1
|
||||
* Maximum value : 16
|
||||
* Dependencies : None.
|
||||
*/
|
||||
#define IOT_CONTEXT_MANAGER_MAX_CONTEXTS 16
|
||||
|
||||
/**
|
||||
* @brief Maximum number of supported context's table.
|
||||
*
|
||||
* @details If value is equal to BLE_IPSP_MAX_CHANNELS then all interface will have
|
||||
* its own table which is preferable.
|
||||
* Minimum value : 1
|
||||
* Maximum value : BLE_IPSP_MAX_CHANNELS
|
||||
* Dependencies : None.
|
||||
*/
|
||||
#define IOT_CONTEXT_MANAGER_MAX_TABLES 1
|
||||
/** @} */
|
||||
/** @} */
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup lwip_nrf51_driver nRF51 lwIP driver
|
||||
* @{
|
||||
* @addtogroup iot_config
|
||||
* @{
|
||||
* @details This section defines configuration of nRF51 lwIP driver.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Disable debug trace in the module.
|
||||
*
|
||||
* @details Set this define to 1 to enable debug trace in the module, else set to 0.
|
||||
* Possible values : 0 or 1.
|
||||
* Dependencies : ENABLE_DEBUG_LOG_SUPPORT. If this flag is not defined, no
|
||||
* trace is observed even if this define is set to 1.
|
||||
*/
|
||||
#define NRF51_LWIP_DRIVER_DISABLE_LOGS 1
|
||||
|
||||
/** @} */
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
/** @} */
|
||||
|
||||
#endif // SDK_CONFIG_H__
|
@ -10243,7 +10243,7 @@ int gettimeofday(struct timeval *tp, void *tzp) {
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
#if CS_PLATFORM == CS_P_NRF52 && defined(__ARMCC_VERSION)
|
||||
#if (CS_PLATFORM == CS_P_NRF51 || CS_PLATFORM == CS_P_NRF52) && defined(__ARMCC_VERSION)
|
||||
int gettimeofday(struct timeval *tp, void *tzp) {
|
||||
/* TODO */
|
||||
tp->tv_sec = 0;
|
||||
|
41
mongoose.h
41
mongoose.h
@ -53,6 +53,7 @@
|
||||
#define CS_P_NXP_KINETIS 9
|
||||
#define CS_P_NRF52 10
|
||||
#define CS_P_PIC32_HARMONY 11
|
||||
#define CS_P_NRF51 12
|
||||
|
||||
/* If not specified explicitly, we guess platform by defines. */
|
||||
#ifndef CS_PLATFORM
|
||||
@ -834,6 +835,46 @@ int inet_pton(int af, const char *src, void *dst);
|
||||
#endif /* CS_PLATFORM == CS_P_MBED */
|
||||
#endif /* CS_COMMON_PLATFORMS_PLATFORM_MBED_H_ */
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_nrf51.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2016 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_NRF51_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_NRF51_H_
|
||||
#if CS_PLATFORM == CS_P_NRF51
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#define to64(x) strtoll(x, NULL, 10)
|
||||
|
||||
#define MG_NET_IF MG_NET_IF_LWIP_LOW_LEVEL
|
||||
#define MG_ENABLE_IPV6 1
|
||||
|
||||
/*
|
||||
* For ARM C Compiler, make lwip to export `struct timeval`; for other
|
||||
* compilers, suppress it.
|
||||
*/
|
||||
#if !defined(__ARMCC_VERSION)
|
||||
# define LWIP_TIMEVAL_PRIVATE 0
|
||||
#else
|
||||
struct timeval;
|
||||
int gettimeofday(struct timeval *tp, void *tzp);
|
||||
#endif
|
||||
|
||||
#define INT64_FMT PRId64
|
||||
#define SIZE_T_FMT "u"
|
||||
|
||||
|
||||
#endif /* CS_PLATFORM == CS_P_NRF51 */
|
||||
#endif /* CS_COMMON_PLATFORMS_PLATFORM_NRF51_H_ */
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_nrf52.h"
|
||||
#endif
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user