Esp8266 When trying to run code it gives boot error

When trying to run my code on my esp8266 it first prints a lot of memory address then prints this

code:


void setup()
{
   Serial.begin(115200);
}

void loop()
{
  static byte x = 0;
  Serial.println(x);
  delay(1000);
}

Error:

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3424, room 16

tail 0

chksum 0x2e

load 0x3fff20b8, len 40, room 8

tail 0

chksum 0x2b

csum 0x2b

v00041e00

~ld

anyone know how to solve this?

did you have the serial monitor baudrate set to 115200?

Yes the output only comes on 115200 on any lower one it just outputs garbage

if I load the code of post 1 into a NodeMCU_V1_ ESP-12E ESP8266 the serial monitor displays

sdlܟ<�l�<�l�c|����r�#�c��gn�dog���c8�lrd;lx�o��$��#g�|���#��ng�l��l �eo'l`ao;Ǜ�'cl�al8�o�;��ܜ��b'�|�c��o'�l �eo'l`ao;Ǜ�'c��`a{ۓo#��`��8el`��o�al����g��s��'|�d�l c��|;�l�o��g�l`��{�d�le��0
0
0
0
0
0

the serial monitor baudrate is set to 115200baud the first line is boot information output at 74880baud (hence appears as garbage) the 0's are the program output at 115200baud
what Tools>Board have you selected? I use Generic ESP8266 Module

the program output in post 1 looks as though the serial monitor baudrate is set to 74880 and you are displaying the boot information

this is what i see when i run on 115200baud