Add Cmake variable for Uart on debug header in release and use -Og for debugbuild instead of -O0
This commit is contained in:
		
							
								
								
									
										1
									
								
								stm-firmware/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								stm-firmware/.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -15,3 +15,4 @@ reflow-controller.includes
 | 
				
			|||||||
*.config
 | 
					*.config
 | 
				
			||||||
*.files
 | 
					*.files
 | 
				
			||||||
*.user.*
 | 
					*.user.*
 | 
				
			||||||
 | 
					*.user
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -49,13 +49,17 @@ message("${BoldGreen}Version: ${GIT_DESCRIBE}${ColorReset}")
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
 | 
					IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
 | 
				
			||||||
add_definitions(-DDEBUGBUILD)
 | 
					add_definitions(-DDEBUGBUILD)
 | 
				
			||||||
add_compile_options(-O0 -g)
 | 
					add_compile_options(-Og -g)
 | 
				
			||||||
ELSE()
 | 
					ELSE()
 | 
				
			||||||
add_definitions(-DDEBUGBUILD)
 | 
					 | 
				
			||||||
add_compile_options(-O3 -g)
 | 
					add_compile_options(-O3 -g)
 | 
				
			||||||
add_link_options(-Wl,--gc-sections)
 | 
					add_link_options(-Wl,--gc-sections)
 | 
				
			||||||
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")
 | 
					ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if (DEFINED UART_ON_DEBUG_HEADER)
 | 
				
			||||||
 | 
					    add_definitions(-DUART_ON_DEBUG_HEADER)
 | 
				
			||||||
 | 
					endif (DEFINED UART_ON_DEBUG_HEADER)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
add_subdirectory(base64-lib)
 | 
					add_subdirectory(base64-lib)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user