diff --git a/examples/nRF52/.gdbinit b/examples/nRF52/.gdbinit deleted file mode 100644 index 27acd58b..00000000 --- a/examples/nRF52/.gdbinit +++ /dev/null @@ -1,2 +0,0 @@ -target extended-remote localhost:2331 -file out/example.out diff --git a/examples/nRF52/Makefile.build b/examples/nRF52/Makefile.build deleted file mode 100644 index 0b20996e..00000000 --- a/examples/nRF52/Makefile.build +++ /dev/null @@ -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 diff --git a/examples/nRF52/README.md b/examples/nRF52/README.md index 5fde7fb2..17df5227 100644 --- a/examples/nRF52/README.md +++ b/examples/nRF52/README.md @@ -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`. diff --git a/examples/nRF52/config/app_cfg.h b/examples/nRF52/config/app_cfg.h deleted file mode 100644 index 364885d8..00000000 --- a/examples/nRF52/config/app_cfg.h +++ /dev/null @@ -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 diff --git a/examples/nRF52/gcc_startup_nrf52.s b/examples/nRF52/gcc_startup_nrf52.s deleted file mode 100644 index 6b8dec10..00000000 --- a/examples/nRF52/gcc_startup_nrf52.s +++ /dev/null @@ -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 diff --git a/examples/nRF52/bleconfig.c b/examples/nRF52/http/bleconfig.c similarity index 96% rename from examples/nRF52/bleconfig.c rename to examples/nRF52/http/bleconfig.c index dfc96ba0..3ad1bce5 100644 --- a/examples/nRF52/bleconfig.c +++ b/examples/nRF52/http/bleconfig.c @@ -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 diff --git a/examples/nRF52/bleconfig.h b/examples/nRF52/http/bleconfig.h similarity index 100% rename from examples/nRF52/bleconfig.h rename to examples/nRF52/http/bleconfig.h diff --git a/examples/nRF52/http/boards/pca10040/arm5_no_packs/iot_lwip_tcp_server_pca10040.uvoptx b/examples/nRF52/http/boards/pca10040/arm5_no_packs/iot_lwip_tcp_server_pca10040.uvoptx new file mode 100644 index 00000000..baf7a8ae --- /dev/null +++ b/examples/nRF52/http/boards/pca10040/arm5_no_packs/iot_lwip_tcp_server_pca10040.uvoptx @@ -0,0 +1,1228 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + + + + 0 + 0 + + + + nrf52832_xxaa_s1xx_iot + 0x4 + ARM-ADS + + 64000000 + + 1 + 1 + 0 + 1 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\_build\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 1 + + 5 + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 0 + 1 + 1 + 0 + 0 + 6 + + + + + + + + + + + Segger\JL2CM3.dll + + + + 0 + DLGUARM + + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + JL2CM3 + -U682204544 -O78 -S0 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN2 -FF0nrf52xxx.flm -FS00 -FL0200000 -FP0($$Device:nRF52832_xxAA$Flash\nrf52xxx.flm) -FF1nrf52xxx_uicr.flm -FS110001000 -FL11000 -FP1($$Device:nRF52832_xxAA$Flash\nrf52xxx_uicr.flm) + + + 0 + UL2CM3 + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0nrf52xxx -FS00 -FL0200000 -FP0($$Device:nRF52832_xxAA$Flash\nrf52xxx)) + + + + + 0 + 0 + 23 + 1 +
152422
+ 0 + 0 + 0 + 0 + 0 + 1 + ..\..\..\main.c + + +
+
+ + 0 + + + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + +
+
+ + + Application + 1 + 0 + 0 + 0 + + 1 + 1 + 1 + 0 + 0 + 0 + 0 + ..\..\..\main.c + main.c + 0 + 0 + + + 1 + 2 + 5 + 0 + 0 + 0 + 0 + ..\..\..\config\sdk_config.h + sdk_config.h + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 0 + 0 + ..\..\..\bleconfig.c + bleconfig.c + 0 + 0 + + + 1 + 4 + 5 + 0 + 0 + 0 + 0 + ..\..\..\bleconfig.h + bleconfig.h + 0 + 0 + + + 1 + 5 + 5 + 0 + 0 + 0 + 0 + ..\..\..\myboard.h + myboard.h + 0 + 0 + + + + + Board Support + 0 + 0 + 0 + 0 + + 2 + 6 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\examples\bsp\bsp.c + bsp.c + 0 + 0 + + + + + Documentation + 0 + 0 + 0 + 0 + + 3 + 7 + 5 + 0 + 0 + 0 + 0 + ..\..\..\Abstract.txt + Abstract.txt + 0 + 0 + + + 3 + 8 + 5 + 0 + 0 + 0 + 0 + ..\..\..\license.txt + license.txt + 0 + 0 + + + + + lwIP + 0 + 0 + 0 + 0 + + 4 + 9 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\def.c + def.c + 0 + 0 + + + 4 + 10 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\dhcp.c + dhcp.c + 0 + 0 + + + 4 + 11 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\dhcp6.c + dhcp6.c + 0 + 0 + + + 4 + 12 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\dns.c + dns.c + 0 + 0 + + + 4 + 13 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv4\icmp.c + icmp.c + 0 + 0 + + + 4 + 14 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\icmp6.c + icmp6.c + 0 + 0 + + + 4 + 15 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\inet6.c + inet6.c + 0 + 0 + + + 4 + 16 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\inet_chksum.c + inet_chksum.c + 0 + 0 + + + 4 + 17 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\init.c + init.c + 0 + 0 + + + 4 + 18 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv4\ip4.c + ip4.c + 0 + 0 + + + 4 + 19 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv4\ip4_addr.c + ip4_addr.c + 0 + 0 + + + 4 + 20 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\ip6.c + ip6.c + 0 + 0 + + + 4 + 21 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\ip6_addr.c + ip6_addr.c + 0 + 0 + + + 4 + 22 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\memp.c + memp.c + 0 + 0 + + + 4 + 23 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\mld6.c + mld6.c + 0 + 0 + + + 4 + 24 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\nd6.c + nd6.c + 0 + 0 + + + 4 + 25 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\netif.c + netif.c + 0 + 0 + + + 4 + 26 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\port\nrf_platform_port.c + nrf_platform_port.c + 0 + 0 + + + 4 + 27 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\pbuf.c + pbuf.c + 0 + 0 + + + 4 + 28 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\raw.c + raw.c + 0 + 0 + + + 4 + 29 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\sys.c + sys.c + 0 + 0 + + + 4 + 30 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\tcp.c + tcp.c + 0 + 0 + + + 4 + 31 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\tcp_in.c + tcp_in.c + 0 + 0 + + + 4 + 32 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\tcp_out.c + tcp_out.c + 0 + 0 + + + 4 + 33 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\timers.c + timers.c + 0 + 0 + + + 4 + 34 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\external\lwip\src\core\udp.c + udp.c + 0 + 0 + + + + + nRF_BLE + 0 + 0 + 0 + 0 + + 5 + 35 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\ble\common\ble_advdata.c + ble_advdata.c + 0 + 0 + + + 5 + 36 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\ble\common\ble_conn_params.c + ble_conn_params.c + 0 + 0 + + + 5 + 37 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\ble\common\ble_srv_common.c + ble_srv_common.c + 0 + 0 + + + + + nRF_Drivers + 0 + 0 + 0 + 0 + + 6 + 38 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\libraries\uart\app_uart_fifo.c + app_uart_fifo.c + 0 + 0 + + + 6 + 39 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\drivers_nrf\delay\nrf_delay.c + nrf_delay.c + 0 + 0 + + + 6 + 40 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\drivers_nrf\common\nrf_drv_common.c + nrf_drv_common.c + 0 + 0 + + + 6 + 41 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\drivers_nrf\gpiote\nrf_drv_gpiote.c + nrf_drv_gpiote.c + 0 + 0 + + + 6 + 42 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\drivers_nrf\uart\nrf_drv_uart.c + nrf_drv_uart.c + 0 + 0 + + + 6 + 43 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\drivers_nrf\pstorage\pstorage.c + pstorage.c + 0 + 0 + + + + + nRF_IoT + 0 + 0 + 0 + 0 + + 7 + 44 + 4 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\iot\ble_6lowpan\lib\ble_6lowpan.lib + ble_6lowpan.lib + 0 + 0 + + + 7 + 45 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\iot\errno\errno.c + errno.c + 0 + 0 + + + 7 + 46 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\iot\context_manager\iot_context_manager.c + iot_context_manager.c + 0 + 0 + + + 7 + 47 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\iot\iot_timer\iot_timer.c + iot_timer.c + 0 + 0 + + + 7 + 48 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\iot\medium\ipv6_medium_ble.c + ipv6_medium_ble.c + 0 + 0 + + + 7 + 49 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\iot\common\ipv6_parse.c + ipv6_parse.c + 0 + 0 + + + + + nRF_IoT_Commissioning + 0 + 0 + 0 + 0 + + 8 + 50 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\iot\medium\ble_ncfgs\ble_ncfgs.c + ble_ncfgs.c + 0 + 0 + + + 8 + 51 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\iot\medium\commissioning\commissioning.c + commissioning.c + 0 + 0 + + + + + nRF_Libraries + 0 + 0 + 0 + 0 + + 9 + 52 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\libraries\button\app_button.c + app_button.c + 0 + 0 + + + 9 + 53 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\libraries\util\app_error.c + app_error.c + 0 + 0 + + + 9 + 54 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\libraries\fifo\app_fifo.c + app_fifo.c + 0 + 0 + + + 9 + 55 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\libraries\scheduler\app_scheduler.c + app_scheduler.c + 0 + 0 + + + 9 + 56 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\libraries\timer\app_timer.c + app_timer.c + 0 + 0 + + + 9 + 57 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\libraries\timer\app_timer_appsh.c + app_timer_appsh.c + 0 + 0 + + + 9 + 58 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\libraries\trace\app_trace.c + app_trace.c + 0 + 0 + + + 9 + 59 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\libraries\mem_manager\mem_manager.c + mem_manager.c + 0 + 0 + + + 9 + 60 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\libraries\util\nrf_assert.c + nrf_assert.c + 0 + 0 + + + 9 + 61 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\libraries\uart\retarget.c + retarget.c + 0 + 0 + + + + + nRF_SoftDevice + 0 + 0 + 0 + 0 + + 10 + 62 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\softdevice\common\softdevice_handler\softdevice_handler.c + softdevice_handler.c + 0 + 0 + + + 10 + 63 + 1 + 0 + 0 + 0 + 0 + ..\..\..\nrf5_iot_sdk\components\softdevice\common\softdevice_handler\softdevice_handler_appsh.c + softdevice_handler_appsh.c + 0 + 0 + + + + + RTT + 0 + 0 + 0 + 0 + + 11 + 64 + 1 + 0 + 0 + 0 + 0 + ..\..\..\rtt\RTT\SEGGER_RTT.c + SEGGER_RTT.c + 0 + 0 + + + 11 + 65 + 5 + 0 + 0 + 0 + 0 + ..\..\..\rtt\RTT\SEGGER_RTT.h + SEGGER_RTT.h + 0 + 0 + + + 11 + 66 + 5 + 0 + 0 + 0 + 0 + ..\..\..\rtt\RTT\SEGGER_RTT_Conf.h + SEGGER_RTT_Conf.h + 0 + 0 + + + 11 + 67 + 1 + 0 + 0 + 0 + 0 + ..\..\..\rtt\RTT\SEGGER_RTT_printf.c + SEGGER_RTT_printf.c + 0 + 0 + + + 11 + 68 + 1 + 0 + 0 + 0 + 0 + ..\..\..\rtt\Syscalls\RTT_Syscalls_KEIL.c + RTT_Syscalls_KEIL.c + 0 + 0 + + + + + Mongoose + 1 + 0 + 0 + 0 + + 12 + 69 + 1 + 0 + 0 + 0 + 0 + ..\..\..\..\..\..\mongoose.c + mongoose.c + 0 + 0 + + + + + ::CMSIS + 0 + 0 + 0 + 1 + + + + ::Device + 0 + 0 + 0 + 1 + + 14 + 70 + 2 + 0 + 0 + 0 + 0 + RTE\Device\nRF52832_xxAA\arm_startup_nrf52.s + arm_startup_nrf52.s + 1 + 0 + + + 14 + 71 + 1 + 0 + 0 + 0 + 0 + RTE\Device\nRF52832_xxAA\system_nrf52.c + system_nrf52.c + 1 + 0 + + + +
diff --git a/examples/nRF52/http/boards/pca10040/arm5_no_packs/iot_lwip_tcp_server_pca10040.uvprojx b/examples/nRF52/http/boards/pca10040/arm5_no_packs/iot_lwip_tcp_server_pca10040.uvprojx new file mode 100644 index 00000000..c5466048 --- /dev/null +++ b/examples/nRF52/http/boards/pca10040/arm5_no_packs/iot_lwip_tcp_server_pca10040.uvprojx @@ -0,0 +1,886 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + nrf52832_xxaa_s1xx_iot + 0x4 + ARM-ADS + + + nRF52832_xxAA + Nordic Semiconductor + NordicSemiconductor.nRF_DeviceFamilyPack.8.0.5 + http://developer.nordicsemi.com/nRF51_SDK/pieces/nRF_DeviceFamilyPack/ + IROM(0x00000000,0x80000) IRAM(0x20000000,0x10000) CPUTYPE("Cortex-M4") FPU2 CLOCK(64000000) ELITTLE + + + UL2CM3(-UM0364FCE -O78 -S0 -C0 -TO18 -TC16000000 -TP21 -TDS800D -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF52xxx -FS00 -FL0200000) + 0 + core.h + + + + + + + + + + ..\..\..\..\..\..\..\SVD\nrf52.xml + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\_build\ + nrf52832_xxaa_s1xx_iot + 1 + 0 + 1 + 1 + 1 + .\_build\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 1 + + + + + + + SARMCM3.DLL + -MPU + TCM.DLL + -pCM4 + + + + 1 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + + + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 0 + 1 + + 0 + 6 + + + + + + + + + + + + + + Segger\JL2CM3.dll + + + + + 1 + 0 + 0 + 1 + 1 + 4099 + + 1 + Segger\JL2CM3.dll + + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M4" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 2 + 0 + 0 + 8 + 0 + 0 + 0 + 3 + 5 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x10000 + + + 1 + 0x0 + 0x80000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x1f000 + 0x61000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20002800 + 0xd800 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 4 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + + --c99 + __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 + + ..\..\..\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;..\..\..\..\..\.. + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + __HEAP_SIZE=4096 BLE_STACK_SUPPORT_REQD BOARD_PCA10040 CONFIG_GPIO_AS_PINRESET s1xx SOFTDEVICE_PRESENT NRF52 SWI_DISABLE0 + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x00000000 + 0x00000000 + + + + + + + + + + + + + Application + + + main.c + 1 + ..\..\..\main.c + + + sdk_config.h + 5 + ..\..\..\config\sdk_config.h + + + bleconfig.c + 1 + ..\..\..\bleconfig.c + + + bleconfig.h + 5 + ..\..\..\bleconfig.h + + + myboard.h + 5 + ..\..\..\myboard.h + + + + + Board Support + + + bsp.c + 1 + ..\..\..\..\nrf5_iot_sdk\examples\bsp\bsp.c + + + + + Documentation + + + Abstract.txt + 5 + ..\..\..\Abstract.txt + + + license.txt + 5 + ..\..\..\license.txt + + + + + lwIP + + + def.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\def.c + + + dhcp.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\dhcp.c + + + dhcp6.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\dhcp6.c + + + dns.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\dns.c + + + icmp.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv4\icmp.c + + + icmp6.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\icmp6.c + + + inet6.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\inet6.c + + + inet_chksum.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\inet_chksum.c + + + init.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\init.c + + + ip4.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv4\ip4.c + + + ip4_addr.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv4\ip4_addr.c + + + ip6.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\ip6.c + + + ip6_addr.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\ip6_addr.c + + + memp.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\memp.c + + + mld6.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\mld6.c + + + nd6.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\ipv6\nd6.c + + + netif.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\netif.c + + + nrf_platform_port.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\port\nrf_platform_port.c + + + pbuf.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\pbuf.c + + + raw.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\raw.c + + + sys.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\sys.c + + + tcp.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\tcp.c + + + tcp_in.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\tcp_in.c + + + tcp_out.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\tcp_out.c + + + timers.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\timers.c + + + udp.c + 1 + ..\..\..\..\nrf5_iot_sdk\external\lwip\src\core\udp.c + + + + + nRF_BLE + + + ble_advdata.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\ble\common\ble_advdata.c + + + ble_conn_params.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\ble\common\ble_conn_params.c + + + ble_srv_common.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\ble\common\ble_srv_common.c + + + + + nRF_Drivers + + + app_uart_fifo.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\libraries\uart\app_uart_fifo.c + + + nrf_delay.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\delay\nrf_delay.c + + + nrf_drv_common.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\common\nrf_drv_common.c + + + nrf_drv_gpiote.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\gpiote\nrf_drv_gpiote.c + + + nrf_drv_uart.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\uart\nrf_drv_uart.c + + + pstorage.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\drivers_nrf\pstorage\pstorage.c + + + + + nRF_IoT + + + ble_6lowpan.lib + 4 + ..\..\..\..\nrf5_iot_sdk\components\iot\ble_6lowpan\lib\ble_6lowpan.lib + + + errno.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\iot\errno\errno.c + + + iot_context_manager.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\iot\context_manager\iot_context_manager.c + + + iot_timer.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\iot\iot_timer\iot_timer.c + + + ipv6_medium_ble.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\iot\medium\ipv6_medium_ble.c + + + ipv6_parse.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\iot\common\ipv6_parse.c + + + + + nRF_IoT_Commissioning + + + ble_ncfgs.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\iot\medium\ble_ncfgs\ble_ncfgs.c + + + commissioning.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\iot\medium\commissioning\commissioning.c + + + + + nRF_Libraries + + + app_button.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\libraries\button\app_button.c + + + app_error.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\libraries\util\app_error.c + + + app_fifo.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\libraries\fifo\app_fifo.c + + + app_scheduler.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\libraries\scheduler\app_scheduler.c + + + app_timer.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\libraries\timer\app_timer.c + + + app_timer_appsh.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\libraries\timer\app_timer_appsh.c + + + app_trace.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\libraries\trace\app_trace.c + + + mem_manager.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\libraries\mem_manager\mem_manager.c + + + nrf_assert.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\libraries\util\nrf_assert.c + + + retarget.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\libraries\uart\retarget.c + + + + + nRF_SoftDevice + + + softdevice_handler.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\softdevice\common\softdevice_handler\softdevice_handler.c + + + softdevice_handler_appsh.c + 1 + ..\..\..\..\nrf5_iot_sdk\components\softdevice\common\softdevice_handler\softdevice_handler_appsh.c + + + + + RTT + + + SEGGER_RTT.c + 1 + ..\..\..\rtt\RTT\SEGGER_RTT.c + + + SEGGER_RTT.h + 5 + ..\..\..\rtt\RTT\SEGGER_RTT.h + + + SEGGER_RTT_Conf.h + 5 + ..\..\..\rtt\RTT\SEGGER_RTT_Conf.h + + + SEGGER_RTT_printf.c + 1 + ..\..\..\rtt\RTT\SEGGER_RTT_printf.c + + + RTT_Syscalls_KEIL.c + 1 + ..\..\..\rtt\Syscalls\RTT_Syscalls_KEIL.c + + + + + Mongoose + + + mongoose.c + 1 + ..\..\..\..\..\..\mongoose.c + + + + + ::CMSIS + + + ::Device + + + arm_startup_nrf52.s + 2 + RTE\Device\nRF52832_xxAA\arm_startup_nrf52.s + + + system_nrf52.c + 1 + RTE\Device\nRF52832_xxAA\system_nrf52.c + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RTE\Device\nRF52832_xxAA\arm_startup_nrf52.s + + + + + + + + RTE\Device\nRF52832_xxAA\system_nrf52.c + + + + + + + + + +
diff --git a/examples/nRF52/http/boards/pca10040/armgcc/.gdbinit b/examples/nRF52/http/boards/pca10040/armgcc/.gdbinit new file mode 100644 index 00000000..be68d093 --- /dev/null +++ b/examples/nRF52/http/boards/pca10040/armgcc/.gdbinit @@ -0,0 +1,2 @@ +target extended-remote localhost:2331 +file _build/nrf52832_xxaa_s1xx_iot.out diff --git a/examples/nRF52/http/boards/pca10040/armgcc/Makefile b/examples/nRF52/http/boards/pca10040/armgcc/Makefile new file mode 100644 index 00000000..185cfdd0 --- /dev/null +++ b/examples/nRF52/http/boards/pca10040/armgcc/Makefile @@ -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 diff --git a/examples/nRF52/Makefile b/examples/nRF52/http/boards/pca10040/armgcc/Makefile.docker similarity index 67% rename from examples/nRF52/Makefile rename to examples/nRF52/http/boards/pca10040/armgcc/Makefile.docker index 103081e7..f9998eaa 100644 --- a/examples/nRF52/Makefile +++ b/examples/nRF52/http/boards/pca10040/armgcc/Makefile.docker @@ -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) \ " diff --git a/examples/nRF52/http/boards/pca10040/armgcc/README.md b/examples/nRF52/http/boards/pca10040/armgcc/README.md new file mode 100644 index 00000000..9854096c --- /dev/null +++ b/examples/nRF52/http/boards/pca10040/armgcc/README.md @@ -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. diff --git a/examples/nRF52/ld/mongoose_example_nrf52.ld b/examples/nRF52/http/boards/pca10040/armgcc/iot_lwip_tcp_server_gcc_nrf52.ld similarity index 84% rename from examples/nRF52/ld/mongoose_example_nrf52.ld rename to examples/nRF52/http/boards/pca10040/armgcc/iot_lwip_tcp_server_gcc_nrf52.ld index aefb5d10..02876d7f 100644 --- a/examples/nRF52/ld/mongoose_example_nrf52.ld +++ b/examples/nRF52/http/boards/pca10040/armgcc/iot_lwip_tcp_server_gcc_nrf52.ld @@ -9,4 +9,4 @@ MEMORY RAM (rwx) : ORIGIN = 0x20002800, LENGTH = 0xd800 } -INCLUDE "nrf5x_common.ld" \ No newline at end of file +INCLUDE "nrf5x_common.ld" diff --git a/examples/nRF52/sdk.version b/examples/nRF52/http/boards/pca10040/armgcc/sdk.version similarity index 100% rename from examples/nRF52/sdk.version rename to examples/nRF52/http/boards/pca10040/armgcc/sdk.version diff --git a/examples/nRF52/config/ipv6_medium_ble_cfg.h b/examples/nRF52/http/config/ipv6_medium_ble_cfg.h similarity index 100% rename from examples/nRF52/config/ipv6_medium_ble_cfg.h rename to examples/nRF52/http/config/ipv6_medium_ble_cfg.h diff --git a/examples/nRF52/config/ipv6_medium_platform.h b/examples/nRF52/http/config/ipv6_medium_platform.h similarity index 100% rename from examples/nRF52/config/ipv6_medium_platform.h rename to examples/nRF52/http/config/ipv6_medium_platform.h diff --git a/examples/nRF52/config/nrf_drv_config.h b/examples/nRF52/http/config/nrf_drv_config.h similarity index 100% rename from examples/nRF52/config/nrf_drv_config.h rename to examples/nRF52/http/config/nrf_drv_config.h diff --git a/examples/nRF52/config/pstorage_platform.h b/examples/nRF52/http/config/pstorage_platform.h similarity index 100% rename from examples/nRF52/config/pstorage_platform.h rename to examples/nRF52/http/config/pstorage_platform.h diff --git a/examples/nRF52/config/sdk_config.h b/examples/nRF52/http/config/sdk_config.h similarity index 100% rename from examples/nRF52/config/sdk_config.h rename to examples/nRF52/http/config/sdk_config.h diff --git a/examples/nRF52/main.c b/examples/nRF52/http/main.c similarity index 90% rename from examples/nRF52/main.c rename to examples/nRF52/http/main.c index 9c655db3..89770310 100644 --- a/examples/nRF52/main.c +++ b/examples/nRF52/http/main.c @@ -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; diff --git a/examples/nRF52/myboard.h b/examples/nRF52/http/myboard.h similarity index 100% rename from examples/nRF52/myboard.h rename to examples/nRF52/http/myboard.h diff --git a/examples/nRF52/rtt/README.txt b/examples/nRF52/http/rtt/README.txt similarity index 100% rename from examples/nRF52/rtt/README.txt rename to examples/nRF52/http/rtt/README.txt diff --git a/examples/nRF52/rtt/RTT/SEGGER_RTT.c b/examples/nRF52/http/rtt/RTT/SEGGER_RTT.c similarity index 100% rename from examples/nRF52/rtt/RTT/SEGGER_RTT.c rename to examples/nRF52/http/rtt/RTT/SEGGER_RTT.c diff --git a/examples/nRF52/rtt/RTT/SEGGER_RTT.h b/examples/nRF52/http/rtt/RTT/SEGGER_RTT.h similarity index 100% rename from examples/nRF52/rtt/RTT/SEGGER_RTT.h rename to examples/nRF52/http/rtt/RTT/SEGGER_RTT.h diff --git a/examples/nRF52/rtt/RTT/SEGGER_RTT_Conf.h b/examples/nRF52/http/rtt/RTT/SEGGER_RTT_Conf.h similarity index 93% rename from examples/nRF52/rtt/RTT/SEGGER_RTT_Conf.h rename to examples/nRF52/http/rtt/RTT/SEGGER_RTT_Conf.h index e8ddee7e..cd1c02a5 100644 --- a/examples/nRF52/rtt/RTT/SEGGER_RTT_Conf.h +++ b/examples/nRF52/http/rtt/RTT/SEGGER_RTT_Conf.h @@ -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) diff --git a/examples/nRF52/rtt/RTT/SEGGER_RTT_printf.c b/examples/nRF52/http/rtt/RTT/SEGGER_RTT_printf.c similarity index 100% rename from examples/nRF52/rtt/RTT/SEGGER_RTT_printf.c rename to examples/nRF52/http/rtt/RTT/SEGGER_RTT_printf.c diff --git a/examples/nRF52/rtt/Syscalls/RTT_Syscalls_GCC.c b/examples/nRF52/http/rtt/Syscalls/RTT_Syscalls_GCC.c similarity index 100% rename from examples/nRF52/rtt/Syscalls/RTT_Syscalls_GCC.c rename to examples/nRF52/http/rtt/Syscalls/RTT_Syscalls_GCC.c diff --git a/examples/nRF52/rtt/Syscalls/RTT_Syscalls_IAR.c b/examples/nRF52/http/rtt/Syscalls/RTT_Syscalls_IAR.c similarity index 100% rename from examples/nRF52/rtt/Syscalls/RTT_Syscalls_IAR.c rename to examples/nRF52/http/rtt/Syscalls/RTT_Syscalls_IAR.c diff --git a/examples/nRF52/rtt/Syscalls/RTT_Syscalls_KEIL.c b/examples/nRF52/http/rtt/Syscalls/RTT_Syscalls_KEIL.c similarity index 100% rename from examples/nRF52/rtt/Syscalls/RTT_Syscalls_KEIL.c rename to examples/nRF52/http/rtt/Syscalls/RTT_Syscalls_KEIL.c diff --git a/examples/nRF52/ld/nrf5x_common.ld b/examples/nRF52/ld/nrf5x_common.ld deleted file mode 100644 index e58638ba..00000000 --- a/examples/nRF52/ld/nrf5x_common.ld +++ /dev/null @@ -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") -} -