Search found 9 matches

by LaWi14
Mon Nov 16, 2020 12:01 pm
Forum: ESP-IDF
Topic: SPIFFS and fseek beyond file end
Replies: 2
Views: 3373

Re: SPIFFS and fseek beyond file end

To answer myself: SPIFFS cannot do this. Should have looked up this before posting. From the SPIFFS wiki: Seeking in a file As opposed to posix, spiffs cannot create gaps in files. Sorry. You can seek around, but seeking beyond file end will promptly put the offset at the file end. Sorry for having ...
by LaWi14
Sun Nov 15, 2020 5:06 pm
Forum: ESP-IDF
Topic: SPIFFS and fseek beyond file end
Replies: 2
Views: 3373

SPIFFS and fseek beyond file end

I tried to enlarge an existing file by positioning the file pointer beyond the end of the file and writing a character there, expecting to have filled the characters in between w/ zeros. The code below works okay under Linux, but fseek fails with errno 5 (EIO) when tried on SPIFFS. Is this a known l...
by LaWi14
Sun Dec 08, 2019 4:28 pm
Forum: Hardware
Topic: support detection of ESP32 revisions 2 & 3
Replies: 4
Views: 5788

Re: support detection of ESP32 revisions 2 & 3

Hi all, somehow I cannot find this "announcement for ESP32 rev 2". As I noticed these days that I can communicate with 20kbaud CAN bus only from rev 2 upwards I am really interested to get my hands on rev 2. BTW: I cannot find any trace of a CAN register description in the technical reference materi...
by LaWi14
Wed Nov 27, 2019 9:23 pm
Forum: ESP-IDF
Topic: SHA-256 for running partition all zero?
Replies: 12
Views: 16441

Re: SHA-256 for running partition all zero?

To follow up myself: the mentioned change went in with the commit by "projectgus" on 16 Sep. See the diff for esp_image_format.c, lines 217-222 (OLD) / 227-231 (NEW) and 224-232 (OLD) / 233-244 (NEW): "if (data->image.hash_appended) {...}" has been moved into the else branch by this.
by LaWi14
Wed Nov 27, 2019 9:09 pm
Forum: ESP-IDF
Topic: SHA-256 for running partition all zero?
Replies: 12
Views: 16441

Re: SHA-256 for running partition all zero?

I compared the code of the current esp_image_format.c with an older version (pulled from git on October, 7th). And the older version has the copying of the hash to the image_digest (the block "if (data->image.hash_appended)" ) AFTER the "if (verify_sha) { ... } else { ...}" block, while the current ...
by LaWi14
Tue Nov 26, 2019 10:13 pm
Forum: ESP-IDF
Topic: SHA-256 for running partition all zero?
Replies: 12
Views: 16441

Re: SHA-256 for running partition all zero?

To continue my test: "Last thing I checked is an error-free return from a call to err = verify_simple_hash(sha_handle, data);" --> this function even debug-prints a non-null hash: D (1794) boot: Calculated hash: 3954b6030aa3f19e7aeb7acbd93ed974e4ef5e8d5865f366e101047a079649fa But it does not make it...
by LaWi14
Mon Nov 25, 2019 10:37 pm
Forum: ESP-IDF
Topic: SHA-256 for running partition all zero?
Replies: 12
Views: 16441

Re: SHA-256 for running partition all zero?

Hi Angus, I am using ESP-IDF v4.1-dev-815-ga45e99853. As you can see from my code snippet, the return value is ESP_OK. I looked up the definition of esp_partition_get_sha256(), which calls bootloader_common_get_sha256_of_partition(). There it returns from a call to esp_image_verify() with data.image...
by LaWi14
Sat Nov 23, 2019 6:02 pm
Forum: ESP-IDF
Topic: SHA-256 for running partition all zero?
Replies: 12
Views: 16441

SHA-256 for running partition all zero?

Following the native OTA example I try to output the SHA-256 for partition table, bootloader and firmware like this: // get sha256 digest for the partition table partition.address = ESP_PARTITION_TABLE_OFFSET; partition.size = ESP_PARTITION_TABLE_MAX_LEN; partition.type = ESP_PARTITION_TYPE_DATA; es...
by LaWi14
Wed Nov 20, 2019 6:28 pm
Forum: ESP-IDF
Topic: station_example_main.c: xEventGroupWaitBits missing?
Replies: 1
Views: 3026

station_example_main.c: xEventGroupWaitBits missing?

On checking the above example code (esp-idf/examples/wifi/getting_started/station/main/station_example_main.c) for the current IDF 4.0 I wondered if a call to xEventGroupWaitBits is missing. The event group is created, connected bit is set in the handler, but where is the code waiting for the bits s...