Search found 108 matches

by dmaxben
Wed Jul 01, 2020 6:06 pm
Forum: ESP-IDF
Topic: Get SHA256 of SPIFFS partition?
Replies: 15
Views: 14101

Re: Get SHA256 of SPIFFS partition?

Ok so after lots of experimentation....

It seems bootloader_mmap (and therefore SHA256 calculation) cant handle chunks >3862528 bytes.

I guess we're out of luck as far as calculating SHA256 hash of large partitions on a 16MB flash chip. :(
by dmaxben
Wed Jul 01, 2020 3:24 pm
Forum: ESP-IDF
Topic: Get SHA256 of SPIFFS partition?
Replies: 15
Views: 14101

Re: Get SHA256 of SPIFFS partition?

Im wondering if Im running into problems simply due to the size of the partition?

Im using a 16MB flash chip, and the SPIFFS partition is 11.4MB.
by dmaxben
Wed Jul 01, 2020 2:42 pm
Forum: ESP-IDF
Topic: Get SHA256 of SPIFFS partition?
Replies: 15
Views: 14101

Re: Get SHA256 of SPIFFS partition?

Im using this exact code: esp_vfs_spiffs_unregister(NULL); ESP_LOGI(TAG, "SPIFFS unmounted"); uint8_t hash[32] = {0}; const esp_partition_t *p = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_SPIFFS, NULL); ESP_LOGI(TAG, "Found spiffs"); ESP_LOGI(TAG, "SPIFFS address: %...
by dmaxben
Wed Jul 01, 2020 2:27 pm
Forum: ESP-IDF
Topic: Get SHA256 of SPIFFS partition?
Replies: 15
Views: 14101

Re: Get SHA256 of SPIFFS partition?

Hi Max, Thanks for providing a detailed report of what isn't working. The bug linked on GitHub was an issue introduced in ESP-IDF v4.1 development (regression when we added support for ESP32-S2 Beta), so it shouldn't be a bug in v3.x at all. I just did a quick test with ESP-IDF v3.3.1 by modifying ...
by dmaxben
Tue Jun 30, 2020 1:19 pm
Forum: ESP-IDF
Topic: Get SHA256 of SPIFFS partition?
Replies: 15
Views: 14101

Re: Get SHA256 of SPIFFS partition?

chegewara wrote:
Mon Jun 29, 2020 7:13 pm
https://github.com/espressif/esp-idf/issues/4586

Fixed in IDF v4.x, not fixed in v3.x.
ahh darn... so theres no way to make it work in IDF 3.x ?

Guess Ill have to work on porting my code to IDF 4.x
by dmaxben
Mon Jun 29, 2020 6:44 pm
Forum: ESP-IDF
Topic: Get SHA256 of SPIFFS partition?
Replies: 15
Views: 14101

Get SHA256 of SPIFFS partition?

Im having some trouble getting the ESP to properly calculate the SHA hash of my SPIFFS partition. Using IDF 3.3.1 This works fine for getting the SHA256 of the running firmware uint8_t FWsha_256[HASH_LEN] = {0}; esp_partition_get_sha256(esp_ota_get_running_partition(), FWsha_256); calc_sha256(FWsha_...
by dmaxben
Thu May 07, 2020 10:38 pm
Forum: ESP-IDF
Topic: Unexplained CAN Errors
Replies: 16
Views: 15707

Re: Unexplained CAN Errors

What does your code look like for initializing the CAN controller, and reading messages?

You're sure the CAN transceiver is good and wired correctly? Which CAN transceiver are you using?
by dmaxben
Thu May 07, 2020 2:14 pm
Forum: ESP-IDF
Topic: partition erase and partition write DOES NOT WORK [SOLVED]
Replies: 4
Views: 5451

Re: partition erase and partition write DOES NOT WORK

Well I feel like a complete idiot!!

I was indeed not using the pointer to the partition struct correctly.... :lol:

Im surprised it compiled and let me build it...

but once I did find partition to get the pointer, then it worked!

Thanks so much for the help everyone, much appreciated!
by dmaxben
Thu May 07, 2020 3:45 am
Forum: ESP-IDF
Topic: partition erase and partition write DOES NOT WORK [SOLVED]
Replies: 4
Views: 5451

Re: partition erase and partition write DOES NOT WORK

WiFive wrote:
Thu May 07, 2020 2:41 am
esp_partition_find_first
Why does partition-find have to be called? I already know the proper offset, size, and name based on what I put into my partition file?
by dmaxben
Wed May 06, 2020 11:44 pm
Forum: ESP-IDF
Topic: partition erase and partition write DOES NOT WORK [SOLVED]
Replies: 4
Views: 5451

partition erase and partition write DOES NOT WORK [SOLVED]

Im at a loss here...ive been messing around with this for 7 hours and I cant figure out why esp_partition_erase_range and esp_partition_write do not work. All they do is return either "invalid size" or "invalid argument" errors. ESP32-wroom32, 16MB flash. My partition table is setup for a SPIFFS par...