Sketch works when uploaded only from a specific computer

Hi all, I hope I'm just missing something painfully obvious here, but this issue has me pretty stumped.

My Uno R3 is part of a system that is used actuate some solenoids. I have some correction factors (used to tune solenoid timing) stored to the Uno's EEPROM that I can read/write by sending data packets to the board via serial. The Uno listens for the packets and executes functions based on the contents of the packet.

There are two functions for reading and writing to EEPROM, which, for readability, I'll refer to as GET_FACTOR and WRITE_FACTOR, respectively. GET_FACTOR is working just fine, but WRITE_FACTOR only works if the sketch was uploaded from one specific laptop. If the sketch is uploaded from any other PC, GET_FACTOR results in a timeout/freeze.

I'm uploading the exact same code from both my PC and the laptop, so it's unlikely that it's an issue with the sketch (I copied the exact file to be sure). My immediate thought was to replicate the IDE installation from the laptop - it's using version 1.8.1 of the IDE, so I downloaded this same version on my PC and and ensured the programmer and preferences were all identical (including properties.txt, which I copied from the laptop). No luck with this, however.

  • To eliminate outside factors, I'm troubleshooting without any of the solenoid hardware connected - just the Arduino and a USB cable, sending packets via the IDE's serial monitor. (I normally use a custom android app to communicate with the board. I first noticed the issue in the app, and replicated it on the PC)

  • The behavior is the same when troubleshooting with serial monitor on both of the computers. GET_FACTOR works if the sketch was uploaded using the laptop, but does not work if it was uploaded using the PC.

  • I've tried using a fresh board in case it was hardware related, but no dice. The issue persists on several Uno R3 boards.

I need to be able to produce more of these systems, but my ability to do so depends on the laptop staying alive, which is obviously not ideal.

I did notice that the PC uploads 12894 bytes to the board, but the laptop uploads only 12888 bytes, despite the identical files. Therefore, it HAS to be something about the way the IDE on the laptop is uploading the sketch, right? Unfortunately I've hit the edge of my knowledge and I can't think of where this difference is coming from. Does anyone have an idea what other leads I could follow here?

Thanks in advance, and sorry for the wall of text.

Please use the flag button to ask a moderator to move your post to a more appropriate forum section. This one is for Arduino IDE installation and troubleshooting.

In the meantime, please take a few moments to read the "How to get the best out of the forum" post, and add the required information to your post.

When you say identical files, do you mean the hex file output by the compiler, or the sketch file?

Are you certain you have the same version of the IDE, the same version of all the libraries used, the same setting in the compiler, etc?

How much program memory and dynamic memory does the compiler report on each computer?

If the sketch is the same then the difference could be with one of the included libraries.

Would probably help if you posted your code so we can have a look. Would also be useful if you posted the 2 compiler logs.

Hi all. Thanks for your care to the correct categorization of the forum.

Considering @red_car's hypothesis, I think the current "Installation and Troubleshooting" category is reasonable. The alternatives would be "Project Guidance" or "Programming Questions", but if this is a matter of installing the same dependencies then it seems more closely related to usage of Arduino IDE than it is to general feasability or programming.

I'll monitor the thread and if information emergest that indicates a different category is more appropriate, I'll be sure to move it at that time.

Regards,
pert

Wrong :wink: The IDE only uploads what was generated by the compile process. So that's where de difference is.

Adding to @red_car, check if the compiler versions are the same as well.

Note:
This smells like memory issues due to the use of dynamic memory allocation; e.g. the use of String (capital S) objects but there might be others as well (we can't see your code :wink:.

Moved.

@luidias,

Could you also take a few moments to Learn How To Use The Forum.

It will help you get the best out of the forum in the future.

Thank you

I hope you missed a digit there and its not IDE version 1.8.1 - that would be a rather old version. Could you confirm?

To clarify, you have tried this from more than one other PC?
Is the Arduino AVR Boards library the same version on both laptop and PC(s)?

Hi all, thanks for the replies and sorry for the late update - I haven't been able to get back to this issue until today.

@BitSeeker

I hope you missed a digit there and its not IDE version 1.8.1 - that would be a rather old version. Could you confirm?

Yep, you read that correctly. It's a rather old version. I took over on this project from someone else, and unfortunately their solution to this issue was to just use the laptop and stop all updates to the IDE, lest it stop working. This obviously not a sustainable solution, so I want to figure out what's causing the issue so I can (hopefully) get everything up to date and make it work everywhere.

@david_2018

When you say identical files, do you mean the hex file output by the compiler, or the sketch file?

Sorry, I should have been more specific. The sketches are identical, the hex file isn't. I'm not 100% sure where the difference is coming from.

Are you certain you have the same version of the IDE, the same version of all the libraries used, the same setting in the compiler, etc?
How much program memory and dynamic memory does the compiler report on each computer?

Yep, IDE 1.8.1 on both computers, and the libraries being used are EEPROM (v2.0 on both), and SPI (v1.0 on both). ctype is also used, but I'm assuming that it must be built in to the IDE as it doesn't show up in the library manager or in the verbose output when compiling.

regarding program and dynamic memory:

  • on the PC, program memory usage is 12894 bytes, dynamic memory usage is 486 bytes.
  • on the laptop, the corresponding numbers are 12888 bytes and 487 bytes, respectively.

It's evident that something is happening differently in the compiler, but I'm stuck as to what it could be.

@sterretje

Wrong :wink: The IDE only uploads what was generated by the compile process. So that's where de difference is.

Good to know, thank you! I kind of figured as much, but I lack the experience to dissect it deeper than that.

Adding to @red_car, check if the compiler versions are the same as well.
Note:
This smells like memory issues due to the use of dynamic memory allocation; e.g. the use of String (capital S) objects but there might be others as well (we can't see your code :wink:.

re: compiler version - it's avrdude 6.3 for both of them. Could there some difference in the avrdude configuration maybe? I'll insert the compiler logs at the end of this post in case they're helpful.

re: memory issues - that could indeed be the issue, thank you for the suggestion. I'll read into dynamic memory allocation and see if it's being used somewhere in the code (no capital S Strings were used, but could be something else, as you said).

Sadly - and I know no one is going to like hearing this - but the code is used at my work and I can't post it without permission (I know, not helpful :pensive: I'm aware this is going to limit things and my expectations are tempered in light of this). I work at in academia, and while the code isn't strictly confidential or anything, it does include a changelog and authorship info with people's full names so I'm hesitant to post it even if the prof gave me the go-ahead. I had assumed my issue wasn't code-related, but if it ends up being related to dynamic memory allocation in the code, I understand that I'm largely on my own if I can't post the code.

@PerryBebbington

Could you also take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Thank you

Thanks for the link - I did read through that page before posting, but please let me know if there's anything specific that I'm doing incorrectly. I followed it as much as I could but there's a good chance I'm overlooking something.

EDIT: Forgot to respond to @BitSeeker 's other question:

To clarify, you have tried this from more than one other PC?

Yep, I've tried it on multiple PCs and various versions of the IDE. There's some kind of sorcery making the code work as intended when I use the laptop, and on nothing else.

/edit

Compiler logs follow.

PC Compiler output (this is the upload that DOESN'T work as intended)

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\luidias\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\luidias\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\luidias\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10801 -build-path C:\Users\luidias\AppData\Local\Temp\arduino_build_254471 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -verbose X:\OrthoEngGroup\OIBG\Projects\CHIMERA\Construction\Electronics\Software\Ardiuno Code\ICORDImpactor Ver3.3 - Release1\ICORDImpactor\ICORDImpactor.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\luidias\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\luidias\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\luidias\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10801 -build-path C:\Users\luidias\AppData\Local\Temp\arduino_build_254471 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -verbose X:\OrthoEngGroup\OIBG\Projects\CHIMERA\Construction\Electronics\Software\Ardiuno Code\ICORDImpactor Ver3.3 - Release1\ICORDImpactor\ICORDImpactor.ino
Using board 'uno' from platform in folder: C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Detecting libraries used...
"C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard" "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\sketch\ICORDImpactor.ino.cpp" -o "nul"
"C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard" "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\EEPROM\src" "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\sketch\ICORDImpactor.ino.cpp" -o "nul"
"C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard" "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\EEPROM\src" "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src" "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\sketch\ICORDImpactor.ino.cpp" -o "nul"
Using cached library dependencies for file: C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src\SPI.cpp
Generating function prototypes...
"C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard" "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\EEPROM\src" "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src" "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\sketch\ICORDImpactor.ino.cpp" -o "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard" "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\EEPROM\src" "-IC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI\src" "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\sketch\ICORDImpactor.ino.cpp" -o "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\sketch\ICORDImpactor.ino.cpp.o"
Compiling libraries...
Compiling library "EEPROM"
Compiling library "SPI"
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\libraries\SPI\SPI.cpp.o
Compiling core...
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\wiring_pulse.S.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\WInterrupts.c.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\hooks.c.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\wiring.c.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\wiring_analog.c.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\wiring_digital.c.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\wiring_pulse.c.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\wiring_shift.c.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\CDC.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\HardwareSerial.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\HardwareSerial0.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\HardwareSerial1.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\HardwareSerial2.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\HardwareSerial3.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\IPAddress.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\PluggableUSB.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\Print.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\Stream.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\Tone.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\USBCore.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\WMath.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\WString.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\abi.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\main.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\new.cpp.o
Using previously compiled file: C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\core\core.a
Linking everything together...
"C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p   -o "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471/ICORDImpactor.ino.elf" "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\sketch\ICORDImpactor.ino.cpp.o" "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471\libraries\SPI\SPI.cpp.o"  "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471/core\core.a" "-LC:\Users\luidias\AppData\Local\Temp\arduino_build_254471" -lm
"C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0  "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471/ICORDImpactor.ino.elf" "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471/ICORDImpactor.ino.eep"
"C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom  "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471/ICORDImpactor.ino.elf" "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471/ICORDImpactor.ino.hex"
Using library EEPROM at version 2.0 in folder: C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\EEPROM 
Using library SPI at version 1.0 in folder: C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\SPI 
Sketch uses 12894 bytes (39%) of program storage space. Maximum is 32256 bytes.
Global variables use 486 bytes (23%) of dynamic memory, leaving 1562 bytes for local variables. Maximum is 2048 bytes.
C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM5 -b115200 -D -Uflash:w:C:\Users\luidias\AppData\Local\Temp\arduino_build_254471/ICORDImpactor.ino.hex:i 

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\luidias\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM5
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\luidias\AppData\Local\Temp\arduino_build_254471/ICORDImpactor.ino.hex"
avrdude: writing flash (12894 bytes):

Writing | ################################################## | 100% 2.44s

avrdude: 12894 bytes of flash written
avrdude: verifying flash memory against C:\Users\luidias\AppData\Local\Temp\arduino_build_254471/ICORDImpactor.ino.hex:
avrdude: load data flash data from input file C:\Users\luidias\AppData\Local\Temp\arduino_build_254471/ICORDImpactor.ino.hex:
avrdude: input file C:\Users\luidias\AppData\Local\Temp\arduino_build_254471/ICORDImpactor.ino.hex contains 12894 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.84s

avrdude: verifying ...
avrdude: 12894 bytes of flash verified

avrdude done.  Thank you.


Laptop Compiler output (this is the upload that DOES work as intended)

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\OIBGuser\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10801 -build-path C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\OIBGuser\Desktop\Kurt\CHIMERA\ICORDImpactor Ver3.3 - Release1\ICORDImpactor Ver3.3 - Release1\ICORDImpactor\ICORDImpactor.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\OIBGuser\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10801 -build-path C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\OIBGuser\Desktop\Kurt\CHIMERA\ICORDImpactor Ver3.3 - Release1\ICORDImpactor Ver3.3 - Release1\ICORDImpactor\ICORDImpactor.ino
Using board 'uno' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Detecting libraries used...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\sketch\ICORDImpactor.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src" "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\sketch\ICORDImpactor.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\sketch\ICORDImpactor.ino.cpp" -o "nul"
Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src\SPI.cpp
Generating function prototypes...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\sketch\ICORDImpactor.ino.cpp" -o "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM\src" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\sketch\ICORDImpactor.ino.cpp" -o "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\sketch\ICORDImpactor.ino.cpp.o"
Compiling libraries...
Compiling library "EEPROM"
Compiling library "SPI"
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\libraries\SPI\SPI.cpp.o
Compiling core...
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\wiring_pulse.S.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\WInterrupts.c.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\hooks.c.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\wiring.c.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\wiring_analog.c.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\wiring_digital.c.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\wiring_pulse.c.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\wiring_shift.c.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\CDC.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\HardwareSerial.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\HardwareSerial0.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\HardwareSerial1.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\HardwareSerial2.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\HardwareSerial3.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\IPAddress.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\PluggableUSB.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\Print.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\Stream.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\Tone.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\USBCore.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\WMath.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\WString.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\abi.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\main.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\new.cpp.o
Using previously compiled file: C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\core\core.a
Linking everything together...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p  -o "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006/ICORDImpactor.ino.elf" "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\sketch\ICORDImpactor.ino.cpp.o" "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006\libraries\SPI\SPI.cpp.o" "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006/core\core.a" "-LC:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006" -lm
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0  "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006/ICORDImpactor.ino.elf" "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006/ICORDImpactor.ino.eep"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-objcopy" -O ihex -R .eeprom  "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006/ICORDImpactor.ino.elf" "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006/ICORDImpactor.ino.hex"
Using library EEPROM at version 2.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM 
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI 
Sketch uses 12888 bytes (39%) of program storage space. Maximum is 32256 bytes.
Global variables use 487 bytes (23%) of dynamic memory, leaving 1561 bytes for local variables. Maximum is 2048 bytes.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM3 -b115200 -D -Uflash:w:C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006/ICORDImpactor.ino.hex:i 

avrdude: Version 6.3, compiled on Dec 16 2016 at 13:33:19
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006/ICORDImpactor.ino.hex"
avrdude: writing flash (12888 bytes):

Writing | ################################################## | 100% 2.25s

avrdude: 12888 bytes of flash written
avrdude: verifying flash memory against C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006/ICORDImpactor.ino.hex:
avrdude: load data flash data from input file C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006/ICORDImpactor.ino.hex:
avrdude: input file C:\Users\OIBGuser\AppData\Local\Temp\arduino_build_726006/ICORDImpactor.ino.hex contains 12888 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.65s

avrdude: verifying ...
avrdude: 12888 bytes of flash verified

avrdude done.  Thank you.


Which version of the Arduino AVR Boards package do you have on the laptop? I can see version 1.8.6 in the listing for the PC, but not for the laptop.

Hi @luidias

There is a difference in the dependencies used when compiling the sketch between the two computers:

On the non-working computer, version 1.8.6 of the "Arduino AVR Boards" platform is being used.

On the working computer, the version (1.6.17) of the "Arduino AVR Boards" platform that comes bundled with the Arduino IDE installation is being used.

Since the "Arduino AVR Boards" platform is bundled with the Arduino IDE installation, there appears to be a some correlation between Arduino IDE version and the "Arduino AVR Boards" version, but you can install any version of the platform via the Arduino IDE Boards Manager and after that the version you installed is used instead of the bundled version, which is what happened on the "DOESN'T work" computer.

There is a good chance this difference is the reason for the different results between the two computers. You can test it by using the Arduino IDE Boards Manager to install the same version of the "Arduino AVR Boards" platform on the "DOESN'T work" computer as you have on the "DOES work" computer. I'll provide instructions:

  1. On the "DOESN'T work" computer, select Tools > Board > Boards Manager from the Arduino IDE menus.
  2. Wait for the updates to finish.
  3. Scroll down through the list of boards platforms until you see "Arduino AVR Boards". Click on it.
  4. Select "1.6.17" from the dropdown version menu.
  5. Click the Install button.
  6. Wait for the installation to finish.
  7. Click the Close button.

Now upload the sketch to your Arduino board using the "DOESN'T work" computer. Does the sketch now work as expected?

1 Like

Your topic was moved because you posted in the 'installation and troubleshooting' category. At the top of that category it says:
For problems with the Arduino IDE (integrated development environment). NOT for problems with your project.

I don't think you have a problem with the IDE and I don't think you think you have a problem with the IDE.

You might reasonably complain that the title of that category is not as clear as it might be. We know.

  1. On the "DOESN'T work" computer, select Tools > Board > Boards Manager from the Arduino IDE menus.
  2. Wait for the updates to finish.
  3. Scroll down through the list of boards platforms until you see "Arduino AVR Boards". Click on it.
  4. Select "1.6.17" from the dropdown version menu.
  5. Click the Install button.
  6. Wait for the installation to finish.
  7. Click the Close button.

Hallelujah, this did the trick! Thank you for your help!

In terms of a long-term solution, I should now be able to upload this sketch on any computer so long as the Arduino AVR Board platform is set to version 1.6.17. I'll add this as a comment to the header of this sketch, so future users know that it's required.

I don't know how easy it would be to figure out why newer versions of Arduino AVR Boards is causing this, but if others think it would be interesting and/or helpful to take a deeper dive into this, let me know and I'd be happy to work on it.

A big thanks to @ptillisch and all those of you who lent their advice.

I don't think you have a problem with the IDE and I don't think you think you have a problem with the IDE.

Respectfully, I did think I was having an issue with the IDE.

Maybe I'm totally off-base here, but seeing as this was ultimately a mismatch with my dependencies, the original category would have been appropriate, no?

I could have been clearer with my title, and will pay more attention to it in future posts.

Ok, fair enough.
The problem for us as moderators is we get a great many topics in that section of the forum that clearly have nothing to do with the IDE. If a topic looks like it doesn't belong there it usually gets moved. When I moved it I felt it didn't belong, as did someone else who flagged it.

Thanks for the feedback.

Good luck with your project.

1 Like

Totally understandable - It's a common issue with tech forums, I think. I imagine it can get quite frustrating to manage.

Thanks again for your help and feedback!

1 Like

Something you might want to try is advancing one version of the boards package at a time until you determine exactly which version first caused the problem.

Thanks for the suggestion @david_2018. I went through all of the versions of the boards package between 1.6.17 and 1.8.6. and now I'm finding that I can't reproduce the original issue. Tried it on several different Unos, too.

This is pretty odd to me, especially considering how much I couldn't get rid of this problem previously, having tried several different boards and computers.

I'm obviously doing something different now (or, more accurately, I was doing something wrong beforehand, across all my attempts), but I can't for the life of me put the finger on what it could be.

I've tried uninstalling the IDE and deleting my arduino folder in appdata, then re-installing IDE 1.8.1 and boards package 1.8.6, but it's all working frustratingly perfectly now.

I'll keep trying to reproduce it and report back if I find anything interesting.

If it were my project, I would definitely spend a little time to try to figure this out.

The experiment I proposed in my previous reply was intended to test the hypothesis that the different board platform versions was the cause of the different results. Now that you have confirmed this, it makes the investigation much easier than before when we pretty much only knew "one computer bad, other computer good". I wasn't intending to suggest that you consider the use of the outdated Arduino AVR Boards version the solution (even though it would be reasonable to stop here if that is your choice).

Arduino IDE prompts the user to update whenever a new version of an installed boards platform is available, so a large portion of the many Arduino users are on Arduino AVR Boards 1.8.6 and there aren't any known critical bugs with that release. It will be more convenient for you to be able to have the latest Arduino AVR boards version installed, and even update to newer versions as they become available instead of being stuck forever on the quite outdated 1.6.17.

I won't likely be of much assistance in the further investigation since my area of specialty is the tooling/dependencies management part we already figured out, whereas the next part is more likely to be about analyzing your sketch code. But there are plenty of helpers here on the forum who are very knowledgeable in that area so you are in good hands.

99.99% convinced that you have a memory issue as mentioned in post #6.

The layout of variables in memory has changed with the different boards version and with the different board version you are now overwriting somewhere something crucial causing your code to crash.