mspdebug icon indicating copy to clipboard operation
mspdebug copied to clipboard

Get error "tilib_api: can't find libmsp430.so: libmsp430.so: wrong ELF class: ELFCLASS32"

Open isaacgr opened this issue 8 years ago • 8 comments

Get this error when I run mspdebug tilib. Is there anything I can do? libmsp430.so is a 32 bit file which I pulled from http://energia.nu/download/. I've tried putting it in /usr/lib, /usr/lib32 and some other paths but still the same issue. I would appreciate any assistance.

Should add I'm running on Ubuntu 16.04.

isaacgr avatar Jan 04 '17 04:01 isaacgr

I actually solved my issue with the instructions here: https://github.com/chintal/toolchains/blob/master/msp430-gcc-ti.md under the heading 'Installing 64-bit libmsp430.so v3.8'. Sadly my MSP still appears to be bricked (was trying to do a firmware upgrade) but I appreciate the tool!

isaacgr avatar Jan 04 '17 12:01 isaacgr

Really sorry for all the posts. Looks like I spoke too soon, just had to try a couple of times to get it. I now get about this far: `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.

Using new (SLAC460L+) API MSP430_GetNumberOfUsbIfs MSP430_GetNameOfUsbIf Found FET: ttyACM0 MSP430_Initialize: ttyACM0 Firmware version is 30901602 MSP430_VCC: 3000 mV MSP430_OpenDevice tilib: MSP430_OpenDevice: Device database not loaded. (error = 98) tilib: device initialization failed ` Any ideas at this point? I'm using Code Composer and now the program actually compiles and loads onto the chip but still complains that I need to upgrade my firmware (which I am reluctant to do since that is what started all this in the first place).

isaacgr avatar Jan 04 '17 13:01 isaacgr

On Wed, Jan 04, 2017 at 05:18:13AM -0800, isaacgr wrote:

Really sorry for all the posts. Looks like I spoke too soon, just had to try a couple of times to get it. I now get about this far: `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.

Using new (SLAC460L+) API MSP430_GetNumberOfUsbIfs MSP430_GetNameOfUsbIf Found FET: ttyACM0 MSP430_Initialize: ttyACM0 Firmware version is 30901602 MSP430_VCC: 3000 mV MSP430_OpenDevice tilib: MSP430_OpenDevice: Device database not loaded. (error = 98) tilib: device initialization failed ` Any ideas at this point? I'm using Code Composer and now the program actually compiles and loads onto the chip but still complains that I need to upgrade my firmware (which I am reluctant to do since that is what started all this in the first place).

That looks like the interface between mspdebug and the library itself is working, but there is some issue between the library and the firmware.

Unfortunately you might have to try the firmware update -- either that, or check with TI. The error codes quoted in the mspdebug output come straight from TI's library.

Cheers, Daniel

-- Daniel Beer [email protected] http://dlbeer.co.nz/ PGP: BA6E 0B26 1F89 246C E3F3 C910 1E58 C43A 160A 553B

dlbeer avatar Jan 04 '17 20:01 dlbeer

I took the risk and upgraded through Code Composer. It worked no problem. Thank you very much.

isaacgr avatar Jan 05 '17 03:01 isaacgr

tilib: MSP430_OpenDevice: Device database not loaded. (error = 98)

It seems that slac460s release of MSP430 library sources lacks device database initialization. It can be solved like in my fork https://github.com/xhpohanka/mspdebug/commit/a3254fb2b8285699387c8c82a28a51c060e3a268

xhpohanka avatar Feb 15 '17 09:02 xhpohanka

Cool -- did you want to put together a pull request for this change, or would you prefer if I picked out and applied the diff on its own?

dlbeer avatar Feb 16 '17 20:02 dlbeer

I will prepare pull request. There is strange thing that binary version of slac460s provided by TI does not need this, they probably released slightly different source...

xhpohanka avatar Feb 17 '17 07:02 xhpohanka

Yes, they might well have done. I think some of the very early releases might have been a little out-of-sync with source too.

dlbeer avatar Feb 20 '17 23:02 dlbeer