Uploading base files for littlefs file system use #1655
-
I've recently moved "back" to not using the Arduino IDE after years of not using ecplise. I'm using ESP8266 to provide web connectivity to my project. In working to get things "figured out" quickly the Arduino IDE has the ability to upload a littlefs directly to the ESPs. I can not figure out how to get this to work directly from eclipse from any online sources. I suspect I need to add an external tool to the eclipse tool menu, but the build chain is completely obscured. If somone can point to an existing documentation for this it would be appreciated. Everything I'm seeing is all Arduino IDEv1 with no real applicability to eclipse. Thanks. My system is |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 15 replies
-
I guess you refer to upload over the air (abriviated as OTA) |
Beta Was this translation helpful? Give feedback.
-
No, I have OTA working. Here is a screen cap from Aruino IDE v2 with the Upload LittleFS feature as the second opion in the command picker. I have ported this project to Sloeber succefully and use the IDE to upload the LittleFS file. I would prefer to move entirely to Sloeber. Way back when I used eclipse without the Sloeber or Arduino (and strictly with AVR) I had to make a pile of tweaks for fuse setting tools as external tools. I'm assuming there is something I need to do here to push the files with esp8266fs.py (which is what is used in the Arduino v1 days) but am unsure where we are hiding the esp toolchain (stupid Mac). |
Beta Was this translation helpful? Give feedback.
-
Seems like you should be able to mount the filesystem on the esp and then dump your files |
Beta Was this translation helpful? Give feedback.
-
I think that will lead me in the right direction... specifically the mklittlefs project and maybe the littlefs-python project. That is effectively what the arduino tool is doing. Let me work on getting that functional then I'll report back. I decided to run an upload and grab the console display for commands and such. Odd that the Arduino IDE v2 is using the v1.5 uploader but... might just be because I upgraded vs starting from scratch. Here's the scrubbed-for-user-dirs command into from the arduino IDE.
|
Beta Was this translation helpful? Give feedback.
-
Running commands like
Should be easy in Sloeber |
Beta Was this translation helpful? Give feedback.
-
Excellent news... from a "general" perspective I have this working from shell command line use the arduino ide v1.5 tool chain. The ESPtools work with no issues once the syntax is understood. I have a couple of best practices questions for you
Thoughts? |
Beta Was this translation helpful? Give feedback.
-
Thoughts? The expand the makefile routeSloeber uses make and make builds targets ("all" and "clean" are the most known but you can have any target name you like)
CDT allows you to build any target and Sloeber allows you to "extend" the "makefile" to add targets.
This line creates the target uploadWithBuild and makes it dependent The next line is
Again (due to the tab) a recipe. The word "pattern" is a giving away that the environment variable is a command (in Arduino Speak) Using a programmerIn the very same way as described above I think it is possible to create a "programmer". |
Beta Was this translation helpful? Give feedback.
-
Thank you for the feedback. I have figured out shell commands for USB and OTA uploads using the Sloeber tool chain. No issues. I don't really ISP load the ESPs I have. There are significant differences in the methods for USB/OTA but it isn't significantly different than uploading the built project. I think this lends to your suggestion of a makefile target based solution.
I have a few things to work on so it may be a bit before I can get anything tested on this. I'll let you know what I come up with. Thanks for the great tool. |
Beta Was this translation helpful? Give feedback.
-
And we are good for LittleFS and OTA delivery. I have ... issues that could be part of my eclipse/sloeber setup so feel free to tell me I need to change my install. mklittlefs target path is a mess mklittlefs really needs variable input why am I only looking at LittleFS? no other tools are doing this... why? |
Beta Was this translation helpful? Give feedback.
-
Because I can't leave well enough alone... I installed the esp8266 board vs 3.1.0. We have the same issue with the tools paths in platform.txt. Demonstration pruned for brevity:
To me this is a problem with the platform definitions. I see the same mess up when I look at the definitions under the Arduino IDE locations (~/Libraries/Arduino/packages/esp8266/...) Adding all this to suggest "fixing the path" isn't a Sloeber problem. Seems to me this is somewhat intentional though as it exists over all the versions and everytime you search for fs upload over OTA you get "impossible, don't ask". |
Beta Was this translation helpful? Give feedback.
Thoughts?
Where do I begin ....
You seem to find solutions so I'll give a general overview and 2 possible routes and hope this will get you started.
Read this is sequence as the second route assumes you understood the first route.
The expand the makefile route
Sloeber uses make and m…