mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-10-31 13:09:38 +00:00 
			
		
		
		
	 891f0db31d
			
		
	
	891f0db31d
	
	
	
		
			
			Implements function to dump GCOV data to host via JTAG. The following functionality was added: - Host file I/O - GCOV runtime I/O stubs - GCOV example
		
			
				
	
	
		
			26 lines
		
	
	
		
			725 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			725 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
| #
 | |
| # This is a project Makefile. It is assumed the directory this Makefile resides in is a
 | |
| # project subdirectory.
 | |
| #
 | |
| 
 | |
| PROJECT_NAME := gcov_example
 | |
| 
 | |
| include $(IDF_PATH)/make/project.mk
 | |
| 
 | |
| GCOV := $(call dequote,$(CONFIG_TOOLPREFIX))gcov
 | |
| REPORT_DIR := $(BUILD_DIR_BASE)/coverage_report
 | |
| 
 | |
| lcov-report:
 | |
| 	echo "Generating coverage report in: $(REPORT_DIR)"
 | |
| 	echo "Using gcov: $(GCOV)"
 | |
| 	mkdir -p $(REPORT_DIR)/html
 | |
| 	lcov --gcov-tool $(GCOV) -c -d $(BUILD_DIR_BASE) -o $(REPORT_DIR)/$(PROJECT_NAME).info
 | |
| 	genhtml -o $(REPORT_DIR)/html $(REPORT_DIR)/$(PROJECT_NAME).info
 | |
| 
 | |
| cov-data-clean:
 | |
| 	echo "Remove coverage data files..."
 | |
| 	find $(BUILD_DIR_BASE) -name "*.gcda" -exec rm {} +
 | |
| 	rm -rf $(REPORT_DIR)
 | |
| 
 | |
| .PHONY: lcov-report cov-data-clean
 |