kcuzner / teensy31-blinky-bare-metal

Simple blink program using a Makefile
33 stars 4 forks source link

no rule to make target `obj/pins_teensy.o` #1

Open hoosierEE opened 10 years ago

hoosierEE commented 10 years ago

I am using Paul Stoffregen's cores instead of Teensyduino, and I edited your Makefile to reflect where the various tools are installed on my system. But I'm getting the following error when I type make:

make: *** No rule to make targetobj/pins_teensy.o', needed by bin/blinky.elf'. Stop.

Any suggestions?

kcuzner commented 10 years ago

That generally means that the makefile can't see pins_teensy.c. I would guess that your TEENSY3X_BASEPATH is not set correctly somehow (although your makefile looks right at first glance, so perhaps $(HOME) isn't expanding correctly or something?). Lines 212-215 of the makefile specify looking in the TEENSY3X_BASEPATH folder for object file dependencies (in this case, pins_teensy.c).

The four $(OBJDIR)/%.o rules specify the places where it will look to try to resolve the files for the targets. When it says that there is "no rule" that means that none of the four rules were able to find a matching C or CPP file, meaning that no pins_teensy.cpp or pins_teensy.c was found in either SRCDIR or TEENSY3X_BASEPATH.

hoosierEE commented 10 years ago

I'm stumped. I just verified that $(HOME) does expand correctly with a test makefile. I do have the files in the TEENSY3X_BASEPATH as I've specified it:

> ll ~/cores/teensy3/
total 1572
-rw-rw-r-- 1 lex lex  13829 Jul 21 22:41 analog.c
-rw-rw-r-- 1 lex lex     48 Jul 21 22:41 Arduino.h
-rw-rw-r-- 1 lex lex   1191 Jul 21 22:41 arm_common_tables.h
-rw-rw-r-- 1 lex lex 248129 Jul 21 22:41 arm_math.h
-rw-rw-r-- 1 lex lex   6311 Jul 21 22:41 AudioStream.cpp
-rw-rw-r-- 1 lex lex   5268 Jul 21 22:41 AudioStream.h
drwxrwxr-x 2 lex lex   4096 Jul 21 22:41 avr
-rw-rw-r-- 1 lex lex   1655 Jul 21 22:41 avr_emulation.cpp
-rw-rw-r-- 1 lex lex  37533 Jul 21 22:41 avr_emulation.h
-rw-rw-r-- 1 lex lex   4497 Jul 21 22:41 avr_functions.h
-rw-rw-r-- 1 lex lex  10379 Jul 21 22:41 binary.h
-rw-rw-r-- 1 lex lex    724 Jul 21 22:41 Client.h
-rw-rw-r-- 1 lex lex 108157 Jul 21 22:41 core_cm4.h
-rw-rw-r-- 1 lex lex  16025 Jul 21 22:41 core_cm4_simd.h
-rw-rw-r-- 1 lex lex  10065 Jul 21 22:41 core_cmInstr.h
-rw-rw-r-- 1 lex lex     47 Jul 21 22:41 core_id.h
-rw-rw-r-- 1 lex lex  27694 Jul 21 22:41 core_pins.h
-rw-rw-r-- 1 lex lex   2320 Jul 21 22:41 DMAChannel.cpp
-rw-rw-r-- 1 lex lex  28586 Jul 21 22:41 DMAChannel.h
-rw-rw-r-- 1 lex lex   8682 Jul 21 22:41 eeprom.c
-rw-rw-r-- 1 lex lex   4298 Jul 21 22:41 elapsedMillis.h
-rw-rw-r-- 1 lex lex    120 Jul 21 22:41 HardwareSerial1.cpp
-rw-rw-r-- 1 lex lex    121 Jul 21 22:41 HardwareSerial2.cpp
-rw-rw-r-- 1 lex lex    121 Jul 21 22:41 HardwareSerial3.cpp
-rw-rw-r-- 1 lex lex   8790 Jul 21 22:41 HardwareSerial.h
-rw-rw-r-- 1 lex lex   6197 Jul 21 22:41 IntervalTimer.cpp
-rw-rw-r-- 1 lex lex   3058 Jul 21 22:41 IntervalTimer.h
-rw-rw-r-- 1 lex lex   1177 Jul 21 22:41 IPAddress.cpp
-rw-rw-r-- 1 lex lex   3138 Jul 21 22:41 IPAddress.h
-rw-rw-r-- 1 lex lex   5066 Jul 21 22:41 keylayouts.c
-rw-rw-r-- 1 lex lex 272472 Jul 21 22:41 keylayouts.h
-rw-rw-r-- 1 lex lex 178582 Jul 21 22:41 kinetis.h
-rw-rw-r-- 1 lex lex    412 Jul 21 22:41 main.cpp
-rw-rw-r-- 1 lex lex   2926 Jul 21 22:41 Makefile
-rw-rw-r-- 1 lex lex   9852 Jul 21 22:41 math_helper.c
-rw-rw-r-- 1 lex lex   1949 Jul 21 22:41 math_helper.h
-rw-rw-r-- 1 lex lex  26203 Jul 21 22:41 mk20dx128.c
-rw-rw-r-- 1 lex lex    109 Jul 21 22:41 mk20dx128.h
-rw-rw-r-- 1 lex lex   2716 Jul 21 22:41 mk20dx128.ld
-rw-rw-r-- 1 lex lex   4192 Jul 22 00:29 mk20dx256.ld
-rw-rw-r-- 1 lex lex    448 Jul 21 22:41 new.cpp
-rw-rw-r-- 1 lex lex    672 Jul 21 22:41 new.h
-rw-rw-r-- 1 lex lex   2356 Jul 21 22:41 nonstd.c
-rw-rw-r-- 1 lex lex   5287 Jul 21 22:41 pins_arduino.h
-rw-rw-r-- 1 lex lex  23845 Jul 24 20:36 pins_teensy.c
-rw-rw-r-- 1 lex lex   1358 Jul 21 22:41 Printable.h
-rw-rw-r-- 1 lex lex   3904 Jul 21 22:41 Print.cpp
-rw-rw-r-- 1 lex lex   4744 Jul 21 22:41 Print.h
-rw-rw-r-- 1 lex lex  11019 Jul 21 22:41 serial1.c
-rw-rw-r-- 1 lex lex   7908 Jul 21 22:41 serial2.c
-rw-rw-r-- 1 lex lex   7808 Jul 21 22:41 serial3.c
-rw-rw-r-- 1 lex lex    138 Jul 21 22:41 Server.h
-rw-rw-r-- 1 lex lex  10418 Jul 21 22:41 SPIFIFO.h
-rw-rw-r-- 1 lex lex   7593 Jul 21 22:41 Stream.cpp
-rw-rw-r-- 1 lex lex   2580 Jul 21 22:41 Stream.h
-rw-rw-r-- 1 lex lex   5534 Jul 21 22:41 Tone.cpp
-rw-rw-r-- 1 lex lex   2874 Jul 21 22:41 touch.c
-rw-rw-r-- 1 lex lex   4202 Jul 21 22:41 Udp.h
-rw-rw-r-- 1 lex lex  45231 Jul 21 22:41 usb_desc.c
-rw-rw-r-- 1 lex lex  12184 Jul 21 22:41 usb_desc.h
-rw-rw-r-- 1 lex lex  25473 Jul 21 22:41 usb_dev.c
-rw-rw-r-- 1 lex lex   3545 Jul 21 22:41 usb_dev.h
-rw-rw-r-- 1 lex lex   8427 Jul 21 22:41 usb_flightsim.cpp
-rw-rw-r-- 1 lex lex   7556 Jul 21 22:41 usb_flightsim.h
-rw-rw-r-- 1 lex lex   2349 Jul 21 22:41 usb_inst.cpp
-rw-rw-r-- 1 lex lex   3425 Jul 21 22:41 usb_joystick.c
-rw-rw-r-- 1 lex lex   4539 Jul 21 22:41 usb_joystick.h
-rw-rw-r-- 1 lex lex  13399 Jul 21 22:41 usb_keyboard.c
-rw-rw-r-- 1 lex lex   3576 Jul 21 22:41 usb_keyboard.h
-rw-rw-r-- 1 lex lex   3425 Jul 21 22:41 usb_mem.c
-rw-rw-r-- 1 lex lex   1784 Jul 21 22:41 usb_mem.h
-rw-rw-r-- 1 lex lex   9351 Jul 21 22:41 usb_midi.c
-rw-rw-r-- 1 lex lex   7475 Jul 21 22:41 usb_midi.h
-rw-rw-r-- 1 lex lex   7875 Jul 21 22:41 usb_mouse.c
-rw-rw-r-- 1 lex lex   3526 Jul 21 22:41 usb_mouse.h
-rw-rw-r-- 1 lex lex   2034 Jul 21 22:41 usb_names.h
-rw-rw-r-- 1 lex lex   2860 Jul 21 22:41 usb_rawhid.c
-rw-rw-r-- 1 lex lex   2182 Jul 21 22:41 usb_rawhid.h
-rw-rw-r-- 1 lex lex   7278 Jul 21 22:41 usb_seremu.c
-rw-rw-r-- 1 lex lex   4808 Jul 21 22:41 usb_seremu.h
-rw-rw-r-- 1 lex lex   7513 Jul 21 22:41 usb_serial.c
-rw-rw-r-- 1 lex lex   5657 Jul 21 22:41 usb_serial.h
drwxrwxr-x 2 lex lex   4096 Jul 21 22:41 util
-rw-rw-r-- 1 lex lex   4566 Jul 21 22:41 WCharacter.h
-rw-rw-r-- 1 lex lex     20 Jul 21 22:41 WConstants.h
-rw-rw-r-- 1 lex lex   3233 Jul 21 22:41 wiring.h
-rw-rw-r-- 1 lex lex    279 Jul 21 22:41 wiring_private.h
-rw-rw-r-- 1 lex lex    955 Jul 21 22:41 WMath.cpp
-rw-rw-r-- 1 lex lex   1410 Jul 21 22:41 WProgram.h
-rw-rw-r-- 1 lex lex  15504 Jul 21 22:41 WString.cpp
-rw-rw-r-- 1 lex lex   9239 Jul 21 22:41 WString.h
-rw-rw-r-- 1 lex lex   1891 Jul 21 22:41 yield.cpp