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

Always updatable libraries in Arduino IDE 1.6.10 #196

Closed
per1234 opened this issue Jul 29, 2016 · 12 comments
Closed

Always updatable libraries in Arduino IDE 1.6.10 #196

per1234 opened this issue Jul 29, 2016 · 12 comments

Comments

@per1234
Copy link
Contributor

per1234 commented Jul 29, 2016

  1. Install Arduino IDE 1.6.10
  2. Install Arduino_STM32 core
  3. Start Arduino IDE
  4. Tools > Board > Maple Mini(or any other STM32F1 board)
  5. Sketch > Include Library > Manage Libraries... > Type > Updatable
  6. Update the Servo and FreeRTOS libraries - Instead of disappearing from the Updatable list as expected, they remain in the list no matter what you do. If enabled, the Arduino IDE will continue to show Updatable library notifications when a STM32F1 board is selected.

The solution is to add library.properties files to these libraries(specification at https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification). I recommend creating unique name values, otherwise the issue will still occur when there is a greater version of the library of the same name available via Library Manager, for example:

name=Servo(STM32F1)
@Isaac96
Copy link

Isaac96 commented Jul 29, 2016

Hi perl 😃

@rogerclarkmelbourne
Copy link
Owner

rogerclarkmelbourne commented Jul 29, 2016

IDE 1.6.10 is not currently supported
The newest supported version is 1.6.9 (see the readme)

@per1234
Copy link
Contributor Author

per1234 commented Jul 29, 2016

I understand that, I assumed that eventually you'll want to support 1.6.10 and would appreciate some help in that direction. I don't even use Arduino_STM32 but I'm familiar with this issue so I thought I'd make the effort to share my knowledge.

Try it with Arduino IDE 1.6.7, you'll see that the same issue occurs with the Servo library. The cause of the issue in 1.6.7 is a different bug, which still exists in 1.6.10, but there is a new Library Manager bug in 1.6.10 that causes it to also occur with the FreeRTOS library.

@rogerclarkmelbourne
Copy link
Owner

rogerclarkmelbourne commented Jul 29, 2016

Try using 1.6.9, as 1.6.6, 1.6.7 1.6.8 do not work. But 1.6.9 seems to work (albeit I'm not sure any tried FreeTOS with 1.6.9

Its very hard to keep up with changes to the IDE as often the changes are not backwards compatible for existing users. e.g. when 1.6.6 was released, the changes to support it would remove support for everyone that was using 1.6.5

If you read the various threads on www.stm32duino.com you'll find that people are generally averse to updating the IDE all the time, i.e if its not broken it doesnt need to be fixed.

I still only have limited agreement from the community to remove support for 1.6.5 and they have asked that I release is made before I remove 1.6.5 support as loads of people still use 1.6.5 or older

@per1234
Copy link
Contributor Author

per1234 commented Jul 29, 2016

The reason it doesn't occur in 1.6.8 and 1.6.9 is because the version of the Servo library included with the Arduino IDE is the same as the latest version available on Library Manager. If they release a new version of the Servo library the always updatable Servo library issue will occur on 1.6.9. You can verify this by changing the version in the Arduino IDE 1.6.9's Servo library library.properties file to 1.1.1.

@Testato
Copy link
Contributor

Testato commented Aug 12, 2016

+1

Yes thi si very important, it is not related to the IDE Version
All the modified Lbrary must have a unique name, different from the original arduino core library name.
So if you modify the original arduino Servo library, you must use a library.proprierty file, and inside it you must use a different name.

On esp github project all library is called xxx-esp8266

You do not need change the name of the library itself, but only the name in the library.proprierty file, because this file is used for the automatic library update

This is an example for servo on esp
https://github.com/esp8266/Arduino/blob/master/libraries/Servo/library.properties

@rogerclarkmelbourne
Copy link
Owner

Now works fine with 1.6.12

@per1234
Copy link
Contributor Author

per1234 commented Nov 10, 2016

Still same issue for me. Did you follow my instructions to reproduce issue?
clipboard02

@rogerclarkmelbourne
Copy link
Owner

OK

So this is not a version issue, its an issue with library names in their properties

@per1234
Copy link
Contributor Author

per1234 commented Nov 11, 2016

I do think the Arduino IDE should be able to handle this correctly and I hope that issue will be fixed in some future version but it hasn't happened yet. I've attempted to bring the issue to the developers' attention multiple times without any response. The issue was originally reported by one of the Arduino developers(arduino/Arduino#4189) but was incorrectly closed. The issue even occurs with one of the official Arduino cores(arduino/Arduino#5283). However, it is east enough for 3rd party cores to work around the issue by just using a unique name value in library.properties. When you think about it, this actually make sense because, for example, the Servo library included with your core is a different library from the stock Arduino Servo library and thus it's proper for it to have a different name(though the same header file name for compatibility with all sketches including that library).

@rogerclarkmelbourne
Copy link
Owner

@per1234
Yes. This is a long standing problem.

IMHO the libraries attached to a core e.g. the STM32 should take priority over the generic Arduino versions of libraries with the same name.
But for some reason the Arduino dev's don't want to do this.

I took at look in the sources and the Servo library was legacy from ages ago, and was possibly written my Leaflabs when they originally wrote LibMaple etc.
So it doesnt have a libraries properties file.

What I need to do is to copy the latest servo library properties file and the keywords file from the Arduino AVR / SAM core and then rename the library to Servo(STM32)

BTW. I've never actually used the Servo library, but I do have some servos for testing, so I should really wire one up and check it actually works ;-)

@rogerclarkmelbourne
Copy link
Owner

Hopefully fixed in this commit

1892447

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

4 participants