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  
 
Pages: 1 2 3 
Send Topic Print
WICED Feather and VisualMicro (Read 27708 times)
Visual Micro
Administrator
*****
Offline



Posts: 10529
United Kingdom
Re: WICED Feather and VisualMicro
Reply #20 - Apr 18th, 2016 at 3:37pm
 
Yes Pro and debug are the same. There is only one paid version even if you got it for free  Smiley
Back to top
 
WWW  
IP Logged
 
hack-o-holic
Junior Member
**
Offline



Posts: 24
Re: WICED Feather and VisualMicro
Reply #21 - Apr 19th, 2016 at 12:39pm
 
Ok just wanted to be sure.  That said, I ran my activated Visual Micro Pro using the properly edited board.txt file saved in the root directory with my sketch.  I see what appears to be the exact same results  as before.

What else can I try?  I doubt you have a WICED board to test with but did you setup the Arduino IDE properly for WICED per the Adafruit instructions I linked to Originally?

WICED BSP
https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi/get-the-w...

Windows Setup
https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi/windows-s...

Arduino IDE Setup
https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi/arduino-i...

I'm just trying to figure out what is different about my setup that allows you to get proper results but is causing me to have issues.  Cry 
Back to top
« Last Edit: Apr 19th, 2016 at 12:43pm by hack-o-holic »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10529
United Kingdom
Re: WICED Feather and VisualMicro
Reply #22 - Apr 19th, 2016 at 12:50pm
 
Yes it's useful thanks. Please post the verbose upload statement after adding the board.txt property so i can see the difference.

It's a simple system. The last verbose command is the upload command and can be tested from a bat file.

For example when you posted the verbose previously the upload command was shown as this

Code:
python C:\Users\[name]\OneDrive\DOCUME~1\Arduino\hardware\ADAFRU~1/tools/FEATHE~1/FEATHE~1.PY arduino_upgrade C:\Users\[name]\AppData\Local\Temp\VMICRO~1\Blink\ADAFRU~1/BLINKI~1.BIN 



I want to see it after adding the board.txt property. It should then look identical to what we see in the arduino ide when file>preferences>verbose is enabled.

If that still fails when both commands are the same then I can guess what the issue will be.

Hop[e this makes sense.
Back to top
« Last Edit: Apr 19th, 2016 at 8:36pm by Visual Micro »  
WWW  
IP Logged
 
hack-o-holic
Junior Member
**
Offline



Posts: 24
Re: WICED Feather and VisualMicro
Reply #23 - Apr 19th, 2016 at 8:25pm
 
Ok, I think I follow.  I placed the "board.txt" file with the "upload.8dot3=false" statement, into the Blink Example folder and Ran VMPro with Verbose on and set to "Release".  I attached the "BlinkVerboseVisualMicroPro_WithBoard.txt" showing my output.  It still shortens the names in that last statement.  I also took away the "Board.txt" file and ran again and attached the "BlinkVerboseVisualMicroPro_WithOutBoard.txt" file.

I did not attach any verbose output files from my own personal sketch because I don't think it ever makes it to that last python statement.

Lastly, I turned on all verbose options in the Arduino IDE and I do see that last python statement correctly no matter if I have the "board.txt" file in place or not.

Note: It says I no longer have permission to attach files to this board so I am currently unable to attach my two text files with the verbose output.  Please advise. 
Back to top
« Last Edit: Apr 19th, 2016 at 8:27pm by hack-o-holic »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10529
United Kingdom
Re: WICED Feather and VisualMicro
Reply #24 - Apr 19th, 2016 at 8:38pm
 
I see the missing upload I will rebuild the forum indexes to see if it fixes the problem.

Yes you are right the 8dot3 property does not relate to the arduino ide java system. It's a test visual micro property.

I only need to see the line(s) from the output similar to the one I posted immediately previous to your last posts.

Thanks
Back to top
« Last Edit: Apr 19th, 2016 at 8:38pm by Visual Micro »  
WWW  
IP Logged
 
hack-o-holic
Junior Member
**
Offline



Posts: 24
Re: WICED Feather and VisualMicro
Reply #25 - Apr 19th, 2016 at 8:59pm
 
Ok, here is that line from VMPro with the board.txt file in place.

python C:\Users\CJR\OneDrive\DOCUME~1\Arduino\hardware\ADAFRU~1/tools/FEATHE~1/FEATHE~1
.PY arduino_upgrade C:\Users\CJR\AppData\Local\Temp\VMICRO~1\Blink\ADAFRU~1/BLINKI~1.BIN


Don't think you need this but here it is when the board.txt file is not there.

python C:\Users\CJR\OneDrive\DOCUME~1\Arduino\hardware\ADAFRU~1/tools/FEATHE~1/FEATHE~1
.PY arduino_upgrade C:\Users\CJR\AppData\Local\Temp\VMICRO~1\Blink\ADAFRU~1/BLINKI~1.BIN



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



Posts: 10529
United Kingdom
Re: WICED Feather and VisualMicro
Reply #26 - Apr 19th, 2016 at 9:05pm
 
Thanks.

The test setting isn't being recognized because we would expect the ~ in the files names such as /FEATHE~1 to be expanded to their full name that might also contain spaces. Windows has the short 8.3 names and longer names for most files. The setting switches back to longer names (or should do).

Can you please switch on "tools>options>visual micro>compiler>show build properties". Then try to upload and copy/paste the output into an email and send it to me info [at] visualmicro.com

Thanks
Back to top
 
WWW  
IP Logged
 
hack-o-holic
Junior Member
**
Offline



Posts: 24
Re: WICED Feather and VisualMicro
Reply #27 - Apr 19th, 2016 at 9:21pm
 
I already e-mailed.  Here is an attempt to attach the same text file.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10529
United Kingdom
Re: WICED Feather and VisualMicro
Reply #28 - Apr 19th, 2016 at 11:00pm
 
Thanks.

Was this with the upload.8dot3=false setting?

Can you email the board.txt and also confirm it is in the same folder as the Blink.ino?

Thanks
Back to top
 
WWW  
IP Logged
 
hack-o-holic
Junior Member
**
Offline



Posts: 24
Re: WICED Feather and VisualMicro
Reply #29 - Apr 20th, 2016 at 12:00pm
 
Yes, I am running these tests with the board.txt file inside the Examples\Blink folder where the blink.ino resides.

To be sure, I created a new Arduino Project in my normal sketch folder, put the board.txt file in there and a renamed copy of the blink.ino.

I still see the truncated names in the output.  I have e-mailed the new output and my board.txt file as requested.

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



Posts: 10529
United Kingdom
Re: WICED Feather and VisualMicro
Reply #30 - Apr 20th, 2016 at 1:31pm
 
It looks to me like you are not using the latest visual micro. when you have a board.txt you should see the following verbose compiler output.

Code:
Using project build property overrides from D:\Arduino\projects\Sketch1\board.txt
	tip: Overrides will remain for the board and session. Click 'Tools>Visual Micro>Reload toolchains' to clear all overrides (don't forget to rename or comment boards.txt)

Compiling debug version of 'Sketch1' for 'Arduino/Genuino Mega w/ ATmega2560 (Mega 2560)' 

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



Posts: 10529
United Kingdom
Re: WICED Feather and VisualMicro
Reply #31 - Apr 20th, 2016 at 2:16pm
 
Thanks for the screen shot of your visual micro version in tools>updates and extensions.

The "Installed" section that you looked at is the currently installed version.

If you click "Updates" or "Online" sections to the left then you will see the currently available version which is 1604.18

There should also be a little red flag at the top of the ide title bar when updates are available.

You asked about VS Update 2. Visual Micro doesn't mind which version of Visual Studio you are running.
Back to top
« Last Edit: Apr 20th, 2016 at 2:36pm by Visual Micro »  
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10529
United Kingdom
Re: WICED Feather and VisualMicro
Reply #32 - Apr 20th, 2016 at 8:08pm
 
Thanks for all the info and note that you have upgraded all ide's

The uploader error that we now see appears to be NoBackendError('No backend available'). The full error is shown at the end of this message.

The command that visual micro runs to attempt the upload can be put in a .bat file. That is a text file with a .bat extension instead of .txt

You can put this command into a .bat and double click from windows explorer.
Code:
"C:\Users\[name]\OneDrive\Documents\Arduino\hardware\Adafruit_WICED_Arduino/tools/feather_dfu/feather_dfu.py" arduino_upgrade "C:\Users\[name]\AppData\Local\Temp\VMicroBuilds\BlinkTest_VMPro\Adafruit_WICED_Arduino_feather/BlinkTest_VMPro.ino.bin"
pause
 



Please try to put the .bat into two places to see if each works

1) The folder where the arduino.exe is located. That is the arduino ide folder.
2) C:\Users\CJR\OneDrive\Documents\Arduino\hardware\Adafruit_WICED_Arduino/tools/fe
ather_dfu


Thanks very much

Code:
python "C:\Users\[name]\OneDrive\Documents\Arduino\hardware\Adafruit_WICED_Arduino/tools/feather_dfu/feather_dfu.py" arduino_upgrade "C:\Users\[name]\AppData\Local\Temp\VMicroBuilds\BlinkTest_VMPro\Adafruit_WICED_Arduino_feather/BlinkTest_VMPro.ino.bin"
Upload failed
Traceback (most recent call last):
  File "C:\Users\[name]\OneDrive\Documents\Arduino\hardware\Adafruit_WICED_Arduino/tools/feather_dfu/feather_dfu.py", line 71, in <module>
    cli()
  File "C:\Python27\lib\site-packages\click\core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "C:\Python27\lib\site-packages\click\core.py", line 696, in main
    rv = self.invoke(ctx)
  File "C:\Python27\lib\site-packages\click\core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Python27\lib\site-packages\click\core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Python27\lib\site-packages\click\core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\[name]\OneDrive\Documents\Arduino\hardware\Adafruit_WICED_Arduino/tools/feather_dfu/feather_dfu.py", line 67, in arduino_upgrade
    sdep.enter_dfu()
  File "C:\Users\[name]\OneDrive\Documents\Arduino\hardware\Adafruit_WICED_Arduino\tools\feather_dfu\sdep.py", line 128, in enter_dfu
    if usb.core.find(idVendor=USB_VID, idProduct=USB_DFU_PID, backend=backend) is None:
  File "C:\Python27\lib\site-packages\usb\core.py", line 1263, in find
    raise NoBackendError('No backend available')
usb.core.NoBackendError: No backend available 

Back to top
« Last Edit: Apr 20th, 2016 at 8:09pm by Visual Micro »  
WWW  
IP Logged
 
hack-o-holic
Junior Member
**
Offline



Posts: 24
Re: WICED Feather and VisualMicro
Reply #33 - Apr 20th, 2016 at 8:16pm
 
Ok... latest update:
Updated, VS 2015 to Update 2.
Updated Arduino IDE to 1.6.8.
Updated VMPro to 1604.18.0
Re-enabled SAM Arm Cortex M3 in Arduino IDE
Downloaded and installed the latest WICED BSP 0.5.1

I am now able to upload the blink sketch to the WICED feather and I FINALLY see the correct output!  I've attached the output text file.

I am STILL Unable to compile/upload my custom sketch even though it does work in the Arduino IDE.  I'll attach that output also but think maybe it is a coding problem and am looking into it.  Maybe you can tell from the output?
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10529
United Kingdom
Re: WICED Feather and VisualMicro
Reply #34 - Apr 20th, 2016 at 8:30pm
 
Thanks for the info

If you create a new sketch and paste this into the .ino does it compile?

Code:
/*********************************************************************
This is an example for our Feather WIFI modules

Pick one up today in the adafruit shop!

Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!

MIT license, check LICENSE for more information
All text above, and the splash screen below must be included in
any redistribution
*********************************************************************/

#include <Adafruit_MPL3115A2.h>
#include <adafruit_feather.h>
#include <adafruit_mqtt.h>
#include <adafruit_aio.h>

/* This sketch connects to the Adafruit IO server at io.adafruit.com
* and updates a 'PHOTOCELL_FEED' every 5 seconds.
*
* It also follow 'ONOFF_FEED' to receive updates from the AIO server via
* the built-in follow/subscribe callback handler.
*
* To run this demo
* 1. Change WLAN_SSID/WLAN_PASS
* 2. Decide whether you want to use TLS/SSL or not (USE_TLS)
* 3. Change AIO_USERNAME, AIO_KEY to match your own account details
* 4. If you want, change PHOTOCELL_FEED and ONOFF_FEED to use different feeds
* 5. Compile and run
* 6. Optionally log into the AIO webserver to see any changes in data, etc.
*/

#define WLAN_SSID         "yourSSID"
#define WLAN_PASS         "yourPass"

#define AIO_USERNAME      "...your AIO username (see https://accounts.adafruit.com)..."
#define AIO_KEY           "...your AIO key..."

// AdafruitAIO will auto append the "username/feeds/" prefix to your feed(s)
#define PHOTOCELL_FEED     "photocell"
#define ONOFF_FEED         "onoff"

// Connect using TLS/SSL or not
#define USE_TLS             0

// Uncomment to set your own ClientID, otherwise a random ClientID is used
//#define CLIENTID          "Adafruit Feather"

AdafruitAIO       aio(AIO_USERNAME, AIO_KEY);
AdafruitAIOFeed   photocell(&aio, PHOTOCELL_FEED);
AdafruitAIOFeed   onoff(&aio, ONOFF_FEED);

int value = 0;

/**************************************************************************/
/*!
@brief  The setup function runs once when the board comes out of reset
*/
/**************************************************************************/
void setup()
{
	Serial.begin(115200);

	// Wait for the USB serial port to connect. Needed for native USB port only
	while (!Serial) delay(1);

	Serial.println("AIO Test Example\r\n");

	// Print all software versions
	Feather.printVersions();

	while (!connectAP())
	{
		delay(500); // delay between each attempt
	}

	// Connected: Print network info
	Feather.printNetwork();

	// Tell the MQTT client to auto print error codes and halt on errors
	aio.err_actions(true, true);

	// Set ClientID if defined
#ifdef CLIENTID
	aio.clientID(CLIENTID);
#endif

	Serial.print("Connecting to io.adafruit.com ... ");
	if (USE_TLS)
	{
		aio.connectSSL(); // Will halted if an error occurs
	}
	else
	{
		aio.connect(); // Will halted if an error occurs
	}
	Serial.println("OK");

	// 'Follow' the onoff feed to capture any state changes
	onoff.follow(feed_callback);
}

/**************************************************************************/
/*!
@brief  This loop function runs over and over again
*/
/**************************************************************************/
void loop()
{
	value = (value + 1) % 100;

	Serial.print("Updating feed " PHOTOCELL_FEED " : ");
	Serial.print(value);
	photocell.print(value);
	Serial.println(" ... OK");

	delay(5000);
}

/**************************************************************************/
/*!
@brief  'follow' event callback handler

@param  message    The new value associated with this feed

@note   'message' is a UTF8String (byte array), which means
it is not null-terminated like C-style strings. You can
access its data and len using .data & .len, although there is
also a Serial.print override to handle UTF8String data types.
*/
/**************************************************************************/
void feed_callback(UTF8String message)
{
	// Print message
	Serial.print("[ONOFF Feed] : ");
	Serial.println(message);
}

/**************************************************************************/
/*!
@brief  Connect to defined Access Point
*/
/**************************************************************************/
bool connectAP(void)
{
	// Attempt to connect to an AP
	Serial.print("Please wait while connecting to: '" WLAN_SSID "' ... ");

	if (Feather.connect(WLAN_SSID, WLAN_PASS))
	{
		Serial.println("Connected!");
	}
	else
	{
		Serial.printf("Failed! %s (%d)", Feather.errstr(), Feather.errno());
		Serial.println();
	}
	Serial.println();

	return Feather.connected();
} 



If not please post the output

thanks
Back to top
 
WWW  
IP Logged
 
hack-o-holic
Junior Member
**
Offline



Posts: 24
Re: WICED Feather and VisualMicro
Reply #35 - Apr 20th, 2016 at 9:43pm
 
I'm sure dumb question but am I to replace [Name] with CJR or is that purposefully a wildcard in the statement for the batch file?
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10529
United Kingdom
Re: WICED Feather and VisualMicro
Reply #36 - Apr 20th, 2016 at 10:04pm
 
Yes thats right, I don't publish any user data so I changed CJR to [name]
Back to top
« Last Edit: Apr 20th, 2016 at 10:04pm by Visual Micro »  
WWW  
IP Logged
 
hack-o-holic
Junior Member
**
Offline



Posts: 24
Re: WICED Feather and VisualMicro
Reply #37 - Apr 23rd, 2016 at 8:52pm
 
Just getting back to this troubleshooting...

In response to your request in #32... I created your batch file, edited out [name] and ran in both locations.  I get the same results in both places and I'll post inside this reply.  I looked and for some reason, the python script it is looking for truly DOES NOT exist there.  I looked back in the same folder from before I recently downloaded the latest BSP from their Git repo and that python file IS indeed there.  Not sure why it is no longer included in their source unless I need to walk back through their installation instructions and maybe one of the steps creates that file?

C:\Users\myuser\OneDrive\Documents\Arduino\hardware\Adafruit_WICED_Arduino\tools
\feather_dfu>"C:\Users\myuser\OneDrive\Documents\Arduino\hardware\Adafruit_WICED
_Arduino/tools/feather_dfu/feather_dfu.py" arduino_upgrade "C:\Users\myuser\AppData\Local\Temp\VMicroBuilds\BlinkTest_VMPro\Adafruit_WICED_
Arduino_feather/BlinkTest_VMPro.ino.bin"
'"C:\Users\myuser\OneDrive\Documents\Arduino\hardware\Adafruit_WICED_Arduino/too
ls/feather_dfu/feather_dfu.py"' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\myuser\OneDrive\Documents\Arduino\hardware\Adafruit_WICED_Arduino\tools
\feather_dfu>pause
Press any key to continue . . .
Back to top
 
 
IP Logged
 
hack-o-holic
Junior Member
**
Offline



Posts: 24
Re: WICED Feather and VisualMicro
Reply #38 - Apr 23rd, 2016 at 9:22pm
 
In response to #34, I copied your code into a new Arduino Project and it failed about the same as my own custom sketch fails.  See output attached..
Back to top
 

Reply34Test.txt (148 KB | )
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10529
United Kingdom
Re: WICED Feather and VisualMicro
Reply #39 - Apr 24th, 2016 at 12:19am
 
Thanks for the files.

I can see one problem and I think this is a change in the arduino ide and I will look into the correct solution.

The problem is that you have installed the Adafruit_MQTT\Adafruit_MQTT_Client library via library manager or by adding it manually/unzipped into the sketchbook library folder "documents\arduino\libraries"

However the feather hardware core comes with Adafruit_MQTT library and currently the way things work is that you can override and create special version of the core libraries by placing them in the sketchbook libraries folder.

So the solution is to delete the "C:\Users\CJR\OneDrive\Documents\Arduino\libraries\Adafruit_MQTT" then click "Tools>Visual Micro>Reload toolchains" or restart the ide.

Then we should be able to see the upload issue.
Back to top
 
WWW  
IP Logged
 
Pages: 1 2 3 
Send Topic Print