Search found 11 matches

by ESP_jakob
Fri Aug 07, 2020 6:44 am
Forum: ESP-IDF
Topic: Transferring STL containers using esp_event_post_to
Replies: 9
Views: 911

Re: Transferring STL containers using esp_event_post_to

Hi Marek! As I understand, you want to notify the users of your component about the finished task. Why don't you use just simple callbacks? This could give you the control over the memory back since the caller of the callback can free the memory afterwards. This is also type-safe. If you don't want ...
by ESP_jakob
Fri Jul 31, 2020 11:45 am
Forum: ESP-IDF
Topic: Transferring STL containers using esp_event_post_to
Replies: 9
Views: 911

Re: Transferring STL containers using esp_event_post_to

Hi Marek, Yes, the data you're sending basically needs to be a trivial C struct. As you found already, this requirement comes from a design decision in esp_event to being able to send arbitrary data in C. It is simply not intended for this kind of resource management. I think however, that your use ...
by ESP_jakob
Thu Jul 30, 2020 12:14 pm
Forum: ESP-IDF
Topic: Transferring STL containers using esp_event_post_to
Replies: 9
Views: 911

Re: Transferring STL containers using esp_event_post_to

Hi Marek, Is it possible to dynamically allocate your data (e.g. http_message_t) on heap? I think this should work, you can initialize the stl container there and just have to make sure that it will be deleted upon event receiving. What do you mean by: I've just realized that any containers that inc...
by ESP_jakob
Tue Jul 07, 2020 2:37 am
Forum: ESP-IDF
Topic: Error : C:/esp-idf-v4.0.1/components/app_update/esp_app_desc.c too many decimal points in number
Replies: 4
Views: 462

Re: Error : C:/esp-idf-v4.0.1/components/app_update/esp_app_desc.c too many decimal points in number

Did you define your app_main() function?
If yes, is it defined in a .cpp file?

Best,
Jakob
by ESP_jakob
Mon Jul 06, 2020 6:47 am
Forum: ESP-IDF
Topic: Error : C:/esp-idf-v4.0.1/components/app_update/esp_app_desc.c too many decimal points in number
Replies: 4
Views: 462

Re: Error : C:/esp-idf-v4.0.1/components/app_update/esp_app_desc.c too many decimal points in number

Hi balsub123,

do you have some code which reproduces that problem? What's the IDF version, what sdkconfig file are you using?

Best,
Jakob
by ESP_jakob
Mon Jul 06, 2020 5:44 am
Forum: ESP-IDF
Topic: encrypt firmware with ESP32
Replies: 7
Views: 911

Re: encrypt firmware with ESP32

Hi Alex, Nice to hear your success! Regarding your questions: 1: NVS relies on the entry state bitmap and the header for each page which are specially tailored to only write 0 bits (this is the way flash writes work) unless the whole page is erased. Hence, this needs to work on the raw flash. 2: You...
by ESP_jakob
Wed Jul 01, 2020 10:07 am
Forum: ESP-IDF
Topic: encrypt firmware with ESP32
Replies: 7
Views: 911

Re: encrypt firmware with ESP32

Hi Alex, NVS encryption, flash encryption and secure boot are different things which partially depend on each other. Let's put secure boot aside and try to only do nvs encryption first. You first need to enable flash encryption, sometimes also called "generic flash encryption". I recommend using a h...
by ESP_jakob
Thu Jun 04, 2020 10:25 am
Forum: ESP-IDF
Topic: [SOLVED] ESP_ERR_NVS_NOT_FOUND from nvs_get_blob() due to nvs_commit() race condition
Replies: 11
Views: 1182

Re: [SOLVED] ESP_ERR_NVS_NOT_FOUND from nvs_get_blob() due to nvs_commit() race condition

Oh, I'm looking at the code just now, sorry.
Actually there shouldn't be a race condition like this.

Code: Select all

nvs_set_blob()
should finish everything before returning. NVS is supposed to be thread safe.
by ESP_jakob
Thu Jun 04, 2020 9:34 am
Forum: ESP-IDF
Topic: [SOLVED] ESP_ERR_NVS_NOT_FOUND from nvs_get_blob() due to nvs_commit() race condition
Replies: 11
Views: 1182

Re: [SOLVED] ESP_ERR_NVS_NOT_FOUND from nvs_get_blob() due to nvs_commit() race condition

Happy to hear that!

So you're doing an asynchronous write (with threads/FreeRTOS tasks), correct?
And yes, seems like our documentation needs some more clarity at this point.

Best,
Jakob
by ESP_jakob
Thu Jun 04, 2020 2:18 am
Forum: ESP-IDF
Topic: [SOLVED] ESP_ERR_NVS_NOT_FOUND from nvs_get_blob() due to nvs_commit() race condition
Replies: 11
Views: 1182

Re: Random ESP_ERR_NVS_NOT_FOUND from nvs_get_blob() sometimes?

OK... The reason why I'm asking is that there seems to be some kind of corruption of the NVS memory which triggers a delete of the blob because the checksum doesn't match anymore. These are the last 32 bytes of the blob data: b2e4 b9b6 b8ff ca00 0000 0000 0000 0000 0000 0000 0000 0000 0000 ffff ffff...

Go to advanced search