Merge branch 'master' of shimatta.de:mhu/stm32f4-sdio
This commit is contained in:
commit
c4166fef74
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ Debug
|
|||||||
*.user
|
*.user
|
||||||
*.user.*
|
*.user.*
|
||||||
*.lss
|
*.lss
|
||||||
|
*.d
|
||||||
|
37
Makefile
37
Makefile
@ -16,6 +16,11 @@ DEFINES = -DSTM32F407xx -DSTM32F4XX -DARM_MATH_CM4
|
|||||||
mapfile = dafuqishappening
|
mapfile = dafuqishappening
|
||||||
|
|
||||||
##Custom Files###
|
##Custom Files###
|
||||||
|
ifneq ($(VERBOSE),true)
|
||||||
|
QUIET=@
|
||||||
|
else
|
||||||
|
QUIET=
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
CFILES += fatfs/option/syscall.c fatfs/option/ccsbcs.c fatfs/diskio.c fatfs/ff.c fatfs/shimatta_sdio_driver/shimatta_sdio.c
|
CFILES += fatfs/option/syscall.c fatfs/option/ccsbcs.c fatfs/diskio.c fatfs/ff.c fatfs/shimatta_sdio_driver/shimatta_sdio.c
|
||||||
@ -35,8 +40,8 @@ CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16 -nostartfiles -Wall -O0 -g3
|
|||||||
|
|
||||||
####################################################################################
|
####################################################################################
|
||||||
|
|
||||||
OBJ = $(CFILES:%.c=%.c.o)
|
OBJ = $(CFILES:%.c=%.o)
|
||||||
ASOBJ = $(ASFILES:%.S=%.S.o)
|
ASOBJ = $(ASFILES:%.S=%.o)
|
||||||
|
|
||||||
default: $(target).elf
|
default: $(target).elf
|
||||||
|
|
||||||
@ -44,35 +49,40 @@ default: $(target).elf
|
|||||||
|
|
||||||
|
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
$(OBJCOPY) -O binary $^ $@
|
$(QUIET)$(OBJCOPY) -O binary $^ $@
|
||||||
%.hex: %.elf
|
%.hex: %.elf
|
||||||
$(OBJCOPY) -O ihex $^ $@
|
$(QUIET)$(OBJCOPY) -O ihex $^ $@
|
||||||
|
|
||||||
|
|
||||||
#Linking
|
#Linking
|
||||||
$(target).elf: $(OBJ) $(ASOBJ)
|
$(target).elf: $(OBJ) $(ASOBJ)
|
||||||
$(CC) $(LFLAGS) $(LIBRARYPATH) -o $@ $^ $(LIBRARIES)
|
@echo !!! Calling linker $@
|
||||||
$(SIZE) $@
|
$(QUIET)$(CC) $(LFLAGS) $(LIBRARYPATH) -o $@ $^ $(LIBRARIES)
|
||||||
|
$(QUIET)$(SIZE) $@
|
||||||
|
|
||||||
|
|
||||||
#Compiling
|
#Compiling
|
||||||
%.c.o: %.c
|
$(OBJ):
|
||||||
$(CC) $(CFLAGS) $(INCLUDEPATH) $(DEFINES) -o $@ $<
|
@echo !!! Calling Compiler $@
|
||||||
|
$(QUIET)$(CC) $(CFLAGS) -MMD -MT $@ $(INCLUDEPATH) $(DEFINES) -o $@ $(@:%.o=%.c)
|
||||||
|
|
||||||
%.S.o: %.S
|
$(ASOBJ):
|
||||||
$(CC) $(CFLAGS) $(INCLUDEPATH) $(DEFINES) -o $@ $<
|
@echo !!! Calling Assembler $@
|
||||||
|
$(QUIET)$(CC) $(CFLAGS) -MMD -MT $@ $(INCLUDEPATH) $(DEFINES) -o $@ $(@:%.o=%.S)
|
||||||
|
|
||||||
.PHONY: qtproject clean mrproper objcopy disassemble
|
.PHONY: qtproject clean mrproper objcopy disassemble
|
||||||
|
|
||||||
disassemble: $(target).elf
|
disassemble: $(target).elf
|
||||||
$(OBJDUMP) -D -s $< > $(target).lss
|
$(QUIET)$(OBJDUMP) -D -s $< > $(target).lss
|
||||||
|
|
||||||
objcopy: $(target).bin $(target).hex
|
objcopy: $(target).bin $(target).hex
|
||||||
|
|
||||||
mrproper:
|
mrproper:
|
||||||
rm -f $(target).pro
|
$(QUIET)rm -f $(target).pro
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(target).elf $(target).bin $(target).hex $(OBJ) $(ASOBJ) $(mapfile).map $(target).lss
|
@echo cleaning up
|
||||||
|
$(QUIET)rm -f $(target).elf $(target).bin $(target).hex $(OBJ) $(ASOBJ) $(mapfile).map $(target).lss $(CFILES:%.c=%.d) $(ASFILES:%.S=%.d)
|
||||||
qtproject:
|
qtproject:
|
||||||
echo -e "TEMPLATE = app\nCONFIG -= console app_bundle qt" > $(target).pro
|
echo -e "TEMPLATE = app\nCONFIG -= console app_bundle qt" > $(target).pro
|
||||||
echo -e "SOURCES += $(CFILES) $(ASFILES)" >> $(target).pro
|
echo -e "SOURCES += $(CFILES) $(ASFILES)" >> $(target).pro
|
||||||
@ -83,4 +93,5 @@ qtproject:
|
|||||||
echo -ne "\nDEFINES += " >> $(target).pro
|
echo -ne "\nDEFINES += " >> $(target).pro
|
||||||
echo "$(DEFINES)" | sed "s/-D//g" >> $(target).pro
|
echo "$(DEFINES)" | sed "s/-D//g" >> $(target).pro
|
||||||
|
|
||||||
|
-include $(CFILES:%.c=%.d) $(ASFILES:%.S=%.d)
|
||||||
|
|
||||||
|
@ -97,3 +97,4 @@ extern void SystemCoreClockUpdate(void);
|
|||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
|
/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
|
||||||
|
|
||||||
|
@ -11,7 +11,5 @@
|
|||||||
void initUART();
|
void initUART();
|
||||||
void sendChar(char c);
|
void sendChar(char c);
|
||||||
void sendString(char* s, int count);
|
void sendString(char* s, int count);
|
||||||
#ifdef _P20N_
|
|
||||||
void yuri();
|
|
||||||
#endif
|
|
||||||
#endif /* UART_UART_H_ */
|
#endif /* UART_UART_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user