Go Down

Topic: arduino freezing on compiling sketch (Read 6227 times) previous topic - next topic

SoupCan

i have 3 different boards, 2 rambos and 1 ramps. I am able to upload blink to all 3 boards. I have them all drivers installed for the 3 boards, baud rate is set correctly at 115200 and appropriate com port is selected for each board.

of course I am not running all three at the same time but with each board Arduino freezes at compiling sketch. Also I am able to connect to repetier but I get command waiting message and no response from the printer at all.

any help would be greatly appreciated I am running windows 8.1

thank you very much

SoupCan

this is starting to  >:( me.
I can upload blink to the board and it works but I cant compile a sketch, I tried the older versions of Arduino and they come back with compiling errors. The latest version just gets hung up and doesnt move, Ive left it for hours.

Bobsloginid

#2
Jun 03, 2015, 03:46 am Last Edit: Jun 03, 2015, 03:44 pm by Bobsloginid Reason: New information.
I'm having the same symptom - but only with some sketches.  The Java(TM) Platform SE binary is running at about 25% of the CPU, and listComPorts.exe is running frequently.  Here are the last few lines from the verbose output (LCDtest_i2c is the sketch name.)  The ugly thing is this all worked last week - could this be due to a Java upgrade I did yesterday?

C:\Users\Bob\AppData\Local\Temp\build3632118483807574207.tmp\LCDtest_i2c.cpp.o
C:\Users\Bob\AppData\Local\Temp\build3632118483807574207.tmp\Wire\Wire.cpp.o
C:\Users\Bob\AppData\Local\Temp\build3632118483807574207.tmp\Wire\utility\twi.c.o
C:\Users\Bob\AppData\Local\Temp\build3632118483807574207.tmp\LiquidCrystal\FastIO.cpp.o
C:\Users\Bob\AppData\Local\Temp\build3632118483807574207.tmp\LiquidCrystal\I2CIO.cpp.o
C:\Users\Bob\AppData\Local\Temp\build3632118483807574207.tmp\LiquidCrystal\LCD.cpp.o
C:\Users\Bob\AppData\Local\Temp\build3632118483807574207.tmp\LiquidCrystal\LiquidCrystal.cpp.o
C:\Users\Bob\AppData\Local\Temp\build3632118483807574207.tmp\LiquidCrystal\LiquidCrystal_I2C.cpp.o
C:\Users\Bob\AppData\Local\Temp\build3632118483807574207.tmp\LiquidCrystal\LiquidCrystal_SR.cpp.o
C:\Users\Bob\AppData\Local\Temp\build3632118483807574207.tmp\LiquidCrystal\LiquidCrystal_SR2W.cpp.o
C:\Users\Bob\AppData\Local\Temp\build3632118483807574207.tmp\LiquidCrystal\LiquidCrystal_SR3W.cpp.o
C:\Users\Bob\AppData\Local\Temp\build3632118483807574207.tmp\MCP23017B\MCP23017B.cpp.o
C:\Users\Bob\AppData\Local\Temp\build3632118483807574207.tmp\LCD_23017B\LCD.cpp.o
C:\Users\Bob\AppData\Local\Temp\build3632118483807574207.tmp\LCD_23017B\LCD_23017B.cpp.o
C:\Users\Bob\AppData\Local\Temp\build3632118483807574207.tmp/core.a -L
C:\Users\Bob\AppData\Local\Temp\build3632118483807574207.tmp -lm

ISANman

#3
Jun 03, 2015, 07:51 am Last Edit: Jun 03, 2015, 08:44 am by ISANman
I too am having the same issue.
My sketches will compile in  1.0.6 and 1.6.3, but some will not compile in 1.6.4

Here is the output of the debug window

Code: [Select]

Using library SPI in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
\libraries\SPI
Using library Ethernet in folder: C:\Program Files (x86)\Arduino\libraries\Ether
net

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc -c -g -Os -w -ffun
ction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO
=10604 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\har
dware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduin
o\avr\variants\standard -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\li
braries\SPI -IC:\Program Files (x86)\Arduino\libraries\Ethernet\src C:\Users\lev
on\AppData\Local\Temp\build4923384594004567671.tmp\AD7731.c -o C:\Users\levon\Ap
pData\Local\Temp\build4923384594004567671.tmp\AD7731.c.o
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-
exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmc
u=atmega328p -DF_CPU=16000000L -DARDUINO=10604 -DARDUINO_AVR_UNO -DARDUINO_ARCH_
AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Pro
gram Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Fil
es (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Program Files (x86)\Ard
uino\libraries\Ethernet\src C:\Users\levon\AppData\Local\Temp\build4923384594004
567671.tmp\EthernetProbeBoard_v1.cpp -o C:\Users\levon\AppData\Local\Temp\build4
923384594004567671.tmp\EthernetProbeBoard_v1.cpp.o


It will just sit there as long as I leave it...
Works fine in 1.0.6, and 1.6.3 :(

ISANman

#4
Jun 03, 2015, 08:50 am Last Edit: Jun 03, 2015, 08:51 am by ISANman
Ok, upon a little more digging I have turned this up.

One sketch that would not compile in 1.6.4 and would just hang, had a few errors in the sketch.

I opened the sketch in 1.6.3, fixed the errors.

Then it would compile in 1.6.4 too.

It seems that there is something wrong with the 1.6.4 version when it encounters some errors in the code. It just hangs and does not report the errors...

Hope that helps debug / resolve the issue.

SoupCan

ok, thanks everyone for that.... Now im getting an "error compiling"



Arduino: 1.6.3 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from Marlin.h:44:0,

                 from BlinkM.cpp:5:

MarlinSerial.h: In member function 'int MarlinSerial::available()':

MarlinSerial.h:100:46: error: 'rx_buffer' was not declared in this scope

       return (unsigned int)(RX_BUFFER_SIZE + rx_buffer.head - rx_buffer.tail) % RX_BUFFER_SIZE;

                                              ^

MarlinSerial.h: In member function 'void MarlinSerial::write(uint8_t)':

MarlinSerial.h:46:33: error: 'UCSR5A' was not declared in this scope

 #define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number

                                 ^

MarlinSerial.h:41:61: note: in definition of macro 'SERIAL_REGNAME_INTERNAL'

 #define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix

                                                             ^

MarlinSerial.h:46:18: note: in expansion of macro 'SERIAL_REGNAME'

 #define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number

                  ^

MarlinSerial.h:105:17: note: in expansion of macro 'M_UCSRxA'

       while (!((M_UCSRxA) & (1 << M_UDREx)))

                 ^

MarlinSerial.h:51:32: error: 'UDRE5' was not declared in this scope

 #define M_UDREx SERIAL_REGNAME(UDRE,SERIAL_PORT,)   

                                ^

MarlinSerial.h:41:61: note: in definition of macro 'SERIAL_REGNAME_INTERNAL'

 #define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix

                                                             ^

MarlinSerial.h:51:17: note: in expansion of macro 'SERIAL_REGNAME'

 #define M_UDREx SERIAL_REGNAME(UDRE,SERIAL_PORT,)   

                 ^

MarlinSerial.h:105:35: note: in expansion of macro 'M_UDREx'

       while (!((M_UCSRxA) & (1 << M_UDREx)))

                                   ^

MarlinSerial.h:52:31: error: 'UDR5' was not declared in this scope

 #define M_UDRx SERIAL_REGNAME(UDR,SERIAL_PORT,) 

                               ^

MarlinSerial.h:41:61: note: in definition of macro 'SERIAL_REGNAME_INTERNAL'

 #define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix

                                                             ^

MarlinSerial.h:52:16: note: in expansion of macro 'SERIAL_REGNAME'

 #define M_UDRx SERIAL_REGNAME(UDR,SERIAL_PORT,) 

                ^

MarlinSerial.h:108:7: note: in expansion of macro 'M_UDRx'

       M_UDRx = c;

       ^

MarlinSerial.h: In member function 'void MarlinSerial::checkRx()':

MarlinSerial.h:46:33: error: 'UCSR5A' was not declared in this scope

 #define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number

                                 ^

MarlinSerial.h:41:61: note: in definition of macro 'SERIAL_REGNAME_INTERNAL'

 #define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix

                                                             ^

MarlinSerial.h:46:18: note: in expansion of macro 'SERIAL_REGNAME'

 #define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number

                  ^

MarlinSerial.h:114:11: note: in expansion of macro 'M_UCSRxA'

       if((M_UCSRxA & (1<<M_RXCx)) != 0) {

           ^

MarlinSerial.h:55:31: error: 'RXC5' was not declared in this scope

 #define M_RXCx SERIAL_REGNAME(RXC,SERIAL_PORT,)

                               ^

MarlinSerial.h:41:61: note: in definition of macro 'SERIAL_REGNAME_INTERNAL'

 #define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix

                                                             ^

MarlinSerial.h:55:16: note: in expansion of macro 'SERIAL_REGNAME'

 #define M_RXCx SERIAL_REGNAME(RXC,SERIAL_PORT,)

                ^

MarlinSerial.h:114:26: note: in expansion of macro 'M_RXCx'

       if((M_UCSRxA & (1<<M_RXCx)) != 0) {

                          ^

MarlinSerial.h:52:31: error: 'UDR5' was not declared in this scope

 #define M_UDRx SERIAL_REGNAME(UDR,SERIAL_PORT,) 

                               ^

MarlinSerial.h:41:61: note: in definition of macro 'SERIAL_REGNAME_INTERNAL'

 #define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix

                                                             ^

MarlinSerial.h:52:16: note: in expansion of macro 'SERIAL_REGNAME'

 #define M_UDRx SERIAL_REGNAME(UDR,SERIAL_PORT,) 

                ^

MarlinSerial.h:115:29: note: in expansion of macro 'M_UDRx'

         unsigned char c  =  M_UDRx;

                             ^

MarlinSerial.h:116:32: error: 'rx_buffer' was not declared in this scope

         int i = (unsigned int)(rx_buffer.head + 1) % RX_BUFFER_SIZE;

                                ^

Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.

Isaac96

Seems to be a bug in Marlin. Try 1.0.6. 
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

SoupCan

thanks, now i have this error and it is highlighting this line

return (unsigned int)(RX_BUFFER_SIZE + rx_buffer.head - rx_buffer.tail) % RX_BUFFER_SIZE;


Isaac96

Well, it seems "rx_buffer" is not defined. It seems to be a class of some sort. Try changing it to
Code: [Select]
return (unsigned int)(RX_BUFFER_SIZE + rx_buffer_head - rx_buffer_tail) % RX_BUFFER_SIZE;
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

SoupCan

thanks for the reply no luck though,

 This report would have more information with
 "Show verbose output during compilation"
 enabled in File > Preferences.
Arduino: 1.0.6 (Windows NT (unknown)), Board: "Arduino Mega 2560 or Mega ADK"
In file included from /Marlin.h:48,
                from blinkm.cpp:5:
/MarlinSerial.h: In member function 'int MarlinSerial::available()':
MarlinSerial.h:96: error: 'rx_buffer_head' was not declared in this scope
MarlinSerial.h:96: error: 'rx_buffer_tail' was not declared in this scope
/MarlinSerial.h: In member function 'void MarlinSerial::write(uint8_t)':
MarlinSerial.h:100: error: 'UCSR4A' was not declared in this scope
MarlinSerial.h:100: error: 'UDRE4' was not declared in this scope
MarlinSerial.h:103: error: 'UDR4' was not declared in this scope
/MarlinSerial.h: In member function 'void MarlinSerial::checkRx()':
MarlinSerial.h:107: error: 'UCSR4A' was not declared in this scope
MarlinSerial.h:107: error: 'RXC4' was not declared in this scope
MarlinSerial.h:108: error: 'UDR4' was not declared in this scope
MarlinSerial.h:109: error: 'rx_buffer' was not declared in this scope

Isaac96

The 'UCSR4' and such makes it look like the wrong processor somehow.
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

SoupCan

I'm not to fond of all that, I understand gcode and some basic programming. I run a cnc machine at work and picked a 3d printer and wasnt expecting to have this kind of problem with this.

I guess its good to get all these problems out of the way before starting to produce with this machine but the list of parts and pieces to print is getting longer and longer and I havent even began to calibrate it. JOY!!!

Im honestly stumped here and I dont know where to go, every small victory just opens up a larger box of problems. I even had a so called "expert" come by and all he did was uninstall the driver that I had worked to install.

Thanks for your help Isaac, if you have any direction to point me that would be very much appreciated

sasabs

I have exactly the same problem with the LiquidCrystal_12C.h I have tried it with several sources including the one from Sainsmart. I am new and wondering if I a doing something wrong. I put the folder (see attached) in the library folder. It won't even compile a simple serial "blink"

PLEASE - I need to run my I2C LCD. I would appreciate any suggestions how to do this with this or other code.

Go Up