Board Manager again

Development environment specific, Arduino, Eclipse, VS2013,Em::Blocks etc
User avatar
RogerClark
Posts: 5538
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Board Manager again

Postby RogerClark » Tue May 31, 2016 9:48 pm

Martin.

Good idea.


I wonder why Arduino.org have not updated thier IDE to match Arduino.cc's version

IMHO They would be better off pulling a lot of changes from Arduino.cc's version.

But I guess its hard to change this stuff without bringing in the whole of the Boards Manager


If i get chance I will email Angelo or Federico at Arduino.org and see what they have to say.

User avatar
ddrown
Posts: 124
Joined: Sat Jan 09, 2016 4:49 am

Re: Board Manager again

Postby ddrown » Wed Sep 21, 2016 2:33 am

I've made a bunch of changes to my Board Manager generation. I've switched from my own branch of stm32duino to the official master branch. I've switched version numbers to a "YYYY.MM.DD" format. Because there have been so many changes, I've switched the URL to http://dan.drown.org/stm32duino/package ... index.json The old URL has the old versions.

If you have the current board manager version installed, you'll need to uninstall it before switching.

It'll check for master branch changes every night and build a new package when it finds one.

I've posted the slightly modified tool to https://github.com/ddrown/Arduino_STM32_release_tools

User avatar
RogerClark
Posts: 5538
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Board Manager again

Postby RogerClark » Wed Sep 21, 2016 4:51 am

Thanks Dan

Someone posted an issue about this on github yesterday, so perhaps he tracked your files down.

BTW. I'm not sure if you read the announcement but STM have produced their own core, complete with board manager package.

But it only supports Nucleo boards (and only 1 board per MCU series)

However we are hoping to be able to add the usual boards to it in the fullness of time. In which case we'll almost certainly need to created an updated boards manager package.
So I'm probably going to need to get to grips with your Perl files to create the BM package for that core.

User avatar
ddrown
Posts: 124
Joined: Sat Jan 09, 2016 4:49 am

Re: Board Manager again

Postby ddrown » Thu Sep 22, 2016 2:36 am

RogerClark wrote:Thanks Dan

Someone posted an issue about this on github yesterday, so perhaps he tracked your files down.

BTW. I'm not sure if you read the announcement but STM have produced their own core, complete with board manager package.

But it only supports Nucleo boards (and only 1 board per MCU series)

However we are hoping to be able to add the usual boards to it in the fullness of time. In which case we'll almost certainly need to created an updated boards manager package.
So I'm probably going to need to get to grips with your Perl files to create the BM package for that core.


I did see the STM core, that's pretty cool. I can setup an automated process to do the same thing for that repo if that'll help.

User avatar
RogerClark
Posts: 5538
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Board Manager again

Postby RogerClark » Thu Sep 22, 2016 3:23 am

Hi Dan

Thanks

I still need to do a load more changes before we're close to needing another release.

STM have put all the tools in the same folder, which is OK when they just supported one simple upload type (USB Mass storage) but not much use when we support multiple upload methods on multiple boards etc

So the boards manager package will need to generate different upload "Tools" for each OS

But, as we have quite a few issues with refactoring the STM core, I don't think we'll need to look at it for several weeks, if not longer

Thanks

Roger

User avatar
ahull
Posts: 1456
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Board Manager again

Postby ahull » Fri Oct 14, 2016 9:22 pm

I'm not sure if this is the right place for this, but I have just installed the latest Arduino.cc IDE (ARDUINO 1.6.12) 32 bit, and added Dan's excellent board manager package.

Everything appears to work, except for this issue when I try to upload using my st-link adapter.

Code: Select all

java.io.IOException: Cannot run program "/home/andrew/.arduino15/packages/stm32duino/hardware/STM32F1/tools/linux/stlink_upload": error=2, No such file or directory
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
   at java.lang.Runtime.exec(Runtime.java:620)
   at java.lang.Runtime.exec(Runtime.java:485)
   at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:11)
   at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:129)
   at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:206)
   at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
   at processing.app.SketchController.upload(SketchController.java:707)
   at processing.app.SketchController.exportApplet(SketchController.java:680)
   at processing.app.Editor$DefaultExportHandler.run(Editor.java:2176)
   at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: error=2, No such file or directory
   at java.lang.UNIXProcess.forkAndExec(Native Method)
   at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
   at java.lang.ProcessImpl.start(ProcessImpl.java:134)
   at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
   ... 10 more
An error occurred while uploading the sketch


I'm not sure where the problem lies. In the unlikely event that the file is missing from Roger's repo, we can use the version below.

Code: Select all

#!/bin/bash

# Check for leaf device.
function leaf_status()
{

this_leaf_status=$(lsusb |grep "1eaf" | awk '{ print $NF}')
# Find the mode of the leaf bootloader
case $this_leaf_status in
   "1eaf:0003")
      echo "dfu"
   ;;
   "1eaf:0004")
      echo "ttyACMx"
   ;;
   *)
      #echo "$this_leaf_status"
      echo "unknown"
   ;;
esac
}

# You will need the usb-reset code, see https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Using-a-generic-stm32-board-on-linux-with-Maple-bootloader
#
USBRESET=$(which usb-reset) || USBRESET="./usb-reset"

# Check to see if a maple compatible board is attached
LEAF_STATUS=$(leaf_status)
echo "USB Status [$LEAF_STATUS]"

$(dirname $0)/stlink/st-flash write "$4" 0x8000000

sleep 4
# Reset the usb device to bring up the tty rather than DFU
"$USBRESET" "/dev/bus/usb/$(lsusb |grep "1eaf" |awk '{print $2,$4}'|sed 's/\://g'|sed 's/ /\//g')" >/dev/null 2>&1
# Check to see if a maple compatible board is attached
LEAF_STATUS=$(leaf_status)
echo "USB Status [$LEAF_STATUS]"
# Check to see if the tty came up
TTY_DEV=$(find /dev -cmin -2 |grep ttyAC)
echo -e "Waiting for tty device $TTY_DEV \n"
sleep 20
echo -e "$TTY_DEV should now be available.\n"
exit 0



I seem to recall that there was some debate about the above version being overly complicated, so perhaps it was removed, but not replaced.
Last edited by ahull on Fri Oct 14, 2016 9:39 pm, edited 1 time in total.
- Andy Hull -

User avatar
RogerClark
Posts: 5538
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Board Manager again

Postby RogerClark » Fri Oct 14, 2016 9:37 pm

Andy

I have not removed anything from the github repo for ages, so the problem is likely to be in the compressed tool package for linux64, i.e it could be missing a file

Or its a path issue in platform.txt as the paths to board manager tools is different from the path if you use the repo

User avatar
Rick Kimball
Posts: 771
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Board Manager again

Postby Rick Kimball » Fri Oct 14, 2016 9:44 pm

Or it could exist and isn't a 64 bit executable. @ahull have you checked to see if it is a 32 bit executable? Do you have the 32 bit libs installed?
-rick

User avatar
ahull
Posts: 1456
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Board Manager again

Postby ahull » Fri Oct 14, 2016 9:45 pm

It is probably an issue with the board manager package in that case, the file is completely missing, although the mac_os and windows equivalents are there.

The mac os version is much simpler, as it doesn't attempt to wait for the board's USB serial port to re-enumerate, which is the purpose of all the extra (bloat?) code I added to the linux version.

It looks like this.

Code: Select all

#!/bin/bash
$(dirname $0)/stlink/st-flash write "$4" 0x8000000
- Andy Hull -

User avatar
ahull
Posts: 1456
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: Board Manager again

Postby ahull » Fri Oct 14, 2016 9:51 pm

Rick Kimball wrote:Or it could exist and isn't a 64 bit executable. @ahull have you checked to see if it is a 32 bit executable? Do you have the 32 bit libs installed?


The missing file is a shell script, so it shouldn't care if we are 32 or 64 bit.
The 64bit version of the IDE suffers from the same missing bash script, as I just tried that too.
The bash script calls st-flash which will care however and the board manager package appears to only have a 64 bit version, so I suspect I have opened a small can of worms here. :roll: Why is life never simple?

EDIT: Actually the linux tools contains maple_upload readme.txt serial_upload stm32flash - but no stlink folder which should contain the st-link files.
- Andy Hull -


Return to “IDE's”

Who is online

Users browsing this forum: No registered users and 2 guests