this robot uses ultrasonic sensors to detect the obstacles and the servo motor acts as the neck for the robot in checking the obstacles in right and left directions
Dependencies: HCSR04 Servo mbed
Fork of Obstacle_avoidance by
Makefile@1:43568a9d4323, 2017-03-24 (annotated)
- Committer:
- monikakakani
- Date:
- Fri Mar 24 01:02:04 2017 +0000
- Revision:
- 1:43568a9d4323
obstacle avoiding and detecting robot using ultrasonic and servo
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
monikakakani | 1:43568a9d4323 | 1 | # This file was automagically generated by mbed.org. For more information, |
monikakakani | 1:43568a9d4323 | 2 | # see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded |
monikakakani | 1:43568a9d4323 | 3 | |
monikakakani | 1:43568a9d4323 | 4 | GCC_BIN = |
monikakakani | 1:43568a9d4323 | 5 | PROJECT = Obstacle_avoider |
monikakakani | 1:43568a9d4323 | 6 | OBJECTS = ./main.o ./Servo/Servo.o ./HCSR04/hcsr04.o |
monikakakani | 1:43568a9d4323 | 7 | SYS_OBJECTS = ./mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/board.o ./mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/cmsis_nvic.o ./mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/mbed_overrides.o ./mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/retarget.o ./mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/startup_MK64F12.o ./mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/system_MK64F12.o |
monikakakani | 1:43568a9d4323 | 8 | INCLUDE_PATHS = -I. -I./Servo -I./HCSR04 -I./mbed -I./mbed/TARGET_K64F -I./mbed/TARGET_K64F/TARGET_Freescale -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/common -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/common/phyksz8081 -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/drivers -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/drivers/clock -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/drivers/enet -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/drivers/interrupt -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/drivers/pit -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/drivers/pit/common -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/adc -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/can -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/dac -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/dmamux -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/dspi -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/edma -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/enet -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/flextimer -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/gpio -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/i2c -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/llwu -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/lptmr -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/lpuart -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/mcg -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/mpu -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/osc -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/pdb -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/pit -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/pmc -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/port -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/rcm -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/rtc -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/sai -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/sdhc -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/sim -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/smc -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/uart -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/wdog -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/utilities -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_MCU_K64F -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_MCU_K64F/MK64F12 -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_MCU_K64F/TARGET_FRDM -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_MCU_K64F/device -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_MCU_K64F/device/MK64F12 -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_MCU_K64F/device/device -I./mbed/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_MCU_K64F/device/device/MK64F12 -I./mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM |
monikakakani | 1:43568a9d4323 | 9 | LIBRARY_PATHS = -L./mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM |
monikakakani | 1:43568a9d4323 | 10 | LIBRARIES = -lmbed |
monikakakani | 1:43568a9d4323 | 11 | LINKER_SCRIPT = ./mbed/TARGET_K64F/TOOLCHAIN_GCC_ARM/K64FN1M0xxx12.ld |
monikakakani | 1:43568a9d4323 | 12 | |
monikakakani | 1:43568a9d4323 | 13 | ############################################################################### |
monikakakani | 1:43568a9d4323 | 14 | AS = $(GCC_BIN)arm-none-eabi-as |
monikakakani | 1:43568a9d4323 | 15 | CC = $(GCC_BIN)arm-none-eabi-gcc |
monikakakani | 1:43568a9d4323 | 16 | CPP = $(GCC_BIN)arm-none-eabi-g++ |
monikakakani | 1:43568a9d4323 | 17 | LD = $(GCC_BIN)arm-none-eabi-gcc |
monikakakani | 1:43568a9d4323 | 18 | OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy |
monikakakani | 1:43568a9d4323 | 19 | OBJDUMP = $(GCC_BIN)arm-none-eabi-objdump |
monikakakani | 1:43568a9d4323 | 20 | SIZE = $(GCC_BIN)arm-none-eabi-size |
monikakakani | 1:43568a9d4323 | 21 | |
monikakakani | 1:43568a9d4323 | 22 | ifeq ($(HARDFP),1) |
monikakakani | 1:43568a9d4323 | 23 | FLOAT_ABI = hard |
monikakakani | 1:43568a9d4323 | 24 | else |
monikakakani | 1:43568a9d4323 | 25 | FLOAT_ABI = softfp |
monikakakani | 1:43568a9d4323 | 26 | endif |
monikakakani | 1:43568a9d4323 | 27 | |
monikakakani | 1:43568a9d4323 | 28 | |
monikakakani | 1:43568a9d4323 | 29 | CPU = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=$(FLOAT_ABI) |
monikakakani | 1:43568a9d4323 | 30 | CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -Wextra -fno-exceptions -ffunction-sections -fdata-sections -fomit-frame-pointer -MMD -MP |
monikakakani | 1:43568a9d4323 | 31 | CC_SYMBOLS = -DTARGET_RTOS_M4_M7 -DTARGET_FF_ARDUINO -DTOOLCHAIN_GCC_ARM -DTOOLCHAIN_GCC -DMBED_BUILD_TIMESTAMP=1459186138.8 -DTARGET_KPSDK_MCUS -DTARGET_KPSDK_CODE -DTARGET_FRDM -DTARGET_CORTEX_M -DCPU_MK64FN1M0VMD12 -D__FPU_PRESENT=1 -DTARGET_Freescale -DTARGET_M4 -D__MBED__=1 -DTARGET_K64F -DTARGET_LIKE_CORTEX_M4 -D__CORTEX_M4 -DFSL_RTOS_MBED -DTARGET_MCU_K64F -DARM_MATH_CM4 -DTARGET_LIKE_MBED |
monikakakani | 1:43568a9d4323 | 32 | |
monikakakani | 1:43568a9d4323 | 33 | LD_FLAGS = $(CPU) -Wl,--gc-sections --specs=nano.specs -u _printf_float -u _scanf_float -Wl,--wrap,main -Wl,-Map=$(PROJECT).map,--cref |
monikakakani | 1:43568a9d4323 | 34 | LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys |
monikakakani | 1:43568a9d4323 | 35 | |
monikakakani | 1:43568a9d4323 | 36 | |
monikakakani | 1:43568a9d4323 | 37 | ifeq ($(DEBUG), 1) |
monikakakani | 1:43568a9d4323 | 38 | CC_FLAGS += -DDEBUG -O0 |
monikakakani | 1:43568a9d4323 | 39 | else |
monikakakani | 1:43568a9d4323 | 40 | CC_FLAGS += -DNDEBUG -Os |
monikakakani | 1:43568a9d4323 | 41 | endif |
monikakakani | 1:43568a9d4323 | 42 | |
monikakakani | 1:43568a9d4323 | 43 | .PHONY: all clean lst size |
monikakakani | 1:43568a9d4323 | 44 | |
monikakakani | 1:43568a9d4323 | 45 | all: $(PROJECT).bin $(PROJECT).hex size |
monikakakani | 1:43568a9d4323 | 46 | |
monikakakani | 1:43568a9d4323 | 47 | |
monikakakani | 1:43568a9d4323 | 48 | clean: |
monikakakani | 1:43568a9d4323 | 49 | rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) |
monikakakani | 1:43568a9d4323 | 50 | |
monikakakani | 1:43568a9d4323 | 51 | |
monikakakani | 1:43568a9d4323 | 52 | .asm.o: |
monikakakani | 1:43568a9d4323 | 53 | $(CC) $(CPU) -c -x assembler-with-cpp -o $@ $< |
monikakakani | 1:43568a9d4323 | 54 | .s.o: |
monikakakani | 1:43568a9d4323 | 55 | $(CC) $(CPU) -c -x assembler-with-cpp -o $@ $< |
monikakakani | 1:43568a9d4323 | 56 | .S.o: |
monikakakani | 1:43568a9d4323 | 57 | $(CC) $(CPU) -c -x assembler-with-cpp -o $@ $< |
monikakakani | 1:43568a9d4323 | 58 | |
monikakakani | 1:43568a9d4323 | 59 | .c.o: |
monikakakani | 1:43568a9d4323 | 60 | $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $< |
monikakakani | 1:43568a9d4323 | 61 | |
monikakakani | 1:43568a9d4323 | 62 | .cpp.o: |
monikakakani | 1:43568a9d4323 | 63 | $(CPP) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu++98 -fno-rtti $(INCLUDE_PATHS) -o $@ $< |
monikakakani | 1:43568a9d4323 | 64 | |
monikakakani | 1:43568a9d4323 | 65 | |
monikakakani | 1:43568a9d4323 | 66 | |
monikakakani | 1:43568a9d4323 | 67 | $(PROJECT).elf: $(OBJECTS) $(SYS_OBJECTS) |
monikakakani | 1:43568a9d4323 | 68 | $(LD) $(LD_FLAGS) -T$(LINKER_SCRIPT) $(LIBRARY_PATHS) -o $@ $^ $(LIBRARIES) $(LD_SYS_LIBS) $(LIBRARIES) $(LD_SYS_LIBS) |
monikakakani | 1:43568a9d4323 | 69 | |
monikakakani | 1:43568a9d4323 | 70 | |
monikakakani | 1:43568a9d4323 | 71 | $(PROJECT).bin: $(PROJECT).elf |
monikakakani | 1:43568a9d4323 | 72 | $(OBJCOPY) -O binary $< $@ |
monikakakani | 1:43568a9d4323 | 73 | |
monikakakani | 1:43568a9d4323 | 74 | $(PROJECT).hex: $(PROJECT).elf |
monikakakani | 1:43568a9d4323 | 75 | @$(OBJCOPY) -O ihex $< $@ |
monikakakani | 1:43568a9d4323 | 76 | |
monikakakani | 1:43568a9d4323 | 77 | $(PROJECT).lst: $(PROJECT).elf |
monikakakani | 1:43568a9d4323 | 78 | @$(OBJDUMP) -Sdh $< > $@ |
monikakakani | 1:43568a9d4323 | 79 | |
monikakakani | 1:43568a9d4323 | 80 | lst: $(PROJECT).lst |
monikakakani | 1:43568a9d4323 | 81 | |
monikakakani | 1:43568a9d4323 | 82 | size: $(PROJECT).elf |
monikakakani | 1:43568a9d4323 | 83 | $(SIZE) $(PROJECT).elf |
monikakakani | 1:43568a9d4323 | 84 | |
monikakakani | 1:43568a9d4323 | 85 | DEPS = $(OBJECTS:.o=.d) $(SYS_OBJECTS:.o=.d) |
monikakakani | 1:43568a9d4323 | 86 | -include $(DEPS) |
monikakakani | 1:43568a9d4323 | 87 | |
monikakakani | 1:43568a9d4323 | 88 |