Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSP430 Upload fails on Mac, old MSPdebug? #16

Open
scandey opened this issue Apr 21, 2020 · 6 comments
Open

MSP430 Upload fails on Mac, old MSPdebug? #16

scandey opened this issue Apr 21, 2020 · 6 comments

Comments

@scandey
Copy link

scandey commented Apr 21, 2020

On Mac OSX 10.14.6, attempted to send a simple Blink file to an MSP-EXP430FR5739 (one of the supported boards) from PlatformIO IDE extension installed into VSCode as recommended.
Everything appears to go well until sending to the actual board: code builds correctly and the upload feature automatically downloads and builds MSPdebug. There then appears to be a permissions error connecting with the MSP430:
Trying to open interface 1 on 025 rf2500: can't claim interface: Permission denied rf2500: failed to open RF2500 device

While I am opening a similar ticket with MSPDebug, I note that they are a whole version ahead (0.25) of the automatically downloaded MSPDebug in PlatformIO with some suggestions in old issues that the upgrade have helped with this issue. Is it possible to update the MSPDebug version for PlatformIO or at least temporarily adjust what version is downloaded for my installation?

Thanks!

`> Executing task: platformio run --target upload <

Processing lpmsp430fr5739 (platform: timsp430; board: lpmsp430fr5739; framework: arduino)

PackageManager: Installing tool-mspdebug @ ~1.2400.0
tool-mspdebug @ 1.2400.190926 has been successfully installed!
PackageManager: Installing tool-dslite @ ~1.80200.1400
Downloading [####################################] 100%
Unpacking [####################################] 100%
tool-dslite @ 1.80200.1400 has been successfully installed!
Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/timsp430/lpmsp430fr5739.html
PLATFORM: TI MSP430 2.2.0 > TI FraunchPad MSP-EXP430FR5739LP
HARDWARE: MSP430FR5739 16MHz, 1KB RAM, 15.37KB Flash
DEBUG: Current (mspdebug) On-board (mspdebug)
PACKAGES:

  • framework-energiamsp430 1.10807.190926 (1.8.7)
  • tool-dslite 1.80200.1400 (8.2.0)
  • tool-mspdebug 1.2400.190926 (24.0)
  • toolchain-timsp430 1.40603.190926 (4.6.3)
    LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 18 compatible libraries
    Scanning dependencies...
    No dependencies
    Building in release mode
    Checking size .pio/build/lpmsp430fr5739/firmware.elf
    Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
    RAM: [ ] 0.2% (used 2 bytes from 1024 bytes)
    Flash: [ ] 1.5% (used 238 bytes from 15743 bytes)
    Configuring upload protocol...
    AVAILABLE: rf2500
    CURRENT: upload_protocol = rf2500
    Uploading .pio/build/lpmsp430fr5739/firmware.hex
    MSPDebug version 0.24 - debugging tool for MSP430 MCUs
    Copyright (C) 2009-2016 Daniel Beer [email protected]
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    Chip info database from MSP430.dll v3.3.1.4 Copyright (C) 2013 TI, Inc.

Trying to open interface 1 on 025
rf2500: can't claim interface: Permission denied
rf2500: failed to open RF2500 device
*** [upload] Error 255`

@glingy
Copy link

glingy commented Jun 14, 2020

I recognize that error. Did you install the Energia kernel extension here: energia/Energia#55?

@glingy
Copy link

glingy commented Jun 14, 2020

Also, I need to add a pull request there, but I discovered a bug where I had to edit the Info.plist of the kernel extension because the distributed plist didn't work (I'm macOS Catalina, so it might be something weird with Catalina). If that doesn't solve the issue for you above, you can try editing the Info.plist so the similar section looks like this:

	<key>DTXcode</key>
	<string>0420</string>
	<key>DTXcodeBuild</key>
	<string>4D5163b</string>
	<key>IOKitPersonalities</key>
	<dict>
		<key>MSP430LPCDC</key>
		<dict>
			<key>bConfigurationValue</key>
			<integer>1</integer>
			<key>bInterfaceNumber</key>
			<integer>1</integer>
			<key>CFBundleIdentifier</key>
			<string>com.ti.driver.MSP430LP</string>
			<key>IOClass</key>
			<string>MSP430LPCDC</string>
			<key>IOProbeScore</key>
			<integer>10000</integer>
			<key>IOProviderClass</key>
			<string>IOUSBInterface</string>
			<key>IOUserClientClass</key>
			<string>MSP430LPCDCUserClient</string>
			<key>InputBuffers</key>
			<integer>8</integer>
			<key>OutputBuffers</key>
			<integer>16</integer>
			<key>bInterfaceClass</key>
			<integer>2</integer>
			<key>bInterfaceSubClass</key>
			<integer>2</integer>
			<key>idProduct</key>
			<integer>62514</integer>
			<key>idVendor</key>
			<integer>1105</integer>
		</dict>
	</dict>
	<key>LSApplicationCategoryType</key>
	<string></string>
	<key>OSBundleLibraries</key>

If I remember correctly I merged the debugIntf with the existing MSP430LPCDC key and it started working better.

@dybarsky
Copy link

dybarsky commented Mar 7, 2021

I have same issue on OSX. The driver is installed. I am using msp430g2553 launchpad. It used to work. It looks like happened after update to BigSur :/

@hellvesper
Copy link

hellvesper commented Oct 17, 2022

the problem looks like fixed in mspdebug version 0.25, anyway it works on Monterey as standalone app, but platformio still using mspdebug v.0.24

@HapCoderWei
Copy link

wow guys, I just solved this problem on Mac (Monterey 12.6.2). It seems platformio's mspdebug is old version(v0.24), and i find that my another mspdebug installed by macports, which is v0.25 works well. So i create a symbolic link to cover the platformio's old version. And it WORKS!

Below is what i did:

  1. install mspdebug by macports; seems homebrew repo doesn't have the mspdebug pkg...
  2. try if the standalone mspdebug is work well by exec "mspdebug rf2500" in your terminal; if it works, go head
  3. rename the platformio's old version as a backup; the old version path on MacOS is "~/.platformio/packages/tool-mspdebug/mspdebug"
  4. create a symbolic link to cover the old version in same path. on my mac, the standalone mspdebug installed by macports path is /opt/local/bin/mspdebug, so the ln cmd is "ln -s /opt/local/bin/mspdebug ~/.platformio/packages/tool-mspdebug/mspdebug"

now try to upload your hex again in platformio and see if it works.
Good luck!

@hellvesper
Copy link

wow guys, I just solved this problem on Mac (Monterey 12.6.2). It seems platformio's mspdebug is old version(v0.24), and i find that my another mspdebug installed by macports, which is v0.25 works well. So i create a symbolic link to cover the platformio's old version. And it WORKS!

Below is what i did:

  1. install mspdebug by macports; seems homebrew repo doesn't have the mspdebug pkg...
  2. try if the standalone mspdebug is work well by exec "mspdebug rf2500" in your terminal; if it works, go head
  3. rename the platformio's old version as a backup; the old version path on MacOS is "~/.platformio/packages/tool-mspdebug/mspdebug"
  4. create a symbolic link to cover the old version in same path. on my mac, the standalone mspdebug installed by macports path is /opt/local/bin/mspdebug, so the ln cmd is "ln -s /opt/local/bin/mspdebug ~/.platformio/packages/tool-mspdebug/mspdebug"

now try to upload your hex again in platformio and see if it works. Good luck!

yeah, but we want them to update this SDK, and debug in platfromio doesn't work properly with mspdebug v.0.25, I think it should be fixed from platformio team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants