-
Notifications
You must be signed in to change notification settings - Fork 446
Closed
Description
MacOS X 10.10.4
avr stuff via homebrew
Arduino IDE 1.6.5
I have tried to compile a sketch which uses pulseIn(). This in turn uses a function from wiring_pulse.S that is not linked/compiled for some reason. The Arduino IDE 1.6.5 compiles it
sources can be found here
Arduino IDE build process:
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc -c -g -x assembler-with-cpp -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard /Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/wiring_pulse.S -o /var/folders/c5/9sqmvxp54m3cmjb6hmtw2xlm0000gn/T/build5848034434382423610.tmp/wiring_pulse.S.o
what my make produces (countPulseASM is in wiring_pulse.S which is not mentioned during the build process):
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc -mmcu=atmega328p -Wl,--gc-sections -Os -o build-uno/hc-sr04-led.elf build-uno/hc-sr04-led.o build-uno/libcore.a -lc -lm
build-uno/libcore.a(wiring_pulse.o): In function `pulseIn':
wiring_pulse.c:(.text.pulseIn+0x32): undefined reference to `countPulseASM'
collect2: error: ld returned 1 exit status
make: *** [build-uno/hc-sr04-led.elf] Error 1
My makefile:
# http://hardwarefun.com/tutorials/compiling-arduino-sketches-using-makefile
#BOARD_TAG=uno
ARDUINO_PORT=/dev/cu.SLAB_USBtoUART
include /usr/local/opt/arduino-mk/Arduino.mk
From a quick look, the arduino-makefile looks at all the source types, maybe it misses on wiring_pulse because it exists as wiring_pulse.c and wiring_pulse.S?
Metadata
Metadata
Assignees
Labels
No labels