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

make flash does not upload modified javascript file #2785

Closed
xeonqq opened this issue Jun 1, 2024 · 2 comments
Closed

make flash does not upload modified javascript file #2785

xeonqq opened this issue Jun 1, 2024 · 2 comments

Comments

@xeonqq
Copy link
Contributor

xeonqq commented Jun 1, 2024

If I modify a javascript file which is included in index.html, after calling make flash, the new file is not updated in the MCU, so still the old version of the javascript file in the flash memory.
The only way to make it really update that file is to change the file name of this javascript file, and do a make clean then make flash. Quite time consuming during development.

@mikee47
Copy link
Contributor

mikee47 commented Jun 1, 2024

Your issue is somewhat lacking in detail, but I'll make a few observations. Note that the build system isn't smart enough to detect changes in the target filesystem layout so you must do this manually.

In general when you need to rebuild a filing system partition image use make buildpart. If the partition in question is called, say, spiffs0, then you can be more specific and use make buildpart PART=spiffs0. That will rebuild the image from the source files.

Regarding make flash, if you run make help you'll see it described as Write the boot loader and all defined partition images. By contrast, make flashpart PART=spiffs0 will flash only the spiffs0 partition.

If you're doing a lot of this sort of iterative development on high-level stuff like web interfaces, you might consider getting your project building for Host and use that for development (if you're not already!). It's much faster than repeatedly re-flashing devices!

@xeonqq
Copy link
Contributor Author

xeonqq commented Jun 2, 2024

Thanks for the hint. I tried the make buildpart, it is still not clever enough to detect the change and build the newly modified file, I still need to change the file name so that it can detect the change.
I do need to try the host build.

@xeonqq xeonqq closed this as completed Jun 2, 2024
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

No branches or pull requests

2 participants