mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
a1cbc20a91
Replaced per-target bootloader.ld.in with bootloader.memory.ld.in and bootloader.sections.ld.in. Common code moved to file bootloader.sections.common.ld Unify ESP32-P4 ECO4- and ECO4+ linker scripts into one shared script Revision-specific code is selected with CONFIG_ESP32P4_SELECTS_REV_LESS_V3
66 lines
1.4 KiB
C
66 lines
1.4 KiB
C
/*
|
|
* SPDX-FileCopyrightText: 2018-2025 Espressif Systems (Shanghai) CO LTD
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
#pragma once
|
|
|
|
#include "esp_err.h"
|
|
#include "esp_image_format.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**@{*/
|
|
/**
|
|
* @brief labels from bootloader linker script: bootloader.sections.common.ld.in
|
|
*
|
|
*/
|
|
extern int _bss_start;
|
|
extern int _bss_end;
|
|
extern int _data_start;
|
|
extern int _data_end;
|
|
/**@}*/
|
|
|
|
/**
|
|
* @brief bootloader image header
|
|
*
|
|
*/
|
|
extern esp_image_header_t bootloader_image_hdr;
|
|
|
|
/**@{*/
|
|
/**
|
|
* @brief Common initialization steps that are applied to all targets.
|
|
*
|
|
*/
|
|
esp_err_t bootloader_read_bootloader_header(void);
|
|
esp_err_t bootloader_check_bootloader_validity(void);
|
|
void bootloader_clear_bss_section(void);
|
|
void bootloader_config_wdt(void);
|
|
void bootloader_enable_random(void);
|
|
void bootloader_print_banner(void);
|
|
/**@}*/
|
|
|
|
/* @brief Prepares hardware for work.
|
|
*
|
|
* Setting up:
|
|
* - Disable Cache access for both CPUs;
|
|
* - Initialise cache mmu;
|
|
* - Setting up pins and mode for SD, SPI, UART, Clocking.
|
|
|
|
* @return ESP_OK - If the setting is successful.
|
|
* ESP_FAIL - If the setting is not successful.
|
|
* ESP_ERR_NOT_SUPPORTED - If selected secure boot scheme is not supported.
|
|
*/
|
|
esp_err_t bootloader_init(void);
|
|
|
|
/**
|
|
* @brief Initialize cache and mmu
|
|
*/
|
|
void bootloader_init_ext_mem(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|