A collection of Analog Devices drivers for the mbed platform

For additional information check out the mbed page of the Analog Devices wiki: https://wiki.analog.com/resources/tools-software/mbed-drivers-all

Committer:
Adrian Suciu
Date:
Mon Oct 24 18:15:23 2016 +0300
Revision:
30:990ce210e8c2
Added example and library for the CN0398

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Adrian Suciu 30:990ce210e8c2 1 # This file was automagically generated by mbed.org. For more information,
Adrian Suciu 30:990ce210e8c2 2 # see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded
Adrian Suciu 30:990ce210e8c2 3
Adrian Suciu 30:990ce210e8c2 4 ifeq ($(OS), Windows_NT)
Adrian Suciu 30:990ce210e8c2 5 # insert Windows path to arm-none-eabi toolchain
Adrian Suciu 30:990ce210e8c2 6 GCC_BIN = C:/Program\ Files\ \(x86\)/GNU\ Tools\ ARM\ Embedded/5.2\ 2015q4/bin/
Adrian Suciu 30:990ce210e8c2 7 else
Adrian Suciu 30:990ce210e8c2 8 # insert Linux path to arm-none-eabi toolchain
Adrian Suciu 30:990ce210e8c2 9 GCC_BIN = ~/workspace/tools/gcc-arm-none-eabi-5_3-2016q1/bin/
Adrian Suciu 30:990ce210e8c2 10 endif
Adrian Suciu 30:990ce210e8c2 11
Adrian Suciu 30:990ce210e8c2 12 PROJECT = CN0398-MBED
Adrian Suciu 30:990ce210e8c2 13 ADI_LIBRARIES_PATH = ../../libraries
Adrian Suciu 30:990ce210e8c2 14 MBED_LIBRARIES_PATH = ../../mbed
Adrian Suciu 30:990ce210e8c2 15 OBJECTS = ./main.o $(ADI_LIBRARIES_PATH)/AD7124/AD7124.o $(ADI_LIBRARIES_PATH)/CN0398/CN0398.o
Adrian Suciu 30:990ce210e8c2 16 SYS_OBJECTS = $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_flash_ramfunc.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/board.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/cmsis_nvic.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/hal_tick.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/mbed_overrides.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/retarget.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/startup_stm32f411xe.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_adc.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_adc_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_can.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_cec.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_cortex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_crc.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_cryp.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_cryp_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_dac.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_dac_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_dcmi.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_dcmi_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_dma.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_dma2d.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_dma_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_dsi.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_eth.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_flash.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_flash_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_fmpi2c_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_fmpi2c.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_msp_template.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_gpio.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_hash.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_hash_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_hcd.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_i2c.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_i2c_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_i2s.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_i2s_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_irda.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_iwdg.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_lptim.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_ltdc.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_ltdc_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_smartcard.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_nand.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_nor.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_pccard.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_pcd.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_pcd_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_pwr.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_pwr_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_qspi.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_rcc.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_rcc_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_rng.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_rtc.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_rtc_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_sai.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_sai_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_sd.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_sdram.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_spdifrx.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_spi.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_sram.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_tim.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_tim_ex.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_uart.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_usart.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_hal_wwdg.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_ll_fmc.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_ll_fsmc.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_ll_sdmmc.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/stm32f4xx_ll_usb.o $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/system_stm32f4xx.o
Adrian Suciu 30:990ce210e8c2 17 INCLUDE_PATHS = -I. -I$(MBED_LIBRARIES_PATH) -I$(ADI_LIBRARIES_PATH) -I$(ADI_LIBRARIES_PATH)/AD7124 -I$(ADI_LIBRARIES_PATH)/CN0398 -I$(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE -I$(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TARGET_STM -I$(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TARGET_STM/TARGET_STM32F4 -I$(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F411RE -I$(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM
Adrian Suciu 30:990ce210e8c2 18 LIBRARY_PATHS = -L$(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM
Adrian Suciu 30:990ce210e8c2 19 LIBRARIES = -lmbed
Adrian Suciu 30:990ce210e8c2 20 LINKER_SCRIPT = $(MBED_LIBRARIES_PATH)/TARGET_NUCLEO_F411RE/TOOLCHAIN_GCC_ARM/STM32F411XE.ld
Adrian Suciu 30:990ce210e8c2 21
Adrian Suciu 30:990ce210e8c2 22 ###############################################################################
Adrian Suciu 30:990ce210e8c2 23 AS = $(GCC_BIN)arm-none-eabi-as
Adrian Suciu 30:990ce210e8c2 24 CC = $(GCC_BIN)arm-none-eabi-gcc
Adrian Suciu 30:990ce210e8c2 25 CPP = $(GCC_BIN)arm-none-eabi-g++
Adrian Suciu 30:990ce210e8c2 26 LD = $(GCC_BIN)arm-none-eabi-gcc
Adrian Suciu 30:990ce210e8c2 27 OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy
Adrian Suciu 30:990ce210e8c2 28 OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump
Adrian Suciu 30:990ce210e8c2 29 SIZE = $(GCC_BIN)arm-none-eabi-size
Adrian Suciu 30:990ce210e8c2 30
Adrian Suciu 30:990ce210e8c2 31 ifeq ($(HARDFP),1)
Adrian Suciu 30:990ce210e8c2 32 FLOAT_ABI = hard
Adrian Suciu 30:990ce210e8c2 33 else
Adrian Suciu 30:990ce210e8c2 34 FLOAT_ABI = softfp
Adrian Suciu 30:990ce210e8c2 35 endif
Adrian Suciu 30:990ce210e8c2 36
Adrian Suciu 30:990ce210e8c2 37
Adrian Suciu 30:990ce210e8c2 38 CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI)
Adrian Suciu 30:990ce210e8c2 39 CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -Wextra -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -MMD -MP
Adrian Suciu 30:990ce210e8c2 40 CC_SYMBOLS = -DTARGET_RTOS_M4_M7 -DTARGET_FF_ARDUINO -DTOOLCHAIN_GCC_ARM -DTARGET_NUCLEO_F411RE -D__CORTEX_M4 -DTARGET_LIKE_MBED -DTARGET_CORTEX_M -D__FPU_PRESENT=1 -DTARGET_LIKE_CORTEX_M4 -DMBED_BUILD_TIMESTAMP=1458639619.11 -DTARGET_M4 -D__MBED__=1 -DTARGET_STM -DTARGET_STM32F4 -DTARGET_FF_MORPHO -DTOOLCHAIN_GCC -DTARGET_STM32F411RE -DARM_MATH_CM4
Adrian Suciu 30:990ce210e8c2 41
Adrian Suciu 30:990ce210e8c2 42 LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -Wl,-Map=$(PROJECT).map,--cref
Adrian Suciu 30:990ce210e8c2 43 LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
Adrian Suciu 30:990ce210e8c2 44
Adrian Suciu 30:990ce210e8c2 45
Adrian Suciu 30:990ce210e8c2 46 ifeq ($(DEBUG), 1)
Adrian Suciu 30:990ce210e8c2 47 CC_FLAGS += -DDEBUG -g3
Adrian Suciu 30:990ce210e8c2 48 else
Adrian Suciu 30:990ce210e8c2 49 CC_FLAGS += -DNDEBUG -g3
Adrian Suciu 30:990ce210e8c2 50 endif
Adrian Suciu 30:990ce210e8c2 51
Adrian Suciu 30:990ce210e8c2 52 .PHONY: all clean lst size
Adrian Suciu 30:990ce210e8c2 53
Adrian Suciu 30:990ce210e8c2 54 all: $(PROJECT).bin $(PROJECT).hex size
Adrian Suciu 30:990ce210e8c2 55
Adrian Suciu 30:990ce210e8c2 56
Adrian Suciu 30:990ce210e8c2 57 clean:
Adrian Suciu 30:990ce210e8c2 58 rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS)
Adrian Suciu 30:990ce210e8c2 59
Adrian Suciu 30:990ce210e8c2 60
Adrian Suciu 30:990ce210e8c2 61 .asm.o:
Adrian Suciu 30:990ce210e8c2 62 $(CC) $(CPU) -c -x assembler-with-cpp -o $@ $<
Adrian Suciu 30:990ce210e8c2 63 .s.o:
Adrian Suciu 30:990ce210e8c2 64 $(CC) $(CPU) -c -x assembler-with-cpp -o $@ $<
Adrian Suciu 30:990ce210e8c2 65 .S.o:
Adrian Suciu 30:990ce210e8c2 66 $(CC) $(CPU) -c -x assembler-with-cpp -o $@ $<
Adrian Suciu 30:990ce210e8c2 67
Adrian Suciu 30:990ce210e8c2 68 .c.o:
Adrian Suciu 30:990ce210e8c2 69 $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $<
Adrian Suciu 30:990ce210e8c2 70
Adrian Suciu 30:990ce210e8c2 71 .cpp.o:
Adrian Suciu 30:990ce210e8c2 72 $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $<
Adrian Suciu 30:990ce210e8c2 73
Adrian Suciu 30:990ce210e8c2 74
Adrian Suciu 30:990ce210e8c2 75
Adrian Suciu 30:990ce210e8c2 76 $(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS)
Adrian Suciu 30:990ce210e8c2 77 $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS)
Adrian Suciu 30:990ce210e8c2 78
Adrian Suciu 30:990ce210e8c2 79
Adrian Suciu 30:990ce210e8c2 80 $(PROJECT).bin: $(PROJECT).elf
Adrian Suciu 30:990ce210e8c2 81 $(OBJCOPY) -O binary $< $@
Adrian Suciu 30:990ce210e8c2 82
Adrian Suciu 30:990ce210e8c2 83 $(PROJECT).hex: $(PROJECT).elf
Adrian Suciu 30:990ce210e8c2 84 @$(OBJCOPY) -O ihex $< $@
Adrian Suciu 30:990ce210e8c2 85
Adrian Suciu 30:990ce210e8c2 86 $(PROJECT).lst: $(PROJECT).elf
Adrian Suciu 30:990ce210e8c2 87 @$(OBJDUMP) -Sdh $< > $@
Adrian Suciu 30:990ce210e8c2 88
Adrian Suciu 30:990ce210e8c2 89 lst: $(PROJECT).lst
Adrian Suciu 30:990ce210e8c2 90
Adrian Suciu 30:990ce210e8c2 91 size: $(PROJECT).elf
Adrian Suciu 30:990ce210e8c2 92 $(SIZE) $(PROJECT).elf
Adrian Suciu 30:990ce210e8c2 93
Adrian Suciu 30:990ce210e8c2 94 DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d)
Adrian Suciu 30:990ce210e8c2 95 -include $(DEPS)
Adrian Suciu 30:990ce210e8c2 96
Adrian Suciu 30:990ce210e8c2 97