esp-idf-sys
esp-idf-sys copied to clipboard
Building bindings to bootloader_support component
Adds the includes from the bootloader_support component and builds them by default. My main interest is access to the bootloader_random.h methods detailed in the Random Number Generation system API's. I thought it could be useful to add the rest of the bootloader support component while I was there.
I've tried to keep this inline with similar changes but it is my first contribution here, sorry if I've missed any conventions.
Hm, something is NOK with the includes of this PR. Check the CI build output.
Rebasing on the new release. I've taken a look at the CI workflows ~~and am not getting the same Clippy errors locally while building on Windows. I will try to replicate the environment as closely as possible in a Linux container to see if I can get the same errors as we encountered on CI.~~ am now seeing the same Clippy errors locally.
The conflicting generated definition only appears in the pio build:
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ets_secure_boot_signature_t {
_unused: [u8; 0],
}
Both the pio and native builds contain:
pub type ets_secure_boot_signature_t = ets_secure_boot_signature;
Which I believe is generated from the corresponding target-specific rom/secure_boot.h, e.g esp32c3/rom/secure_boot.h:
typedef struct ets_secure_boot_signature ets_secure_boot_signature_t;
The CI job for both native and pio use --target riscv32imc-esp-espidf, so I'm not sure where the difference is coming from. The only target I see that does not define ets_secure_boot_signature_t as a typedef is esp32:
/* Multiple key block support */
typedef struct {
ets_secure_boot_sig_block_t block[SECURE_BOOT_MAX_APPENDED_SIGN_BLOCKS_TO_IMAGE];
uint8_t _padding[4096 - (sizeof(ets_secure_boot_sig_block_t) * SECURE_BOOT_MAX_APPENDED_SIGN_BLOCKS_TO_IMAGE)];
} ets_secure_boot_signature_t;
This should only be getting included if CONFIG_IDF_TARGET_ESP32 is set.
I've now included bootloader_common.h in the build. Do you need something else included?
I've now included
bootloader_common.hin the build. Do you need something else included?
Could we include #include "bootloader_random.h"?