mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
Merge 3b28818ba4f1c0ace850ddd893cf28bcf71f2407 into 0461e2ff88369c3da0d4caced31e8488f53376cd
This commit is contained in:
commit
2019b16a9f
@ -1,17 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
PARAM=""
|
||||
|
||||
# Retrive the target from the current filename, if no target specified,
|
||||
# the variable will be empty
|
||||
TARGET=$(echo $0 | cut -s -f2 -d- | cut -s -f1 -d.)
|
||||
if [[ -n $TARGET ]]
|
||||
then
|
||||
# Target is not null, specify the build parameters
|
||||
PARAM="-DCMAKE_TOOLCHAIN_FILE=$IDF_PATH/tools/cmake/toolchain-${TARGET}.cmake -DTARGET=${TARGET} -GNinja"
|
||||
fi
|
||||
|
||||
rm -rf build && mkdir build && cd build
|
||||
cmake .. $PARAM
|
||||
cmake --build .
|
1
examples/build_system/cmake/idf_as_lib/build-esp32p4.sh
Symbolic link
1
examples/build_system/cmake/idf_as_lib/build-esp32p4.sh
Symbolic link
@ -0,0 +1 @@
|
||||
build.sh
|
@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
cd build
|
||||
python $IDF_PATH/components/esptool_py/esptool/esptool.py -p $1 write_flash @flash_project_args
|
||||
python -m esp_idf_monitor -p $1 idf_as_lib.elf
|
1
examples/build_system/cmake/idf_as_lib/run-esp32p4.sh
Symbolic link
1
examples/build_system/cmake/idf_as_lib/run-esp32p4.sh
Symbolic link
@ -0,0 +1 @@
|
||||
run-esp32.sh
|
@ -1,5 +1,3 @@
|
||||
add_library(stub_esp32 STATIC system_api.c flash_ops.c cpu_start.c)
|
||||
add_library(stub_esp32 STATIC system_api.c cpu_start.c)
|
||||
target_include_directories(stub_esp32 PUBLIC .)
|
||||
add_library(stub::esp32 ALIAS stub_esp32)
|
||||
|
||||
target_link_libraries(stub_esp32 stub::spi_flash)
|
||||
|
@ -9,6 +9,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ESP_OK 0 /*!< esp_err_t value indicating success (no error) */
|
||||
|
||||
typedef int esp_err_t;
|
||||
|
||||
void esp_restart(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -1,10 +0,0 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
|
||||
int spi_flash_get_chip_size(void)
|
||||
{
|
||||
return (1024 * 1024 * 1024);
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
add_library(stub_spi_flash INTERFACE)
|
||||
target_include_directories(stub_spi_flash INTERFACE .)
|
||||
add_library(stub_spi_flash STATIC flash_ops.c)
|
||||
target_include_directories(stub_spi_flash PUBLIC .)
|
||||
add_library(stub::spi_flash ALIAS stub_spi_flash)
|
||||
target_link_libraries(stub_spi_flash PUBLIC stub_esp32)
|
||||
|
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "esp_system.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void * esp_flash_t;
|
||||
|
||||
esp_err_t esp_flash_get_size(esp_flash_t *chip, uint32_t *out_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -1,19 +0,0 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int spi_flash_get_chip_size(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -0,0 +1,13 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
|
||||
#include "esp_flash.h"
|
||||
|
||||
esp_err_t esp_flash_get_size(esp_flash_t *chip, uint32_t *out_size)
|
||||
{
|
||||
*out_size = 1024 * 1024 * 1024;
|
||||
return ESP_OK;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user