edited Makefile
This commit is contained in:
		
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -3,3 +3,4 @@
 | 
				
			|||||||
*.map
 | 
					*.map
 | 
				
			||||||
*.user
 | 
					*.user
 | 
				
			||||||
*.user.*
 | 
					*.user.*
 | 
				
			||||||
 | 
					*.lss
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										8
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								Makefile
									
									
									
									
									
								
							@@ -25,6 +25,7 @@ INCLUDEPATH += -IFATFS -IFATFS/shimatta_sdio_driver
 | 
				
			|||||||
###################################################################################
 | 
					###################################################################################
 | 
				
			||||||
CC=arm-none-eabi-gcc
 | 
					CC=arm-none-eabi-gcc
 | 
				
			||||||
OBJCOPY=arm-none-eabi-objcopy
 | 
					OBJCOPY=arm-none-eabi-objcopy
 | 
				
			||||||
 | 
					OBJDUMP=arm-none-eabi-objdump
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
LFLAGS = -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork 
 | 
					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
 | 
					objcopy: $(target).bin $(target).hex
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -68,7 +72,7 @@ mrproper:
 | 
				
			|||||||
	rm -f $(target).pro
 | 
						rm -f $(target).pro
 | 
				
			||||||
 | 
					
 | 
				
			||||||
clean:
 | 
					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:
 | 
					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
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										13
									
								
								main.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								main.c
									
									
									
									
									
								
							@@ -14,18 +14,29 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
FATFS SDfs;
 | 
					FATFS SDfs;
 | 
				
			||||||
FIL file;
 | 
					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() {
 | 
					int main() {
 | 
				
			||||||
	RCC->AHB1ENR |= RCC_AHB1ENR_GPIODEN;
 | 
						RCC->AHB1ENR |= RCC_AHB1ENR_GPIODEN;
 | 
				
			||||||
	__DSB();
 | 
						__DSB();
 | 
				
			||||||
	GPIOD->MODER = OUTPUT(12);
 | 
						GPIOD->MODER = OUTPUT(12);
 | 
				
			||||||
	SysTick_Config(8*1680000);
 | 
						SysTick_Config(8*1680000);
 | 
				
			||||||
 | 
						test(1,2,3,4,5,6,7,8,9,10);
 | 
				
			||||||
	//f_mount(&SDfs, "0:/",1);
 | 
						//f_mount(&SDfs, "0:/",1);
 | 
				
			||||||
	//f_open(&file, "0:/meow.txt", FA_READ);
 | 
						//f_open(&file, "0:/meow.txt", FA_READ);
 | 
				
			||||||
	while(1);
 | 
						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()
 | 
					void SysTick_Handler()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	GPIOD->ODR ^= (1<<12);
 | 
						GPIOD->ODR ^= (1<<12);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,5 +2,5 @@ TEMPLATE = app
 | 
				
			|||||||
CONFIG -= console app_bundle qt
 | 
					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
 | 
					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
 | 
					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
 | 
					DEFINES += STM32F407xx STM32F4XX ARM_MATH_CM4
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user