Search found 2344 matches

by ESP_Angus
Wed May 12, 2021 4:01 am
Forum: General Discussion
Topic: secure boot check fail" in ESP32 when using Secure Boot and Flash Encryption
Replies: 6
Views: 5373

Re: secure boot check fail" in ESP32 when using Secure Boot and Flash Encryption

Hi Raghav, Sorry to hear you're having problems making this work correctly. The "secure boot check fail" message means that the digest in flash doesn't match the bootloader binary as read out from flash. So the problem is unlikely to be related to partition table offset, unless you flashed the parti...
by ESP_Angus
Tue May 11, 2021 12:37 am
Forum: ESP-IDF
Topic: How to disable secure boot V2 from esp32s2
Replies: 2
Views: 5575

Re: How to disable secure boot V2 from esp32s2

Hi ankayca, I'm afraid that it's not possible to disable Secure Boot V2 once enabled. If it was, then this would provide a way to bypass Secure Boot protection. It is possible to build a new bootloader and/or app, sign them with the key trusted by the device, and flash them. /dev/ttyUSB0 failed to c...
by ESP_Angus
Mon May 10, 2021 11:55 pm
Forum: ESP-IDF
Topic: How is my heap getting corrupted? [Code assistance/review]
Replies: 9
Views: 15929

Re: How is my heap getting corrupted? [Code assistance/review]

Hi rfleming, The reason uxTaskGetStackHighWaterMark is crashing is that a task handle is only valid while the task is valid, after the task has been deleted all of its resources are freed and the task handle itself becomes a pointer to freed memory. Suggest calling uxTaskGetStackHighWaterMark(NULL) ...
by ESP_Angus
Mon May 10, 2021 11:49 pm
Forum: Report Bugs
Topic: Wrong logging level for ESP_LOGI [IDFGH-5232]
Replies: 2
Views: 7478

Re: Wrong logging level for ESP_LOGI [IDFGH-5232]

Hi dkatsig, Thanks for noticing this! We run some of our ESP-IDF automated tests on the host system, and to do this we have to stub out some of the lower-level functions like logging, flash, etc. The stub header for logging in spi_flash host testing does indeed have this typo and logs at the wrong l...
by ESP_Angus
Fri May 07, 2021 11:25 pm
Forum: ESP-IDF
Topic: How is my heap getting corrupted? [Code assistance/review]
Replies: 9
Views: 15929

Re: How is my heap getting corrupted? [Code assistance/review]

Hi rfleming, Unfortunately at least in C the compiler can't determine maximum stack size (for example, think of recursive functions). I'm unsure if you can check it for arbitrary functions in any language without solving the halting problem! You can call uxTaskGetStackHighWaterMark(NULL) from a task...
by ESP_Angus
Fri May 07, 2021 7:33 am
Forum: ESP-IDF
Topic: How is my heap getting corrupted? [Code assistance/review]
Replies: 9
Views: 15929

Re: How is my heap getting corrupted? [Code assistance/review]

Hi rfleming, I think your observation is right and it's possible you are overflowing the stack of the main task (meaning: the code in app_main is using more stack than is assigned for the task that runs it). The stack for each task is allocated from the heap, so a major overflow can trigger heap cor...
by ESP_Angus
Fri May 07, 2021 12:38 am
Forum: ESP-IDF
Topic: How do I include CA attributes in pulblic key for "Signed App Images"?
Replies: 2
Views: 2277

Re: How do I include CA attributes in pulblic key for "Signed App Images"?

Hi flouflou, Sounds like an interesting thesis project! Unfortunately the binary format compiled into the bootloader for Secure Boot V1 is very simple - it's just the EC public key point value stored directly as two fixed length binary numbers. There isn't any additional metadata or support for vari...
by ESP_Angus
Wed May 05, 2021 8:44 am
Forum: ESP-IDF
Topic: How is my heap getting corrupted? [Code assistance/review]
Replies: 9
Views: 15929

Re: How is my heap getting corrupted? [Code assistance/review]

Hi rfleming, Thanks for the comprehensive description of the issue. What ESP-IDF version are you using? I had a quick attempt to reproduce this on ESP-IDF master branch and failed. I think either it depends on the IDF version you're using, or it depends on the sdkconfig contents (for example, the of...
by ESP_Angus
Wed May 05, 2021 7:39 am
Forum: General Discussion
Topic: ULP RISC-V calling assembly from C not working
Replies: 2
Views: 3208

Re: ULP RISC-V calling assembly from C not working

Hi bitmandu, Thanks for the very clear test case! After scratching my head about this for a bit, I can confirm this is a bug in the ESP-IDF linker script that we will fix ASAP. In the meantime you can make your program work by changing the name of the assembly section that holds the add function, li...
by ESP_Angus
Tue May 04, 2021 11:35 pm
Forum: ESP-IDF
Topic: Setting Heap Management Scheme
Replies: 5
Views: 5497

Re: Setting Heap Management Scheme

Hi Dutch66, ESP-IDF doesn't use any of the FreeRTOS heap implementations, we use a different one (before ESP-IDF v4.3 it's a custom one called "multi_heap", since ESP-IDF v4.3 it's a new one based on the TLSF algorithm.) vPortMalloc() & vPortFree() are #defined to malloc() & free() in freertos porta...