-
Notifications
You must be signed in to change notification settings - Fork 0
Overzealous Caching core.a
This feature is on by default. It is a problem for any Sketch builds that use build option files that alter the built contents of core
.
See ~/.arduino15/preferences.txt
compiler.cache_core=true
It is responsible for caching the compiled archive core.a
on the 1ST build.
And, reusing that cached copy for every subsequent Sketch built.
1ST build shows:
Archiving built core (caching) in: /tmp/arduino_cache_435098/core/core_62c943b4b5d2e650148140921e4af2c7.a
Every build after shows:
Compiling core...
Using precompiled core: /tmp/arduino_cache_435098/core/core_62c943b4b5d2e650148140921e4af2c7.a
When an item under the "Tools" pull-down menu is changed, a forced rebuild of core.a
will occur. And the cached copy is updated. This sketch is now the new owner of the cached core.a
. Its version is now shared with all the other sketches. This all works fine and saves a lot of time. (These are my observations there is always room for error.)
However, when you introduce build.opt
into the mix, things get complicated. build.opt
can contain defines that require core.a
to be recompiled. When multiple Sketches are open, they can no longer reliably share one cached core.a
. To use build.opt
reliably you need to set compiler.cache_core=false
. Then each sketch will compile its own copy of core.a
. The alternative when using compiler.cache_core=true
, is to close all Arduino IDE sketch windows. Start and run only one instance of the IDE, while building a Sketch that uses build.opt
.
References:
- Keeping the Lights On - how to manage GPIO state across reboots and crashes
- Boot fails when SPI Bus used
- GPIO Drive Strength and Ringing
- LDO Regulators WIP
- ESP8266 Power Considerations This is only a rough outline, needs a lot of development.
- Upgrading Flash Chips, QIO, and DIO
- Dodgy Extra 2K of DRAM or CONT - WIP
- WDTracks - Print last call before WDT
- 5V Tolerant I/O?
Arduino IDE specific
Misc.
- Exception Causes
- ESP8266 will not boot
- Stacks sys and cont
- WIP Boot ROM and SDK Notes
- Multi-segment Boot ROM Loader, notes
- Cache_Read_Enable How to turn off and on instruction cache execution.