Refactor quantum/split_common/i2c.c, quantum/split_common/serial.c (#4522)
* add temporary compile test shell script
* Extended support of SKIP_VERSION to make invariant compile results during testing.
* build_keyboard.mk, tmk_core/rules.mk: add LIB_SRC, QUANTUM_LIB_SRC support
Support compiled object enclosed in library.
e.g.
```
LIB_SRC += xxxx.c
xxxx.c --> xxxx.o ---> xxxx.a
```
* remove 'ifdef/ifndef USE_I2C' from quantum/split_common/{i2c|serial}.c
* add SKIP_DEBUG_INFO into tmk_core/rules.mk
When SKIP_DEBUG_INFO=yes is specified, do not use the -g option at compile time.
* tmk_core/rules.mk: Library object need -fno-lto
* add SKIP_DEBUG_INFO=yes
* remove temporary compile test shell script
* add '#define SOFT_SERIAL_PIN D0' to keyboards/lets_split/rev?/config.h
* quantum/split_common/serial.c: Changed not to use USE_I2C.
			
			
This commit is contained in:
		
							parent
							
								
									a49d98e665
								
							
						
					
					
						commit
						8f790948e5
					
				
					 9 changed files with 56 additions and 24 deletions
				
			
		| 
						 | 
				
			
			@ -34,6 +34,10 @@ $(error MASTER does not have a valid value(left/right))
 | 
			
		|||
    endif
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifdef SKIP_VERSION
 | 
			
		||||
    OPT_DEFS += -DSKIP_VERSION
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
# Determine which subfolders exist.
 | 
			
		||||
KEYBOARD_FOLDER_PATH_1 := $(KEYBOARD)
 | 
			
		||||
KEYBOARD_FOLDER_PATH_2 := $(patsubst %/,%,$(dir $(KEYBOARD_FOLDER_PATH_1)))
 | 
			
		||||
| 
						 | 
				
			
			@ -278,6 +282,7 @@ ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
 | 
			
		|||
endif
 | 
			
		||||
 | 
			
		||||
# # project specific files
 | 
			
		||||
SRC += $(patsubst %.c,%.clib,$(LIB_SRC))
 | 
			
		||||
SRC += $(KEYBOARD_SRC) \
 | 
			
		||||
    $(KEYMAP_C) \
 | 
			
		||||
    $(QUANTUM_SRC)
 | 
			
		||||
| 
						 | 
				
			
			@ -296,6 +301,7 @@ include $(TMK_PATH)/protocol.mk
 | 
			
		|||
include $(TMK_PATH)/common.mk
 | 
			
		||||
include bootloader.mk
 | 
			
		||||
 | 
			
		||||
SRC += $(patsubst %.c,%.clib,$(QUANTUM_LIB_SRC))
 | 
			
		||||
SRC += $(TMK_COMMON_SRC)
 | 
			
		||||
OPT_DEFS += $(TMK_COMMON_DEFS)
 | 
			
		||||
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue