CFLAGS clean up
This commit is contained in:
		
							
								
								
									
										31
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								Makefile
									
									
									
									
									
								
							@@ -207,15 +207,30 @@ INC_PATHS = $(addprefix -I,$(IPATH))
 | 
				
			|||||||
# - Additional compiler flags
 | 
					# - Additional compiler flags
 | 
				
			||||||
#******************************************************************************
 | 
					#******************************************************************************
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#flags common to all targets
 | 
					# Debugging/Optimization
 | 
				
			||||||
CFLAGS += -mcpu=cortex-m4
 | 
					ifeq ($(DEBUG), 1)
 | 
				
			||||||
CFLAGS += -mthumb -mabi=aapcs --std=gnu99
 | 
						CFLAGS += -Og -ggdb
 | 
				
			||||||
CFLAGS += -Wall -Werror -Os -g3
 | 
					else
 | 
				
			||||||
CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
 | 
						CFLAGS += -Os
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# keep every function in separate section. This will allow linker to dump unused functions
 | 
					#flags common to all targets
 | 
				
			||||||
CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
 | 
					CFLAGS += \
 | 
				
			||||||
CFLAGS += -fno-builtin -fshort-enums -fstack-usage
 | 
						-mthumb \
 | 
				
			||||||
 | 
						-mabi=aapcs \
 | 
				
			||||||
 | 
						-mcpu=cortex-m4 \
 | 
				
			||||||
 | 
						-mfloat-abi=hard \
 | 
				
			||||||
 | 
						-mfpu=fpv4-sp-d16 \
 | 
				
			||||||
 | 
						-ffunction-sections \
 | 
				
			||||||
 | 
						-fdata-sections \
 | 
				
			||||||
 | 
						-fno-builtin \
 | 
				
			||||||
 | 
						-fshort-enums \
 | 
				
			||||||
 | 
						-fstack-usage \
 | 
				
			||||||
 | 
						-fno-strict-aliasing \
 | 
				
			||||||
 | 
						-Wall \
 | 
				
			||||||
 | 
						-Werror
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CFLAGS += -Wno-error=unused-parameter
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Defined Symbol (MACROS)
 | 
					# Defined Symbol (MACROS)
 | 
				
			||||||
CFLAGS += -D__HEAP_SIZE=0
 | 
					CFLAGS += -D__HEAP_SIZE=0
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user