Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Local index.json for custom packages (Read 8414 times)
rml
Junior Member
**
Offline



Posts: 38
Local index.json for custom packages
Aug 29th, 2016 at 2:32pm
 
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
 
Visual Micro
Administrator
*****
Offline



Posts: 10532
United Kingdom
Re: Local index.json for custom packages
Reply #1 - Aug 29th, 2016 at 3:03pm
 
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
 
Visual Micro
Administrator
*****
Offline



Posts: 10532
United Kingdom
Re: Local index.json for custom packages
Reply #2 - Aug 30th, 2016 at 12:50am
 
There is a new release please test physical folder paths when you get time.

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



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



Posts: 38
Re: Local index.json for custom packages
Reply #4 - Oct 26th, 2016 at 6:10pm
 
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
 
Visual Micro
Administrator
*****
Offline



Posts: 10532
United Kingdom
Re: Local index.json for custom packages
Reply #5 - Oct 26th, 2016 at 7:05pm
 
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
Back to top
« Last Edit: Oct 26th, 2016 at 7:06pm by Visual Micro »  
WWW  
IP Logged
 
rml
Junior Member
**
Offline



Posts: 38
Re: Local index.json for custom packages
Reply #6 - Oct 26th, 2016 at 7:32pm
 
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
 
Visual Micro
Administrator
*****
Offline



Posts: 10532
United Kingdom
Re: Local index.json for custom packages
Reply #7 - Oct 26th, 2016 at 7:38pm
 
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
Re: Local index.json for custom packages
Reply #8 - Oct 26th, 2016 at 8:00pm
 
thanks - I removed the "file://" part but the custom boards do not show up in the "Manage Boards" tab.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10532
United Kingdom
Re: Local index.json for custom packages
Reply #9 - Oct 26th, 2016 at 8:09pm
 
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)



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



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



Posts: 10532
United Kingdom
Re: Local index.json for custom packages
Reply #11 - Oct 27th, 2016 at 2:10am
 
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
Back to top
« Last Edit: Oct 27th, 2016 at 2:13am by Visual Micro »  
WWW  
IP Logged
 
rml
Junior Member
**
Offline



Posts: 38
Re: Local index.json for custom packages
Reply #12 - Oct 27th, 2016 at 8:58am
 
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
 
Visual Micro
Administrator
*****
Offline



Posts: 10532
United Kingdom
Re: Local index.json for custom packages
Reply #13 - Oct 27th, 2016 at 6:06pm
 
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
Back to top
« Last Edit: Oct 27th, 2016 at 6:07pm by Visual Micro »  
WWW  
IP Logged
 
rml
Junior Member
**
Offline



Posts: 38
Re: Local index.json for custom packages
Reply #14 - Oct 28th, 2016 at 12:24am
 
"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:
# 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 

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