Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ATA-Trim support #2781

Merged
merged 29 commits into from
Jan 2, 2024
Merged

ATA-Trim support #2781

merged 29 commits into from
Jan 2, 2024

Conversation

SybexX
Copy link
Collaborator

@SybexX SybexX commented Dec 31, 2023

copied the ESP IDF component fatfs to our project and modified it to:

  1. SD initialize -> read SD parameters -> if FF_USE_TRIM = 1 -> ATA-Trim is supported -> run through ATA-Trim routine
  2. SD initialize -> read SD parameters -> if FF_USE_TRIM = 1 -> ATA-Trim is not supported -> do nothing
  3. SD initialize -> read SD parameters -> if FF_USE_TRIM = 0 -> do nothing

Original (official ESP-IDF behaviour):

  1. SD initialize -> read SD parameters -> if FF_USE_TRIM = 1 -> no matter whether ATA-Trim is supported or not -> run through ATA-Trim routine
  2. SD initialize -> read SD parameters -> if FF_USE_TRIM = 0 -> do nothing

See #2710 for details

@jomjol
Copy link
Owner

jomjol commented Dec 31, 2023

Is this doing the same as: #2779 ???

@SybexX and @caco3:

My question: one or the other pull request or both?

@SybexX
Copy link
Collaborator Author

SybexX commented Dec 31, 2023

Yes, only I have now adapted fatfs and sdmmc from the ESP-IDF so that FF_USE_TRIM can remain at 1 and cards that support it can also use it.
I don't know whether ATA Trim has any advantages at all, but I still want to keep it and not deactivate it completely.


Process in the ESP-IDF:

  1. SD initialize -> read SD parameters -> if FF_USE_TRIM = 1 -> no matter whether ATA-Trim is supported or not -> run through ATA-Trim routine
  2. SD initialize -> read SD parameters -> if FF_USE_TRIM = 0 -> do nothing

changed to:

  1. SD initialize -> read SD parameters -> if FF_USE_TRIM = 1 -> ATA-Trim is supported -> run through ATA-Trim routine
  2. SD initialize -> read SD parameters -> if FF_USE_TRIM = 1 -> ATA-Trim is not supported -> do nothing
  3. SD initialize -> read SD parameters -> if FF_USE_TRIM = 0 -> do nothing

@caco3 caco3 marked this pull request as draft December 31, 2023 11:56
@caco3
Copy link
Collaborator

caco3 commented Dec 31, 2023

@jomjol Yes, the other PR was the initial one, but we should go with the one here as it is advanced.
@SybexX Can you please in the readme and in the code mark your changes? This makes it easier when we want to update the file sin the future.

I updated the PR description with your nice explanation.

@friedpa and @Rak3tenmann Can you also test this PR and check it works for you?
Get the build from here: https://github.com/jomjol/AI-on-the-edge-device/actions?query=event%3Apull_request (use the latest [SybexX:ATA_TRIM_SUPPORT](https://github.com/SybexX/AI-on-the-edge-device/tree/ATA_TRIM_SUPPORT) build)

@friedpa
Copy link

friedpa commented Dec 31, 2023

Good Afternoon Gents,
the AI-on-the-edge-device__update__2781_merge_(9a3f3de) works as tested before.
Happy new year!

@caco3 caco3 marked this pull request as ready for review January 1, 2024 21:00
@caco3
Copy link
Collaborator

caco3 commented Jan 1, 2024

Thanks @SybexX for your contribution!

@SybexX
Copy link
Collaborator Author

SybexX commented Jan 2, 2024

Since this problem really affects all 5. versions, I have now created a "Issues" in espressif, let's see if something happens there.

espressif/esp-idf#12912

@jomjol jomjol merged commit 2ed6fb0 into jomjol:rolling Jan 2, 2024
6 checks passed
@SybexX SybexX deleted the ATA_TRIM_SUPPORT branch January 4, 2024 07:45
@olegarch
Copy link

Linker complains about duplicates:

packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/12.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio/build/esp32cam/esp-idf/esp-sdmmc/libesp-sdmmc.a(sdmmc_common_mh.o): in function sdmmc_init_ocr': AI-on-the-edge-device\code/components\esp-sdmmc/sdmmc_common_mh.c:25: multiple definition of sdmmc_init_ocr'; .pio/build/esp32cam/esp-idf/sdmmc/libsdmmc.a(sdmmc_common.o):C:\Users\olegk.platformio\packages\framework-espidf\components\sdmmc/sdmmc_common.c:23: first defined here

@SybexX
Copy link
Collaborator Author

SybexX commented Jan 25, 2024

Unfortunately, this is due to Visual Studio Code, and linking problems occasionally occur.
As far as I could read on the internet, this problem only affects Windows users^^

caco3 added a commit that referenced this pull request Feb 2, 2024
* update

* Revert "v15.4.0"

This reverts commit 74d4f20.

* Revert "prepare v15.4.0 versuch 2"

This reverts commit e790a14.

* revert submnodules (#2768)

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Update submodules (#2769)

- Update `esp-nn` to v1.0.2
- Update `esp32-camera` to v2.0.6
- Updated `tflite-micro-esp-examples` (The repo got renamed to `esp-tflite-micro ` and the folder structure got cleaned up).

* fix(unity-test): Run unity tests in dedicated task
Avoid running out of heap

* Add delay

* Update

* Update

* Enhance busy notification (#2774)

* on marker updating, show message and retry until round got completed

* same for contrast enhancement

---------

Co-authored-by: CaCO3 <caco@ruinelli.ch>

* Fix negatives on extended resolution false #2744 (#2772)

* not extended resolution allows -1 on the lowest digit

* not extended resolution allows -1 on the lowest number

* negatives on last value digit with -1 will set to prevalue and is not an error  #2744

---------

Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>

* Implemented late analog / digital transition (#2778)

* Implemented late transition

Complete rewrite of analog / digital transition

Two tests is still failing, which need to be discussed.

* Allow wider range of transition values to support late transition

* Added documentation

* Fix testings (#2783)

* fix all tests and more description

* The decimal point offset. -3 corresponds to x.yyy

---------

Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>

* Bugfix InfluxDB shifting times (#2785)

* Modify time_sntp

* Update time_sntp.cpp

* Update time_sntp.cpp

* update

* Update interface_influxdb.cpp

* Update interface_influxdb.cpp

* Update time_sntp.cpp

* Upload

* Update interface_influxdb.cpp

* Update interface_influxdb.cpp

* Update interface_influxdb.cpp

* Remove Time Convert vom influx Interface

* Update platform-espressif32 to 6.5.0 (#2770)

* Update ESP IDF to 6.5.0

* Migration to new IDF

* Correct smtp vor v5.1

---------

Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>

* ATA-Trim support (#2781)

* Add files via upload

* Update main.cpp

* Update main.cpp

* Update main.cpp

* Update Helper.cpp

* Update Helper.h

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update diskio_sdmmc_mh.c

* Update diskio_sdmmc_mh.h

* Update ff_mh.c

* Update vfs_fat_sdmmc_mh.c

* Update sdmmc_common_mh.h

* Update sdmmc_common_mh.c

* Update Helper.cpp

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update ff_mh.c

---------

Co-authored-by: CaCO3 <caco3@ruinelli.ch>

* Update Changelog.md

* Add device info info page (#2789)

Signed-off-by: Florian Grabmeier <flo.grabmeier@gmail.com>

* fix chip information REST API

* Update pipelines to fix warnings (#2841)

Update actions

* Move param doc (#2843)

moved param doc from docs repo to here

* fix(tflite): Fix memory leaks in tflite integration (#2842)

* Update Changelog.md (#2849)

---------

Signed-off-by: Florian Grabmeier <flo.grabmeier@gmail.com>
Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>
Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: Slider0007 <jobbelle@gmx.net>
Co-authored-by: Frank Haverland <fspapaping@googlemail.com>
Co-authored-by: Martin Siggel <martin.siggel@dlr.de>
Co-authored-by: michael <Heinrich-Tuning@web.de>
Co-authored-by: flox_x <93255373+flooxo@users.noreply.github.com>
Co-authored-by: Slider0007 <115730895+Slider0007@users.noreply.github.com>
@caco3 caco3 mentioned this pull request Feb 2, 2024
caco3 added a commit that referenced this pull request Feb 2, 2024
* update

* Revert "v15.4.0"

This reverts commit 74d4f20.

* Revert "prepare v15.4.0 versuch 2"

This reverts commit e790a14.

* revert submnodules (#2768)



* Update submodules (#2769)

- Update `esp-nn` to v1.0.2
- Update `esp32-camera` to v2.0.6
- Updated `tflite-micro-esp-examples` (The repo got renamed to `esp-tflite-micro ` and the folder structure got cleaned up).

* fix(unity-test): Run unity tests in dedicated task
Avoid running out of heap

* Add delay

* Update

* Update

* Enhance busy notification (#2774)

* on marker updating, show message and retry until round got completed

* same for contrast enhancement

---------



* Fix negatives on extended resolution false #2744 (#2772)

* not extended resolution allows -1 on the lowest digit

* not extended resolution allows -1 on the lowest number

* negatives on last value digit with -1 will set to prevalue and is not an error  #2744

---------



* Implemented late analog / digital transition (#2778)

* Implemented late transition

Complete rewrite of analog / digital transition

Two tests is still failing, which need to be discussed.

* Allow wider range of transition values to support late transition

* Added documentation

* Fix testings (#2783)

* fix all tests and more description

* The decimal point offset. -3 corresponds to x.yyy

---------



* Bugfix InfluxDB shifting times (#2785)

* Modify time_sntp

* Update time_sntp.cpp

* Update time_sntp.cpp

* update

* Update interface_influxdb.cpp

* Update interface_influxdb.cpp

* Update time_sntp.cpp

* Upload

* Update interface_influxdb.cpp

* Update interface_influxdb.cpp

* Update interface_influxdb.cpp

* Remove Time Convert vom influx Interface

* Update platform-espressif32 to 6.5.0 (#2770)

* Update ESP IDF to 6.5.0

* Migration to new IDF

* Correct smtp vor v5.1

---------




* ATA-Trim support (#2781)

* Add files via upload

* Update main.cpp

* Update main.cpp

* Update main.cpp

* Update Helper.cpp

* Update Helper.h

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update diskio_sdmmc_mh.c

* Update diskio_sdmmc_mh.h

* Update ff_mh.c

* Update vfs_fat_sdmmc_mh.c

* Update sdmmc_common_mh.h

* Update sdmmc_common_mh.c

* Update Helper.cpp

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update ff_mh.c

---------



* Update Changelog.md

* Add device info info page (#2789)



* fix chip information REST API

* Update pipelines to fix warnings (#2841)

Update actions

* Move param doc (#2843)

moved param doc from docs repo to here

* fix(tflite): Fix memory leaks in tflite integration (#2842)

* Update Changelog.md (#2849)

---------

Signed-off-by: Florian Grabmeier <flo.grabmeier@gmail.com>
Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>
Co-authored-by: CaCO3 <caco@ruinelli.ch>
Co-authored-by: Slider0007 <jobbelle@gmx.net>
Co-authored-by: Frank Haverland <fspapaping@googlemail.com>
Co-authored-by: Martin Siggel <martin.siggel@dlr.de>
Co-authored-by: michael <Heinrich-Tuning@web.de>
Co-authored-by: flox_x <93255373+flooxo@users.noreply.github.com>
Co-authored-by: Slider0007 <115730895+Slider0007@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants