Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Local index.json for custom packages (Read 13197 times)
rml
Junior Member
**
Offline


Posts: 38
Joined: Aug 29th, 2016
Local index.json for custom packages
Aug 29th, 2016 at 1:32pm
Print Post  
Hello,

First of all, big thumbs up to the Visual Micro team - installed it a few days ago, and I absolutely love it. It brings Arduino development to a whole new level.

One thing that keeps me going back to the Arduino IDE though is the ability to specify local files (and not just URLs) as board package index.
For instance the following URL as boardsmanager.additional.urls allows me to detect my custom boards: 'file://C:\Users\Armel\AppData\Local\Arduino15\test_package_toto_index.json'.

I have tried the same in Visual Micro's "Configure Ide Locations" menu, but my boards do not show up.

Is there a way to make it work?
Thanks,

Armel
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Local index.json for custom packages
Reply #1 - Aug 29th, 2016 at 2:03pm
Print Post  
Good to hear that and thanks for the post.

Funny I was looking at that yesterday. There is a release due over the next day or so with a  lot of semi-minor fixes so will try to include in that.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Local index.json for custom packages
Reply #2 - Aug 29th, 2016 at 11:50pm
Print Post  
There is a new release please test physical folder paths when you get time.

Thanks
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Local index.json for custom packages
Reply #3 - Oct 15th, 2016 at 2:08pm
Print Post  
Any feedback? Working okay now?
  
Back to top
WWW  
IP Logged
 
rml
Junior Member
**
Offline


Posts: 38
Joined: Aug 29th, 2016
Re: Local index.json for custom packages
Reply #4 - Oct 26th, 2016 at 5:10pm
Print Post  
Hi Tim,

Apologies for the late reply - still can't see my custom boards, even though they show up in the Arduino IDE.
Do you have an example of syntax that should be used?
Thanks,

Armel
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Local index.json for custom packages
Reply #5 - Oct 26th, 2016 at 6:05pm
Print Post  
Hi,

It shouldn't really matter about any format that Visual Micro requires it's supposed to do the same as the arduino ide.

Can you confirm if you have entered the .json path into the comma separated contributions json file list on the arduino ide preferences window?

Thanks
« Last Edit: Oct 26th, 2016 at 6:06pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
rml
Junior Member
**
Offline


Posts: 38
Joined: Aug 29th, 2016
Re: Local index.json for custom packages
Reply #6 - Oct 26th, 2016 at 6:32pm
Print Post  
I copied the following comma-separated string from the Arduino IDE / "Preferences" window / "Additional Boards Manager URLs" field:
https://adafruit.github.io/arduino-board-index/package_adafruit_index.json, file://C:\Users\Armel\AppData\Local\Arduino15\test_package_ThingType_index.json

(the important part for me is the one starting with 'file')
and I pasted it into Visual Micro / "Configure Ide Locations" window / "Optional additional boards manager urls (url1, url2, url3...). Warning: Use safe urls from the link below" field.

Best,

Armel
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Local index.json for custom packages
Reply #7 - Oct 26th, 2016 at 6:38pm
Print Post  
Oh Smiley

I did it wrong because visual micro tests if the url is a valid local file, didn't think/know about the "file://" up the front of the path. 

So until the next visual micro update you can probably add C:\Users\Armel\AppData\Local\Arduino15\test_package_ThingType_index.json to the Visual Micro>Ide Locations>"Board Support Urls" property.
  
Back to top
WWW  
IP Logged
 
rml
Junior Member
**
Offline


Posts: 38
Joined: Aug 29th, 2016
Re: Local index.json for custom packages
Reply #8 - Oct 26th, 2016 at 7:00pm
Print Post  
thanks - I removed the "file://" part but the custom boards do not show up in the "Manage Boards" tab.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Local index.json for custom packages
Reply #9 - Oct 26th, 2016 at 7:09pm
Print Post  
Did you try clicking the rescan button twice?

Can you please post or emaill the index file. email is info[at]visualmicro.com

Lastly you could temporarily remove the one from arduino ide and then close it, restart vs just to see if the vm one is then found. It might be a de-duplication issue where vm thinks the url has already been processed. (but this test might be a waste of your time)



« Last Edit: Oct 26th, 2016 at 7:16pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
rml
Junior Member
**
Offline


Posts: 38
Joined: Aug 29th, 2016
Re: Local index.json for custom packages
Reply #10 - Oct 26th, 2016 at 7:18pm
Print Post  
just emailed - hope it helps
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Local index.json for custom packages
Reply #11 - Oct 27th, 2016 at 1:10am
Print Post  
Thanks. Yes there were a few things.

There is a new update 1610.27 that should work okay but please read the release notes

The result is that the file name format used arduino ide file:// is now the only supported option for local json files. This means you can remove your config from Visual Micro.

When opening the Visual Micro Explorer there are some new error messages that will appear when the json parser fails. The system will continue to load so I might remove the messages in the next release. Currently the messages will report that your two json properties size: "" are invalid integers. You could change them from "" to "0" if the errors become annoying.

Let me know how you get on. Thanks
« Last Edit: Oct 27th, 2016 at 1:13am by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
rml
Junior Member
**
Offline


Posts: 38
Joined: Aug 29th, 2016
Re: Local index.json for custom packages
Reply #12 - Oct 27th, 2016 at 7:58am
Print Post  
Hi Tim,

Thanks, it works, I can see my boards now!

I noticed one small thing though, which can also be seen on the Adafruit board package: in the "Installed" tab / Explore Platforms / Adafruit / samd / "Adafruit SAMD (32-bits ARM Cortex-M0+) Boards(2)" there are 2 boards listed:
"Adafruit Feather M0 (Native USB Port)" and "Adafruit SAMD (32-bits ARM Cortex-M0+) Boards"

Based on the Arduino IDE, there should be only the first board, the second one is not a board but just a repeat of the node above. For some reason, there is no such extra board displayed in the Adafruit / avr architecture.

Best regards,

Armel
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Local index.json for custom packages
Reply #13 - Oct 27th, 2016 at 5:06pm
Print Post  
ok. 

Can you give me a list of .json urls you have used in arduino ide

Also let me see the boards.txt files from your test package

Thanks
« Last Edit: Oct 27th, 2016 at 5:07pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
rml
Junior Member
**
Offline


Posts: 38
Joined: Aug 29th, 2016
Re: Local index.json for custom packages
Reply #14 - Oct 27th, 2016 at 11:24pm
Print Post  
"Additional Boards Manager URLs" in the Arduino IDE: https://adafruit.github.io/arduino-board-index/package_adafruit_index.json (I removed my custom boards since the same thing happens with Adafruit SAMD boards)

The corresponding boards.txt is copied below.

Best regards,

Armel

Code
Select All
# Copyright (c) 2014-2015 Arduino LLC.  All right reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA


adafruit_feather_m0.name=Adafruit Feather M0 (Native USB Port)
adafruit_feather_m0.vid.0=0x239A
adafruit_feather_m0.pid.0=0x800B
adafruit_feather_m0.vid.1=0x239A
adafruit_feather_m0.pid.1=0x000B
adafruit_feather_m0.upload.tool=bossac
adafruit_feather_m0.upload.protocol=sam-ba
adafruit_feather_m0.upload.maximum_size=262144
adafruit_feather_m0.upload.use_1200bps_touch=true
adafruit_feather_m0.upload.wait_for_upload_port=true
adafruit_feather_m0.upload.native_usb=true
adafruit_feather_m0.build.mcu=cortex-m0plus
adafruit_feather_m0.build.f_cpu=48000000L
adafruit_feather_m0.build.usb_product="Feather M0"
adafruit_feather_m0.build.usb_manufacturer="Adafruit"
adafruit_feather_m0.build.board=SAMD_FEATHER_M0
adafruit_feather_m0.build.core=arduino
adafruit_feather_m0.build.extra_flags=-DARDUINO_SAMD_ZERO -D__SAMD21G18A__ {build.usb_flags}
adafruit_feather_m0.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld
adafruit_feather_m0.build.openocdscript=openocd_scripts/arduino_zero.cfg
adafruit_feather_m0.build.variant=arduino_zero
adafruit_feather_m0.build.variant_system_lib=
adafruit_feather_m0.build.vid=0x239A
adafruit_feather_m0.build.pid=0x800B
adafruit_feather_m0.bootloader.tool=openocd
adafruit_feather_m0.bootloader.file=feather/samd21_sam_ba.bin

#adafruit_radio_m0.name=Adafruit M0 Radio (Native USB Port)
#adafruit_radio_m0.vid.0=0x239A
#adafruit_radio_m0.pid.0=0x8014
#adafruit_radio_m0.vid.1=0x239A
#adafruit_radio_m0.pid.1=0x0014
#adafruit_radio_m0.upload.tool=bossac
#adafruit_radio_m0.upload.protocol=sam-ba
#adafruit_radio_m0.upload.maximum_size=262144
#adafruit_radio_m0.upload.use_1200bps_touch=true
#adafruit_radio_m0.upload.wait_for_upload_port=true
#adafruit_radio_m0.upload.native_usb=true
#adafruit_radio_m0.build.mcu=cortex-m0plus
#adafruit_radio_m0.build.f_cpu=48000000L
#adafruit_radio_m0.build.usb_product="Radio M0"
#adafruit_radio_m0.build.usb_manufacturer="Adafruit"
#adafruit_radio_m0.build.board=SAMD_ZERO
#adafruit_radio_m0.build.core=arduino
#adafruit_radio_m0.build.extra_flags=-D__SAMR21G18A__ {build.usb_flags}
#adafruit_radio_m0.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld
#adafruit_radio_m0.build.openocdscript=openocd_scripts/arduino_zero.cfg
#adafruit_radio_m0.build.variant=zero_radio
#adafruit_radio_m0.build.variant_system_lib=
#adafruit_radio_m0.build.vid=0x239A
#adafruit_radio_m0.build.pid=0x8014
#adafruit_radio_m0.bootloader.tool=openocd
#adafruit_radio_m0.bootloader.file=feather/samr21_sam_ba.bin

#adafruit_metro_m0.name=Adafruit Metro M0 (Native USB Port)
#adafruit_metro_m0.vid.0=0x239A
#adafruit_metro_m0.pid.0=0x8013
#adafruit_metro_m0.vid.1=0x239A
#adafruit_metro_m0.pid.1=0x0013
#adafruit_metro_m0.upload.tool=bossac
#adafruit_metro_m0.upload.protocol=sam-ba
#adafruit_metro_m0.upload.maximum_size=262144
#adafruit_metro_m0.upload.use_1200bps_touch=true
#adafruit_metro_m0.upload.wait_for_upload_port=true
#adafruit_metro_m0.upload.native_usb=true
#adafruit_metro_m0.build.mcu=cortex-m0plus
#adafruit_metro_m0.build.f_cpu=48000000L
#adafruit_metro_m0.build.usb_product="Metro M0"
#adafruit_metro_m0.build.usb_manufacturer="Adafruit"
#adafruit_metro_m0.build.board=SAMD_ZERO
#adafruit_metro_m0.build.core=arduino
#adafruit_metro_m0.build.extra_flags=-D__SAMD21G18A__ {build.usb_flags}
#adafruit_metro_m0.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld
#adafruit_metro_m0.build.openocdscript=openocd_scripts/arduino_zero.cfg
#adafruit_metro_m0.build.variant=arduino_zero
#adafruit_metro_m0.build.variant_system_lib=
#adafruit_metro_m0.build.vid=0x239A
#adafruit_metro_m0.build.pid=0x8013
#adafruit_metro_m0.bootloader.tool=openocd
#adafruit_metro_m0.bootloader.file=metro/samd21_sam_ba.bin 

« Last Edit: Oct 28th, 2016 at 12:30pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint