Team,
I have copied bootloader folder from <esp_sdk>components to myproject/components. I modified the necessary changes so that it can generate pbl.bin in build/pbl/pbl.bin. But i could not avoid generating bootloader.bin. The assumption is to use this customized pbl.bin instead of bootloader.bin. Any suggestion how to avoid generating bootloader.bin without modifying esp_sdk components? i do not want to remove bootloader folder from components
ESP32S3 Custom bootloader
Re: ESP32S3 Custom bootloader
The recommended way to customize the bootloader is shown in the bootloader_override example: https://github.com/espressif/esp-idf/tr ... r_override
This way all the build system logic related to the bootloader stays in place, but you can override the implementation. Please give this approach a try!
This way all the build system logic related to the bootloader stays in place, but you can override the implementation. Please give this approach a try!
-
- Posts: 12
- Joined: Tue May 24, 2022 10:46 am
Re: ESP32S3 Custom bootloader
@ESP_Igrr,
Thanks for your reply.
I tried custom bootloader override example but i face the below error.
c:/espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: appl.elf section `.dram0.bss' will not fit in region `dram_seg'
c:/espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: DRAM segment data does not fit.
c:/espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: region `dram_seg' overflowed by 125528 bytes
It appears the custom bootloader is trying to fit in application binary not in bootloader binary.
Here is my project structure which is different from the example (main CMakelist.txt is not at the root of all directory)
├── main
│ ├── CMakeLists.txt This is main Cmakelist.txt and it references bootloader_components as its EXTRA_COMPONENT_DIRS
│ └── main.c User application
├── bootloader_components
│ └── main
│ ├── component.mk
│ ├── CMakeLists.txt
│ ├── ld/
│ │ └── ...
│ └── bootloader_start.c Implementation of the second stage bootloader
└── README.md
Thanks for your reply.
I tried custom bootloader override example but i face the below error.
c:/espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: appl.elf section `.dram0.bss' will not fit in region `dram_seg'
c:/espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: DRAM segment data does not fit.
c:/espressif/tools/xtensa-esp32s3-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/8.4.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: region `dram_seg' overflowed by 125528 bytes
It appears the custom bootloader is trying to fit in application binary not in bootloader binary.
Here is my project structure which is different from the example (main CMakelist.txt is not at the root of all directory)
├── main
│ ├── CMakeLists.txt This is main Cmakelist.txt and it references bootloader_components as its EXTRA_COMPONENT_DIRS
│ └── main.c User application
├── bootloader_components
│ └── main
│ ├── component.mk
│ ├── CMakeLists.txt
│ ├── ld/
│ │ └── ...
│ └── bootloader_start.c Implementation of the second stage bootloader
└── README.md
-
- Posts: 12
- Joined: Tue May 24, 2022 10:46 am
Re: ESP32S3 Custom bootloader
Unless if i update the build structure as below, then it is compiling without error. Because the CMakelist.txt inside bootloader/subproject is referring custom bootloader path as "${PROJECT_SOURCE_DIR}/bootloader_components".
├── main
│ ├── CMakeLists.txt This is main cmakelist.txt and it references the bootloader_components as its EXTRA_COMPONENT_DIRS
│ └── main.c User application
├ └── bootloader_components
│ └── main
│ ├── component.mk
│ ├── CMakeLists.txt
│ ├── ld/
│ │ └── ...
│ └── bootloader_start.c Implementation of the second stage bootloader
└── README.md This is the file you are currently reading
├── main
│ ├── CMakeLists.txt This is main cmakelist.txt and it references the bootloader_components as its EXTRA_COMPONENT_DIRS
│ └── main.c User application
├ └── bootloader_components
│ └── main
│ ├── component.mk
│ ├── CMakeLists.txt
│ ├── ld/
│ │ └── ...
│ └── bootloader_start.c Implementation of the second stage bootloader
└── README.md This is the file you are currently reading
Who is online
Users browsing this forum: No registered users and 369 guests