Make nRF5 example fit better in nRF ecosystem

By making dir hierarchy replicate that of examples provided with the nRF
IoT SDK.

Also, example for Keil uVision IDE is added.

PUBLISHED_FROM=1a3d9a54d15eb1acfb1b5d162138576a387ed21c
This commit is contained in:
Dmitry Frank 2016-10-26 14:24:16 +03:00 committed by Cesanta Bot
parent 99377bdd30
commit f061dcf8b6
31 changed files with 2446 additions and 1023 deletions

View File

@ -1,2 +0,0 @@
target extended-remote localhost:2331
file out/example.out

View File

@ -1,299 +0,0 @@
.PHONY: all clean flash gdbserver gdb jlinkexe rtt
APP_ROOT=.
MONGOOSE_ROOT=../..
BUILD_DIR=.build
OUT_DIR=out
PROJECT=example
NRF_IOT_SDK_ROOT=/opt/nrf5_iot_sdk
GNU_PREFIX := arm-none-eabi
LD_PATH=$(APP_ROOT)/ld
#echo suspend
ifeq ("$(VERBOSE)","1")
V :=
else
V := @
endif
# Toolchain commands
CC := '$(GNU_PREFIX)-gcc'
AS := '$(GNU_PREFIX)-as'
AR := '$(GNU_PREFIX)-ar' -r
LD := '$(GNU_PREFIX)-ld'
NM := '$(GNU_PREFIX)-nm'
OBJDUMP := '$(GNU_PREFIX)-objdump'
OBJCOPY := '$(GNU_PREFIX)-objcopy'
SIZE := '$(GNU_PREFIX)-size'
IPATH_SDK = . \
$(NRF_IOT_SDK_ROOT)/components/iot/errno \
$(NRF_IOT_SDK_ROOT)/components/softdevice/s1xx_iot/headers \
$(NRF_IOT_SDK_ROOT)/components/drivers_nrf/common \
$(NRF_IOT_SDK_ROOT)/components/softdevice/common/softdevice_handler \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/include \
$(NRF_IOT_SDK_ROOT)/components/iot/ble_6lowpan \
$(NRF_IOT_SDK_ROOT)/components/drivers_nrf/hal \
$(NRF_IOT_SDK_ROOT)/components/ble/common \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/port \
$(NRF_IOT_SDK_ROOT)/components/libraries/fifo \
$(NRF_IOT_SDK_ROOT)/components/libraries/trace \
$(NRF_IOT_SDK_ROOT)/components/device \
$(NRF_IOT_SDK_ROOT)/components/libraries/uart \
$(NRF_IOT_SDK_ROOT)/components/drivers_nrf/rng \
$(NRF_IOT_SDK_ROOT)/components/iot/medium \
$(NRF_IOT_SDK_ROOT)/components/drivers_nrf/config \
$(NRF_IOT_SDK_ROOT)/components/libraries/mem_manager \
$(NRF_IOT_SDK_ROOT)/components/drivers_nrf/uart \
$(NRF_IOT_SDK_ROOT)/components/iot/ble_ipsp \
$(NRF_IOT_SDK_ROOT)/components/libraries/scheduler \
$(NRF_IOT_SDK_ROOT)/components/iot/iot_timer \
$(NRF_IOT_SDK_ROOT)/components/iot/tls/mbedtls/tls/config \
$(NRF_IOT_SDK_ROOT)/external/mbedtls/include \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/include/netif \
$(NRF_IOT_SDK_ROOT)/components/iot/medium/commissioning \
$(NRF_IOT_SDK_ROOT)/components/iot/tls \
$(NRF_IOT_SDK_ROOT)/components/iot/include \
$(NRF_IOT_SDK_ROOT)/components/drivers_nrf/pstorage \
$(NRF_IOT_SDK_ROOT)/components/iot/tls \
$(NRF_IOT_SDK_ROOT)/components/iot/context_manager \
$(NRF_IOT_SDK_ROOT)/components/iot_timer \
$(NRF_IOT_SDK_ROOT)/components/toolchain/gcc \
$(NRF_IOT_SDK_ROOT)/components/drivers_nrf/delay \
$(NRF_IOT_SDK_ROOT)/components/iot/medium/ble_ncfgs \
$(NRF_IOT_SDK_ROOT)/components/drivers_nrf/gpiote \
$(NRF_IOT_SDK_ROOT)/components/iot/mqtt \
$(NRF_IOT_SDK_ROOT)/components/softdevice/s1xx_iot/headers/nrf52 \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/include/lwip \
$(NRF_IOT_SDK_ROOT)/components/iot/common \
$(NRF_IOT_SDK_ROOT)/components/libraries/timer \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/port/arch \
$(NRF_IOT_SDK_ROOT)/components/libraries/button \
$(NRF_IOT_SDK_ROOT)/components/libraries/util \
$(NRF_IOT_SDK_ROOT)/examples/bsp \
$(NRF_IOT_SDK_ROOT)/components/toolchain \
$(NRF_IOT_SDK_ROOT)/components/iot/medium/include \
IPATH_RTT = $(APP_ROOT)/rtt/RTT
IPATH_APP = $(APP_ROOT) $(APP_ROOT)/config
IPATH = . $(IPATH_APP) $(IPATH_RTT) $(IPATH_SDK)
SOURCES_NRF_IOT_SDK = \
$(NRF_IOT_SDK_ROOT)/examples/bsp/bsp.c \
$(NRF_IOT_SDK_ROOT)/components/libraries/button/app_button.c \
$(NRF_IOT_SDK_ROOT)/components/libraries/util/app_error.c \
$(NRF_IOT_SDK_ROOT)/components/libraries/fifo/app_fifo.c \
$(NRF_IOT_SDK_ROOT)/components/libraries/scheduler/app_scheduler.c \
$(NRF_IOT_SDK_ROOT)/components/libraries/timer/app_timer.c \
$(NRF_IOT_SDK_ROOT)/components/libraries/timer/app_timer_appsh.c \
$(NRF_IOT_SDK_ROOT)/components/libraries/trace/app_trace.c \
$(NRF_IOT_SDK_ROOT)/components/libraries/mem_manager/mem_manager.c \
$(NRF_IOT_SDK_ROOT)/components/libraries/util/nrf_assert.c \
$(NRF_IOT_SDK_ROOT)/components/libraries/uart/retarget.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/def.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/dhcp.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/ipv6/dhcp6.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/dns.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/ipv4/icmp.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/ipv6/icmp6.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/ipv6/inet6.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/inet_chksum.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/init.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/ipv4/ip4.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/ipv4/ip4_addr.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/ipv6/ip6.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/ipv6/ip6_addr.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/memp.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/ipv6/mld6.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/ipv6/nd6.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/netif.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/port/nrf_platform_port.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/pbuf.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/raw.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/sys.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/tcp.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/tcp_in.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/tcp_out.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/timers.c \
$(NRF_IOT_SDK_ROOT)/external/lwip/src/core/udp.c \
$(NRF_IOT_SDK_ROOT)/components/libraries/uart/app_uart_fifo.c \
$(NRF_IOT_SDK_ROOT)/components/drivers_nrf/delay/nrf_delay.c \
$(NRF_IOT_SDK_ROOT)/components/drivers_nrf/common/nrf_drv_common.c \
$(NRF_IOT_SDK_ROOT)/components/drivers_nrf/gpiote/nrf_drv_gpiote.c \
$(NRF_IOT_SDK_ROOT)/components/drivers_nrf/uart/nrf_drv_uart.c \
$(NRF_IOT_SDK_ROOT)/components/drivers_nrf/pstorage/pstorage.c \
$(NRF_IOT_SDK_ROOT)/components/ble/common/ble_advdata.c \
$(NRF_IOT_SDK_ROOT)/components/ble/common/ble_conn_params.c \
$(NRF_IOT_SDK_ROOT)/components/ble/common/ble_srv_common.c \
$(NRF_IOT_SDK_ROOT)/components/iot/errno/errno.c \
$(NRF_IOT_SDK_ROOT)/components/iot/context_manager/iot_context_manager.c \
$(NRF_IOT_SDK_ROOT)/components/iot/iot_timer/iot_timer.c \
$(NRF_IOT_SDK_ROOT)/components/iot/medium/ipv6_medium_ble.c \
$(NRF_IOT_SDK_ROOT)/components/iot/common/ipv6_parse.c \
$(NRF_IOT_SDK_ROOT)/components/toolchain/system_nrf52.c \
$(NRF_IOT_SDK_ROOT)/components/iot/medium/ble_ncfgs/ble_ncfgs.c \
$(NRF_IOT_SDK_ROOT)/components/iot/medium/commissioning/commissioning.c \
$(NRF_IOT_SDK_ROOT)/components/softdevice/common/softdevice_handler/softdevice_handler.c \
$(NRF_IOT_SDK_ROOT)/components/softdevice/common/softdevice_handler/softdevice_handler_appsh.c \
SOURCES_RTT = \
$(APP_ROOT)/rtt/RTT/SEGGER_RTT.c \
$(APP_ROOT)/rtt/RTT/SEGGER_RTT_printf.c \
$(APP_ROOT)/rtt/Syscalls/RTT_Syscalls_GCC.c \
SOURCES_APP = \
$(APP_ROOT)/main.c \
$(APP_ROOT)/bleconfig.c \
$(MONGOOSE_ROOT)/mongoose.c \
SOURCES = $(SOURCES_APP) $(SOURCES_NRF_IOT_SDK) $(SOURCES_RTT)
LIBS = $(NRF_IOT_SDK_ROOT)/components/iot/ble_6lowpan/lib/ble_6lowpan.a
ASM_SOURCES = $(APP_ROOT)/gcc_startup_nrf52.s
LINKER_SCRIPT = $(LD_PATH)/mongoose_example_nrf52.ld
C_SOURCE_FILE_NAMES = $(notdir $(SOURCES))
C_PATHS = $(sort $(dir $(SOURCES) ) )
ASM_PATHS = $(sort $(dir $(ASM_SOURCES) ))
C_OBJECTS = $(addprefix $(BUILD_DIR)/, $(C_SOURCE_FILE_NAMES:.c=.o) )
ASM_SOURCE_FILE_NAMES = $(notdir $(ASM_SOURCES))
ASM_PATHS = $(sort $(dir $(ASM_SOURCES) ))
ASM_OBJECTS = $(addprefix $(BUILD_DIR)/, $(ASM_SOURCE_FILE_NAMES:.s=.o) )
INCDIRS = $(addprefix -I,$(IPATH))
vpath %.c $(C_PATHS)
vpath %.s $(ASM_PATHS)
OBJECTS = $(C_OBJECTS) $(ASM_OBJECTS)
# Mongoose features
MG_FEATURES_TINY = \
-DMG_DISABLE_HTTP_DIGEST_AUTH \
-DMG_DISABLE_MD5 \
-DMG_DISABLE_HTTP_KEEP_ALIVE \
-DMG_ENABLE_HTTP_SSI=0 \
-DMG_ENABLE_HTTP_STREAMING_MULTIPART \
-DMG_NO_BSD_SOCKETS
#flags common to all targets
CFLAGS = -D__HEAP_SIZE=512
CFLAGS += -DSWI_DISABLE0
CFLAGS += -DSOFTDEVICE_PRESENT
CFLAGS += -DBOARD_PCA10040
CFLAGS += -DNRF52
CFLAGS += -DCONFIG_GPIO_AS_PINRESET
CFLAGS += -DBLE_STACK_SUPPORT_REQD
CFLAGS += -Ds1xx
CFLAGS += -mcpu=cortex-m4
CFLAGS += -mthumb -mabi=aapcs --std=gnu99
CFLAGS += -w -g3 -Os
CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
# 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
CFLAGS += -DCS_ENABLE_STDIO
#CFLAGS += -DCS_ENABLE_DEBUG
# This macro is needed for stdout to be retargeted to either UART or RTT
CFLAGS += -DENABLE_DEBUG_LOG_SUPPORT
# Don't retarget stdout to UART; it'll be retargeted to RTT
CFLAGS += -DNRF_LOG_USES_RTT
# Mongoose flags
CFLAGS += -DCS_PLATFORM=CS_P_NRF52 $(MG_FEATURES_TINY) -DMG_MODULE_LINES
LDFLAGS += -Xlinker -Map=$(OUT_DIR)/$(PROJECT).map
LDFLAGS += -mthumb -mabi=aapcs -L $(LD_PATH) -T$(LINKER_SCRIPT)
LDFLAGS += -mcpu=cortex-m4
LDFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
# 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 += -DSOFTDEVICE_PRESENT
ASMFLAGS += -DBOARD_PCA10040
ASMFLAGS += -DNRF52
ASMFLAGS += -DCONFIG_GPIO_AS_PINRESET
ASMFLAGS += -DENABLE_DEBUG_LOG_SUPPORT
ASMFLAGS += -DBLE_STACK_SUPPORT_REQD
ASMFLAGS += -Ds1xx
ASMFLAGS += -g3
INC_PATHS=$(addprefix -I,$(IPATH))
BUILD_DIRECTORIES := $(BUILD_DIR) $(OUT_DIR)
# Create objects from C SRC files
$(BUILD_DIR)/%.o: %.c
@echo Compiling file: $(notdir $<)
$(V)$(CC) $(CFLAGS) $(INC_PATHS) -c -o $@ $<
# Assemble files
$(BUILD_DIR)/%.o: %.s
@echo Assembly file: $(notdir $<)
$(V)$(CC) $(ASMFLAGS) $(INC_PATHS) -c -o $@ $<
# Create binary .hex file from the .out file
%.hex: %.out
@echo Generating HEX file: $@
$(V)$(OBJCOPY) -O ihex $< $@
OUT_FILENAME=$(OUT_DIR)/$(PROJECT).out
HEX_FILENAME=$(OUT_DIR)/$(PROJECT).hex
all: $(OUT_FILENAME) $(HEX_FILENAME)
$(OUT_FILENAME): $(BUILD_DIRECTORIES) $(OBJECTS)
@echo Linking target: $(OUT_FILENAME)
$(V)$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $(OUT_FILENAME)
## Create build directories
$(BUILD_DIRECTORIES):
mkdir $@
clean:
rm -rf $(BUILD_DIR) $(OUT_DIR) \
# Flash the program
flash: $(HEX_FILENAME)
@echo Flashing: $<
/opt/nordic/nrfjprog/nrfjprog --program $< -f nrf52 --sectorerase
/opt/nordic/nrfjprog/nrfjprog --reset -f nrf52
# start GDB server. It is needed to be done in a separate terminal before we
# can invoke `gdb` target
gdbserver:
/opt/SEGGER/JLink_V610g/JLinkGDBServer -device NRF52 -speed 4000 -if SWD
# run GDB (for that to work, `make gdbserver` should run in parallel)
gdb:
arm-none-eabi-gdb
# start JLinkExe; it is needed to be done in a separate terminal before we
# can invoke `rtt` target
jlinkexe:
/opt/SEGGER/JLink_V610g/JLinkExe -device NRF52 -speed 4000 -if SWD
# run RTT client (for that to work, `make jlinkexe` should run in parallel)
rtt:
/opt/SEGGER/JLink_V610g/JLinkRTTClient

View File

@ -1,38 +1,3 @@
# nRF52 example project
This example shows how to use mongoose on nRF52 boards.
To run it you will need:
- [nRF52 DK](https://www.nordicsemi.com/Products/Getting-started-with-the-nRF52-Development-Kit) dev board
- Linux machine with 6lowpan module enabled. There are a few tutorials out there,
e.g [this one](https://devzone.nordicsemi.com/blogs/972/setting-up-ipv6-over-ble-using-nrf52-series-and-co/)
- [Docker](https://docs.docker.com/engine/installation/linux/)
## Building firmware and cleaning
Nothing special: `make` and `make clean`.
## Flashing
`make flash`
## Watch debug output
This is a two-step process:
- In a separate terminal, invoke `make jlinkexe`. It will run `JLinkExe`
utility, in which you'll need to type `connect`. You can actually do a lot of
things there, including halting and stopping the target, flashing firmware,
etc. You can type `?` to get the list of all available commands.
- Now, in another terminal, invoke `make rtt`. It will start RTT client which
will connect to the running `JLinkExe` and will show logs from the device.
## Debug with GDB
This is a two-step process:
- In a separate terminal, invoke `make gdbserver`. Note that `make jlinkexe`
and `make gdbserver`, unfortunately, cannot run sumultaneously.
- Now, in another terminal, invoke `make gdb`. It will start GDB session which
will connect to the running GDB server.
This is a Mongoose "Hello, world" that can be compiled under nRF IoT SDK.
To make it work, you should download [nRF5 IoT SDK](http://developer.nordicsemi.com/nRF5_IoT_SDK/) and unpack it in current directory as `nrf5_iot_sdk`.

View File

@ -1,8 +0,0 @@
/*
* Copyright (c) 2014-2016 Cesanta Software Limited
* All rights reserved
*/
#if !defined(COMMISSIONING_ENABLED) /* ifdef-ok */
# define COMMISSIONING_ENABLED 0
#endif

View File

@ -1,490 +0,0 @@
/*
Copyright (c) 2015, Nordic Semiconductor ASA
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Nordic Semiconductor ASA nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
NOTE: Template files (including this one) are application specific and therefore
expected to be copied into the application project folder prior to its use!
*/
.syntax unified
.arch armv7e-m
.section .stack
.align 3
#ifdef __STACK_SIZE
.equ Stack_Size, __STACK_SIZE
#else
.equ Stack_Size, 4096
#endif
.globl __StackTop
.globl __StackLimit
__StackLimit:
.space Stack_Size
.size __StackLimit, . - __StackLimit
__StackTop:
.size __StackTop, . - __StackTop
.section .heap
.align 3
#ifdef __HEAP_SIZE
.equ Heap_Size, __HEAP_SIZE
#else
.equ Heap_Size, 4096
#endif
.globl __HeapBase
.globl __HeapLimit
__HeapBase:
.if Heap_Size
.space Heap_Size
.endif
.size __HeapBase, . - __HeapBase
__HeapLimit:
.size __HeapLimit, . - __HeapLimit
.section .Vectors
.align 2
.globl __Vectors
__Vectors:
.long __StackTop /* Top of Stack */
.long Reset_Handler
.long NMI_Handler
.long HardFault_Handler
.long MemoryManagement_Handler
.long BusFault_Handler
.long UsageFault_Handler
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long SVC_Handler
.long 0 /*Reserved */
.long 0 /*Reserved */
.long PendSV_Handler
.long SysTick_Handler
/* External Interrupts */
.long POWER_CLOCK_IRQHandler
.long RADIO_IRQHandler
.long UARTE0_UART0_IRQHandler
.long SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
.long SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
.long NFCT_IRQHandler
.long GPIOTE_IRQHandler
.long SAADC_IRQHandler
.long TIMER0_IRQHandler
.long TIMER1_IRQHandler
.long TIMER2_IRQHandler
.long RTC0_IRQHandler
.long TEMP_IRQHandler
.long RNG_IRQHandler
.long ECB_IRQHandler
.long CCM_AAR_IRQHandler
.long WDT_IRQHandler
.long RTC1_IRQHandler
.long QDEC_IRQHandler
.long COMP_LPCOMP_IRQHandler
.long SWI0_EGU0_IRQHandler
.long SWI1_EGU1_IRQHandler
.long SWI2_EGU2_IRQHandler
.long SWI3_EGU3_IRQHandler
.long SWI4_EGU4_IRQHandler
.long SWI5_EGU5_IRQHandler
.long TIMER3_IRQHandler
.long TIMER4_IRQHandler
.long PWM0_IRQHandler
.long PDM_IRQHandler
.long 0 /*Reserved */
.long 0 /*Reserved */
.long MWU_IRQHandler
.long PWM1_IRQHandler
.long PWM2_IRQHandler
.long SPIM2_SPIS2_SPI2_IRQHandler
.long RTC2_IRQHandler
.long I2S_IRQHandler
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.long 0 /*Reserved */
.size __Vectors, . - __Vectors
/* Reset Handler */
.text
.thumb
.thumb_func
.align 1
.globl Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
.fnstart
/* Loop to copy data from read only memory to RAM. The ranges
* of copy from/to are specified by following symbols evaluated in
* linker script.
* __etext: End of code section, i.e., begin of data sections to copy from.
* __data_start__/__data_end__: RAM address range that data should be
* copied to. Both must be aligned to 4 bytes boundary. */
ldr r1, =__etext
ldr r2, =__data_start__
ldr r3, =__data_end__
subs r3, r2
ble .LC0
.LC1:
subs r3, 4
ldr r0, [r1,r3]
str r0, [r2,r3]
bgt .LC1
.LC0:
LDR R0, =SystemInit
BLX R0
LDR R0, =_start
BX R0
.pool
.cantunwind
.fnend
.size Reset_Handler,.-Reset_Handler
.section ".text"
/* Dummy Exception Handlers (infinite loops which can be modified) */
.weak NMI_Handler
.type NMI_Handler, %function
NMI_Handler:
B .
.size NMI_Handler, . - NMI_Handler
.weak HardFault_Handler
.type HardFault_Handler, %function
HardFault_Handler:
B .
.size HardFault_Handler, . - HardFault_Handler
.weak MemoryManagement_Handler
.type MemoryManagement_Handler, %function
MemoryManagement_Handler:
B .
.size MemoryManagement_Handler, . - MemoryManagement_Handler
.weak BusFault_Handler
.type BusFault_Handler, %function
BusFault_Handler:
B .
.size BusFault_Handler, . - BusFault_Handler
.weak UsageFault_Handler
.type UsageFault_Handler, %function
UsageFault_Handler:
B .
.size UsageFault_Handler, . - UsageFault_Handler
.weak SVC_Handler
.type SVC_Handler, %function
SVC_Handler:
B .
.size SVC_Handler, . - SVC_Handler
.weak PendSV_Handler
.type PendSV_Handler, %function
PendSV_Handler:
B .
.size PendSV_Handler, . - PendSV_Handler
.weak SysTick_Handler
.type SysTick_Handler, %function
SysTick_Handler:
B .
.size SysTick_Handler, . - SysTick_Handler
/* IRQ Handlers */
.globl Default_Handler
.type Default_Handler, %function
Default_Handler:
B .
.size Default_Handler, . - Default_Handler
.macro IRQ handler
.weak \handler
.set \handler, Default_Handler
.endm
IRQ POWER_CLOCK_IRQHandler
IRQ RADIO_IRQHandler
IRQ UARTE0_UART0_IRQHandler
IRQ SPIM0_SPIS0_TWIM0_TWIS0_SPI0_TWI0_IRQHandler
IRQ SPIM1_SPIS1_TWIM1_TWIS1_SPI1_TWI1_IRQHandler
IRQ NFCT_IRQHandler
IRQ GPIOTE_IRQHandler
IRQ SAADC_IRQHandler
IRQ TIMER0_IRQHandler
IRQ TIMER1_IRQHandler
IRQ TIMER2_IRQHandler
IRQ RTC0_IRQHandler
IRQ TEMP_IRQHandler
IRQ RNG_IRQHandler
IRQ ECB_IRQHandler
IRQ CCM_AAR_IRQHandler
IRQ WDT_IRQHandler
IRQ RTC1_IRQHandler
IRQ QDEC_IRQHandler
IRQ COMP_LPCOMP_IRQHandler
IRQ SWI0_EGU0_IRQHandler
IRQ SWI1_EGU1_IRQHandler
IRQ SWI2_EGU2_IRQHandler
IRQ SWI3_EGU3_IRQHandler
IRQ SWI4_EGU4_IRQHandler
IRQ SWI5_EGU5_IRQHandler
IRQ TIMER3_IRQHandler
IRQ TIMER4_IRQHandler
IRQ PWM0_IRQHandler
IRQ PDM_IRQHandler
IRQ MWU_IRQHandler
IRQ PWM1_IRQHandler
IRQ PWM2_IRQHandler
IRQ SPIM2_SPIS2_SPI2_IRQHandler
IRQ RTC2_IRQHandler
IRQ I2S_IRQHandler
.end

View File

@ -1,7 +1,3 @@
/*
* Copyright (c) 2014-2016 Cesanta Software Limited
* All rights reserved
*/
/* clang-format off */
@ -35,12 +31,11 @@
#include "ipv6_medium.h"
#include "SEGGER_RTT.h"
#include "myboard.h"
#include "app_cfg.h"
#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. */
#if COMMISSIONING_ENABLED
#ifdef COMMISSIONING_ENABLED
#define ERASE_BUTTON_PIN_NO BSP_BUTTON_3 /**< Button used to erase commissioning settings. */
#endif // COMMISSIONING_ENABLED
@ -71,7 +66,7 @@ static ipv6_medium_instance_t m_ipv6_medium;
static struct tcp_pcb * mp_tcp_port; /**< TCP Port to listen on. */
static tcp_state_t m_tcp_state; /**< TCP State information. */
#if COMMISSIONING_ENABLED
#ifdef COMMISSIONING_ENABLED
static bool m_power_off_on_failure = false;
static bool m_identity_mode_active;
#endif // COMMISSIONING_ENABLED
@ -79,7 +74,7 @@ static bool m_identity_mode_active;
/**@brief Function to handle interface up event. */
void nrf_driver_interface_up(void)
{
#if COMMISSIONING_ENABLED
#ifdef COMMISSIONING_ENABLED
commissioning_joining_mode_timer_ctrl(JOINING_MODE_TIMER_STOP_RESET);
#endif // COMMISSIONING_ENABLED
@ -97,7 +92,7 @@ void nrf_driver_interface_up(void)
/**@brief Function to handle interface down event. */
void nrf_driver_interface_down(void)
{
#if COMMISSIONING_ENABLED
#ifdef COMMISSIONING_ENABLED
commissioning_joining_mode_timer_ctrl(JOINING_MODE_TIMER_START);
#endif // COMMISSIONING_ENABLED
@ -156,7 +151,7 @@ static void leds_init(void)
LEDS_OFF(ALL_APP_LED);
}
#if COMMISSIONING_ENABLED
#ifdef COMMISSIONING_ENABLED
/**@brief Timer callback used for controlling board LEDs to represent application state.
*
*/
@ -211,7 +206,7 @@ static void iot_timer_init(void)
static const iot_timer_client_t list_of_clients[] =
{
{system_timer_callback, LWIP_SYS_TICK_MS},
#if COMMISSIONING_ENABLED
#ifdef COMMISSIONING_ENABLED
{blink_timeout_handler, LED_BLINK_INTERVAL_MS},
{commissioning_time_tick, SEC_TO_MILLISEC(COMMISSIONING_TICK_INTERVAL_SEC)}
#endif // COMMISSIONING_ENABLED
@ -258,7 +253,7 @@ static void ip_stack_init(void)
APP_ERROR_CHECK(err_code);
}
#if COMMISSIONING_ENABLED
#ifdef COMMISSIONING_ENABLED
/**@brief Function for handling button events.
*
* @param[in] pin_no The pin number of the button pressed.
@ -286,7 +281,7 @@ static void buttons_init(void)
static app_button_cfg_t buttons[] =
{
#if COMMISSIONING_ENABLED
#ifdef COMMISSIONING_ENABLED
{ERASE_BUTTON_PIN_NO, false, BUTTON_PULL, button_event_handler}
#endif // COMMISSIONING_ENABLED
};
@ -340,7 +335,7 @@ static void on_ipv6_medium_error(ipv6_medium_error_t * p_ipv6_medium_error)
// Do something.
}
#if COMMISSIONING_ENABLED
#ifdef COMMISSIONING_ENABLED
void commissioning_id_mode_cb(mode_control_cmd_t control_command)
{
switch (control_command)
@ -386,7 +381,7 @@ void bleconfig_init(void) {
timers_init();
iot_timer_init();
#if COMMISSIONING_ENABLED
#ifdef COMMISSIONING_ENABLED
err_code = pstorage_init();
APP_ERROR_CHECK(err_code);
@ -398,7 +393,7 @@ void bleconfig_init(void) {
ipv6_medium_init_params.ipv6_medium_evt_handler = on_ipv6_medium_evt;
ipv6_medium_init_params.ipv6_medium_error_handler = on_ipv6_medium_error;
ipv6_medium_init_params.use_scheduler = true;
#if COMMISSIONING_ENABLED
#ifdef COMMISSIONING_ENABLED
ipv6_medium_init_params.commissioning_id_mode_cb = commissioning_id_mode_cb;
ipv6_medium_init_params.commissioning_power_off_cb = commissioning_power_off_cb;
#endif // COMMISSIONING_ENABLED

View File

@ -0,0 +1,886 @@
<?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>nrf52832_xxaa_s1xx_iot</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<TargetCommonOption>
<Device>nRF52832_xxAA</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,0x80000) IRAM(0x20000000,0x10000) CPUTYPE("Cortex-M4") FPU2 CLOCK(64000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
<FlashDriverDll>UL2CM3(-UM0364FCE -O78 -S0 -C0 -TO18 -TC16000000 -TP21 -TDS800D -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF52xxx -FS00 -FL0200000)</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\nrf52.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>nrf52832_xxaa_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>-MPU</TargetDllArguments>
<TargetDlgDll>TCM.DLL</TargetDlgDll>
<TargetDlgDllArguments>-pCM4</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-M4"</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>2</RvdsVP>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
<useUlib>0</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>0x10000</Size>
</IRAM>
<IROM>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x80000</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>0x1f000</StartAddress>
<Size>0x61000</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>0x20002800</StartAddress>
<Size>0xd800</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>1</wLevel>
<uThumb>0</uThumb>
<uSurpInc>0</uSurpInc>
<uC99>0</uC99>
<useXO>0</useXO>
<VariousControls>
<MiscControls>--c99</MiscControls>
<Define>__HEAP_SIZE=4096 BLE_STACK_SUPPORT_REQD BOARD_PCA10040 CONFIG_GPIO_AS_PINRESET s1xx SOFTDEVICE_PRESENT NRF52 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_NRF52 CS_ENABLE_STDIO NRF_LOG_USES_RTT ENABLE_DEBUG_LOG_SUPPORT</Define>
<Undefine></Undefine>
<IncludePath>..\..\..\config;..\..\..\..\nrf5_iot_sdk\examples\bsp;..\..\..\..\nrf5_iot_sdk\components\device;..\..\..\..\nrf5_iot_sdk\components\toolchain;..\..\..\..\nrf5_iot_sdk\components\ble\common;..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\common;..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\delay;..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\gpiote;..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\hal;..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\pstorage;..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\uart;..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\config;..\..\..\..\nrf5_iot_sdk\components\iot\ble_6lowpan;..\..\..\..\nrf5_iot_sdk\components\iot\ble_ipsp;..\..\..\..\nrf5_iot_sdk\components\iot\common;..\..\..\..\nrf5_iot_sdk\components\iot\context_manager;..\..\..\..\nrf5_iot_sdk\components\iot\include;..\..\..\..\nrf5_iot_sdk\components\iot\errno;..\..\..\..\nrf5_iot_sdk\components\iot\iot_timer;..\..\..\..\nrf5_iot_sdk\components\iot\medium;..\..\..\..\nrf5_iot_sdk\components\iot\medium\ble_ncfgs;..\..\..\..\nrf5_iot_sdk\components\iot\medium\include;..\..\..\..\nrf5_iot_sdk\components\iot\medium\commissioning;..\..\..\..\nrf5_iot_sdk\components\libraries\button;..\..\..\..\nrf5_iot_sdk\components\libraries\fifo;..\..\..\..\nrf5_iot_sdk\components\libraries\mem_manager;..\..\..\..\nrf5_iot_sdk\components\libraries\scheduler;..\..\..\..\nrf5_iot_sdk\components\libraries\timer;..\..\..\..\nrf5_iot_sdk\components\libraries\trace;..\..\..\..\nrf5_iot_sdk\components\libraries\uart;..\..\..\..\nrf5_iot_sdk\components\libraries\util;..\..\..\..\nrf5_iot_sdk\components\softdevice\common\softdevice_handler;..\..\..\..\nrf5_iot_sdk\components\softdevice\s1xx_iot\headers;..\..\..\..\nrf5_iot_sdk\components\softdevice\s1xx_iot\headers\nrf52;..\..\..\..\nrf5_iot_sdk\external\lwip\src\include;..\..\..\..\nrf5_iot_sdk\external\lwip\src\include\netif;..\..\..\..\nrf5_iot_sdk\external\lwip\src\include\lwip;..\..\..\..\nrf5_iot_sdk\external\lwip\src\port;..\..\..\..\nrf5_iot_sdk\external\lwip\src\port\arch;..\..\..;..\..\..\rtt\RTT;..\..\..\rtt\Syscalls;..\..\..\..\..\..</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=4096 BLE_STACK_SUPPORT_REQD BOARD_PCA10040 CONFIG_GPIO_AS_PINRESET s1xx SOFTDEVICE_PRESENT NRF52 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>sdk_config.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\config\sdk_config.h</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>Board Support</GroupName>
<Files>
<File>
<FileName>bsp.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\examples\bsp\bsp.c</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>lwIP</GroupName>
<Files>
<File>
<FileName>def.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\def.c</FilePath>
</File>
<File>
<FileName>dhcp.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\dhcp.c</FilePath>
</File>
<File>
<FileName>dhcp6.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\dhcp6.c</FilePath>
</File>
<File>
<FileName>dns.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\dns.c</FilePath>
</File>
<File>
<FileName>icmp.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv4\icmp.c</FilePath>
</File>
<File>
<FileName>icmp6.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\icmp6.c</FilePath>
</File>
<File>
<FileName>inet6.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\inet6.c</FilePath>
</File>
<File>
<FileName>inet_chksum.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\inet_chksum.c</FilePath>
</File>
<File>
<FileName>init.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\init.c</FilePath>
</File>
<File>
<FileName>ip4.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv4\ip4.c</FilePath>
</File>
<File>
<FileName>ip4_addr.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv4\ip4_addr.c</FilePath>
</File>
<File>
<FileName>ip6.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\ip6.c</FilePath>
</File>
<File>
<FileName>ip6_addr.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\ip6_addr.c</FilePath>
</File>
<File>
<FileName>memp.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\memp.c</FilePath>
</File>
<File>
<FileName>mld6.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\mld6.c</FilePath>
</File>
<File>
<FileName>nd6.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\nd6.c</FilePath>
</File>
<File>
<FileName>netif.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\netif.c</FilePath>
</File>
<File>
<FileName>nrf_platform_port.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\port\nrf_platform_port.c</FilePath>
</File>
<File>
<FileName>pbuf.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\pbuf.c</FilePath>
</File>
<File>
<FileName>raw.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\raw.c</FilePath>
</File>
<File>
<FileName>sys.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\sys.c</FilePath>
</File>
<File>
<FileName>tcp.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\tcp.c</FilePath>
</File>
<File>
<FileName>tcp_in.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\tcp_in.c</FilePath>
</File>
<File>
<FileName>tcp_out.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\tcp_out.c</FilePath>
</File>
<File>
<FileName>timers.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\timers.c</FilePath>
</File>
<File>
<FileName>udp.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\udp.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>nRF_BLE</GroupName>
<Files>
<File>
<FileName>ble_advdata.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\ble\common\ble_advdata.c</FilePath>
</File>
<File>
<FileName>ble_conn_params.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\ble\common\ble_conn_params.c</FilePath>
</File>
<File>
<FileName>ble_srv_common.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_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>..\..\..\..\nrf5_iot_sdk\components\libraries\uart\app_uart_fifo.c</FilePath>
</File>
<File>
<FileName>nrf_delay.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\delay\nrf_delay.c</FilePath>
</File>
<File>
<FileName>nrf_drv_common.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\common\nrf_drv_common.c</FilePath>
</File>
<File>
<FileName>nrf_drv_gpiote.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\gpiote\nrf_drv_gpiote.c</FilePath>
</File>
<File>
<FileName>nrf_drv_uart.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\uart\nrf_drv_uart.c</FilePath>
</File>
<File>
<FileName>pstorage.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\pstorage\pstorage.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>nRF_IoT</GroupName>
<Files>
<File>
<FileName>ble_6lowpan.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\iot\ble_6lowpan\lib\ble_6lowpan.lib</FilePath>
</File>
<File>
<FileName>errno.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\iot\errno\errno.c</FilePath>
</File>
<File>
<FileName>iot_context_manager.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\iot\context_manager\iot_context_manager.c</FilePath>
</File>
<File>
<FileName>iot_timer.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\iot\iot_timer\iot_timer.c</FilePath>
</File>
<File>
<FileName>ipv6_medium_ble.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\iot\medium\ipv6_medium_ble.c</FilePath>
</File>
<File>
<FileName>ipv6_parse.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\iot\common\ipv6_parse.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>nRF_IoT_Commissioning</GroupName>
<Files>
<File>
<FileName>ble_ncfgs.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\iot\medium\ble_ncfgs\ble_ncfgs.c</FilePath>
</File>
<File>
<FileName>commissioning.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\iot\medium\commissioning\commissioning.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>nRF_Libraries</GroupName>
<Files>
<File>
<FileName>app_button.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\libraries\button\app_button.c</FilePath>
</File>
<File>
<FileName>app_error.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\libraries\util\app_error.c</FilePath>
</File>
<File>
<FileName>app_fifo.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\libraries\fifo\app_fifo.c</FilePath>
</File>
<File>
<FileName>app_scheduler.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\libraries\scheduler\app_scheduler.c</FilePath>
</File>
<File>
<FileName>app_timer.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\libraries\timer\app_timer.c</FilePath>
</File>
<File>
<FileName>app_timer_appsh.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\libraries\timer\app_timer_appsh.c</FilePath>
</File>
<File>
<FileName>app_trace.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\libraries\trace\app_trace.c</FilePath>
</File>
<File>
<FileName>mem_manager.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\libraries\mem_manager\mem_manager.c</FilePath>
</File>
<File>
<FileName>nrf_assert.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\libraries\util\nrf_assert.c</FilePath>
</File>
<File>
<FileName>retarget.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\libraries\uart\retarget.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>nRF_SoftDevice</GroupName>
<Files>
<File>
<FileName>softdevice_handler.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\softdevice\common\softdevice_handler\softdevice_handler.c</FilePath>
</File>
<File>
<FileName>softdevice_handler_appsh.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\nrf5_iot_sdk\components\softdevice\common\softdevice_handler\softdevice_handler_appsh.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>RTT</GroupName>
<Files>
<File>
<FileName>SEGGER_RTT.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\rtt\RTT\SEGGER_RTT.c</FilePath>
</File>
<File>
<FileName>SEGGER_RTT.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\rtt\RTT\SEGGER_RTT.h</FilePath>
</File>
<File>
<FileName>SEGGER_RTT_Conf.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\rtt\RTT\SEGGER_RTT_Conf.h</FilePath>
</File>
<File>
<FileName>SEGGER_RTT_printf.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\rtt\RTT\SEGGER_RTT_printf.c</FilePath>
</File>
<File>
<FileName>RTT_Syscalls_KEIL.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\rtt\Syscalls\RTT_Syscalls_KEIL.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_nrf52.s</FileName>
<FileType>2</FileType>
<FilePath>RTE\Device\nRF52832_xxAA\arm_startup_nrf52.s</FilePath>
</File>
<File>
<FileName>system_nrf52.c</FileName>
<FileType>1</FileType>
<FilePath>RTE\Device\nRF52832_xxAA\system_nrf52.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="nrf52832_xxaa_s1xx_iot" versionMatchMode="fixed"/>
</targetInfos>
</package>
<package name="nRF_DeviceFamilyPack" schemaVersion="1.0" url="http://developer.nordicsemi.com/nRF51_SDK/pieces/nRF_DeviceFamilyPack/" vendor="NordicSemiconductor" version="8.0.5">
<targetInfos>
<targetInfo name="nrf52832_xxaa_s1xx_iot" versionMatchMode="fixed"/>
</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="nrf52832_xxaa_s1xx_iot" versionMatchMode="fixed"/>
</targetInfos>
</component>
<component Cclass="Device" Cgroup="Startup" Cvendor="NordicSemiconductor" Cversion="8.0.5" 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="8.0.5"/>
<targetInfos>
<targetInfo name="nrf52832_xxaa_s1xx_iot" versionMatchMode="fixed"/>
</targetInfos>
</component>
</components>
<files>
<file attr="config" category="source" condition="ARM Compiler" name="Device\Source\arm\arm_startup_nrf52.s">
<instance index="0">RTE\Device\nRF52832_xxAA\arm_startup_nrf52.s</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="NordicSemiconductor" Cversion="8.0.5" condition="nRF52 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="nrf52832_xxaa_s1xx_iot"/>
</targetInfos>
</file>
<file attr="config" category="source" name="Device\Source\system_nrf52.c">
<instance index="0">RTE\Device\nRF52832_xxAA\system_nrf52.c</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="NordicSemiconductor" Cversion="8.0.5" condition="nRF52 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="nrf52832_xxaa_s1xx_iot"/>
</targetInfos>
</file>
</files>
</RTE>
</Project>

View File

@ -0,0 +1,2 @@
target extended-remote localhost:2331
file _build/nrf52832_xxaa_s1xx_iot.out

View File

@ -0,0 +1,304 @@
PROJECT_NAME := iot_lwip_tcp_server_pca10040
export OUTPUT_FILENAME
#MAKEFILE_NAME := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
MAKEFILE_NAME := $(MAKEFILE_LIST)
MAKEFILE_DIR := $(dir $(MAKEFILE_NAME) )
TEMPLATE_PATH = ../../../../nrf5_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 += \
$(abspath ../../../../nrf5_iot_sdk/components/libraries/button/app_button.c) \
$(abspath ../../../../nrf5_iot_sdk/components/libraries/util/app_error.c) \
$(abspath ../../../../nrf5_iot_sdk/components/libraries/fifo/app_fifo.c) \
$(abspath ../../../../nrf5_iot_sdk/components/libraries/scheduler/app_scheduler.c) \
$(abspath ../../../../nrf5_iot_sdk/components/libraries/timer/app_timer.c) \
$(abspath ../../../../nrf5_iot_sdk/components/libraries/timer/app_timer_appsh.c) \
$(abspath ../../../../nrf5_iot_sdk/components/libraries/trace/app_trace.c) \
$(abspath ../../../../nrf5_iot_sdk/components/libraries/mem_manager/mem_manager.c) \
$(abspath ../../../../nrf5_iot_sdk/components/libraries/util/nrf_assert.c) \
$(abspath ../../../../nrf5_iot_sdk/components/libraries/uart/retarget.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/def.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/dhcp.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/ipv6/dhcp6.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/dns.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/ipv4/icmp.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/ipv6/icmp6.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/ipv6/inet6.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/inet_chksum.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/init.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/ipv4/ip4.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/ipv4/ip4_addr.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/ipv6/ip6.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/ipv6/ip6_addr.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/memp.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/ipv6/mld6.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/ipv6/nd6.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/netif.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/port/nrf_platform_port.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/pbuf.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/raw.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/sys.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/tcp.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/tcp_in.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/tcp_out.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/timers.c) \
$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/core/udp.c) \
$(abspath ../../../../nrf5_iot_sdk/components/libraries/uart/app_uart_fifo.c) \
$(abspath ../../../../nrf5_iot_sdk/components/drivers_nrf/delay/nrf_delay.c) \
$(abspath ../../../../nrf5_iot_sdk/components/drivers_nrf/common/nrf_drv_common.c) \
$(abspath ../../../../nrf5_iot_sdk/components/drivers_nrf/gpiote/nrf_drv_gpiote.c) \
$(abspath ../../../../nrf5_iot_sdk/components/drivers_nrf/uart/nrf_drv_uart.c) \
$(abspath ../../../../nrf5_iot_sdk/components/drivers_nrf/pstorage/pstorage.c) \
$(abspath ../../../../nrf5_iot_sdk/examples/bsp/bsp.c) \
$(abspath ../../../main.c) \
$(abspath ../../../bleconfig.c) \
$(abspath ../../../../../../mongoose.c) \
$(abspath ../../../rtt/RTT/SEGGER_RTT.c) \
$(abspath ../../../rtt/RTT/SEGGER_RTT_printf.c) \
$(abspath ../../../rtt/Syscalls/RTT_Syscalls_GCC.c) \
$(abspath ../../../../nrf5_iot_sdk/components/ble/common/ble_advdata.c) \
$(abspath ../../../../nrf5_iot_sdk/components/ble/common/ble_conn_params.c) \
$(abspath ../../../../nrf5_iot_sdk/components/ble/common/ble_srv_common.c) \
$(abspath ../../../../nrf5_iot_sdk/components/iot/errno/errno.c) \
$(abspath ../../../../nrf5_iot_sdk/components/iot/context_manager/iot_context_manager.c) \
$(abspath ../../../../nrf5_iot_sdk/components/iot/iot_timer/iot_timer.c) \
$(abspath ../../../../nrf5_iot_sdk/components/iot/medium/ipv6_medium_ble.c) \
$(abspath ../../../../nrf5_iot_sdk/components/iot/common/ipv6_parse.c) \
$(abspath ../../../../nrf5_iot_sdk/components/toolchain/system_nrf52.c) \
$(abspath ../../../../nrf5_iot_sdk/components/iot/medium/ble_ncfgs/ble_ncfgs.c) \
$(abspath ../../../../nrf5_iot_sdk/components/iot/medium/commissioning/commissioning.c) \
$(abspath ../../../../nrf5_iot_sdk/components/softdevice/common/softdevice_handler/softdevice_handler.c) \
$(abspath ../../../../nrf5_iot_sdk/components/softdevice/common/softdevice_handler/softdevice_handler_appsh.c) \
#assembly files common to all targets
ASM_SOURCE_FILES = $(abspath ../../../../nrf5_iot_sdk/components/toolchain/gcc/gcc_startup_nrf52.s)
#assembly files common to all targets
LIBS = $(abspath ../../../../nrf5_iot_sdk/components/iot/ble_6lowpan/lib/ble_6lowpan.a)
#includes common to all targets
INC_PATHS = -I$(abspath ../../../config)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/iot/errno)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/softdevice/s1xx_iot/headers)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/drivers_nrf/common)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/softdevice/common/softdevice_handler)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/include)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/iot/ble_6lowpan)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/drivers_nrf/hal)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/ble/common)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/port)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/libraries/fifo)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/libraries/trace)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/device)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/libraries/uart)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/iot/medium)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/drivers_nrf/config)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/libraries/mem_manager)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/drivers_nrf/uart)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/iot/ble_ipsp)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/libraries/scheduler)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/iot/iot_timer)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/include/netif)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/iot/medium/commissioning)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/iot/include)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/drivers_nrf/pstorage)
INC_PATHS += -I$(abspath ../../..)
INC_PATHS += -I$(abspath ../../../../../..)
INC_PATHS += -I$(abspath ../../../rtt/RTT)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/iot/context_manager)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/toolchain/gcc)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/drivers_nrf/delay)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/iot/medium/ble_ncfgs)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/drivers_nrf/gpiote)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/softdevice/s1xx_iot/headers/nrf52)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/include/lwip)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/iot/common)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/libraries/timer)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/external/lwip/src/port/arch)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/libraries/button)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/libraries/util)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/examples/bsp)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/toolchain)
INC_PATHS += -I$(abspath ../../../../nrf5_iot_sdk/components/iot/medium/include)
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) )
# Mongoose features
MG_FEATURES_TINY = \
-DMG_DISABLE_HTTP_DIGEST_AUTH \
-DMG_DISABLE_MD5 \
-DMG_DISABLE_HTTP_KEEP_ALIVE \
-DMG_ENABLE_HTTP_SSI=0 \
-DMG_ENABLE_HTTP_STREAMING_MULTIPART \
-DMG_NO_BSD_SOCKETS
#flags common to all targets
CFLAGS = -D__HEAP_SIZE=4096
#CFLAGS += -DCOMMISSIONING_ENABLED
CFLAGS += -DSWI_DISABLE0
CFLAGS += -DSOFTDEVICE_PRESENT
CFLAGS += -DBOARD_PCA10040
CFLAGS += -DNRF52
CFLAGS += -DCONFIG_GPIO_AS_PINRESET
CFLAGS += -DBLE_STACK_SUPPORT_REQD
CFLAGS += -Ds1xx
CFLAGS += -mcpu=cortex-m4
CFLAGS += -mthumb -mabi=aapcs --std=gnu99
CFLAGS += -w -g3 -O3
CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
# 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
CFLAGS += -DCS_ENABLE_STDIO
# This macro is needed for stdout to be retargeted to either UART or RTT
CFLAGS += -DENABLE_DEBUG_LOG_SUPPORT
# Don't retarget stdout to UART; it'll be retargeted to RTT
CFLAGS += -DNRF_LOG_USES_RTT
# Mongoose flags
CFLAGS += -DCS_PLATFORM=CS_P_NRF52 $(MG_FEATURES_TINY) -DMG_MODULE_LINES
# 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-m4
LDFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
# 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=4096
ASMFLAGS += -DSWI_DISABLE0
ASMFLAGS += -DSOFTDEVICE_PRESENT
ASMFLAGS += -DBOARD_PCA10040
ASMFLAGS += -DNRF52
ASMFLAGS += -DCONFIG_GPIO_AS_PINRESET
ASMFLAGS += -DENABLE_DEBUG_LOG_SUPPORT
ASMFLAGS += -DBLE_STACK_SUPPORT_REQD
ASMFLAGS += -Ds1xx
ASMFLAGS += -g3
#building all targets
all: nrf52832_xxaa_s1xx_iot
#target for printing all targets
help:
@echo following targets are available:
@echo nrf52832_xxaa_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)
nrf52832_xxaa_s1xx_iot: OUTPUT_FILENAME := nrf52832_xxaa_s1xx_iot
nrf52832_xxaa_s1xx_iot: LINKER_SCRIPT=iot_lwip_tcp_server_gcc_nrf52.ld
nrf52832_xxaa_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 Assembly 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)/nrf52832_xxaa_s1xx_iot.hex
nrfjprog --program $(OUTPUT_BINARY_DIRECTORY)/nrf52832_xxaa_s1xx_iot.hex -f nrf52 --sectorerase
nrfjprog --reset -f nrf52
## Flash softdevice

View File

@ -1,5 +1,5 @@
SDK ?= $(shell cat sdk.version)
SRC_DIR ?= $(realpath ../../..)
SRC_DIR ?= $(realpath ../../../../../../..)
.PHONY: all clean flash gdbserver gdb jlinkexe rtt
@ -22,5 +22,6 @@ all clean flash gdbserver gdb jlinkexe rtt:
$(V)docker run --rm -it $(ADD_DOCKER_ARGS) -v $(SRC_DIR):/src $(SDK) \
/bin/bash -c "\
make -C /src/mongoose mongoose.c mongoose.h && \
make -C /src/mongoose/examples/nRF52 -f Makefile.build $@ -$(MAKEFLAGS) \
if [ ! -e /src/mongoose/examples/nRF52/nrf5_iot_sdk ]; then ln -s /opt/nrf5_iot_sdk /src/mongoose/examples/nRF52/nrf5_iot_sdk; fi && \
make -C /src/mongoose/examples/nRF52/http/boards/pca10040/armgcc $@ -$(MAKEFLAGS) \
"

View File

@ -0,0 +1,3 @@
`Makefile` is intended to be used under nRF IoT SDK (see
../../../../README.md); `Makefile.docker` is intended to be used under Cesanta
repository.

View File

@ -9,4 +9,4 @@ MEMORY
RAM (rwx) : ORIGIN = 0x20002800, LENGTH = 0xd800
}
INCLUDE "nrf5x_common.ld"
INCLUDE "nrf5x_common.ld"

View File

@ -6,7 +6,7 @@
#include "bleconfig.h"
#include "myboard.h"
#include "../../mongoose.h"
#include "mongoose.h"
/*
* This is a callback invoked by Mongoose to signal that a poll is needed soon.
@ -72,9 +72,11 @@ int main(void)
// 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_bind_opts opts;
struct mg_connection *nc = NULL;
memset(&opts, 0x00, sizeof(opts));
opts.error_string = &err;
struct mg_connection *nc = mg_bind_opt(&mgr, "80", ev_handler, opts); // Create listening connection and add it to the event manager
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;

View File

@ -27,7 +27,7 @@ Purpose : Implementation of SEGGER real-time terminal which allows
#define SEGGER_RTT_MAX_NUM_UP_BUFFERS (2) // Max. number of up-buffers (T->H) available on this target (Default: 2)
#define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (2) // Max. number of down-buffers (H->T) available on this target (Default: 2)
#define BUFFER_SIZE_UP (512) // Size of the buffer for terminal output of target, up to host (Default: 1k)
#define BUFFER_SIZE_UP (2048) // Size of the buffer for terminal output of target, up to host (Default: 1k)
#define BUFFER_SIZE_DOWN (16) // Size of the buffer for terminal input to target from host (Usually keyboard input) (Default: 16)
#define SEGGER_RTT_PRINTF_BUFFER_SIZE (64) // Size of buffer for RTT printf to bulk-send chars via RTT (Default: 64)

View File

@ -1,164 +0,0 @@
/* Linker script for Nordic Semiconductor nRF5 devices
*
* Version: Sourcery G++ 4.5-1
* Support: https://support.codesourcery.com/GNUToolchain/
*
* Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc.
*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*/
OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
/* Linker script to place sections and symbol values. Should be used together
* with other linker script that defines memory regions FLASH and RAM.
* It references following symbols, which must be defined in code:
* Reset_Handler : Entry of reset handler
*
* It defines following symbols, which code can use without definition:
* __exidx_start
* __exidx_end
* __etext
* __data_start__
* __preinit_array_start
* __preinit_array_end
* __init_array_start
* __init_array_end
* __fini_array_start
* __fini_array_end
* __data_end__
* __bss_start__
* __bss_end__
* __end__
* end
* __HeapLimit
* __StackLimit
* __StackTop
* __stack
*/
ENTRY(Reset_Handler)
SECTIONS
{
.text :
{
KEEP(*(.Vectors))
*(.text*)
KEEP(*(.init))
KEEP(*(.fini))
/* .ctors */
*crtbegin.o(.ctors)
*crtbegin?.o(.ctors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
*(SORT(.ctors.*))
*(.ctors)
/* .dtors */
*crtbegin.o(.dtors)
*crtbegin?.o(.dtors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
*(SORT(.dtors.*))
*(.dtors)
*(.rodata*)
*(.eh_frame*)
. = ALIGN(4);
} > FLASH
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
. = ALIGN(4);
} > FLASH
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
. = ALIGN(4);
} > FLASH
__exidx_end = .;
__etext = .;
.data : AT (__etext)
{
__data_start__ = .;
*(vtable)
*(.data*)
. = ALIGN(4);
/* preinit data */
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP(*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
/* init data */
PROVIDE_HIDDEN (__init_array_start = .);
*(SORT(.init_array.*))
KEEP(*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
/* finit data */
PROVIDE_HIDDEN (__fini_array_start = .);
*(SORT(.fini_array.*))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);
*(.jcr)
. = ALIGN(4);
/* All data end */
__data_end__ = .;
} > RAM
.bss :
{
. = ALIGN(4);
__bss_start__ = .;
*(.bss*)
*(COMMON)
. = ALIGN(4);
__bss_end__ = .;
} > RAM
.heap (COPY):
{
__end__ = .;
end = __end__;
*(.heap*)
__HeapLimit = .;
} > RAM
/* .stack_dummy section doesn't contains any symbols. It is only
* used for linker to calculate size of stack sections, and assign
* values to stack symbols later */
.stack_dummy (COPY):
{
*(.stack*)
} > RAM
/* Set stack top to end of RAM, and stack limit move down by
* size of stack_dummy section */
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
PROVIDE(__stack = __StackTop);
/* Check if data + heap + stack exceeds RAM limit */
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
}