Closed dvosully closed 7 months ago
Changed to component.
Edit 'myproject\main\CMakeLists.txt' and add "esp-idf-ftpClient" to the 'REQUIRES' section
No changes needed. Simply copy the component to your project.
Thanks for the update. The proposed PR was structured that the entire repo could simply be referenced as a submodule by git, whereas the modifications you made do (as you mentioned) require copying the component directory into your project. It still works, but IMO a bit less clean.
The changes I made were based on the directory structure used in the official ESP-IDF sample. I think Espressif recommends this kind of directory structure.
https://github.com/espressif/esp-idf/tree/master/examples/wifi/antenna https://github.com/espressif/esp-idf/tree/master/examples/ethernet/basic https://github.com/espressif/esp-idf/tree/master/examples/ethernet/enc28j60
./bluetooth/nimble/throughput_app/blecent_throughput/components ./bluetooth/esp_ble_mesh/ble_mesh_coex_test/components ./bluetooth/esp_ble_mesh/aligenie_demo/components ./system/unit_test/components ./system/console/advanced/components ./system/gcov/components ./peripherals/spi_master/hd_eeprom/components ./peripherals/dedicated_gpio/soft_uart/components ./peripherals/dedicated_gpio/soft_i2c/components ./peripherals/dedicated_gpio/soft_spi/components ./storage/custom_flash_driver/components ./build_system/cmake/plugins/components ./build_system/cmake/import_prebuilt/prebuilt/components ./build_system/cmake/import_lib/components
I have refactored the FTP client into a component library which can be included as a component of a larger project. This removes the need to copy the key files into a personal project, providing a clear separation between library and application, and making back-porting changes much more straightforward. Instead, the whole repository can be included as a submodule in an external project.
The demo application can still be built as a standalone project, and it is otherwise unchanged. To build the demo app now, cd to ./esp-idf-ftpClient/test and then configure and build the application as normal.
To use the component in a larger project (myproject):