Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By ornea
#91572 Using Arduino 1.8.13 to develop for WEMOS D1

I am always moving between SDE's so I use Arduino in portable mode. Works great.

Except I continually get bitten by the Arduino SDE changing the target platform and end up spending sometime fault finding util i finally check the target board.

So I did this

Code: Select allconst byte io_pins [9] =     {D0, D1, D2, D3, D4, D5, D6, D7, D8};
const byte esp8266_io_pins[9] =    {16,  5,  4,  0,  2, 14, 12, 13, 15};

  for (int i = 0; i < 9; i++)
  {
    Serial.print(io_pins[i]);
    Serial.print("-");   
    Serial.println(esp8266_io_pins[i]);
   
  }


It helps but still get bitten, so i thought i would try this

Code: Select all#if (D0 != 16)
#error "Wrong platform"
#endif


But D0 is still "D0" at the pre-processor pass so does not work as intended. (Or at least thats what I am guessing)

Anyone have this issue and a possible way to make sure the board selected is the correct board or do I just need to be more vigilant.
Cheers Ornea