Versione migliorata dell'esempio 9.8, due funzioni vengono create e stampano su stdout

Dependencies:   mbed mbed-rtos

Committer:
flombella
Date:
Wed Apr 06 14:18:44 2022 +0000
Revision:
0:68b32e1c7187
Versione inziaile da testo Xiao

Who changed what in which revision?

UserRevisionLine numberNew contents of line
flombella 0:68b32e1c7187 1 # This file was automagically generated by mbed.org. For more information,
flombella 0:68b32e1c7187 2 # see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded
flombella 0:68b32e1c7187 3
flombella 0:68b32e1c7187 4 ###############################################################################
flombella 0:68b32e1c7187 5 # Boiler-plate
flombella 0:68b32e1c7187 6
flombella 0:68b32e1c7187 7 # cross-platform directory manipulation
flombella 0:68b32e1c7187 8 ifeq ($(shell echo $$OS),$$OS)
flombella 0:68b32e1c7187 9 MAKEDIR = if not exist "$(1)" mkdir "$(1)"
flombella 0:68b32e1c7187 10 RM = rmdir /S /Q "$(1)"
flombella 0:68b32e1c7187 11 else
flombella 0:68b32e1c7187 12 MAKEDIR = '$(SHELL)' -c "mkdir -p \"$(1)\""
flombella 0:68b32e1c7187 13 RM = '$(SHELL)' -c "rm -rf \"$(1)\""
flombella 0:68b32e1c7187 14 endif
flombella 0:68b32e1c7187 15
flombella 0:68b32e1c7187 16 OBJDIR := BUILD
flombella 0:68b32e1c7187 17 # Move to the build directory
flombella 0:68b32e1c7187 18 ifeq (,$(filter $(OBJDIR),$(notdir $(CURDIR))))
flombella 0:68b32e1c7187 19 .SUFFIXES:
flombella 0:68b32e1c7187 20 mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
flombella 0:68b32e1c7187 21 MAKETARGET = '$(MAKE)' --no-print-directory -C $(OBJDIR) -f '$(mkfile_path)' \
flombella 0:68b32e1c7187 22 'SRCDIR=$(CURDIR)' $(MAKECMDGOALS)
flombella 0:68b32e1c7187 23 .PHONY: $(OBJDIR) clean
flombella 0:68b32e1c7187 24 all:
flombella 0:68b32e1c7187 25 +@$(call MAKEDIR,$(OBJDIR))
flombella 0:68b32e1c7187 26 +@$(MAKETARGET)
flombella 0:68b32e1c7187 27 $(OBJDIR): all
flombella 0:68b32e1c7187 28 Makefile : ;
flombella 0:68b32e1c7187 29 % :: $(OBJDIR) ; :
flombella 0:68b32e1c7187 30 clean :
flombella 0:68b32e1c7187 31 $(call RM,$(OBJDIR))
flombella 0:68b32e1c7187 32
flombella 0:68b32e1c7187 33 else
flombella 0:68b32e1c7187 34
flombella 0:68b32e1c7187 35 # trick rules into thinking we are in the root, when we are in the bulid dir
flombella 0:68b32e1c7187 36 VPATH = ..
flombella 0:68b32e1c7187 37
flombella 0:68b32e1c7187 38 # Boiler-plate
flombella 0:68b32e1c7187 39 ###############################################################################
flombella 0:68b32e1c7187 40 # Project settings
flombella 0:68b32e1c7187 41
flombella 0:68b32e1c7187 42 PROJECT := Example_9_9
flombella 0:68b32e1c7187 43
flombella 0:68b32e1c7187 44
flombella 0:68b32e1c7187 45 # Project settings
flombella 0:68b32e1c7187 46 ###############################################################################
flombella 0:68b32e1c7187 47 # Objects and Paths
flombella 0:68b32e1c7187 48
flombella 0:68b32e1c7187 49 OBJECTS += main.o
flombella 0:68b32e1c7187 50 OBJECTS += mbed-rtos/rtos/Mutex.o
flombella 0:68b32e1c7187 51 OBJECTS += mbed-rtos/rtos/RtosTimer.o
flombella 0:68b32e1c7187 52 OBJECTS += mbed-rtos/rtos/Semaphore.o
flombella 0:68b32e1c7187 53 OBJECTS += mbed-rtos/rtos/Thread.o
flombella 0:68b32e1c7187 54 OBJECTS += mbed-rtos/rtos/rtos_idle.o
flombella 0:68b32e1c7187 55 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/HAL_CM.o
flombella 0:68b32e1c7187 56 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/RTX_Conf_CM.o
flombella 0:68b32e1c7187 57 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_GCC/HAL_CM4.o
flombella 0:68b32e1c7187 58 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_GCC/SVC_Table.o
flombella 0:68b32e1c7187 59 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/rt_CMSIS.o
flombella 0:68b32e1c7187 60 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/rt_Event.o
flombella 0:68b32e1c7187 61 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/rt_List.o
flombella 0:68b32e1c7187 62 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/rt_Mailbox.o
flombella 0:68b32e1c7187 63 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/rt_MemBox.o
flombella 0:68b32e1c7187 64 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/rt_Memory.o
flombella 0:68b32e1c7187 65 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/rt_Mutex.o
flombella 0:68b32e1c7187 66 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/rt_OsEventObserver.o
flombella 0:68b32e1c7187 67 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/rt_Robin.o
flombella 0:68b32e1c7187 68 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/rt_Semaphore.o
flombella 0:68b32e1c7187 69 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/rt_System.o
flombella 0:68b32e1c7187 70 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/rt_Task.o
flombella 0:68b32e1c7187 71 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/rt_Time.o
flombella 0:68b32e1c7187 72 OBJECTS += mbed-rtos/rtx/TARGET_CORTEX_M/rt_Timer.o
flombella 0:68b32e1c7187 73
flombella 0:68b32e1c7187 74 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/PeripheralPins.o
flombella 0:68b32e1c7187 75 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/analogin_api.o
flombella 0:68b32e1c7187 76 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/analogout_api.o
flombella 0:68b32e1c7187 77 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/crc.o
flombella 0:68b32e1c7187 78 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/dma_api.o
flombella 0:68b32e1c7187 79 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/flash_api.o
flombella 0:68b32e1c7187 80 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_adc16.o
flombella 0:68b32e1c7187 81 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_clock.o
flombella 0:68b32e1c7187 82 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_clock_config.o
flombella 0:68b32e1c7187 83 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_cmp.o
flombella 0:68b32e1c7187 84 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_cmt.o
flombella 0:68b32e1c7187 85 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_common.o
flombella 0:68b32e1c7187 86 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_crc.o
flombella 0:68b32e1c7187 87 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_dac.o
flombella 0:68b32e1c7187 88 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_dmamux.o
flombella 0:68b32e1c7187 89 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_dspi.o
flombella 0:68b32e1c7187 90 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_dspi_edma.o
flombella 0:68b32e1c7187 91 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_edma.o
flombella 0:68b32e1c7187 92 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_enet.o
flombella 0:68b32e1c7187 93 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_ewm.o
flombella 0:68b32e1c7187 94 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_flash.o
flombella 0:68b32e1c7187 95 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_flexbus.o
flombella 0:68b32e1c7187 96 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_flexcan.o
flombella 0:68b32e1c7187 97 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_ftm.o
flombella 0:68b32e1c7187 98 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_gpio.o
flombella 0:68b32e1c7187 99 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_i2c.o
flombella 0:68b32e1c7187 100 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_i2c_edma.o
flombella 0:68b32e1c7187 101 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_llwu.o
flombella 0:68b32e1c7187 102 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_lptmr.o
flombella 0:68b32e1c7187 103 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_mpu.o
flombella 0:68b32e1c7187 104 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_pdb.o
flombella 0:68b32e1c7187 105 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_phy.o
flombella 0:68b32e1c7187 106 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_pit.o
flombella 0:68b32e1c7187 107 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_pmc.o
flombella 0:68b32e1c7187 108 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_rcm.o
flombella 0:68b32e1c7187 109 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_rnga.o
flombella 0:68b32e1c7187 110 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_rtc.o
flombella 0:68b32e1c7187 111 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_sai.o
flombella 0:68b32e1c7187 112 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_sai_edma.o
flombella 0:68b32e1c7187 113 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_sdhc.o
flombella 0:68b32e1c7187 114 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_sim.o
flombella 0:68b32e1c7187 115 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_smc.o
flombella 0:68b32e1c7187 116 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_uart.o
flombella 0:68b32e1c7187 117 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_uart_edma.o
flombella 0:68b32e1c7187 118 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_vref.o
flombella 0:68b32e1c7187 119 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/fsl_wdog.o
flombella 0:68b32e1c7187 120 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/gpio_api.o
flombella 0:68b32e1c7187 121 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/gpio_irq_api.o
flombella 0:68b32e1c7187 122 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/i2c_api.o
flombella 0:68b32e1c7187 123 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/lp_ticker.o
flombella 0:68b32e1c7187 124 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/mbed_board.o
flombella 0:68b32e1c7187 125 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/mbed_overrides.o
flombella 0:68b32e1c7187 126 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/mbed_retarget.o
flombella 0:68b32e1c7187 127 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/mbed_sdk_boot.o
flombella 0:68b32e1c7187 128 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/pinmap.o
flombella 0:68b32e1c7187 129 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/port_api.o
flombella 0:68b32e1c7187 130 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/pwmout_api.o
flombella 0:68b32e1c7187 131 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/rtc_api.o
flombella 0:68b32e1c7187 132 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/serial_api.o
flombella 0:68b32e1c7187 133 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/sleep.o
flombella 0:68b32e1c7187 134 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/spi_api.o
flombella 0:68b32e1c7187 135 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/startup_MK64F12.o
flombella 0:68b32e1c7187 136 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/storage_driver.o
flombella 0:68b32e1c7187 137 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/system_MK64F12.o
flombella 0:68b32e1c7187 138 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/trng_api.o
flombella 0:68b32e1c7187 139 SYS_OBJECTS += mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/us_ticker.o
flombella 0:68b32e1c7187 140
flombella 0:68b32e1c7187 141 INCLUDE_PATHS += -I../
flombella 0:68b32e1c7187 142 INCLUDE_PATHS += -I../.
flombella 0:68b32e1c7187 143 INCLUDE_PATHS += -I../mbed-rtos
flombella 0:68b32e1c7187 144 INCLUDE_PATHS += -I../mbed-rtos/rtos
flombella 0:68b32e1c7187 145 INCLUDE_PATHS += -I../mbed-rtos/rtx
flombella 0:68b32e1c7187 146 INCLUDE_PATHS += -I../mbed-rtos/rtx/TARGET_CORTEX_M
flombella 0:68b32e1c7187 147 INCLUDE_PATHS += -I../mbed-rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7
flombella 0:68b32e1c7187 148 INCLUDE_PATHS += -I../mbed-rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_GCC
flombella 0:68b32e1c7187 149 INCLUDE_PATHS += -I../mbed-rtos/targets
flombella 0:68b32e1c7187 150 INCLUDE_PATHS += -I../mbed-rtos/targets/TARGET_Freescale
flombella 0:68b32e1c7187 151 INCLUDE_PATHS += -I../mbed/.
flombella 0:68b32e1c7187 152 INCLUDE_PATHS += -I../mbed/TARGET_K64F
flombella 0:68b32e1c7187 153 INCLUDE_PATHS += -I../mbed/TARGET_K64F/TARGET_Freescale
flombella 0:68b32e1c7187 154 INCLUDE_PATHS += -I../mbed/TARGET_K64F/TARGET_Freescale/TARGET_MCUXpresso_MCUS
flombella 0:68b32e1c7187 155 INCLUDE_PATHS += -I../mbed/TARGET_K64F/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F
flombella 0:68b32e1c7187 156 INCLUDE_PATHS += -I../mbed/TARGET_K64F/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/TARGET_FRDM
flombella 0:68b32e1c7187 157 INCLUDE_PATHS += -I../mbed/TARGET_K64F/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/device
flombella 0:68b32e1c7187 158 INCLUDE_PATHS += -I../mbed/TARGET_K64F/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/drivers
flombella 0:68b32e1c7187 159 INCLUDE_PATHS += -I../mbed/TARGET_K64F/TARGET_Freescale/TARGET_MCUXpresso_MCUS/api
flombella 0:68b32e1c7187 160 INCLUDE_PATHS += -I../mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM
flombella 0:68b32e1c7187 161 INCLUDE_PATHS += -I../mbed/drivers
flombella 0:68b32e1c7187 162 INCLUDE_PATHS += -I../mbed/hal
flombella 0:68b32e1c7187 163 INCLUDE_PATHS += -I../mbed/platform
flombella 0:68b32e1c7187 164
flombella 0:68b32e1c7187 165 LIBRARY_PATHS := -L../mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM
flombella 0:68b32e1c7187 166 LIBRARIES := -lmbed
flombella 0:68b32e1c7187 167 LINKER_SCRIPT ?= ../mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/MK64FN1M0xxx12.ld
flombella 0:68b32e1c7187 168
flombella 0:68b32e1c7187 169 # Objects and Paths
flombella 0:68b32e1c7187 170 ###############################################################################
flombella 0:68b32e1c7187 171 # Tools and Flags
flombella 0:68b32e1c7187 172
flombella 0:68b32e1c7187 173 AS = 'arm-none-eabi-gcc' '-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' '-Os' '-mcpu=cortex-m4' '-mthumb' '-mfpu=fpv4-sp-d16' '-mfloat-abi=softfp'
flombella 0:68b32e1c7187 174 CC = 'arm-none-eabi-gcc' '-std=gnu99' '-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' '-Os' '-mcpu=cortex-m4' '-mthumb' '-mfpu=fpv4-sp-d16' '-mfloat-abi=softfp'
flombella 0:68b32e1c7187 175 CPP = 'arm-none-eabi-g++' '-std=gnu++98' '-fno-rtti' '-Wvla' '-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' '-Os' '-mcpu=cortex-m4' '-mthumb' '-mfpu=fpv4-sp-d16' '-mfloat-abi=softfp'
flombella 0:68b32e1c7187 176 LD = 'arm-none-eabi-gcc'
flombella 0:68b32e1c7187 177 ELF2BIN = 'arm-none-eabi-objcopy'
flombella 0:68b32e1c7187 178 PREPROC = 'arm-none-eabi-cpp' '-E' '-P' '-Wl,--gc-sections' '-Wl,--wrap,main' '-Wl,--wrap,_malloc_r' '-Wl,--wrap,_free_r' '-Wl,--wrap,_realloc_r' '-Wl,--wrap,_memalign_r' '-Wl,--wrap,_calloc_r' '-Wl,--wrap,exit' '-Wl,--wrap,atexit' '-Wl,-n' '-mcpu=cortex-m4' '-mthumb' '-mfpu=fpv4-sp-d16' '-mfloat-abi=softfp'
flombella 0:68b32e1c7187 179
flombella 0:68b32e1c7187 180
flombella 0:68b32e1c7187 181 C_FLAGS += -std=gnu99
flombella 0:68b32e1c7187 182 C_FLAGS += -DFEATURE_LWIP=1
flombella 0:68b32e1c7187 183 C_FLAGS += -D__MBED__=1
flombella 0:68b32e1c7187 184 C_FLAGS += -DDEVICE_I2CSLAVE=1
flombella 0:68b32e1c7187 185 C_FLAGS += -D__FPU_PRESENT=1
flombella 0:68b32e1c7187 186 C_FLAGS += -DTARGET_Freescale
flombella 0:68b32e1c7187 187 C_FLAGS += -DDEVICE_PORTINOUT=1
flombella 0:68b32e1c7187 188 C_FLAGS += -DTARGET_RTOS_M4_M7
flombella 0:68b32e1c7187 189 C_FLAGS += -DDEVICE_LOWPOWERTIMER=1
flombella 0:68b32e1c7187 190 C_FLAGS += -DDEVICE_RTC=1
flombella 0:68b32e1c7187 191 C_FLAGS += -DTOOLCHAIN_object
flombella 0:68b32e1c7187 192 C_FLAGS += -DDEVICE_SERIAL_ASYNCH=1
flombella 0:68b32e1c7187 193 C_FLAGS += -D__CMSIS_RTOS
flombella 0:68b32e1c7187 194 C_FLAGS += -DFSL_RTOS_MBED
flombella 0:68b32e1c7187 195 C_FLAGS += -DDEVICE_STORAGE=1
flombella 0:68b32e1c7187 196 C_FLAGS += -DTARGET_KPSDK_MCUS
flombella 0:68b32e1c7187 197 C_FLAGS += -DTOOLCHAIN_GCC
flombella 0:68b32e1c7187 198 C_FLAGS += -DTARGET_CORTEX_M
flombella 0:68b32e1c7187 199 C_FLAGS += -DTARGET_KSDK2_MCUS
flombella 0:68b32e1c7187 200 C_FLAGS += -DTARGET_LIKE_CORTEX_M4
flombella 0:68b32e1c7187 201 C_FLAGS += -DDEVICE_ANALOGOUT=1
flombella 0:68b32e1c7187 202 C_FLAGS += -DTARGET_M4
flombella 0:68b32e1c7187 203 C_FLAGS += -DTARGET_UVISOR_UNSUPPORTED
flombella 0:68b32e1c7187 204 C_FLAGS += -DTARGET_K64F
flombella 0:68b32e1c7187 205 C_FLAGS += -DDEVICE_SPI_ASYNCH=1
flombella 0:68b32e1c7187 206 C_FLAGS += -DDEVICE_PWMOUT=1
flombella 0:68b32e1c7187 207 C_FLAGS += -DDEVICE_INTERRUPTIN=1
flombella 0:68b32e1c7187 208 C_FLAGS += -DTARGET_CORTEX
flombella 0:68b32e1c7187 209 C_FLAGS += -DDEVICE_I2C=1
flombella 0:68b32e1c7187 210 C_FLAGS += -DDEVICE_PORTOUT=1
flombella 0:68b32e1c7187 211 C_FLAGS += -D__CORTEX_M4
flombella 0:68b32e1c7187 212 C_FLAGS += -DDEVICE_STDIO_MESSAGES=1
flombella 0:68b32e1c7187 213 C_FLAGS += -DCPU_MK64FN1M0VMD12
flombella 0:68b32e1c7187 214 C_FLAGS += -DTARGET_LIKE_MBED
flombella 0:68b32e1c7187 215 C_FLAGS += -DTARGET_FF_ARDUINO
flombella 0:68b32e1c7187 216 C_FLAGS += -DTARGET_KPSDK_CODE
flombella 0:68b32e1c7187 217 C_FLAGS += -DTARGET_RELEASE
flombella 0:68b32e1c7187 218 C_FLAGS += -DMBED_BUILD_TIMESTAMP=1508061234.6
flombella 0:68b32e1c7187 219 C_FLAGS += -DFEATURE_STORAGE=1
flombella 0:68b32e1c7187 220 C_FLAGS += -DDEVICE_TRNG=1
flombella 0:68b32e1c7187 221 C_FLAGS += -D__MBED_CMSIS_RTOS_CM
flombella 0:68b32e1c7187 222 C_FLAGS += -DDEVICE_SLEEP=1
flombella 0:68b32e1c7187 223 C_FLAGS += -DTOOLCHAIN_GCC_ARM
flombella 0:68b32e1c7187 224 C_FLAGS += -DTARGET_FRDM
flombella 0:68b32e1c7187 225 C_FLAGS += -DTARGET_MCUXpresso_MCUS
flombella 0:68b32e1c7187 226 C_FLAGS += -DDEVICE_SPI=1
flombella 0:68b32e1c7187 227 C_FLAGS += -DDEVICE_SPISLAVE=1
flombella 0:68b32e1c7187 228 C_FLAGS += -DDEVICE_ANALOGIN=1
flombella 0:68b32e1c7187 229 C_FLAGS += -DDEVICE_SERIAL=1
flombella 0:68b32e1c7187 230 C_FLAGS += -DDEVICE_FLASH=1
flombella 0:68b32e1c7187 231 C_FLAGS += -DDEVICE_PORTIN=1
flombella 0:68b32e1c7187 232 C_FLAGS += -DTARGET_MCU_K64F
flombella 0:68b32e1c7187 233 C_FLAGS += -DARM_MATH_CM4
flombella 0:68b32e1c7187 234 C_FLAGS += -DDEVICE_SERIAL_FC=1
flombella 0:68b32e1c7187 235 C_FLAGS += -include
flombella 0:68b32e1c7187 236 C_FLAGS += mbed_config.h
flombella 0:68b32e1c7187 237
flombella 0:68b32e1c7187 238 CXX_FLAGS += -std=gnu++98
flombella 0:68b32e1c7187 239 CXX_FLAGS += -fno-rtti
flombella 0:68b32e1c7187 240 CXX_FLAGS += -Wvla
flombella 0:68b32e1c7187 241 CXX_FLAGS += -DFEATURE_LWIP=1
flombella 0:68b32e1c7187 242 CXX_FLAGS += -D__MBED__=1
flombella 0:68b32e1c7187 243 CXX_FLAGS += -DDEVICE_I2CSLAVE=1
flombella 0:68b32e1c7187 244 CXX_FLAGS += -D__FPU_PRESENT=1
flombella 0:68b32e1c7187 245 CXX_FLAGS += -DTARGET_Freescale
flombella 0:68b32e1c7187 246 CXX_FLAGS += -DDEVICE_PORTINOUT=1
flombella 0:68b32e1c7187 247 CXX_FLAGS += -DTARGET_RTOS_M4_M7
flombella 0:68b32e1c7187 248 CXX_FLAGS += -DDEVICE_LOWPOWERTIMER=1
flombella 0:68b32e1c7187 249 CXX_FLAGS += -DDEVICE_RTC=1
flombella 0:68b32e1c7187 250 CXX_FLAGS += -DTOOLCHAIN_object
flombella 0:68b32e1c7187 251 CXX_FLAGS += -DDEVICE_SERIAL_ASYNCH=1
flombella 0:68b32e1c7187 252 CXX_FLAGS += -D__CMSIS_RTOS
flombella 0:68b32e1c7187 253 CXX_FLAGS += -DFSL_RTOS_MBED
flombella 0:68b32e1c7187 254 CXX_FLAGS += -DDEVICE_STORAGE=1
flombella 0:68b32e1c7187 255 CXX_FLAGS += -DTARGET_KPSDK_MCUS
flombella 0:68b32e1c7187 256 CXX_FLAGS += -DTOOLCHAIN_GCC
flombella 0:68b32e1c7187 257 CXX_FLAGS += -DTARGET_CORTEX_M
flombella 0:68b32e1c7187 258 CXX_FLAGS += -DTARGET_KSDK2_MCUS
flombella 0:68b32e1c7187 259 CXX_FLAGS += -DTARGET_LIKE_CORTEX_M4
flombella 0:68b32e1c7187 260 CXX_FLAGS += -DDEVICE_ANALOGOUT=1
flombella 0:68b32e1c7187 261 CXX_FLAGS += -DTARGET_M4
flombella 0:68b32e1c7187 262 CXX_FLAGS += -DTARGET_UVISOR_UNSUPPORTED
flombella 0:68b32e1c7187 263 CXX_FLAGS += -DTARGET_K64F
flombella 0:68b32e1c7187 264 CXX_FLAGS += -DDEVICE_SPI_ASYNCH=1
flombella 0:68b32e1c7187 265 CXX_FLAGS += -DDEVICE_PWMOUT=1
flombella 0:68b32e1c7187 266 CXX_FLAGS += -DDEVICE_INTERRUPTIN=1
flombella 0:68b32e1c7187 267 CXX_FLAGS += -DTARGET_CORTEX
flombella 0:68b32e1c7187 268 CXX_FLAGS += -DDEVICE_I2C=1
flombella 0:68b32e1c7187 269 CXX_FLAGS += -DDEVICE_PORTOUT=1
flombella 0:68b32e1c7187 270 CXX_FLAGS += -D__CORTEX_M4
flombella 0:68b32e1c7187 271 CXX_FLAGS += -DDEVICE_STDIO_MESSAGES=1
flombella 0:68b32e1c7187 272 CXX_FLAGS += -DCPU_MK64FN1M0VMD12
flombella 0:68b32e1c7187 273 CXX_FLAGS += -DTARGET_LIKE_MBED
flombella 0:68b32e1c7187 274 CXX_FLAGS += -DTARGET_FF_ARDUINO
flombella 0:68b32e1c7187 275 CXX_FLAGS += -DTARGET_KPSDK_CODE
flombella 0:68b32e1c7187 276 CXX_FLAGS += -DTARGET_RELEASE
flombella 0:68b32e1c7187 277 CXX_FLAGS += -DMBED_BUILD_TIMESTAMP=1508061234.6
flombella 0:68b32e1c7187 278 CXX_FLAGS += -DFEATURE_STORAGE=1
flombella 0:68b32e1c7187 279 CXX_FLAGS += -DDEVICE_TRNG=1
flombella 0:68b32e1c7187 280 CXX_FLAGS += -D__MBED_CMSIS_RTOS_CM
flombella 0:68b32e1c7187 281 CXX_FLAGS += -DDEVICE_SLEEP=1
flombella 0:68b32e1c7187 282 CXX_FLAGS += -DTOOLCHAIN_GCC_ARM
flombella 0:68b32e1c7187 283 CXX_FLAGS += -DTARGET_FRDM
flombella 0:68b32e1c7187 284 CXX_FLAGS += -DTARGET_MCUXpresso_MCUS
flombella 0:68b32e1c7187 285 CXX_FLAGS += -DDEVICE_SPI=1
flombella 0:68b32e1c7187 286 CXX_FLAGS += -DDEVICE_SPISLAVE=1
flombella 0:68b32e1c7187 287 CXX_FLAGS += -DDEVICE_ANALOGIN=1
flombella 0:68b32e1c7187 288 CXX_FLAGS += -DDEVICE_SERIAL=1
flombella 0:68b32e1c7187 289 CXX_FLAGS += -DDEVICE_FLASH=1
flombella 0:68b32e1c7187 290 CXX_FLAGS += -DDEVICE_PORTIN=1
flombella 0:68b32e1c7187 291 CXX_FLAGS += -DTARGET_MCU_K64F
flombella 0:68b32e1c7187 292 CXX_FLAGS += -DARM_MATH_CM4
flombella 0:68b32e1c7187 293 CXX_FLAGS += -DDEVICE_SERIAL_FC=1
flombella 0:68b32e1c7187 294 CXX_FLAGS += -include
flombella 0:68b32e1c7187 295 CXX_FLAGS += mbed_config.h
flombella 0:68b32e1c7187 296
flombella 0:68b32e1c7187 297 ASM_FLAGS += -x
flombella 0:68b32e1c7187 298 ASM_FLAGS += assembler-with-cpp
flombella 0:68b32e1c7187 299 ASM_FLAGS += -D__CORTEX_M4
flombella 0:68b32e1c7187 300 ASM_FLAGS += -DCPU_MK64FN1M0VMD12
flombella 0:68b32e1c7187 301 ASM_FLAGS += -DARM_MATH_CM4
flombella 0:68b32e1c7187 302 ASM_FLAGS += -D__FPU_PRESENT=1
flombella 0:68b32e1c7187 303 ASM_FLAGS += -D__MBED_CMSIS_RTOS_CM
flombella 0:68b32e1c7187 304 ASM_FLAGS += -D__CMSIS_RTOS
flombella 0:68b32e1c7187 305 ASM_FLAGS += -DFSL_RTOS_MBED
flombella 0:68b32e1c7187 306 ASM_FLAGS += -I.
flombella 0:68b32e1c7187 307 ASM_FLAGS += -Imbed-rtos
flombella 0:68b32e1c7187 308 ASM_FLAGS += -Imbed-rtos/rtx
flombella 0:68b32e1c7187 309 ASM_FLAGS += -Imbed-rtos/rtx/TARGET_CORTEX_M
flombella 0:68b32e1c7187 310 ASM_FLAGS += -Imbed-rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7
flombella 0:68b32e1c7187 311 ASM_FLAGS += -Imbed-rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_GCC
flombella 0:68b32e1c7187 312 ASM_FLAGS += -Imbed-rtos/targets
flombella 0:68b32e1c7187 313 ASM_FLAGS += -Imbed-rtos/targets/TARGET_Freescale
flombella 0:68b32e1c7187 314 ASM_FLAGS += -Imbed-rtos/rtos
flombella 0:68b32e1c7187 315 ASM_FLAGS += -Imbed/.
flombella 0:68b32e1c7187 316 ASM_FLAGS += -Imbed/TARGET_K64F
flombella 0:68b32e1c7187 317 ASM_FLAGS += -Imbed/TARGET_K64F/TARGET_Freescale
flombella 0:68b32e1c7187 318 ASM_FLAGS += -Imbed/TARGET_K64F/TARGET_Freescale/TARGET_MCUXpresso_MCUS
flombella 0:68b32e1c7187 319 ASM_FLAGS += -Imbed/TARGET_K64F/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F
flombella 0:68b32e1c7187 320 ASM_FLAGS += -Imbed/TARGET_K64F/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/TARGET_FRDM
flombella 0:68b32e1c7187 321 ASM_FLAGS += -Imbed/TARGET_K64F/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/device
flombella 0:68b32e1c7187 322 ASM_FLAGS += -Imbed/TARGET_K64F/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/drivers
flombella 0:68b32e1c7187 323 ASM_FLAGS += -Imbed/TARGET_K64F/TARGET_Freescale/TARGET_MCUXpresso_MCUS/api
flombella 0:68b32e1c7187 324 ASM_FLAGS += -Imbed/TARGET_K64F/TOOLCHAIN_GCC_ARM
flombella 0:68b32e1c7187 325 ASM_FLAGS += -Imbed/drivers
flombella 0:68b32e1c7187 326 ASM_FLAGS += -Imbed/hal
flombella 0:68b32e1c7187 327 ASM_FLAGS += -Imbed/platform
flombella 0:68b32e1c7187 328
flombella 0:68b32e1c7187 329
flombella 0:68b32e1c7187 330 LD_FLAGS :=-Wl,--gc-sections -Wl,--wrap,main -Wl,--wrap,_malloc_r -Wl,--wrap,_free_r -Wl,--wrap,_realloc_r -Wl,--wrap,_memalign_r -Wl,--wrap,_calloc_r -Wl,--wrap,exit -Wl,--wrap,atexit -Wl,-n -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp
flombella 0:68b32e1c7187 331 LD_SYS_LIBS :=-Wl,--start-group -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -lmbed -Wl,--end-group
flombella 0:68b32e1c7187 332
flombella 0:68b32e1c7187 333 # Tools and Flags
flombella 0:68b32e1c7187 334 ###############################################################################
flombella 0:68b32e1c7187 335 # Rules
flombella 0:68b32e1c7187 336
flombella 0:68b32e1c7187 337 .PHONY: all lst size
flombella 0:68b32e1c7187 338
flombella 0:68b32e1c7187 339
flombella 0:68b32e1c7187 340 all: $(PROJECT).bin $(PROJECT).hex size
flombella 0:68b32e1c7187 341
flombella 0:68b32e1c7187 342
flombella 0:68b32e1c7187 343 .s.o:
flombella 0:68b32e1c7187 344 +@$(call MAKEDIR,$(dir $@))
flombella 0:68b32e1c7187 345 +@echo "Assemble: $(notdir $<)"
flombella 0:68b32e1c7187 346
flombella 0:68b32e1c7187 347 @$(AS) -c $(ASM_FLAGS) $(INCLUDE_PATHS) -o $@ $<
flombella 0:68b32e1c7187 348
flombella 0:68b32e1c7187 349
flombella 0:68b32e1c7187 350
flombella 0:68b32e1c7187 351 .S.o:
flombella 0:68b32e1c7187 352 +@$(call MAKEDIR,$(dir $@))
flombella 0:68b32e1c7187 353 +@echo "Assemble: $(notdir $<)"
flombella 0:68b32e1c7187 354
flombella 0:68b32e1c7187 355 @$(AS) -c $(ASM_FLAGS) $(INCLUDE_PATHS) -o $@ $<
flombella 0:68b32e1c7187 356
flombella 0:68b32e1c7187 357
flombella 0:68b32e1c7187 358 .c.o:
flombella 0:68b32e1c7187 359 +@$(call MAKEDIR,$(dir $@))
flombella 0:68b32e1c7187 360 +@echo "Compile: $(notdir $<)"
flombella 0:68b32e1c7187 361 @$(CC) $(C_FLAGS) $(INCLUDE_PATHS) -o $@ $<
flombella 0:68b32e1c7187 362
flombella 0:68b32e1c7187 363 .cpp.o:
flombella 0:68b32e1c7187 364 +@$(call MAKEDIR,$(dir $@))
flombella 0:68b32e1c7187 365 +@echo "Compile: $(notdir $<)"
flombella 0:68b32e1c7187 366 @$(CPP) $(CXX_FLAGS) $(INCLUDE_PATHS) -o $@ $<
flombella 0:68b32e1c7187 367
flombella 0:68b32e1c7187 368
flombella 0:68b32e1c7187 369 $(PROJECT).link_script.ld: $(LINKER_SCRIPT)
flombella 0:68b32e1c7187 370 @$(PREPROC) $< -o $@
flombella 0:68b32e1c7187 371
flombella 0:68b32e1c7187 372
flombella 0:68b32e1c7187 373
flombella 0:68b32e1c7187 374 $(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) $(PROJECT).link_script.ld
flombella 0:68b32e1c7187 375 +@echo "link: $(notdir $@)"
flombella 0:68b32e1c7187 376 @$(LD) $(LD_FLAGS) -T $(filter-out %.o, $^) $(LIBRARY_PATHS) --output $@ $(filter %.o, $^) $(LIBRARIES) $(LD_SYS_LIBS)
flombella 0:68b32e1c7187 377
flombella 0:68b32e1c7187 378
flombella 0:68b32e1c7187 379 $(PROJECT).bin: $(PROJECT).elf
flombella 0:68b32e1c7187 380 $(ELF2BIN) -O binary $< $@
flombella 0:68b32e1c7187 381 +@echo "===== bin file ready to flash: $(OBJDIR)/$@ ====="
flombella 0:68b32e1c7187 382
flombella 0:68b32e1c7187 383 $(PROJECT).hex: $(PROJECT).elf
flombella 0:68b32e1c7187 384 $(ELF2BIN) -O ihex $< $@
flombella 0:68b32e1c7187 385
flombella 0:68b32e1c7187 386
flombella 0:68b32e1c7187 387 # Rules
flombella 0:68b32e1c7187 388 ###############################################################################
flombella 0:68b32e1c7187 389 # Dependencies
flombella 0:68b32e1c7187 390
flombella 0:68b32e1c7187 391 DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d)
flombella 0:68b32e1c7187 392 -include $(DEPS)
flombella 0:68b32e1c7187 393 endif
flombella 0:68b32e1c7187 394
flombella 0:68b32e1c7187 395 # Dependencies
flombella 0:68b32e1c7187 396 ###############################################################################