ESP32 Issues with platformio

I have only just started using platformio with esp32. I have 2 main issues, if up upload code from platformio and then go back to using arduino ide the esp32 is bricked and goes into a constant crash and reboot cycle.

assertion "false && "item should have been present in cache"" failed: file "/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/nvs_flash/src/nvs_item_hash_list.cpp", line 85, function: void nvs::HashList::erase(size_t)
abort() was called at PC 0x400d3cc7 on core 0

The second issue, is that I cannot get the SI5351 module to work with platformio. it knows the module is there in an i2c scan but the module does not output anything.

Code that works in aurduino ide compiles fine but there is no output from the module.

#include "si5351.h"

#include "Wire.h"

#define PLLB_FREQ    87600000000ULL

Si5351 si5351(0x60); //correct address

void setup()


  // Start serial and initialize the Si5351


  Wire1.begin(21,22,400000); // correct pin assignments


  si5351.init(SI5351_CRYSTAL_LOAD_8PF, 0, 0);

  // Set VCXO osc to 876 MHz (146 MHz x 6), 40 ppm pull

  si5351.set_vcxo(PLLB_FREQ, 40);

  // Set CLK0 to be locked to VCXO

  si5351.set_ms_source(SI5351_CLK0, SI5351_PLLB);

  // Tune to 146 MHz center frequency

  si5351.set_freq_manual(14600000000ULL, PLLB_FREQ, SI5351_CLK0);




void loop()


  // Read the Status Register and print it every 10 seconds


  Serial.print("corr: ");

 // Serial.print(si5351.get_correction());

  Serial.print("  SYS_INIT: ");


  Serial.print("  LOL_A: ");


  Serial.print("  LOL_B: ");


  Serial.print("  LOS: ");


  Serial.print("  REVID: ");




Google has yeilded no answers, does anyone here have any idea whats going on? Code works in arduino but not platformio, once a micro has been used in platformio it wont run code from arduino anymore.

Im lost.


  1. Show a screenshot of the Arduino IDE board configuration (Tools)
  2. Goto Tools -> Boards -> Board Package Manager and then show the version of the ESP32 package / Arduino core version.
  3. Show your full platformio.ini



For whatever reason the board manager is only showing esp8266 and not the 32 as well. Im assuming its all one package, i cant remember though, as i installed it a few years ago.



No the ESP32 package is separate from the ESP8266 one.


Is that really not in the board manager?

People at nvs: nvs_flash_init_custom "item should have been present in cache" when flashing with ESP-IDF 3.1 after 3.2 - ESP32 Forum say this error can occur when a board that has been flashed with a very old and not-updated version of Arduino-ESP32 and then with a newer one.

Please do a full erase of your ESP32 and re-program it then. Do so by opening a PlatformIO CLI and executing

"C:\Users\<user>\.platformio\packages\tool-esptoolpy\" erase_flash

this should auto-detect and erase your board fully.

1 Like

No its not in there HAHAHA But all the boards are. I might do a reinstall later and fix it :slight_smile:


Thanks for the erase_flash tip, i will give that a go.