Board Manager again

Development environment specific, Arduino, Eclipse, VS2013,Em::Blocks etc
User avatar
ddrown
Posts: 119
Joined: Sat Jan 09, 2016 4:49 am

Re: Board Manager again

Postby ddrown » Thu Oct 20, 2016 3:04 am

ddrown wrote:Hm, I had seen something like this when I switched my local IDE from the 1.0.x branch to the 2016.x.x branch, but clearing the arduino15 folder and re-downloading the stm32duino package fixed it for me. I'll see if I can recreate this and figure out what's going on.


Ok, if I install both boards, I get the same as you:

Code: Select all

Arduino: 1.6.12 (Windows 10), Board: "Generic STM32F103C series, STM32F103C8 (20k RAM. 64k Flash), STLink"

...

Board genericSTM32F103C (platform STM32F1, package stm32duino) is unknown

Error compiling for board Generic STM32F103C series.


And if I look in my Arduino15 directory:

Code: Select all

$ ls -l Arduino15/packages/stm32duino/hardware/STM32F1/
total 8
drwx------+ 1 ddrown ddrown 0 Oct 19 21:54 1.0.10
drwx------+ 1 ddrown ddrown 0 Sep 21 21:52 2016.9.20


If I clear one of the versions out, without restarting the IDE:

Code: Select all

$ rm -rf Arduino15/packages/stm32duino/hardware/STM32F1/2016.9.20 Arduino15/packages/stm32duino/tools/stm32tools/2016.9.20


Then my builds work again:

Code: Select all

...
Sketch uses 19,932 bytes (30%) of program storage space. Maximum is 65,536 bytes.
Global variables use 2,720 bytes of dynamic memory.


If I switch URLs and install the 2016.10.17 package, I get the board is unknown error again. So I clear out the other version:

Code: Select all

$ rm -rf Arduino15/packages/stm32duino/hardware/STM32F1/1.0.10/ Arduino15/packages/stm32duino/tools/stm32tools/1.0.*


Then my builds work again:

Code: Select all

...
Sketch uses 20,492 bytes (31%) of program storage space. Maximum is 65,536 bytes.
Global variables use 2,984 bytes of dynamic memory.


I'm this in Windows, maybe that's why it works for me? Do you want me to try to replicate this on Linux?

zmemw16
Posts: 983
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Board Manager again

Postby zmemw16 » Thu Oct 20, 2016 11:20 am

ahull wrote:Clearly I am very good at finding new and interesting ways to break this.

My 32 bit install is fine, but the 64 bit install is nicely broken.
If I remove and reinstall the board manager package, it *sometimes* works, but 99% of the time I end up with it broken.

I even resorted to removing and re-installing the ide and removing and re-creating the /home/ahull/.arduino15 folder.
I've run out of flat surfaces to bang my head against, so I thought I'd share my pain. ;) Any ideas?


cherry picked on the quoting, but WOW you're really patient, a 100 times and it worked once :D

stephen

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

Re: Board Manager again

Postby ahull » Thu Oct 20, 2016 10:05 pm

zmemw16 wrote:
ahull wrote:Clearly I am very good at finding new and interesting ways to break this.

My 32 bit install is fine, but the 64 bit install is nicely broken.
If I remove and reinstall the board manager package, it *sometimes* works, but 99% of the time I end up with it broken.

I even resorted to removing and re-installing the ide and removing and re-creating the /home/ahull/.arduino15 folder.
I've run out of flat surfaces to bang my head against, so I thought I'd share my pain. ;) Any ideas?


cherry picked on the quoting, but WOW you're really patient, a 100 times and it worked once :D

stephen


It may have been 99.9% of the time :P

On a more serious note, I can confirm the above behaviour, if you install both the dev and the current versions, then it breaks. Remove one or the other and it mysteriously un-breaks. I assume that something is looking for exactly one answer and is getting an array of more than one, and thus throws the unknown board error.

The missing 32 bit Linux tools are also a confirmed issue, but it looks like the st-link tool runs on both 32 and 64 bit (multi-arch)

So even when the versions are screwed, on my 64 bit box I can do...

Code: Select all

cd stm32duino/tools/stm32tools/2016.10.17/linux64/
./stlink_upload ttyACM3 {upload.altID} {upload.usbID} /tmp/arduino_build_960091/STM32C64.ino.bin

.. and it flashes the sketch generated by the IDE using the ST-Link V2 adapter.
- Andy Hull -

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

Re: Board Manager again

Postby ahull » Sat Oct 22, 2016 1:16 pm

(facepalm) Finally I understand why this fails if I add the symlink.

Code: Select all

/home/ahull/.arduino15/packages/stm32duino/hardware/STM32F1/tools/linux/maple_upload ttyACM3 2 1EAF:0003 /tmp/arduino_build_558946/STM32-O-Scope.ino.bin
java.io.IOException: Cannot run program "/home/ahull/.arduino15/packages/stm32duino/hardware/STM32F1/tools/linux/maple_upload": error=2, No such file or directory


... so the obvious thing is to add a symlink... but that adds a linux folder in just the right place to trigger the cannot find board problem, as the IDE now thinks we have a 2016.10.x version AND a linux (EDIT: actually a "tools") version, so it sulks.
Last edited by ahull on Sat Oct 22, 2016 10:09 pm, edited 1 time in total.
- Andy Hull -

zmemw16
Posts: 983
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Board Manager again

Postby zmemw16 » Sat Oct 22, 2016 5:06 pm

just to check what i thought was correct, i googled >(facepalm)<; the images returned are interesting
srp

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

Re: Board Manager again

Postby ahull » Sat Oct 22, 2016 10:11 pm

Image
:D
- Andy Hull -

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

Re: Board Manager again

Postby ahull » Sun Oct 23, 2016 12:52 pm

In summary there are two problems.

First, if you install the staging package, then the release package, we end up with two packages, and the IDE gets confused.

Second, the upload methods point to ...

$PATH/.arduino15/packages/stm32duino/hardware/STM32F1/tools/linux/{TOOLNAME}


But they should point to ...

$PATH/.arduino15/packages/stm32duino/tools/stm32tools/{VERSION}/linux64/{TOOLNAME}

or

$PATH/.arduino15/packages/stm32duino/tools/stm32tools/{VERSION}/linux/{TOOLNAME}

or better still


$PATH/.arduino15/packages/stm32duino/tools/stm32tools/{VERSION}/linux{PROCESSOR_BITS}/{TOOLNAME}

... where {VERSION} , {TOOLNAME} and {PROCESSOR_BITS} are assumed to be variables in the build script.

If the tools all run on both 32 and 64 bit, we could simplify to...

$PATH/.arduino15/packages/stm32duino/tools/stm32tools/{VERSION}/linux/{TOOLNAME}
- Andy Hull -

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

Re: Board Manager again

Postby ddrown » Tue Oct 25, 2016 3:33 am

ahull wrote:In summary there are two problems.

First, if you install the staging package, then the release package, we end up with two packages, and the IDE gets confused.

Second, the upload methods point to ...

$PATH/.arduino15/packages/stm32duino/hardware/STM32F1/tools/linux/{TOOLNAME}


But they should point to ...

$PATH/.arduino15/packages/stm32duino/tools/stm32tools/{VERSION}/linux64/{TOOLNAME}

or

$PATH/.arduino15/packages/stm32duino/tools/stm32tools/{VERSION}/linux/{TOOLNAME}

or better still


$PATH/.arduino15/packages/stm32duino/tools/stm32tools/{VERSION}/linux{PROCESSOR_BITS}/{TOOLNAME}

... where {VERSION} , {TOOLNAME} and {PROCESSOR_BITS} are assumed to be variables in the build script.

If the tools all run on both 32 and 64 bit, we could simplify to...

$PATH/.arduino15/packages/stm32duino/tools/stm32tools/{VERSION}/linux/{TOOLNAME}


Ok, 2016.10.24 and later should now rewrite the tool paths in platform.txt and the linux64 package is now .../linux/ instead of .../linux64/

platform.txt has a rule for linux64, and it looked like this previously:

Code: Select all

tools.maple_upload.path.linux64={runtime.tools.stm32tools.path}/linux64


But that directory seems to be ignored, so it's pointed at .../linux/ too.

Does it work for you?

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

Re: Board Manager again

Postby ahull » Tue Oct 25, 2016 8:27 am

I just tried a test sketch on both the 32 bit machine and the 64 bit one and that appears to have done the trick.
I didn't have a board to hand to test with, but it calls the correct upload methods on both platforms, and we get the correct error from the upload binaries as a result of them being unable to connect to the selected board.
I'll do more in depth testing, this time with a board attached. when I get some spare time, but that does appear to have resolved the issue.
Thanks. :D
- Andy Hull -

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

Re: Board Manager again

Postby ahull » Tue Oct 25, 2016 10:29 am

Image

High five from the bear.. it works! :D
Just uploaded a sketch via stm32bootloader and ST-Link and it works perfectly.
- Andy Hull -


Return to “IDE's”

Who is online

Users browsing this forum: No registered users and 1 guest