From 246a94305ee4db8f206c468c0a25a1ce7e820c7d Mon Sep 17 00:00:00 2001 From: Shino Amakusa Date: Tue, 8 Dec 2015 21:31:41 +0100 Subject: [PATCH] edited Makefile --- .gitignore | 1 + Makefile | 8 ++++++-- main.c | 13 ++++++++++++- stm32f4sdio.pro | 2 +- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 1c2ba55..63477a9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ *.map *.user *.user.* +*.lss diff --git a/Makefile b/Makefile index 9378ea1..ccfb046 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ INCLUDEPATH += -IFATFS -IFATFS/shimatta_sdio_driver ################################################################################### CC=arm-none-eabi-gcc OBJCOPY=arm-none-eabi-objcopy +OBJDUMP=arm-none-eabi-objdump LFLAGS = -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork @@ -60,7 +61,10 @@ $(target).elf: $(OBJ) -.PHONY: qtproject clean mrproper objcopy +.PHONY: qtproject clean mrproper objcopy disassemble + +disassemble: $(target).elf + $(OBJDUMP) -D -s $< > $(target).lss objcopy: $(target).bin $(target).hex @@ -68,7 +72,7 @@ mrproper: rm -f $(target).pro clean: - rm -f $(target).elf $(target).bin $(target).hex $(OBJ) $(mapfile).map + rm -f $(target).elf $(target).bin $(target).hex $(OBJ) $(mapfile).map $(target).lss qtproject: echo -e "TEMPLATE = app\nCONFIG -= console app_bundle qt" > $(target).pro echo -e "SOURCES += $(CFILES) $(ASFILES)" >> $(target).pro diff --git a/main.c b/main.c index 5801565..0e5a6cb 100644 --- a/main.c +++ b/main.c @@ -14,18 +14,29 @@ FATFS SDfs; FIL file; + +void test(char a, char b, char c, char d, char e,char f, char g, char h, char i, char j); +void gna(); int main() { RCC->AHB1ENR |= RCC_AHB1ENR_GPIODEN; __DSB(); GPIOD->MODER = OUTPUT(12); SysTick_Config(8*1680000); - + test(1,2,3,4,5,6,7,8,9,10); //f_mount(&SDfs, "0:/",1); //f_open(&file, "0:/meow.txt", FA_READ); while(1); } + +void test(char a, char b, char c, char d, char e,char f, char g, char h, char i, char j) { + gna(); + GPIOD->ODR ^= a+b+c+d+e+f+g+h+i+j; +} +void gna() { + GPIOD->ODR = 0; +} void SysTick_Handler() { GPIOD->ODR ^= (1<<12); diff --git a/stm32f4sdio.pro b/stm32f4sdio.pro index a4f31b6..dd63150 100644 --- a/stm32f4sdio.pro +++ b/stm32f4sdio.pro @@ -2,5 +2,5 @@ TEMPLATE = app CONFIG -= console app_bundle qt SOURCES += main.c syscalls.c UART/uart.c cmsis_boot/system_stm32f4xx.c FATFS/option/syscall.c FATFS/option/ccsbcs.c FATFS/diskio.c FATFS/ff.c FATFS/shimatta_sdio_driver/shimatta_sdio-driver.c boot/startup_stm32f4xx.S INCLUDEPATH += ./boot ./mathlib ./cmsis ./cmsis_boot ./UART ./FATFS ./FATFS/shimatta_sdio_driver -HEADERS += ./cmsis/core_cm4_simd.h ./cmsis/core_cmFunc.h ./cmsis/core_cm4.h ./cmsis/core_cmInstr.h ./cmsis_boot/stm32f407xx.h ./cmsis_boot/system_stm32f4xx.h ./cmsis_boot/stm32f4xx.h ./mathlib/arm_math.h ./UART/uart.h ./FATFS/ffconf.h ./FATFS/integer.h ./FATFS/ff.h ./FATFS/diskio.h ./FATFS/shimatta_sdio_driver/shimatta_sdio-driver.h +HEADERS += ./cmsis_boot/system_stm32f4xx.h ./cmsis_boot/stm32f407xx.h ./cmsis_boot/stm32f4xx.h ./cmsis/core_cmFunc.h ./cmsis/core_cm4_simd.h ./cmsis/core_cmInstr.h ./cmsis/core_cm4.h ./FATFS/diskio.h ./FATFS/shimatta_sdio_driver/shimatta_sdio-driver.h ./FATFS/integer.h ./FATFS/ffconf.h ./FATFS/ff.h ./mathlib/arm_math.h ./UART/uart.h DEFINES += STM32F407xx STM32F4XX ARM_MATH_CM4