Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant overload bootloader_support component (IDFGH-5279) #7043

Closed
chegewara opened this issue May 18, 2021 · 2 comments
Closed

cant overload bootloader_support component (IDFGH-5279) #7043

chegewara opened this issue May 18, 2021 · 2 comments
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@chegewara
Copy link
Contributor

chegewara commented May 18, 2021

Hi,
i am trying to change factory reset pin level to use HIGH instead of LOW (btw it would be nice it selectable from menuconfig as feature), which requires to overload 2 components:

  • bootloader
  • bootloader_support

To do so i am having copy of both components in project components folder, but bootloader_support is used from esp-idf:

/home/chegewara/upwork/ota-over-ble-syrp/components/bootloader/subproject/main/bootloader_start.c: In function 'selected_boot_partition':
/home/chegewara/upwork/ota-over-ble-syrp/components/bootloader/subproject/main/bootloader_start.c:82:13: error: too many arguments to function 'bootloader_common_check_long_hold_gpio'
         if (bootloader_common_check_long_hold_gpio(CONFIG_BOOTLOADER_NUM_PIN_FACTORY_RESET, CONFIG_BOOTLOADER_HOLD_TIME_GPIO, CONFIG_BOOTLOADER_PIN_LEVEL_FACTORY_RESET) == 1) {
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/chegewara/upwork/ota-over-ble-syrp/components/bootloader/subproject/main/bootloader_start.c:18:
/home/chegewara/esp/esp-idf/components/bootloader_support/include/bootloader_common.h:81:22: note: declared here
 esp_comm_gpio_hold_t bootloader_common_check_long_hold_gpio(uint32_t num_pin, uint32_t delay_sec);

esp-idf: b015061 and master (updated now)

Thanks

@espressif-bot espressif-bot added the Status: Opened Issue is new label May 18, 2021
@github-actions github-actions bot changed the title cant overload bootloader_support component cant overload bootloader_support component (IDFGH-5279) May 18, 2021
@projectgus
Copy link
Contributor

projectgus commented May 31, 2021

Hi @chegewara,

Sorry for the slow reply.

We'll take the request for configurable levels on board, thanks (a PR would also be welcome if you happen to have one!)

I think to override bootloader_support component in the bootloader requires copying it to project_dir/bootloader/subproject/components/ rather than project_dir/components. This will result in a different bootloader_support being built for app vs bootloader, but if you only need to override the bootloader behaviour then this may be acceptable.

EDIT: Just confirmed this works, need to idf.py fullclean before building it again though.

We know this is a shortcoming in the build system bootloader implementation for now. We're working on some better options for overriding parts of bootloader functionality.

Angus

@chegewara
Copy link
Contributor Author

Hi @projectgus
I think it is acceptable solution and since it is very rare case to override bootloader_support we can leave it this way or give it a low priority.
In my case the problem is solved anyway.

Thanks

@espressif-bot espressif-bot added Status: In Progress Work is in progress and removed Status: Opened Issue is new labels Jun 15, 2021
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: In Progress Work is in progress labels Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

3 participants