makertum / Trinamic_TMC2130

Arduino-compatible library to configure the Trinamic TMC2130 stepper motor driver
42 stars 19 forks source link

Invalid library? #4

Closed thinkyhead closed 8 years ago

thinkyhead commented 8 years ago

I'm trying to get Travis CI to do a test build of Marlin… https://travis-ci.org/MarlinFirmware/Marlin/builds/174050993 …but when it installs Trinamic_TMC2130 library Arduino complains:

Invalid library found in /usr/local/share/arduino/libraries/Trinamic_TMC2130

Is the library in need of an update, or is there some way I can get Arduino to accept it?

thinkyhead commented 8 years ago

Reference https://github.com/MarlinFirmware/Marlin/pull/5179

makertum commented 8 years ago

Hi, I'll close this issue as it seems to relate to an issue of another TMC2130 library and another fork of Marlin. Thanks anyway! Much appreciated!

thinkyhead commented 8 years ago

@makertum I'm the lead on MarlinFirmware, and we are trying to use your library to integrate TMC2130 support into the upcoming 1.1.0 release.

Here's what we're doing in our .travis.yml:

# Install: TMC2130 Stepper Motor Controller library
- git clone https://github.com/makertum/Trinamic_TMC2130.git
- sudo mv Trinamic_TMC2130 /usr/local/share/arduino/libraries/Trinamic_TMC2130

git clone https://github.com/makertum/Trinamic_TMC2130.git

That's you!

And the error message I'm getting back from the Arduino build tools is:

Invalid library found in /usr/local/share/arduino/libraries/Trinamic_TMC2130: /usr/local/share/arduino/libraries/Trinamic_TMC2130

Now then, why do you suppose Arduino is throwing that error? Should we not be using your library? It seems pretty complete to me.

ghost commented 8 years ago

@thinkyhead Maybe

sudo mv Trinamic_TMC2130/Trinamic_TMC2130 /usr/local/share/arduino/libraries/Trinamic_TMC2130

solves your problem.

makertum commented 8 years ago

Hi again!

Sorry for prematurely closing this issue and thanks for your persistence.

esenapaj is probably right, since the actual library lives within the subfolder.

Nevertheless, the ´library.properties´ also wasn't really to spec, so I've made the necessary changes. Could you please try what esenapaj suggested above, along with the current version of the library, and see if it works for you?

Best, Moritz

thinkyhead commented 8 years ago

Trinamic_TMC2130/Trinamic_TMC2130

D'oh! That's probably it! Testing now….

thinkyhead commented 8 years ago

Sure enough, just didn't think to try that. Now the "invalid library" complaint has gone away. Thanks!

I had a couple of typos, so now just waiting for Travis CI to catch any of my remaining errors.

I also made a fork for testing so I could also play with the properties file. The one other thing I did there was to move the .cpp and .h files into a src subfolder. When we publish Marlin for other architectures —which may happen pretty soon for Due— we might need architecture-based subfolders, unless the code is universal. I presume it is…?

makertum commented 8 years ago

It is - as long as the library is provided a suiteble SPI.h, it'll work fine on any architecture.