ble nano hid over gatt
Dependencies: BLE_API mbed-dev nRF51822
Makefile
- Committer:
- cho45
- Date:
- 2016-09-15
- Revision:
- 86:e0fab77e669d
- Parent:
- 65:391ce51e37cc
File content as of revision 86:e0fab77e669d:
# This file was automagically generated by mbed.org. For more information, # see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded # cross-platform directory manipulation ifeq ($(shell echo $$OS),$$OS) MAKEDIR = if not exist "$(1)" mkdir "$(1)" RM = rmdir /S /Q "$(1)" else MAKEDIR = $(SHELL) -c "mkdir -p \"$(1)\"" RM = $(SHELL) -c "rm -rf \"$(1)\"" endif ifeq (,$(filter .build,$(notdir $(CURDIR)))) .SUFFIXES: OBJDIR := .build mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) MAKETARGET = $(MAKE) --no-print-directory -C $(OBJDIR) -f $(mkfile_path) \ SRCDIR=$(CURDIR) $(MAKECMDGOALS) .PHONY: $(OBJDIR) clean all: +@$(call MAKEDIR,$(OBJDIR)) +@$(MAKETARGET) $(OBJDIR): all Makefile : ; % :: $(OBJDIR) ; : clean : $(call RM,$(OBJDIR)) else VPATH = .. GCC_BIN = PROJECT = keyboard OBJECTS = ./mbed-dev/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/startup_NRF51822.o ./mbed-dev/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/cmsis_nvic.o ./mbed-dev/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/system_nrf51.o ./mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/analogin_api.o ./mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/gpio_api.o ./mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/gpio_irq_api.o ./mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/i2c_api.o ./mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/pinmap.o ./mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/port_api.o ./mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/pwmout_api.o ./mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.o ./mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/sleep.o ./mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/spi_api.o ./mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/twi_master.o ./mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/us_ticker.o ./mbed-dev/common/assert.o ./mbed-dev/common/board.o ./mbed-dev/common/error.o ./mbed-dev/common/gpio.o ./mbed-dev/common/lp_ticker_api.o ./mbed-dev/common/mbed_interface.o ./mbed-dev/common/pinmap_common.o ./mbed-dev/common/rtc_time.o ./mbed-dev/common/semihost_api.o ./mbed-dev/common/ticker_api.o ./mbed-dev/common/us_ticker_api.o ./mbed-dev/common/wait_api.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/ble_radio_notification/ble_radio_notification.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/ble_services/ble_dfu/ble_dfu.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/common/ble_advdata.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/common/ble_conn_state.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/common/ble_srv_common.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/device_manager/device_manager_peripheral.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/peer_manager/id_manager.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/peer_manager/peer_data.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/peer_manager/peer_data_storage.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/peer_manager/peer_database.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/peer_manager/peer_id.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/peer_manager/pm_buffer.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/peer_manager/pm_mutex.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/ble_flash/ble_flash.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/delay/nrf_delay.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/hal/nrf_ecb.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/hal/nrf_nvmc.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/pstorage/pstorage.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/bootloader_dfu/bootloader_util.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/bootloader_dfu/dfu_app_handler.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/bootloader_dfu/dfu_init_template.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/crc16/crc16.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/fds/fds.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/fstorage/fstorage.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/fstorage/fstorage_nosd.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/hci/hci_mem_pool.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/scheduler/app_scheduler.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/util/app_error.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/util/app_util_platform.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/util/nrf_assert.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/util/sdk_mapped_flags.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/softdevice/common/softdevice_handler/softdevice_handler.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/softdevice/common/softdevice_handler/softdevice_handler_appsh.o ./main.o ./HIDController_BLE.o ./HIDServiceBase.o ./mbed-dev/common/BusIn.o ./mbed-dev/common/BusInOut.o ./mbed-dev/common/BusOut.o ./mbed-dev/common/CAN.o ./mbed-dev/common/CallChain.o ./mbed-dev/common/Ethernet.o ./mbed-dev/common/FileBase.o ./mbed-dev/common/FileLike.o ./mbed-dev/common/FilePath.o ./mbed-dev/common/FileSystemLike.o ./mbed-dev/common/I2C.o ./mbed-dev/common/I2CSlave.o ./mbed-dev/common/InterruptIn.o ./mbed-dev/common/InterruptManager.o ./mbed-dev/common/LocalFileSystem.o ./mbed-dev/common/RawSerial.o ./mbed-dev/common/SPI.o ./mbed-dev/common/SPISlave.o ./mbed-dev/common/Serial.o ./mbed-dev/common/SerialBase.o ./mbed-dev/common/Stream.o ./mbed-dev/common/Ticker.o ./mbed-dev/common/Timeout.o ./mbed-dev/common/Timer.o ./mbed-dev/common/TimerEvent.o ./mbed-dev/common/retarget.o ./BLE_API/source/BLE.o ./BLE_API/source/DiscoveredCharacteristic.o ./BLE_API/source/GapScanningParams.o ./BLE_API/source/services/DFUService.o ./BLE_API/source/services/UARTService.o ./BLE_API/source/services/URIBeaconConfigService.o ./nRF51822/source/nRF5xDiscoveredCharacteristic.o ./nRF51822/source/nRF5xGap.o ./nRF51822/source/nRF5xGattClient.o ./nRF51822/source/nRF5xGattServer.o ./nRF51822/source/nRF5xServiceDiscovery.o ./nRF51822/source/nRF5xn.o ./nRF51822/source/nRF5xCharacteristicDescriptorDiscoverer.o ./nRF51822/source/btle/btle.o ./nRF51822/source/btle/btle_advertising.o ./nRF51822/source/btle/btle_discovery.o ./nRF51822/source/btle/btle_gap.o ./nRF51822/source/btle/btle_security.o ./nRF51822/source/btle/custom/custom_helper.o ./nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/common/ble_conn_params.o SYS_OBJECTS = INCLUDE_PATHS = -I../. -I.././mbed-dev -I.././mbed-dev/api -I.././mbed-dev/hal -I.././mbed-dev/targets -I.././mbed-dev/targets/cmsis -I.././mbed-dev/targets/cmsis/TARGET_NORDIC -I.././mbed-dev/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822 -I.././mbed-dev/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM -I.././mbed-dev/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S130 -I.././mbed-dev/targets/hal -I.././mbed-dev/targets/hal/TARGET_NORDIC -I.././mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822 -I.././mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib -I.././mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk -I.././mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components -I.././mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries -I.././mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/crc16 -I.././mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/scheduler -I.././mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/nordic_sdk/components/libraries/util -I.././mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_8_0_0 -I.././mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0 -I.././mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/TARGET_RBLAB_BLENANO -I.././mbed-dev/common -I.././BLE_API -I.././BLE_API/ble -I.././BLE_API/ble/services -I.././BLE_API/source -I.././BLE_API/source/services -I.././nRF51822 -I.././nRF51822/source -I.././nRF51822/source/btle -I.././nRF51822/source/btle/custom -I.././nRF51822/source/common -I.././nRF51822/nrf51-sdk -I.././nRF51822/nrf51-sdk/source -I.././nRF51822/nrf51-sdk/source/nordic_sdk -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/ble -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/ble_radio_notification -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/ble_services -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/ble_services/ble_dfu -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/common -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/device_manager -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/device_manager/config -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/peer_manager -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/device -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/drivers_nrf -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/ble_flash -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/delay -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/hal -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/pstorage -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/pstorage/config -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/bootloader_dfu -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/bootloader_dfu/hci_transport -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/crc16 -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/experimental_section_vars -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/fds -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/fstorage -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/hci -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/scheduler -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/timer -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/libraries/util -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/softdevice -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/softdevice/common -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/softdevice/common/softdevice_handler -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/softdevice/s130 -I.././nRF51822/nrf51-sdk/source/nordic_sdk/components/softdevice/s130/headers -I.././nRF51822/bootloader LIBRARY_PATHS = LIBRARIES = # LINKER_SCRIPT = .././mbed-dev/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/TOOLCHAIN_GCC_ARM/TARGET_MCU_NRF51_16K_S130/NRF51822.ld LINKER_SCRIPT = ./NRF51822.ld # SOFTDEVICE = mbed/TARGET_RBLAB_BLENANO/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex SOFTDEVICE = ../mbed-dev/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex ############################################################################### AS = $(GCC_BIN)arm-none-eabi-as CC = $(GCC_BIN)arm-none-eabi-gcc CPP = $(GCC_BIN)arm-none-eabi-g++ LD = $(GCC_BIN)arm-none-eabi-gcc OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump SIZE = $(GCC_BIN)arm-none-eabi-size SREC_CAT = srec_cat CPU = -mcpu=cortex-m0 -mthumb CC_FLAGS = -c -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fmessage-length=0 -fno-exceptions -fno-builtin -ffunction-sections -fdata-sections -funsigned-char -MMD -fno-delete-null-pointer-checks -fomit-frame-pointer -mcpu=cortex-m0 -mthumb -Os -std=gnu99 -include mbed_config.h -MMD -MP CPPC_FLAGS = -c -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fmessage-length=0 -fno-exceptions -fno-builtin -ffunction-sections -fdata-sections -funsigned-char -MMD -fno-delete-null-pointer-checks -fomit-frame-pointer -mcpu=cortex-m0 -mthumb -Os -std=gnu++98 -fno-rtti -Wvla -include mbed_config.h -MMD -MP ASM_FLAGS = -x assembler-with-cpp -c -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fmessage-length=0 -fno-exceptions -fno-builtin -ffunction-sections -fdata-sections -funsigned-char -MMD -fno-delete-null-pointer-checks -fomit-frame-pointer -mcpu=cortex-m0 -mthumb -Os CC_SYMBOLS = -DDEVICE_ERROR_PATTERN=1 -DNRF51 -D__MBED__=1 -DTARGET_LIKE_MBED -DTARGET_NRF51822 -DDEVICE_PORTINOUT=1 -D__MBED_CMSIS_RTOS_CM -DTOOLCHAIN_object -DMBED_BUILD_TIMESTAMP=1472736609.65 -D__CMSIS_RTOS -DTARGET_MCU_NRF51_16K -DTOOLCHAIN_GCC -DTARGET_CORTEX_M -DARM_MATH_CM0 -DTARGET_UVISOR_UNSUPPORTED -DDEVICE_ANALOGIN=1 -DTARGET_M0 -DTARGET_MCU_NRF51 -DDEVICE_SERIAL=1 -DTARGET_MCU_NRF51_16K_S130 -D__CORTEX_M0 -DDEVICE_I2C=1 -DDEVICE_PORTOUT=1 -DTARGET_RELEASE -DTARGET_NORDIC -DFEATURE_BLE=1 -DTARGET_MCU_NORDIC_16K -DDEVICE_PORTIN=1 -DDEVICE_SLEEP=1 -DTOOLCHAIN_GCC_ARM -DTARGET_MCU_NRF51822 -DDEVICE_SPI=1 -DDEVICE_INTERRUPTIN=1 -DMBED_RTOS_SINGLE_THREAD -DDEVICE_SPISLAVE=1 -DTARGET_RBLAB_BLENANO -DDEVICE_PWMOUT=1 -DTARGET_LIKE_CORTEX_M0 LD_FLAGS =-Wl,--gc-sections -Wl,--wrap,main -mcpu=cortex-m0 -mthumb --specs=nano.specs LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys ifeq ($(DEBUG), 1) CC_FLAGS += -DDEBUG -O0 else CC_FLAGS += -DNDEBUG -Os endif .PHONY: all lst size all: $(PROJECT).bin $(PROJECT).hex size .asm.o: +@$(call MAKEDIR,$(dir $@)) $(CC) $(CPU) -c $(ASM_FLAGS) -o $@ $< .s.o: +@$(call MAKEDIR,$(dir $@)) $(CC) $(CPU) -c $(ASM_FLAGS) -o $@ $< .S.o: +@$(call MAKEDIR,$(dir $@)) $(CC) $(CPU) -c $(ASM_FLAGS) -o $@ $< .c.o: +@$(call MAKEDIR,$(dir $@)) $(CC) $(CC_FLAGS) $(CC_SYMBOLS) $(INCLUDE_PATHS) -o $@ $< .cpp.o: +@$(call MAKEDIR,$(dir $@)) $(CPP) $(CPPC_FLAGS) $(CC_SYMBOLS) $(INCLUDE_PATHS) -o $@ $< $(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) $(LINKER_SCRIPT) $(LD) $(LD_FLAGS) -T$(filter %.ld, $^) $(LIBRARY_PATHS) -o $@ $(filter %.o, $^) -Wl,--start-group $(LIBRARIES) $(LD_SYS_LIBS) -Wl,--end-group $(PROJECT).bin: $(PROJECT).elf $(OBJCOPY) -O binary $< $@ $(PROJECT).hex: $(PROJECT).elf @$(OBJCOPY) -O ihex $< $@ $(PROJECT).lst: $(PROJECT).elf @$(OBJDUMP) -Sdh $< > $@ lst: $(PROJECT).lst size: $(PROJECT).elf $(SIZE) $(PROJECT).elf DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) -include $(DEPS) merge: $(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44 flash: keyboard.hex merge dd if=combined.hex of=/Volumes/MBED/firmware.hex conv=notrunc endif