| 
									
										
										
										
											2016-08-17 23:08:22 +08:00
										 |  |  | #
 | 
					
						
							|  |  |  | # Component Makefile
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-25 14:15:14 +08:00
										 |  |  | COMPONENT_SRCDIRS := . | 
					
						
							| 
									
										
										
										
											2016-09-08 17:41:43 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-31 10:12:16 +07:00
										 |  |  | #Linker scripts used to link the final application.
 | 
					
						
							|  |  |  | #Warning: These linker scripts are only used when the normal app is compiled; the bootloader
 | 
					
						
							|  |  |  | #specifies its own scripts.
 | 
					
						
							| 
									
										
										
										
											2019-03-14 17:29:32 +08:00
										 |  |  | LINKER_SCRIPTS += $(COMPONENT_BUILD_DIR)/esp32.project.ld esp32.peripherals.ld | 
					
						
							| 
									
										
										
										
											2017-03-09 10:29:00 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-31 10:12:16 +07:00
										 |  |  | #ld_include_panic_highint_hdl is added as an undefined symbol because otherwise the
 | 
					
						
							|  |  |  | #linker will ignore panic_highint_hdl.S as it has no other files depending on any
 | 
					
						
							|  |  |  | #symbols in it.
 | 
					
						
							| 
									
										
										
										
											2019-03-26 16:30:43 +08:00
										 |  |  | COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH)/ld \
 | 
					
						
							| 
									
										
										
										
											2016-12-12 15:54:30 +11:00
										 |  |  |                          -T esp32_out.ld \
 | 
					
						
							| 
									
										
										
										
											2017-04-18 17:14:32 +08:00
										 |  |  |                          -u ld_include_panic_highint_hdl \
 | 
					
						
							| 
									
										
										
										
											2018-04-18 10:57:45 +08:00
										 |  |  |                          $(addprefix -T ,$(LINKER_SCRIPTS)) \
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | COMPONENT_ADD_LDFRAGMENTS += ld/esp32_fragments.lf linker.lf | 
					
						
							| 
									
										
										
										
											2016-08-17 23:08:22 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-12-12 15:54:30 +11:00
										 |  |  | # final linking of project ELF depends on all binary libraries, and
 | 
					
						
							|  |  |  | # all linker scripts (except esp32_out.ld, as this is code generated here.)
 | 
					
						
							| 
									
										
										
										
											2019-03-22 14:21:15 +08:00
										 |  |  | COMPONENT_ADD_LINKER_DEPS := $(addprefix ld/, $(filter-out $(COMPONENT_BUILD_DIR)/esp32.project.ld, $(LINKER_SCRIPTS))) \
 | 
					
						
							| 
									
										
										
										
											2019-03-14 09:59:31 +11:00
										 |  |  |                             $(COMPONENT_BUILD_DIR)/esp32.project.ld | 
					
						
							| 
									
										
										
										
											2016-09-21 11:04:16 +10:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Preprocess esp32.ld linker script into esp32_out.ld
 | 
					
						
							|  |  |  | #
 | 
					
						
							|  |  |  | # The library doesn't really depend on esp32_out.ld, but it
 | 
					
						
							|  |  |  | # saves us from having to add the target to a Makefile.projbuild
 | 
					
						
							| 
									
										
										
										
											2018-09-21 14:33:18 +08:00
										 |  |  | $(COMPONENT_LIBRARY): esp32_out.ld | 
					
						
							| 
									
										
										
										
											2016-09-21 11:04:16 +10:00
										 |  |  | 
 | 
					
						
							|  |  |  | esp32_out.ld: $(COMPONENT_PATH)/ld/esp32.ld ../include/sdkconfig.h | 
					
						
							|  |  |  | 	$(CC) -I ../include -C -P -x c -E $< -o $@ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-14 09:59:31 +11:00
										 |  |  | COMPONENT_EXTRA_CLEAN := esp32_out.ld $(COMPONENT_BUILD_DIR)/esp32.project.ld |