Skip to content

1.6.1 returns exit code 5 #2768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nilton61 opened this issue Mar 14, 2015 · 1 comment
Closed

1.6.1 returns exit code 5 #2768

nilton61 opened this issue Mar 14, 2015 · 1 comment
Labels
Type: Works For Me We are unable to reproduce the reported bug
Milestone

Comments

@nilton61
Copy link

Edit: The error occurred when i commented out line 25, with line 25 active the program compiles with the line commented out i get a crash report and a error message stating:

collect2.exe: error: ld returned 5 exit status

Line 25 is a normal function call:
lh = Exp();

The application reported this:

Arduino:1.6.1 (Windows XP), Kort:"Arduino Uno"
Using library Streaming in folder: D:\Mina dokument\Arduino\libraries\Streaming (legacy)
Using library SM in folder: D:\Mina dokument\Arduino\libraries\SM (legacy)

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard -ID:\Mina dokument\Arduino\libraries\Streaming -ID:\Mina dokument\Arduino\libraries\SM C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\level1.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\level1.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard -ID:\Mina dokument\Arduino\libraries\Streaming -ID:\Mina dokument\Arduino\libraries\SM -ID:\Mina dokument\Arduino\libraries\SM\utility D:\Mina dokument\Arduino\libraries\SM\SM.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\SM\SM.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\hooks.c -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\hooks.c.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\WInterrupts.c -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\WInterrupts.c.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\wiring.c -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\wiring.c.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\wiring_analog.c -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\wiring_analog.c.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\wiring_digital.c -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\wiring_digital.c.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\wiring_pulse.c -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\wiring_pulse.c.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\wiring_shift.c -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\wiring_shift.c.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\abi.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\abi.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\CDC.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\CDC.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\HardwareSerial.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial0.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\HardwareSerial0.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial1.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\HardwareSerial1.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial2.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\HardwareSerial2.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\HardwareSerial3.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\HardwareSerial3.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\HID.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\HID.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\IPAddress.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\IPAddress.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\main.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\main.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\new.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\new.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\Print.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\Print.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\Stream.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\Stream.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\Tone.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\Tone.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\USBCore.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\USBCore.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\WMath.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\WMath.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program\Arduino\hardware\arduino\avr\variants\standard C:\Program\Arduino\hardware\arduino\avr\cores\arduino\WString.cpp -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\WString.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\hooks.c.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\WInterrupts.c.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\wiring.c.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\wiring_analog.c.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\wiring_digital.c.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\wiring_pulse.c.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\wiring_shift.c.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\abi.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\CDC.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\HardwareSerial.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\HardwareSerial0.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\HardwareSerial1.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\HardwareSerial2.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\HardwareSerial3.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\HID.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\IPAddress.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\main.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\new.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\Print.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\Stream.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\Tone.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\USBCore.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\WMath.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-ar rcs C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\WString.cpp.o 

C:\Program\Arduino/hardware/tools/avr/bin/avr-gcc -w -Os -Wl,--gc-sections -mmcu=atmega328p -o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/level1.cpp.elf C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\level1.cpp.o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp\SM\SM.cpp.o C:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp/core.a -LC:\DOCUME~1\Nilton\LOKALA~1\Temp\build7182676666863857172.tmp -lm 

collect2.exe: error: ld returned 5 exit status

Fel vid kompilering.

here is the source i tried to compile:

#include <Streaming.h>
#include <SM.h>
#include <math.h>
#define RNAN (struct retVal){NAN, NAN}

SM tokenizer(soe);
enum token{SOE, ADD, SUB, MUL, DIV, DIG, X, Etk, ERR};
const char *tStr[] = {"SOE", "ADD", "SUB", "MUL", "DIV", "DIG", "X", "Etk", "ERR"};

struct retVal {
  double c;
  double x;
};//retVal

struct retVal lh;
token tk;

char test[]="x*3";
char *current;
int dValue;

void setup(){
  Serial.begin(115200);
  current = test;
  //lh = Exp();
  //Serial<<"constant: "<<lh.c<<"\tvariable: "<<lh.x<<endl;
  Serial<<"none = "<<rStatus(RNAN)<<endl;
}//setup()

void loop(){}//lotk()

State soe(){
  tk = (token) deCode(*current++);
  Serial<<"soe: "<<tStr[tk]<<endl;
  switch(tk){
  case DIG: 
    tokenizer.Set(value);
    break;
  case X:
    tokenizer.Set(unknown);
    break;
  case SUB:
    tokenizer.Set(minus);
    break;
  default:
    tokenizer.Set(error);
  }//switch(tk)
}//soe()

State value(){}//value()

State unknown(){
  tk = (token) deCode(*current++);
  Serial<<"unknown: "<<tStr[tk]<<endl;
  switch(tk){
  case ADD:
  case SUB:
  case MUL:
  case DIV:
    tokenizer.Set(soe);
    break;
  default: tokenizer.Set(error);
  }//switch(tk)
}//unknown()

State minus(){}//minus()

State error(){}//error()

int deCode(char c){
  Serial<<"deCode: "<<c<<endl;
  switch(c){
  case '+': return ADD;
  case '-': return SUB;
  case '*': return MUL;
  case '/': return DIV;
  case 'x':
  case 'X': return X;
  case '0': case '1': case '2':
  case '3': case '4': case '5':
  case '6': case '7': case '8':
  case '9': dValue = c-'0';
    return DIG;
  case 0: return Etk;
  default: return ERR;
  }//switch(c)
}//deCode()

struct retVal Exp(){
  retVal r = term();
  return r;
}//Exp()

struct retVal term(){
  retVal t = faktor();
  byte r = rStatus(t);//0=dual, 1=x, 2=c, 3=none 
  if(r==3) return RNAN;
  EXEC(tokenizer);//get tkerator
  while((tk==MUL)||(tk==DIV)){}//while(mtk)
    token tk1 = tk;
    retVal u = faktor();
    r = r<<2|rStatus(u);
    switch(r){
    //case B0000://t=dual, u=dual -> illegal
    //case B0001://t=dual, u=x -> illegal
    //case B0010://t=dual, u=c -> NIY
    //case B0011://t=dual, u=none ->illegal
    case B0100:
    case B0101:
    case B0110:
    case B0111:
    case B1000:
    case B1001:
    case B1010:
    case B1011:
    default: return RNAN;
    }//switch(r)
  return t;
}//term()

struct retVal faktor(){
  retVal f = {NAN, NAN};
  EXEC(tokenizer);
  switch(tk){
  case X:
    f.x = 1;
    break;
  case DIG:
    f.c = dValue;
    break;
  default:
    return RNAN;
  }//()
  return f;
}//faktor()

inline byte rStatus(retVal s){
  return isnan(s.c)|(isnan(s.x)<<1);
  //0=dual
  //1=x
  //2=c
  //3=none
}//rStatus()
@ffissore ffissore self-assigned this Jul 1, 2015
@ffissore ffissore added the Type: Works For Me We are unable to reproduce the reported bug label Sep 17, 2015
@ffissore ffissore added this to the Release 1.6.6 milestone Sep 17, 2015
@HiTechHiTouch
Copy link

Please see Issue 2989. There are full dumps and source all zipped up, including the Windbg analysis. There should be more than enough information for someone with the LD.exe source to trace the problem.
windbg anaylsis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Works For Me We are unable to reproduce the reported bug
Projects
None yet
Development

No branches or pull requests

3 participants