Robot-Will / Stino

A Sublime Text Plugin for Arduino
Other
1.58k stars 250 forks source link

Teensy 3.1 throws "unknown MCU 'cortex-m4' specified" #107

Closed ubidefeo closed 10 years ago

ubidefeo commented 10 years ago

hi, everyone

I just got a Teensy 3.1 and it compiles/uploads fine from the Arduino IDE, while on ST2 with Stino I get this weird error plus

Blink.ino.cpp:1: error: MCU 'cortex-m4' supported for assembler only

also strange is it lists all AVR MCUs, as if it were trying to compile an AVR rather than the ARM

anyone knows what I'm dealing with?

thanks. ubi

ps: kick me if the amount of output I pasted is too much. I just think it's strange that it lists the AVR devices in there

error:

Compiling Blink... Creating /Users/ubi/Documents/Arduino_Build/Blink/Blink.ino.cpp.o... unknown MCU 'cortex-m4' specified Known MCU names: avr2 at90s2313 at90s2323 at90s2333 at90s2343 attiny22 attiny26 at90s4414 at90s4433 at90s4434 at90s8515 at90c8534 at90s8535 avr25 attiny13 attiny13a attiny2313 attiny24 attiny44 attiny84 attiny25 attiny45 attiny85 attiny261 attiny461 attiny861 attiny43u attiny48 attiny88 at86rf401 avr3 at43usb320 at43usb355 at76c711 avr31 atmega103 avr35 at90usb82 at90usb162 attiny167 avr4 atmega8 atmega48 atmega48p atmega88 atmega88p atmega8515 atmega8535 atmega8hva at90pwm1 at90pwm2 at90pwm2b at90pwm3 at90pwm3b avr5 atmega16 atmega161 atmega162 atmega163 atmega164p atmega165 atmega165p atmega168 atmega168p atmega169 atmega169p atmega32 atmega323 atmega324p atmega325 atmega325p atmega3250 atmega3250p atmega328p atmega329 atmega329p atmega3290 atmega3290p atmega406 atmega64 atmega640 atmega644 atmega644p atmega645 atmega6450 atmega649 atmega6490 atmega16hva at90can32 at90can64 at90pwm216 at90pwm316 atmega32m1 atmega32c1 atmega32u4 atmega32u6 at90usb646 at90usb647 at94k avr51 atmega128 atmega1280 atmega1281 atmega1284p at90can128 at90usb1286 at90usb1287 avr6 atmega2560 atmega2561 avrxmega4 atxmega64a3 avrxmega5 atxmega64a1 avrxmega6 atxmega128a3 atxmega256a3 atxmega256a3b avrxmega7 atxmega128a1 avr1 at90s1200 attiny11 attiny12 attiny15 attiny28 /Users/ubi/Documents/Arduino_Build/Blink/Blink.ino.cpp:1: error: MCU 'cortex-m4' supported for assembler only In file included from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/WProgram.h:14, from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/Arduino.h:1, from /Users/ubi/Documents/Arduino_Build/Blink/Blink.ino.cpp:1: /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avrfunctions.h:97: error: 'char* utoa(unsigned int, char, int)' was declared 'extern' and later 'static' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h:460: error: previous declaration of 'char utoa(unsigned int, char, int)' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avrfunctions.h:99: error: 'char itoa(int, char, int)' was declared 'extern' and later 'static' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h:406: error: previous declaration of 'char itoa(int, char_, int)' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avrfunctions.h:101: error: declaration of C function 'char dtostrf(float, int, unsigned int, char)' conflicts with /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h:581: error: previous declaration 'char dtostrf(double, signed char, unsigned char, char_)' here In file included from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/wiring.h:33, from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/WProgram.h:15, from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/Arduino.h:1, from /Users/ubi/Documents/Arduino_Build/Blink/Blink.ino.cpp:1: /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/core_pins.h: In function 'void digitalWriteFast(uint8_t, uint8_t)': /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/core_pins.h:459: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/core_pins.h:461: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/core_pins.h:509: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/core_pins.h:523: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/core_pins.h:529: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/core_pins.h:531: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/core_pins.h:579: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/core_pins.h:593: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/core_pins.h: In function 'uint8_t digitalReadFast(uint8_t)': /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/core_pins.h:613: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/core_pins.h:615: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/core_pins.h:663: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/core_pins.h:677: warning: left shift count >= width of type In file included from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/Print.h:35, from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/Stream.h:24, from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/HardwareSerial.h:142, from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/WProgram.h:16, from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/Arduino.h:1, from /Users/ubi/Documents/Arduino_Build/Blink/Blink.ino.cpp:1: /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h: At global scope: /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:614: error: 'int vfprintf' redeclared as different kind of symbol /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:608: error: previous declaration of 'int vfprintf(_file, const char, void)' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:614: error: expected primary-expression before 'struct' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:614: error: expected )' before 'struct' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:675: error: 'int sprintf' redeclared as different kind of symbol /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:669: error: previous declaration of 'int sprintf(char*, const char*, ...)' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:675: error: expected primary-expression before 'char' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:675: error: expected)' before 'char' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:691: error: expected unqualified-id before 'char' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:691: error: expected )' before 'char' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:691: error: expected)' before 'char' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:703: error: expected unqualified-id before 'char' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:703: error: expected )' before 'char' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:703: error: expected)' before 'char' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:719: error: expected unqualified-id before 'char' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:719: error: expected )' before 'char' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:719: error: expected)' before 'char' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:730: error: expected unqualified-id before 'struct' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:730: error: expected )' before 'struct' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h:730: error: expected)' before 'struct' In file included from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/Print.h:38, from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/Stream.h:24, from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/HardwareSerial.h:142, from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/WProgram.h:16, from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/Arduino.h:1, from /Users/ubi/Documents/Arduino_Build/Blink/Blink.ino.cpp:1: /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/WString.h: In constructor 'String::String(double, unsigned char)': /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/WString.h:67: error: type 'String' is not a direct base of 'String' In file included from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/WProgram.h:22, from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/Arduino.h:1, from /Users/ubi/Documents/Arduino_Build/Blink/Blink.ino.cpp:1: /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avr_emulation.h: In member function 'void DDRDemulation::clr0()': /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avr_emulation.h:248: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avr_emulation.h: In member function 'void DDRDemulation::clr1()': /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avr_emulation.h:253: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avr_emulation.h: In member function 'SPCRemulation& SPCRemulation::operator=(int)': /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avr_emulation.h:809: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avr_emulation.h:809: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avr_emulation.h:814: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avr_emulation.h:814: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avr_emulation.h:841: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avr_emulation.h:841: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avr_emulation.h: In member function 'SPCRemulation& SPCRemulation::operator|=(int)': /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avr_emulation.h:868: warning: left shift count >= width of type /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/avr_emulation.h:868: warning: left shift count >= width of type In file included from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/WProgram.h:35, from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/Arduino.h:1, from /Users/ubi/Documents/Arduino_Build/Blink/Blink.ino.cpp:1: /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/IntervalTimer.h: At global scope: /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/IntervalTimer.h:37: error: 'UINT32_MAX' was not declared in this scope In file included from /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/Arduino.h:1, from /Users/ubi/Documents/Arduino_Build/Blink/Blink.ino.cpp:1: /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy3/WProgram.h:48: error: new declaration 'uint32_t random()' /Applications/Hardware/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h:504: error: ambiguates old declaration 'long int random()' [Stino - Error 1]

ubidefeo commented 10 years ago

gonna try again one month later :D has anybody had this issue besides me?

I've already downloaded the latest release and updated manually, same error. I'm sure it has to do with a missing board entry somewhere, but I'm not comfortable putting my hands on it.

thank you ubi

alexstrassheim commented 10 years ago

hi, you have to modify the version of our teensy in file compiler.py (~/Library/Application Support/Sublime Text 3/Packages/Arduino-like IDE/app) on line 377 from

        if '3.0' in board_name:
            file_name = 'teensy_arm.txt'
        else:
            file_name = 'teensy_avr.txt'

to

        if '3.0' in board_name:
            file_name = 'teensy_arm.txt'
        elif '3.1' in board_name:
            file_name = 'teensy_arm.txt'
        else:
            file_name = 'teensy_avr.txt'
ubidefeo commented 10 years ago

hi, Alex

thank you so much for the reply. had ended up on that file, and was looking for hints on what to add/change by checking what was in the Arduino boards.txt, but hadn't found anything useful. I was sure it was something easy :)

thanks for your tip. changed it to.

if ('3.0' in board_name) or ('3.1' in board_name): file_name = 'teensy_arm.txt' else: file_name = 'teensy_avr.txt'

works a beauty. this should be updated in the master, I see a proliferation of Teensy 3.1 users ;)

thanks again ciao.ubi

ubidefeo commented 10 years ago

ehm... I'm still a bit of a noob on GitHub. was I supposed to leave this open for others or is it ok that I have closed it?

thanks u

wormpy commented 10 years ago

You should definitely leave this open until Robot Will fixes the issue. Then he will close it.

You could also submit a pull request with the fix.

Btw the fix worked for me.

ubidefeo commented 10 years ago

haven't had time to read how the workflow for GITHub is. I have used GIT for my projects, but not more than clone>edit>add>commit>push :)

I promised myself I'll be a more active GITHub user soon, especially 'cause I have a lot of things to add here and there. still a noob, no matter how old I get.

thanks for the tip, @wormpy . reopening until either @Robot-Will or someone else (maybe me) will patch the code.

thanks to everyone for putting up with me :) u.

Robot-Will commented 10 years ago

I have fixed this problem.

ubidefeo commented 10 years ago

Thank you, sir :)