energia / Energia

Fork of Arduino for the Texas Instruments LaunchPad's
http://energia.nu
Other
794 stars 672 forks source link

MAC OSX 10.7.5 Stellarpad not recognized #270

Closed jnshadow closed 10 years ago

jnshadow commented 11 years ago

Using Mac OS X 10.7.5, I can get power to Stellarpad via USB cable but the Serial Port under Tools is greyed out. Unplug Stellarpad and plug in MSP430; change board selection to MSP430; serial port shows up; everything works as advertised for Energia. Unplug MSP430, serial port goes grey; does not change when Stellarpad plugged in. Java crash when trying to upload a sketch to Stellarpad. Any guidance? Am I missing an add-on USB driver for Stellarpad? I am using the current distribution of Energia just released. Thanks!

robertinant commented 11 years ago

@jnshadow. There are no special drivers needed for the Tiva/Stellaris launchpad. Couple of questions:

1: What is the version of your LaunchPad. There should be a rev letter or version close to the reset button. 2: Can you send me the console output for when you plug the launchpad into your Mac? You can open the console by typing "console" in spotlight. Once console opens, click the "Clear Display" button, plug in your launchpad, select the new lines that are printed and copy past them here by selecting copy "Copy" from the "Edit" menu. The output on my 10.7.5 Mac looks as follows:

9/18/13 7:23:45.000 AM kernel: MSP430LPCDC : Quiting : Not Launchpad
9/18/13 7:23:45.000 AM kernel: AppleUSBCDCACMData: Version number - 4.1.22, Input buffers 8, Output buffers 16
9/18/13 7:23:45.000 AM kernel: AppleUSBCDC: Version number - 4.1.22

The first line is telling you that it is not a MSP430 launchpad. Then the build in Apple CDCACM driver takes over and enumerates the Tiva/Stellaris LaunchPad. 3: Would you be able to verify that the LaunchPad works properly under Windows? 4: I have seen issues with USB cables so if you have a different cable handy then that might be worth a try.

robertinant commented 11 years ago

Can you also try the following command in terminal to see if the USB device is actually on the bus? system_profiler SPUSBDataType

This will print a list of all USB devices and there should be an entry something like the below for the Tiva/Stellaris LaunchPad.

        In-Circuit Debug Interface:

          Product ID: 0x00fd
          Vendor ID: 0x1cbe  (Texas Instruments - Stellaris)
          Version: 1.00
          Serial Number: 0E202FAF
          Speed: Up to 12 Mb/sec
          Manufacturer: Texas Instruments
          Location ID: 0x1a200000 / 3
          Current Available (mA): 500
          Current Required (mA): 250
jnshadow commented 11 years ago

Hi Robertinant, thanks for responding so quickly!

It's a EK-LM4F120XL Rev B. Using the debug port, I get:

9/18/13 11:03:59.000 AM kernel: MSP430LPCDC : Quiting : Not Launchpad 9/18/13 11:04:00.000 AM kernel: AppleUSBCDCACMData: Version number - 4.1.22, Input buffers 8, Output buffers 16 9/18/13 11:04:00.000 AM kernel: AppleUSBCDC: Version number - 4.1.22

AND:

In-Circuit Debug Interface:

      Product ID: 0x00fd
      Vendor ID: 0x1cbe  (Texas Instruments - Stellaris)
      Version: 1.00
      Serial Number: 0E10D3C2
      Speed: Up to 12 Mb/sec
      Manufacturer: Texas Instruments
      Location ID: 0x04100000 / 4
      Current Available (mA): 500
      Current Required (mA): 250

AND (when uploading blink with PIn set to via /dev/tty.usbmodem0E10D3C1) get this Java crash:

Process: JavaApplicationStub [548] Path: /Applications/Energia.app/Contents/MacOS/JavaApplicationStub Identifier: JavaApplicationStub Version: ??? (???) Code Type: X86-64 (Native) Parent Process: JavaApplicationStub [295]

Date/Time: 2013-09-18 10:48:16.093 -0400 OS Version: Mac OS X 10.7.5 (11G63) Report Version: 9

Interval Since Last Report: 484244 sec Crashes Since Last Report: 7 Per-App Crashes Since Last Report: 5 Anonymous UUID: E57C9967-F8FD-494A-80FE-D648E8D4C2A5

Crashed Thread: Unknown

Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000

Backtrace not available

Unknown thread crashed with X86 Thread State (64-bit): rax: 0x000000140000000e rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000 rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x5fc0102800000000 rsp: 0x0000000000000000 r8: 0x0000000000000000 r9: 0x0000005500000000 r10: 0x0000000000000000 r11: 0x0000000000000000 r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000e00000000 r15: 0x0000000000000000 rip: 0x00007fff5fc01028 rfl: 0x0000000000010202 cr2: 0x0000000000000000 Logical CPU: 0

Binary images description not available

External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 187 thread_create: 0 thread_set_state: 0

Model: MacBookPro5,4, BootROM MBP53.00AC.B03, 2 processors, Intel Core 2 Duo, 2.53 GHz, 8 GB, SMC 1.49f2 Graphics: NVIDIA GeForce 9400M, NVIDIA GeForce 9400M, PCI, 256 MB Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1067 MHz, 0x859B, 0x435435313236344243313036372E4D313646 Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1067 MHz, 0x859B, 0x435435313236344243313036372E4D313646 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.106.198.19.22) Bluetooth: Version 4.0.8f17, 2 service, 11 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en1 Serial ATA Device: FUJITSU MJA2250BH FFS G1, 250.06 GB Serial ATA Device: MATSHITADVD-R UJ-868 USB Device: Built-in iSight, apple_vendor_id, 0x8507, 0x24400000 / 2 USB Device: Internal Memory Card Reader, apple_vendor_id, 0x8403, 0x26500000 / 2 USB Device: In-Circuit Debug Interface, 0x1cbe (Texas Instruments - Stellaris), 0x00fd, 0x04100000 / 4 USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0236, 0x04600000 / 3 USB Device: IR Receiver, apple_vendor_id, 0x8242, 0x04500000 / 2 USB Device: BRCM2046 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0x06100000 / 2 USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8213, 0x06110000 / 3

Using the Device Port, I get nothing in Console and greyed out Serial Port in Energia; board does get power. I will go obtain a replacement USB cable -- the results above are from using the one that came with the Stellaris. If that does not work, I will try loading Energia on Windows using VirtualBox. More to come...

robertinant commented 11 years ago

Couple more things to try. I just posted a known issue here: http://energia.nu/release.html. Can you please follow the instructions listed under "Upload to Stellaris/Tiva LaunchPad fails on Mac OS X 10.7.x"

Can you also try the following?

1: Launch a terminal window. In Spotlight type "Terminal" 2: In the terminal change the directory to where you have Energia.app installed. If this is the Applications folder then you can do cd /Applications/ 3: Then execute the following command: ./Energia.app/Contents/MacOS/JavaApplicationStub 4: It will print something like this in Terminal:

[JavaAppLauncher] Requested [1.5*], launching in [1.6] instead.
Experimental:  JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7

Can you please copy and past that output here?

5: Still in the terminal can you execute the following command: java -version This will print something like this:

java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)

Can you please copy past that output here so that we can compare that with the Java version I have here?

jnshadow commented 11 years ago

Ok, I got the same versions from both Terminal commands as your examples: java version "1.6.0_51" Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509) Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)

and: [JavaAppLauncher] Requested [1.5*], launching in [1.6] instead. Experimental: JNI_OnLoad called.

Stable Library

Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7

I made the LM4flash change to the Energia app per the directions, rebooted, and the upload to the Stellaris still failed. Java error was: Process: JavaApplicationStub [499] Path: /Applications/Energia.app/Contents/MacOS/JavaApplicationStub Identifier: JavaApplicationStub Version: ??? (???) Code Type: X86-64 (Native) Parent Process: JavaApplicationStub [296]

Date/Time: 2013-09-18 15:12:29.264 -0400 OS Version: Mac OS X 10.7.5 (11G63) Report Version: 9

Interval Since Last Report: 498934 sec Crashes Since Last Report: 22 Per-App Crashes Since Last Report: 20 Anonymous UUID: E57C9967-F8FD-494A-80FE-D648E8D4C2A5

Crashed Thread: Unknown

Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000

Backtrace not available

Unknown thread crashed with X86 Thread State (64-bit): rax: 0x000000140000000e rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000 rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x5fc0102800000000 rsp: 0x0000000000000000 r8: 0x0000000000000000 r9: 0x0000005500000000 r10: 0x0000000000000000 r11: 0x0000000000000000 r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000e00000000 r15: 0x0000000000000000 rip: 0x00007fff5fc01028 rfl: 0x0000000000010202 cr2: 0x0000000000000000 Logical CPU: 0

Binary images description not available

External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 179 thread_create: 0 thread_set_state: 0

Model: MacBookPro5,4, BootROM MBP53.00AC.B03, 2 processors, Intel Core 2 Duo, 2.53 GHz, 8 GB, SMC 1.49f2 Graphics: NVIDIA GeForce 9400M, NVIDIA GeForce 9400M, PCI, 256 MB Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1067 MHz, 0x859B, 0x435435313236344243313036372E4D313646 Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1067 MHz, 0x859B, 0x435435313236344243313036372E4D313646 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.106.198.19.22) Bluetooth: Version 4.0.8f17, 2 service, 11 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en1 Serial ATA Device: FUJITSU MJA2250BH FFS G1, 250.06 GB Serial ATA Device: MATSHITADVD-R UJ-868 USB Device: Built-in iSight, apple_vendor_id, 0x8507, 0x24400000 / 2 USB Device: Internal Memory Card Reader, apple_vendor_id, 0x8403, 0x26500000 / 2 USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0236, 0x04600000 / 4 USB Device: IR Receiver, apple_vendor_id, 0x8242, 0x04500000 / 3 USB Device: SCRx31 USB Smart Card Reader, 0x04e6 (Shuttle Technology), 0xe001, 0x04100000 / 2 USB Device: In-Circuit Debug Interface, 0x1cbe (Texas Instruments - Stellaris), 0x00fd, 0x06200000 / 4 USB Device: BRCM2046 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0x06100000 / 2 USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8213, 0x06110000 / 3

robertinant commented 11 years ago

Can you please execute the this command in the terminal in the directory where Energia is and send me any output it produces?

./Energia.app/Contents/Resources/Java/hardware/tools/lm4f/bin/lm4flash -V

Does Energia crash when you click upload in Energia while the LaunchPad is not plugged in?

jnshadow commented 11 years ago

When I execute the command I get: Illegal instruction: 4

Yes, Energia crashes when I click upload while the Stellaris is not plugged in. If I change the board type to MSP430 and click upload (with no board attached), it does not crash -- I get: usbutil: unable to find a device matching 0451:f432

Thanks for continuing to work this problem!

jnshadow commented 11 years ago

Apparently, "Illegal Instruction 4" means that the binary for LM4Flash needs to be compiled with a flag of: -mmacosx-version-min=10.5

See:

http://stackoverflow.com/questions/14268887/what-is-the-illegal-instruction-4-error-and-why-does-mmacosx-version-min-10

Any chance of posting a new binary compiled with the flag that I can swap into /Energia.app/Contents/Resources/Java/hardware/tools/lm4f/bin/

and test or will I have to wait for a whole new release of Energia?

jnshadow commented 11 years ago

Update: I downloaded the previous release of Energia, extracted lm4flash, and replaced current release lm4flash with previous release version -- now board is found and I am able to download to it.

rei-vilo commented 11 years ago

So it suggests the latest enclosed version of lm4flash is bugged?

jnshadow commented 11 years ago

Yep, but I defer to the developers for the real answer.

robertinant commented 10 years ago

lm4flash will be replaced by OpenOCD in the next rev. Unfortunately there is nothing I can do at the moment about the lm4flash included in Energia 0101E0010. As an interim solution I suggest as you did and take lm4flash from the previous distribution.