mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-11-03 14:01:53 +00:00 
			
		
		
		
	Add the possibility to have user bootloader components. This is performed from an application/project, by creating bootloader components. To do so, it is required to create a `bootloader_component` directory containing the custom modules to be compiled with the bootloader. Thanks to this, two solutions are available to override the bootloader now: - Using hooks within a user bootloader component - Using a user defined `main` bootloader component to totally override the old implementation Please check the two new examples in `examples/custom_bootloader` * Closes https://github.com/espressif/esp-idf/issues/7043
		
			
				
	
	
		
			39 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
// Copyright 2015-2021 Espressif Systems (Shanghai) PTE LTD
 | 
						|
//
 | 
						|
// Licensed under the Apache License, Version 2.0 (the "License");
 | 
						|
// you may not use this file except in compliance with the License.
 | 
						|
// You may obtain a copy of the License at
 | 
						|
 | 
						|
//     http://www.apache.org/licenses/LICENSE-2.0
 | 
						|
//
 | 
						|
// Unless required by applicable law or agreed to in writing, software
 | 
						|
// distributed under the License is distributed on an "AS IS" BASIS,
 | 
						|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
						|
// See the License for the specific language governing permissions and
 | 
						|
// limitations under the License.
 | 
						|
 | 
						|
#ifndef BOOTLOADER_HOOKS_H
 | 
						|
#define BOOTLOADER_HOOKS_H
 | 
						|
 | 
						|
/**
 | 
						|
 * @file The 2nd stage bootloader can be overriden or completed by an application.
 | 
						|
 * The functions declared here are weak, and thus, are meant to be defined by a user
 | 
						|
 * project, if required.
 | 
						|
 * Please check `custom_bootloader` ESP-IDF examples for more details about this feature.
 | 
						|
 */
 | 
						|
 | 
						|
 | 
						|
/**
 | 
						|
 * @brief Function executed *before* the second stage bootloader initialization,
 | 
						|
 * if provided.
 | 
						|
 */
 | 
						|
void __attribute__((weak)) bootloader_before_init(void);
 | 
						|
 | 
						|
/**
 | 
						|
 * @brief Function executed *after* the second stage bootloader initialization,
 | 
						|
 * if provided.
 | 
						|
 */
 | 
						|
void __attribute__((weak)) bootloader_after_init(void);
 | 
						|
 | 
						|
#endif // BOOTLOADER_HOOKS_H
 |