Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: ArduinoISP on Teensy 3.1

  1. #1
    Junior Member
    Join Date
    Feb 2015
    Posts
    3

    ArduinoISP on Teensy 3.1

    Hello,

    I tried to upload the 1.6.5 stock ArduinoISP to the Teensy 3.1, but compiling fails. Compiling the Blink example works just fine.

    Code:
    Arduino: 1.6.5 (Mac OS X), TD: 1.24, Board: "Teensy 3.1, Serial, 96 MHz optimized (overclock), German (Mac)"
    
    Build options changed, rebuilding all
    
    /Applications/Arduino.app/Contents/Java/hardware/tools/arm/bin/arm-none-eabi-g++ -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -D__MK20DX256__ -DTEENSYDUINO=124 -DARDUINO=10605 -DF_CPU=96000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_GERMAN_MAC -I/Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3 /Users/niklas/Documents/_dev/Arduino/_build/ArduinoISP.cpp -o /Users/niklas/Documents/_dev/Arduino/_build/ArduinoISP.cpp.o 
    In file included from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/wiring.h:33:0,
    from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/WProgram.h:15,
    from /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/Arduino.h:1,
    from ArduinoISP.ino:66:
    /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/core_pins.h: In function 'void digitalWriteFast(uint8_t, uint8_t)':
    /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/core_pins.h:887:24: error: 'portSetRegister' was not declared in this scope
    *portSetRegister(pin) = digitalPinToBitMask(pin);
    ^
    /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/core_pins.h:887:51: error: 'digitalPinToBitMask' was not declared in this scope
    *portSetRegister(pin) = digitalPinToBitMask(pin);
    ^
    /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/core_pins.h:889:26: error: 'portClearRegister' was not declared in this scope
    *portClearRegister(pin) = digitalPinToBitMask(pin);
    ^
    /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/core_pins.h:889:53: error: 'digitalPinToBitMask' was not declared in this scope
    *portClearRegister(pin) = digitalPinToBitMask(pin);
    ^
    /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/core_pins.h: In function 'uint8_t digitalReadFast(uint8_t)':
    /Applications/Arduino.app/Contents/Java/hardware/teensy/avr/cores/teensy3/core_pins.h:976:32: error: 'portInputRegister' was not declared in this scope
    return *portInputRegister(pin);
    ^
    ArduinoISP.ino: In function 'void universal()':
    ArduinoISP.ino:279:7: warning: unused variable 'w' [-Wunused-variable]
    ArduinoISP.ino: In function 'int avrisp()':
    ArduinoISP.ino:551:1: warning: no return statement in function returning non-void [-Wreturn-type]
    Error compiling.

  2. #2
    Junior Member
    Join Date
    Feb 2015
    Posts
    3
    commenting out
    Code:
    #include "pins_arduino.h"
    lets it compile, but then avrdude doesn't recognize the target

    EDIT: https://forum.pjrc.com/threads/23574...ISP-programmer -> moving spi_init() fixed it
    Last edited by mischnic; 07-09-2015 at 06:37 PM.

  3. #3
    Junior Member
    Join Date
    Aug 2014
    Posts
    5
    Hi mischnic

    What did you do exactly to solve this issue? (moving spi_init() fixed it does not say anything to me)

  4. #4
    Senior Member
    Join Date
    Nov 2013
    Posts
    720
    Quote Originally Posted by almulder View Post
    Hi mischnic

    What did you do exactly to solve this issue? (moving spi_init() fixed it does not say anything to me)
    Did you read the thread that mischnic linked to?

    Quote Originally Posted by mischnic View Post
    EDIT: https://forum.pjrc.com/threads/23574...ISP-programmer -> moving spi_init() fixed it

  5. #5
    Junior Member
    Join Date
    Aug 2014
    Posts
    5
    Quote Originally Posted by robsoles View Post
    Did you read the thread that mischnic linked to?
    Hi robsoles. Yes I did now.
    It is solved now. Thx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •