Commit Graph

117 Commits

Author SHA1 Message Date
Adam Múdry
12dfcdd1d9 spiffs: Add esp_spiffs_check() function
esp_spiffs_check() exposes SPIFFS_check() functionality to the user
2022-05-27 21:14:33 +00:00
Ivan Grokhotkov
6eeaf50da8
spiffs: add init checks for partition alignment and data types
Closes https://github.com/espressif/esp-idf/issues/8593
2022-04-20 12:53:30 +02:00
Ivan Grokhotkov
370473b772 spiffs: only add GCC-specific flags when building with GCC 2021-09-16 11:07:54 +02:00
Omar Chebib
bd96484f7b host tests: add missing header files for compiling host tests 2021-07-20 17:44:20 +08:00
Shu Chen
6fce2930d0 esp32h2: enable more components to support esp32h2
Involved components:
 * app_trace
 * esp-tls
 * esp_adc_cal
 * esp_pm
 * esp_serial_slave_link
 * esp_timer
 * freertos
 * idf_test
 * log
 * mbedtls
 * newlib
 * perfmon
 * spi_flash
 * spiffs
 * ulp
 * unity
 * vfs
2021-07-01 19:53:11 +08:00
Roland Dobai
407053592e Drop support for unsupported Python versions 2021-06-21 21:48:49 +02:00
Jakob Hasse
ef2dba3921 Integrated linux log into fatfs and spiffs host tests 2021-05-28 11:05:55 +08:00
Ivan Grokhotkov
0bd9f6fe12 tools: spiffsgen: fix length error, add test case 2021-05-03 11:37:42 +02:00
Ivan Grokhotkov
9af485307e tools: spiffsgen.py: minor lint fixes
Not squashing these since they should have gone into the commit before
adding type hints.
2021-04-30 18:07:48 +02:00
Ivan Grokhotkov
a9b81341ca tools: spiffsgen.py: make default arguments meaningful
Without this, defaults of inverse options (--no-magic-len) were based
on the 'dest' value. In this case, dest='use_magic_len’, and the
default value is True. Which is confusing, because both
—use-magic-len and --no-magic-len show the same default value.

This adds a custom help formatter class which doesn’t add default
to the option help text if the help string already includes it.
2021-04-30 18:07:48 +02:00
Ivan Grokhotkov
9f20eeb1c0 tools: spiffsgen.py: add type annotations 2021-04-30 18:07:48 +02:00
Ivan Grokhotkov
930ee51b8f tools: spiffsgen.py: avoid reallocating byte array for each new block
On large filesystems (~15 MB), this reduces execution time from
11s to 0.3s.
2021-04-30 18:07:48 +02:00
Ivan Grokhotkov
ad1606ae1d tools: spiffsgen.py: esp8266 compatibility options
1. Implement --aligned-obj-ix-tables which is used by default on the
   ESP8266 in NodeMCU and Arduino.
2. Introduce --no-magic and --no-magic-len to allow disabling options
   --use-magic-len and --use-magic. As these have been declared with
   default=True and action='store_true', they couldn't be disabled
   otherwise.

Closes https://github.com/espressif/esp-idf/issues/6717
2021-04-30 18:07:48 +02:00
Renz Bagaporo
e6edf34e82 esp32: move esp_clk functions 2021-03-31 19:17:33 +08:00
Renz Bagaporo
4a08264e7a esp_system: split esp_system.h header 2021-03-31 19:13:03 +08:00
Angus Gratton
9c03f04769 esptool_py: Add esptool_py as a dependency for any component that uses it
Many components uses esptool_py_flash_target function, they all should
explicitly requier the esptool_py component.

Related to https://github.com/espressif/esp-idf/issues/6670
2021-03-08 19:47:38 +11:00
Fu Hanxi
0146f258d7 style: format python files with isort and double-quote-string-fixer 2021-01-26 10:49:01 +08:00
Marius Vikhammer
9c8e4fd4c5 C3: build and run unit tests
Enable building and running of unit tests in CI for C3 as well as fix
related compile errors

Also enables building of C3 test apps
2021-01-11 11:34:37 +08:00
Ivan Grokhotkov
b1c4107275 vfs: zero-initialize struct stat in *_stat and *_fstat handlers
...otherwise some fields will contain garbage values.
This wasn't noticed until HAVE_BLKSIZE got enabled in newlib builds.
2020-12-29 16:18:04 +01:00
Anton Maklakov
df544dee30 tools: Redirect some warnings to stderr 2020-12-15 12:41:20 +07:00
Angus Gratton
e4407468bc Merge branch 'feature/flash_binary_partition_with_name' into 'master'
buildsystem: flash binary to a named partition

Closes IDF-2387

See merge request espressif/esp-idf!11342
2020-12-10 06:24:15 +08:00
Omar Chebib
02ddecb69f buildsystem: flash binary to a named partition
Changed optional value parameter 'encrypted' to a named parameter
called 'ALWAYS_PLAINTEXT'. This flag can be passed to:
- esptool_py_flash_target
- esptool_py_flash_target_image
Fix wrong identation.
2020-12-08 12:16:02 +08:00
martin.gano
f4ea2dcb74 Tools: add Python 2 deprecation warning 2020-12-02 11:08:48 +01:00
Omar Chebib
956538e364 buildsystem: flash binary to a named partition
- Add the function esptool_py_flash_to_partition to flash a binary
image to a named partition. If encryption is enabled, this function
will also determine if the partition needs to be encrypted or not
according the its type, subtype and flag in the CSV file (if any).
- Use idf.py encrypted-flash will now flash both encrypted and
non-encrypted file if any (spiffs for example) using esptool.py's
--encrypt-files option.

Closes IDF-2387
Relates to IDF-723
Relates to IDF-2231
2020-11-26 10:04:34 +08:00
Angus Gratton
420aef1ffe Updates for riscv support
* Target components pull in xtensa component directly
* Use CPU HAL where applicable
* Remove unnecessary xtensa headers
* Compilation changes necessary to support non-xtensa gcc types (ie int32_t/uint32_t is no
  longer signed/unsigned int).

Changes come from internal branch commit a6723fc
2020-11-13 07:49:11 +11:00
Angus Gratton
66fb5a29bb Whitespace: Automated whitespace fixes (large commit)
Apply the pre-commit hook whitespace fixes to all files in the repo.

(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00
Renz Bagaporo
79887fdc6c soc: descriptive part occupy whole component 2020-10-28 07:21:29 +08:00
Renz Bagaporo
21e46d5b3c ci: use actual esp_system headers for host test 2020-10-22 19:42:34 +08:00
Jakob Hasse
20c068ef3b cmock: added cmock as component
* changing dependencies from unity->cmock
* added component.mk and Makefile.projbuild
* ignore test dir in gen_esp_err_to_name.py
* added some brief introduction of CMock in IDF
2020-09-02 16:38:37 +08:00
Michael (XIAO Xufeng)
5425ef4ee4 hal: extract hal component from soc component 2020-09-01 13:25:32 +08:00
morris
2917651478 esp_rom: extract common ets apis into esp_rom_sys.h 2020-07-27 15:27:01 +08:00
Renz Bagaporo
9a020cbb40 spiffs: restore dependency of flash targets on spiffs images
Closes https://github.com/espressif/esp-idf/issues/5066
2020-04-07 17:01:58 +08:00
Angus Gratton
62426a6c90 Merge branch 'refactor/use_new_component_registration_functions' into 'master'
CMake: Use new component registration function

See merge request espressif/esp-idf!8068
2020-03-25 08:02:42 +08:00
Renz Bagaporo
3d0967a58a test: declare requirements and include dirs private 2020-03-23 10:58:50 +08:00
Ivan Grokhotkov
dc77ccb24e spiffs: handle CONFIG_VFS_SUPPORT_DIR 2020-03-20 14:03:45 +01:00
Renz Christian Bagaporo
1f2e2fe8af soc: separate abstraction, description and implementation 2020-02-11 14:30:42 +05:00
KonstantinKondrashov
e85e99189f spiffs: Fix for case when CONFIG_SPIFFS_USE_MTIME is not defined
Closes: 2c793cef06
2020-02-05 03:00:22 +08:00
Renz Christian Bagaporo
cc8bff703e esptool_py: create flash target functions 2020-01-15 03:36:47 +00:00
Angus Gratton
28d64e7f82 Merge branch 'bugfix/cmake_failure_on_spiffsgen_clean_project' into 'master'
spiffs: fix build issue on clean project

See merge request espressif/esp-idf!6596
2020-01-13 12:14:04 +08:00
Angus Gratton
bdf6c00154 Merge branch 'feature/likely_unlikely' into 'master'
Adding likely unlikely macros to hot code paths

Closes IDF-284

See merge request espressif/esp-idf!6368
2020-01-10 14:05:07 +08:00
Konstantin Kondrashov
2c793cef06 idf: Support a custom toolchain with time_t wide 64-bits
Allows resolving the Y2K38 problem.

Closes: IDF-350

Closes: https://github.com/espressif/esp-idf/issues/584
2020-01-10 12:58:54 +08:00
Felipe Neves
fc00236d79 components/esp_common: added esp_macros.h that aims to hold useful macros
esp_common/esp_compiler: renamed esp_macros file to a more specific one

esp_common/esp_compiler: removed CONTAINER_OF macro, it was a duplicate

components/freertos: placed likely macros around port and critical sections

component/freertos: placed likely macros on lists module

components/freertos: placed unlikely macros inside of assertion points, they likely wont fail

components/freertos: added likely macros on queue modules

FreeRTOS queues are one of most hot code path, because to queues itself tend to
be used a lot by the applications, besides that, queues are the basic primitive
to form both mutexes and semaphores, The focus here is to place likely
macros inside lowest level send and receive routines, since they're common
from all kobjects: semaphores, queues, mutexes and FR internals (like timer queue)

components/lwip: placed likely/unlikey on net-interfaces code

components/fatfs: added unlikely macros on disk drivers code

components/spiffs: added unlikely macros on low level fs driver

components/freertos: added likely/unlikely macros on timers and ticker

freertos/event_group: placed likely/unlikely macros on hot event group code paths

components/sdmmc: placed likely / unlikely macros on lower level path of sdmmc

components/bt: placed unlikely macros around bt HCI functions calling

components/lwip: added likely/unlikely macros on OS port code section

components/freertos: fix code style on tick handler
2020-01-03 14:42:49 -03:00
Ivan Grokhotkov
750818de72 spiffs: clarify the usage of partition_label, fix the example
* If esp_vfs_spiffs_register is called with an explicit partition
  label, other SPIFFS functions (info, format, unregister) must be
  called with the same label.

* On the other hand, if label was NULL in the call to
  esp_vfs_spiffs_register and the first matching partition was used,
  calls to the rest of the SPIFFS functions should be done with NULL
  partition_label argument.

Fix the Doxygen documentation. Update the example accordingly, in case
a user modifies "partition_label" value in esp_vfs_spiffs_conf_t conf
initializer.

Closes https://github.com/espressif/esp-idf/issues/4450
2019-12-23 18:20:14 +01:00
Renz Christian Bagaporo
77585bd14e spiffs: fix build issue on clean project
From issue:

I did some poking around in components/spiffs/project_include.cmake and
it looks like what is failing is it isn't getting an offset from
parttool.py. I think what the problem is that the parttool.py cannot
determine the offset of the storage partition as I can't run menuconfig
to set the custom partitions.

I have tested that this problem is solvable by manually setting the
custom partitions in sdkconfig and that is a workaround but there should
be at least a better error message in the configuration when it cannot
find the partition as this would also happen if the partition name was
misspelled.

Closes https://github.com/espressif/esp-idf/issues/4236
2019-11-13 12:31:50 +08:00
Angus Gratton
7ce75a42c7 Merge branch 'master' into feature/esp32s2beta_merge 2019-10-25 15:13:52 +11:00
Renz Christian Bagaporo
746322b7d6 spiffs: fix issue with args to spiffsgen in make 2019-10-22 11:35:19 +08:00
Angus Gratton
8675a818f9 Merge branch 'master' into feature/esp32s2beta_merge 2019-10-22 13:51:49 +11:00
Ivan Grokhotkov
1821873a1d Merge branch 'feature/follow_symlinks_in_spiffsgen' into 'master'
spiffs: follow symlinks in spiffsgen

See merge request espressif/esp-idf!6280
2019-10-18 18:49:35 +08:00
Angus Gratton
ae21d669b9 Merge branch 'master' into feature/esp32s2beta_merge 2019-10-17 18:22:08 +11:00
Ivan Grokhotkov
0be585179e spiffs: fix warning when building at release optimization level
Closes https://github.com/espressif/esp-idf/issues/4144
2019-10-13 15:37:19 +02:00