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

tilib on OpenBSD #97

Open
hosewiejacke opened this issue Jun 29, 2020 · 6 comments
Open

tilib on OpenBSD #97

hosewiejacke opened this issue Jun 29, 2020 · 6 comments

Comments

@hosewiejacke
Copy link

Hello all,

I'd like to use an FRAM launchpad on OpenBSD. AFAIK tilib is an appropriate driver for this. However, I couldn't make it work. Does anybody know what the problem could be?

mspdebug is compiled from #e65bc69:

$ mspdebug --version

MSPDebug version 0.25 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2017 Daniel Beer <dlbeer@gmail.com>
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.15.0.1 Copyright (C) 2013 TI, Inc.

libmsp430.so is compiled from Rev 3.15.1.001:

$ ldd libmsp430.so | awk '{print $NF}'

libmsp430.so:
Name
/var/src/libmsp430/libmsp430.so
/usr/local/lib/libboost_filesystem-mt.so.10.0
/usr/local/lib/libboost_system-mt.so.10.0
/usr/local/lib/libboost_thread-mt.so.10.0
/usr/local/lib/libhidapi-libusb.so.0.0
/usr/lib/libc++.so.4.0
/usr/lib/libc++abi.so.2.1
/usr/lib/libpthread.so.26.1
/usr/lib/libm.so.10.1
/usr/local/lib/libusb-1.0.so.1.2
/usr/local/lib/libiconv.so.7.0

The Launchpad is attached:

$ usbdevs

Controller /dev/usb0:
...
addr 05: 2047:0013 Texas Instruments, MSP Tools Driver
...

and recognized by mspdebug:

$ mspdebug --usb-list
Devices on bus 000:
...
000:005 2047:0013  [serial: XXXXXXXXXXXXXXXX]
...

However, the connection via tilib fails:

$ mspdebug tilib

...

Using new (SLAC460L+) API
MSP430_GetNumberOfUsbIfs
No unused FET found.

A connection via ezfet fails, too:

$ mspdebug ezfet

...

Reset communications...
transport/cdc_acm.c: can't send data: Function not implemented
hal_proto_send: type: 0x92

Is the anything else I could try?

PS: @dlbeer, thanks a lot for mspdebug!
(rf2500 works great on OpenBSD with the old Launchpad).

@dlbeer
Copy link
Owner

dlbeer commented Jun 29, 2020 via email

@hosewiejacke
Copy link
Author

hosewiejacke commented Jun 30, 2020 via email

@dlbeer
Copy link
Owner

dlbeer commented Jun 30, 2020 via email

@phillbush
Copy link

Hi.

I could get a bit further on porting libmsp430 (aka tilib, aka msp430-debug-stack) on OpenBSD.

It also fails at the MSP430_Initialize step. But it goes further and do not issues it could not find a FET on the specified serial port (error 57), as happened with @hosewiejacke. With the patch I applied, libmsp430 actually finds a suitable FET and starts communicating with it.

Here's the port: https://github.com/phillbush/openbsd-ports/tree/master/devel/libmsp430
The patch to the source code (and two patches to the Makefile) can be found at the patches/ directory.

However, libmsp430 fails at the communication itself (error 35), because of an unexpected byte read from the serial port at the beginning of the communication.

I explain the error better here: osresearch/MSPDebugStack#1

Thank you,
Lucas de Sena.

@phillbush
Copy link

I fixed the port.
tilib/libmsp430 now works fine on OpenBSD.

@hosewiejacke
Copy link
Author

This is plain awesome 🥳
Thank you, @phillbush!

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

3 participants