trouble uploading or compiling

Second attempt to post. My projects a LED matrix scrolling display. It has worked great for awhile. now the time is off. I think I need to reupload the program to get the time stamp off my pc. I tried to upload and it won't. I cant get it to compile either. I am still in the early stages of learning programing. this is a complex project. I modified an existing code to get it t work.

//Basically finished would like to play with messages at diffrent times 

//got lunch time to work thinking add it to the time case so either display time or lunch time ect see project #8
//working good smooth transistions. changes formatting. added some case swithes to get mayas info in 

//  Code modded from MD_zone_time_message in exampls of MD_Parola
//  also used code from DHT.h examples 
// - DS1307 library (MD_DS1307) found at https://github.com/MajicDesigns/DS1307
// NOTE: MD_MAX72xx library must be installed and configured for the LED
// matrix type being used. Refer documentation included in the MD_MAX72xx
// library or see this link:
// https://majicdesigns.github.io/MD_MAX72XX/page_hardware.html
//

// connect real time clock to pins SCL to A5, SDA to A4, 5V, and GND. 
// Connect pin 1 (on the left) of the  Tempsensor to +5V
// NOTE: If using a board with 3.3V logic like an Arduino Due connect pin 1
// to 3.3V instead of 5V!
// Connect pin 2 of the Temp sensor to whatever your DHTPIN is
// Connect pin 4 (on the right) of the Temp sensor to GROUND
// Connect a 10K resistor from pin 2 (data) to pin 1 (power) of the sensor

// Use the DS1307 clock module
//#define USE_DS1307 0

// Header file includes
#include <MD_Parola.h>  //LED
#include <MD_MAX72xx.h> //LED
#include <SPI.h>        //LED
#include "Font_Data.h"  //LED

#include <MD_DS1307.h> //Clock
#include <Wire.h>      //Clock

#include "DHT.h"      //Temp sensor



// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define MAX_DEVICES 8  // Max devices attached 

#define CLK_PIN   13  // Pin for led clock
#define DATA_PIN  11  // pin for led data in 
#define CS_PIN    10  // Pin for led chip select 

#define DHTPIN 2 // Pin for Temp sensor
#define DHTTYPE DHT22   // DHT 22  (AM2302), AM2321

// Hardware SPI connection
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES); //LED
DHT dht(DHTPIN, DHTTYPE); // Temp


#define SPEED_TIME  75 //LED
#define PAUSE_TIME  1000  //LED was 0

#define MAX_MESG  20  //LED

// Turn on debug statements to the serial output
#define DEBUG 0

// Global variables
float oldt =0;
float oldh =0;
float oldf =0;
float t=20;
float h=100;
float f=70;
int nan = nan;
int Red = 6; //Red led output pin
int Blue = 5; //Blue led output pin
int Green = 3; //Green led output pin

char szTime[9];    // mm:ss\0
char szMesg[MAX_MESG+1] = "";

uint8_t degC[] = { 6, 3, 3, 56, 68, 68, 68 }; // Deg C
uint8_t degF[] = { 6, 3, 3, 124, 20, 20, 4 }; // Deg F

char *mon2str(uint8_t mon, char *psz, uint8_t len)

// Get a label from PROGMEM into a char array
{
  static const __FlashStringHelper* str[] =
  {
    F("Jan"), F("Feb"), F("Mar"), F("Apr"),
    F("May"), F("Jun"), F("Jul"), F("Aug"),
    F("Sep"), F("Oct"), F("Nov"), F("Dec")
  };

  strncpy_P(psz, (const char PROGMEM *)str[mon-1], len);
  psz[len] = '\0';

  return(psz);
}

char *dow2str(uint8_t code, char *psz, uint8_t len)
{
  static const __FlashStringHelper*	str[] =
  {
    F("Sunday"), F("Monday"), F("Tuesday"),
    F("Wednesday"), F("Thursday"), F("Friday"),
    F("Saturday"), F("Maya B Webb"), F("Radiochemist"),
    F("Lunch Time")
  };

  strncpy_P(psz, (const char PROGMEM *)str[code-1], len);
  psz[len] = '\0';

  return(psz);
}

void getTemp(){
   h = dht.readHumidity(); //read humidity
   t = dht.readTemperature();//read temperature in Celsius ()
   f = dht.readTemperature(true); //read tempeature in Fahrenheit (true)
     //Check if any reads failed and exit early (to try again).
  if (isnan(h) || isnan(t) || isnan(f)) {
    analogWrite (Green,200);
  }else{
    analogWrite (Green,0); 
  }} 

void getTime(char *psz, bool f = false)
// Code for reading clock time
{
//#if	USE_DS1307
  RTC.readTime();
  sprintf(psz, "%02d%c%02d", RTC.h, (f ? ':' : ' '), RTC.m);
  
/*#else
  uint16_t  h, m, s;

  s = millis()/1000;
  m = s/60;
  h = m/60;
  m %= 60;
  s %= 60;
  sprintf(psz, "%02d%c%02d", h, (f ? ':' : ' '), m);
#endif*/
}

void getDate(char *psz)
// Code for reading clock date
{
//#if	USE_DS1307
  char	szBuf[10];

  RTC.readTime();
  sprintf(psz, "%d %s %04d", RTC.dd, mon2str(RTC.mm, szBuf, sizeof(szBuf)-1), RTC.yyyy);
//#else
//  strcpy(szMesg, "25 Dec 2017");
//#endif
}

void setup(void)
{
  Serial.begin(9600);
  pinMode (Red, OUTPUT); //red
  pinMode (Blue, OUTPUT); //blue
  pinMode (Green, OUTPUT); //green

  dht.begin();
  P.begin(1);
  P.setInvert(false);

  P.setZone(0, 0, MAX_DEVICES-1);
  //P.setZone(1, MAX_DEVICES-4, MAX_DEVICES-1);
  //P.setFont(1, numeric7Seg);
 
  P.displayZoneText(0, szMesg, PA_CENTER, SPEED_TIME, PAUSE_TIME, PA_SCROLL_LEFT, PA_SCROLL_LEFT);

  P.addChar('

, degC);
  P.addChar('&', degF);

//#if USE_DS1307
  RTC.control(DS1307_CLOCK_HALT, DS1307_OFF);
  RTC.control(DS1307_12H, DS1307_OFF);
//#endif

getTime(szMesg);
}

void loop(void)
{

static uint32_t lastTime = 0; // millis() memory
  static uint8_t  display = 0;  // current display mode
  static bool flasher = false;  // seconds passing flasher

P.displayAnimate();

if (P.getZoneStatus(0))
  {
    switch (display)
    {
      case 0: // first message name
        P.setTextEffect(0, PA_SCROLL_LEFT, PA_WIPE);
        display++;
     
      dow2str(8 , szMesg, MAX_MESG); //made up shit to work
        break;
       
      case 1: // second message title
        P.setTextEffect(0, PA_SCROLL_LEFT, PA_FADE);
        display++;
      dow2str(9 , szMesg, MAX_MESG); //made up shit to work
        break;

case 2: // Temperature deg F
        P.setTextEffect(0, PA_SCROLL_UP, PA_SCROLL_LEFT);
        display++;
          if (f == nan){
          dtostrf(oldf, 3, 0, szMesg);
          strcat(szMesg, "&");
        }else{
          dtostrf(f, 3, 0, szMesg);
          strcat(szMesg, "&");
          oldf = f;
        }
   
        break;
       
      case 3: // Temperature deg C
        P.setTextEffect(0, PA_SCROLL_UP, PA_WIPE);
        display++;
        getTemp();
        if (t == nan){
          dtostrf(oldt, 3, 0, szMesg);
          strcat(szMesg, "$");
        }else{
          dtostrf(t, 3, 0, szMesg);
          strcat(szMesg, "$");
          oldt = t;
        }

break;

case 4: // Relative Humidity
        P.setTextEffect(0, PA_SCROLL_LEFT, PA_SCROLL_DOWN);
        display++;
       
          if (h == nan){
          dtostrf(oldh, 3, 0, szMesg);
          strcat(szMesg, "%RH");
        }else{
          dtostrf(h, 3, 0, szMesg);
          strcat(szMesg, "% RH");
          oldh = h;
        }

break;
    /* case 5: // time
        P.setTextEffect(0, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
        display++;
        getTime(szMesg, flasher);
        flasher = !flasher;
   
        break;

case 6: //Lunch
      if(RTC.h == 13 && RTC.m == 37){ 
   
        P.setTextEffect (0, PA_SCROLL_UP, PA_SCROLL_UP);
        display++;
          dow2str(10 , szMesg, MAX_MESG); //made up shit to work
      }else{
        P.setTextEffect (0, PA_SCROLL_UP, PA_SCROLL_UP);
        display++;
          dow2str(8 , szMesg, MAX_MESG); //made up shit to work
      }
        break;*/
     
      case 5: // day of week
        P.setTextEffect(0, PA_SCROLL_LEFT, PA_SCROLL_UP);
        display++;

dow2str(RTC.dow, szMesg, MAX_MESG);

break;

default:  // Calendar
        P.setTextEffect(0, PA_DISSOLVE, PA_DISSOLVE);
        display = 0;
 
        getDate(szMesg);
        break;
    }

P.displayReset(0);
  }
  //Serial.println (h);
  if (RTC.h == 12 && RTC.m == 00){
    analogWrite (Green, 100);
   
   
  }else{
    analogWrite (Green, 0);
   
  }

if (f < 70){  // LED blue if too cold
      analogWrite (Blue,200);
      }else{
        analogWrite (Blue,0);}

if (f > 85){ // LED red if too hot
        analogWrite (Red, 200);
      }else{
        analogWrite (Red, 0);}
       
  // Finally, adjust the time string if we have to
// if (millis() - lastTime >= 1000)
// {
//  lastTime = millis();
//  getTime(szTime, flasher);
//  flasher = !flasher;

//  P.displayReset(0);
// }
}

The error code I get is as follows .... too long to post any ideas? over 9000. I even tried to cut it in half

If the length of the error messages exceed the forum's 9000 character limit, save it to a .txt file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link.

thank you for the help. I also realized I didn't put system info in this post windows 10. I used notes to attach file

deskprojecterror1.txt (124 KB)

The last chunk of error code. not the whole thing.

Archiving built core (caching) in: C:\Users\austi\AppData\Local\Temp\arduino_cache_365344\core\core_arduino_avr_uno_180a539c02cce575fcd7710170113f75.a
Linking everything together...
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910/Mays_desk_Project7.ino.elf" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\sketch\\Mays_desk_Project7.ino.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\sketch\\dht11.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_PZone.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola_Blinds.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola_Close.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola_Diag.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola_Dissolve.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola_Fade.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola_Grow.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola_HScroll.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola_Mesh.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola_Open.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola_Print.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola_Random.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola_Scan.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola_Slice.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola_Sprite.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola_VScroll.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_Parola\\MD_Parola_Wipe.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_MAX72XX\\MD_MAX72xx.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_MAX72XX\\MD_MAX72xx_buf.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_MAX72XX\\MD_MAX72xx_font.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_MAX72XX\\MD_MAX72xx_pix.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\SPI\\SPI.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\MD_DS1307\\MD_DS1307.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\Wire\\Wire.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\Wire\\utility\\twi.c.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\DHT_sensor_library\\DHT.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910\\libraries\\DHT_sensor_library\\DHT_U.cpp.o" "C:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910/core\\core.a" "-LC:\\Users\\austi\\AppData\\Local\\Temp\\arduino_build_407910" -lm
lto1.exe: internal compiler error: in lto_output_varpool_node, at lto-cgraph.c:624

Please submit a full bug report,

with preprocessed source if appropriate.

See <http://gcc.gnu.org/bugs.html> for instructions.

lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.21.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

Using library MD_Parola at version 3.0.1 in folder: C:\Users\austi\Documents\Arduino\libraries\MD_Parola 
Using library MD_MAX72XX at version 3.0.2 in folder: C:\Users\austi\Documents\Arduino\libraries\MD_MAX72XX 
Using library SPI at version 1.0 in folder: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\libraries\SPI 
Using library MD_DS1307 at version 1.3.4 in folder: C:\Users\austi\Documents\Arduino\libraries\MD_DS1307 
Using library Wire at version 1.0 in folder: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\libraries\Wire 
Using library DHT_sensor_library at version 1.3.0 in folder: C:\Users\austi\Documents\Arduino\libraries\DHT_sensor_library 
Using library Adafruit_Sensor-master at version 1.0.2 in folder: C:\Users\austi\Documents\Arduino\libraries\Adafruit_Sensor-master 
exit status 1
Error compiling for board Arduino/Genuino Uno.

This bug is specific to the 5.4.0-atmel3.6.1-arduino2 version of avr-gcc used by Arduino AVR Boards 1.6.22 and newer. It has been reported here:

Here's the workaround:

  • Tools > Board > Boards Manager
  • Wait for downloads to finish.
  • When you move the mouse pointer over "Arduino AVR Boards", you will see a "Select version" dropdown menu appear. Select "1.6.21".
  • Click "Install".
  • Wait for installation to finish.
  • Click "Close".

Due to a bug, this alternative workaround doesn't work with Arduino IDE 1.8.6, but it will work with any other version of the Arduino IDE.

If you have File > Preferences > Check for updates on startup checked, the Arduino IDE may occasionally notify you that a new version of Arduino AVR Boards is available, you'll need to refrain from updating back to the new Arduino AVR Boards version, otherwise you'll be back to seeing the segmentation fault error again.

I just tried the fix you recommended. I was able to compile after. Thank you!! I will try to upload to the board next.

You're welcome. I'm glad to hear it's working now. Enjoy!
Per

Well... it uploaded, but now it doesn't do anything. I let it run a few times before I uploaded it, so it was working. now I have to dig back in to the program. Unless one of you has a suggestion. I haven't touched the code since it worked.

I'd add some Serial.println() statements at strategic locations throughout the code and open Serial Monitor while it's running so you can get some idea of what's happening.

I will look into that. I know for one or two of my projects I burnt an uno boot loader to a nano. I’m questioning if this is one. I tried to upload as a nano but got an error that the sketch was too big. It’s hard to pick back up after being away so long.

I looked into some of the library’s I’m using and md_max72xx h file seems to be missing some lines. I don’t see the lines used to change hardware settings. I tried to reinstall didn’t seem to change...

austinibew145:
md_max72xx h file seems to be missing some lines. I don’t see the lines used to change hardware settings.

Please provide more details about what makes you think this.

austinibew145 has created a new thread for discussion of the library's "missing lines":
http://forum.arduino.cc/index.php?topic=606432

Thanks, Pert for the link. I was informed that Marco changed his H file so that people didn't have to go there to set up hardware. now I need to figure out the steps I need to take to adjust the program I'm running.