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 
Send Topic Print
Re: Hologram Dash Intellisense support (Read 10227 times)
orbitcoms
Junior Member
**
Offline



Posts: 45
Re: Hologram Dash Intellisense support
Jul 4th, 2017 at 12:49pm
 
I am using same hardware and notice several small issues with Intellisense.

I also have trouble getting debugger to work. I can compile and upload code to the Dash device ok but cannot debug. I have purchased the debugger option with Visual Micro.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Hologram Dash Intellisense support
Reply #1 - Jul 5th, 2017 at 12:11am
 
Please give url or instruction to install your board

Default serial debug is only supported if the board definition maintains arduino compatibility for serial otherwise you have to follow the documentation guide to debug using other ports and pins
Back to top
 
WWW  
IP Logged
 
orbitcoms
Junior Member
**
Offline



Posts: 45
Re: Hologram Dash Intellisense support
Reply #2 - Jul 5th, 2017 at 12:57am
 
This page describes the serial ports https://hologram.io/docs/reference/dash/api/

This page shows initial installation using Arduino
https://hologram.io/docs/guide/dash/programming-and-firmware/

I am using SerialUSB (enumerated as COM24) for main port. I have SD card on Serial2 but Serial0 is available if we cannot use SerialUSB for some reason.
Back to top
« Last Edit: Jul 5th, 2017 at 1:05am by orbitcoms »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Hologram Dash Intellisense support
Reply #3 - Jul 5th, 2017 at 2:03pm
 
Thanks I will look into it over the next few days. It's usually a simply addition to support new board types.

In the meantime it will be helpful if you type Serial0 into the code and then press F12 or Goto definition. What class does Serial0 use?
Back to top
 
WWW  
IP Logged
 
orbitcoms
Junior Member
**
Offline



Posts: 45
Re: Hologram Dash Intellisense support
Reply #4 - Jul 5th, 2017 at 10:03pm
 
When I type Serial0 and press F12, I get taken to WVariant.h (contents below). The port I upload on is SerialUSB. Serial1 is reserved for Cloud write. I have addaed the contents of uart.h at bottom of this post.

#include "Arduino.h"

#define DASH_LED        (25)
#define DASH_WAKE       (7)
#define LED_BUILTIN     DASH_LED

#define SPI_INSTANCE    SPI0
#define SPI_GATE        kSimClockGateSpi0
#define SPI_CLOCK_SRC   DEFAULT_BUS_CLOCK
#define Serial          SerialUSB

#define USB_STR_SERIAL_NUMBER_SIZE  (64)

#ifdef __cplusplus
#include "Uart.h"
#include "Dash.h"
#include "Max1704x.h"
#include "Charger.h"
#include "Wire.h"
#include "Clock.h"
#include "Hologram.h"
#include "SerialCloud.h"

extern Uart Serial0;
extern Uart SerialSystem;
extern Uart Serial2;
extern DashClass Dash;
extern TwoWire Wire;
extern ClockClass Clock;
extern Max1704x FuelGauge;
extern DashCharger Charger;
extern Hologram HologramCloud;
extern SerialCloudClass SerialCloud;

***************  UART.h ****************
#include "RingBuffer.h"
#include "HardwareSerial.h"
#include "hal/fsl_device_registers.h"

#include <cstddef>

class Uart : public HardwareSerial
{
public:
    Uart(UART_Type * instance, sim_clock_gate_name_t gate_name, uint32_t clock,
        IRQn_Type irqNumber, uint32_t rx, uint32_t tx);
    void begin(unsigned long baudRate); //(8N1 only) TODO add config params
    void begin(unsigned long baudrate, uint16_t config) {begin(baudrate);}
    void flush();
    void IrqHandler();
    size_t write(const uint8_t data);
    void end();
    int available();
    int peek();
    int read();
    operator bool() { return true; }
    using Print::write; // pull in write(str) and write(buf, size) from Print

    void waitToEmpty();

protected:
    RingBuffer rxBuffer;
    UART_Type * instance;
    sim_clock_gate_name_t gate_name;
    uint32_t clock;
    IRQn_Type irqNumber;
    uint32_t rx;
    uint32_t tx;
};
Back to top
 
 
IP Logged
 
orbitcoms
Junior Member
**
Offline



Posts: 45
Re: Hologram Dash Intellisense support
Reply #5 - Jul 5th, 2017 at 10:34pm
 
For some reason the project compiles now when debug is selected but no debugging. I get message in output window as shown below and status "Project 'SD_Logger' on board dash". The device handles the SerialUSB port in a strange manner, when I put bard in program mode the port is shown as HID and then after programming it enumerates to a COM port. It seems then that if I can use Serial0 instead that this should get the debugging happening as Serial0 is always available as a com port using FTDI ttl to USB convertor. Is this what you are working on (add Serial0 option for remote port in debugger?). Right now I have local port set to COM24 (which is enumarated SerialUSB) and remote port set to SerialUSB.

Compiling 'SD_Logger' for 'Dash'
Program size: 43,788 bytes (used 4% of a 1,014,764 byte maximum) (0.36 secs)

Uploading 'SD_Logger' to 'Dash' using 'hologram.io USB loader'
Update Complete
     The upload process has finished.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Hologram Dash Intellisense support
Reply #6 - Jul 7th, 2017 at 4:41pm
 
If you set the debug port to serial0 then you would need a serial/usb cable from pc to the pins of serial0.

Then in visual micro the local port would be set to the COM of the serial0 and not the serialusb

note: arduino boards that have usb on the micro-controller will usually boot into a different port for upload. That is handled by visual micro.
Back to top
« Last Edit: Jul 7th, 2017 at 4:42pm by Visual Micro »  
WWW  
IP Logged
 
orbitcoms
Junior Member
**
Offline



Posts: 45
Re: Hologram Dash Intellisense support
Reply #7 - Jul 7th, 2017 at 10:17pm
 
Are you still looking at changes to support the Hologram Dash hardware?
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Hologram Dash Intellisense support
Reply #8 - Jul 8th, 2017 at 12:48pm
 
Yes will add support for the usb upload com port shortly.

Now that you have explained what you have it sounds like you just need to set the debugger local port to the COM that is Serial0. You can ignore my prev note about needing an extra cable.
Back to top
 
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Hologram Dash Intellisense support
Reply #9 - Jul 8th, 2017 at 2:16pm
 
I've tested the dash board. Debug won't work on any port in the current version of visual micro because the class names of serial(s) are different to all other boards.

There will be an update over the next 24/48 with support.

Thanks for the report.

edit: released
Back to top
« Last Edit: Jul 8th, 2017 at 9:10pm by Visual Micro »  
WWW  
IP Logged
 
orbitcoms
Junior Member
**
Offline



Posts: 45
Re: Hologram Dash Intellisense support
Reply #10 - Jul 8th, 2017 at 11:52pm
 
Thanks.

The main serial port used for code update is SerialUSB. Being able to upload code and debug will be great. I look forward to the updated VM.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Hologram Dash Intellisense support
Reply #11 - Jul 9th, 2017 at 12:30am
 
Yes, was released earlier although I forgot to test the other ports. Main port should work okay now thought. Don't forget to clear your local/remote project properties and ensure the vmicro?debugger menu is empty/default

you should see the little flag at the top of the ide meaning there is an update.
Back to top
 
WWW  
IP Logged
 
orbitcoms
Junior Member
**
Offline



Posts: 45
Re: Hologram Dash Intellisense support
Reply #12 - Jul 9th, 2017 at 4:46am
 
I installed the update ok, then reset debug settings (now no ports etc selected for debug) then when I compile debug version I get this error

Compiling debug version of 'SD_Logger' for 'Dash'

VM_DBG.cpp:33: In file included from

VM_DBG.h: 206:2: error: 'Serial_' does not name a type
   Serial_ *transport

VM_DBG.h: 207:13: error: 'Serial_' has not been declared
   void begin(Serial_ *theSerial)

VM_DBG.h: 208:13: error: 'Serial_' has not been declared
   void begin(Serial_ *theSerial, unsigned long baud)
VM_DBG.cpp: In member function void VisualMicroDebug:ShockednBreakPointPrintBegin(uint8_t)

VM_DBG.cpp: 181:2: error: 'transport' was not declared in this scope
   transport->print("VMDPE_")
VM_DBG.cpp: In member function void VisualMicroDebug:ShockednBreakPointPrintEnd()

VM_DBG.cpp: 194:2: error: 'transport' was not declared in this scope
   transport->println("_VMDPE")
VM_DBG.cpp: At global scope

VM_DBG.cpp: 643:30: error: variable or field 'begin' declared void
void VisualMicroDebug*: begin(Serial_ *theSerial)

VM_DBG.cpp: 643:30: error: 'Serial_' was not declared in this scope

VM_DBG.cpp: 643:39: error: 'theSerial' was not declared in this scope
void VisualMicroDebug*: begin(Serial_ *theSerial)

VM_DBG.cpp: 1859:27: error: expected declaration before end of line
   #pragma GCC diagnostic pop
Error compiling libraries
   error: This hardware might not support the default Serial debugger.
     Try switching the toolbar from 'Debug' to 'Release' and build again.
           or switch off Automatic Debugging
           or configure the SoftwareSerial debugger option.
Debug build failed for project 'SD_Logger'
Back to top
 
 
IP Logged
 
orbitcoms
Junior Member
**
Offline



Posts: 45
Re: Hologram Dash Intellisense support
Reply #13 - Jul 9th, 2017 at 5:02am
 
If I switch off auto debug the code updates over SerialUSB and I see message "Uploading 'SD_logger' to 'Dash' using hologram.io USB loader'. Update Complete, The upload process has finished.
Then the Hologram switches the USB port to serial USB on COM 24 and I see the serial terminal open with "Opening Port", "Port Open". But no debugger.

I have uploader programmer set to 'hologram.io USB loader" and "always use programmer for port instead of port".

If I turn off the "always use program for port..." I get a list of modules show up in the build window and see "Initializing" come up wuth thenthe output window just locks up on lats item "xplainedpro ..." The serial monitor then shows "Port Closed, Uploading to I/O board". Status line shows "Project 'SD_logger" on board 'dash' but the program did not load to board.

It looks like the system must need to use SerialUSB and the hologram.io programmer to upload the code but then needs to switch over to COM port after upload for debug (in this case to COM24) ?

Hope more info is helping.

Do you need a copy of the project to see the settings or anything that might help further?


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



Posts: 10395
United Kingdom
Re: Hologram Dash Intellisense support
Reply #14 - Jul 9th, 2017 at 12:58pm
 
Sorry, there is an update here for the dash. I just tested the dashpro before. The serialn ports are also tested now

This is the next build.

https://1drv.ms/u/s!AsT00oFsGAmRkcdvRyZ4AtDKAeG_mQ
Back to top
 
WWW  
IP Logged
 
orbitcoms
Junior Member
**
Offline



Posts: 45
Re: Hologram Dash Intellisense support
Reply #15 - Jul 9th, 2017 at 1:24pm
 
I have downloaded and installed the file. How can I confirm in VS 2017 that this version is installed?

When the installed ran it indicated being installed for VS 2015?

PS: I cannot test right now as I am away from my office so was only able to install the update right now.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Hologram Dash Intellisense support
Reply #16 - Jul 9th, 2017 at 3:47pm
 
Yep, Microsoft have sure confused the installers between vs versions!

It's been uploaded to the gallery now which is available in the ide via tools>extensions and updates. That's where you can install for the current ide and be sure of what version you have installed.

The currently installed version shows on the "Installed" tab, available version on the "Online" or "Updates" tabs.
Back to top
 
WWW  
IP Logged
 
orbitcoms
Junior Member
**
Offline



Posts: 45
Re: Hologram Dash Intellisense support
Reply #17 - Jul 9th, 2017 at 10:24pm
 
I installed the latest and reset the debug settings so local and remote ports are blank and get same error when attempting to program the Dash. (Not the Dashpro has been discontinued, not sure if the USB serial port handing is the same betwween the pro you tested and the dash I am using?)
Are there any settings you set up in your code after you reset the debug "reset these settings"?
Back to top
 
 
IP Logged
 
orbitcoms
Junior Member
**
Offline



Posts: 45
Re: Hologram Dash Intellisense support
Reply #18 - Jul 9th, 2017 at 10:26pm
 
Here is the actual output when I attempt to run indebug mode:

Code:
Compiling debug version of 'SD_Logger' for 'Dash'

VM_DBG.cpp:33: In file included from

VM_DBG.h: 301:2: error: 'UARTClass' does not name a type
   UARTClass *transport

VM_DBG.h: 302:13: error: 'UARTClass' has not been declared
   void begin(UARTClass *theSerial, unsigned long baud)
VM_DBG.cpp: In member function void VisualMicroDebug::OnBreakPointPrintBegin(uint8_t)

VM_DBG.cpp: 181:2: error: 'transport' was not declared in this scope
   transport->print("VMDPE_")
VM_DBG.cpp: In member function void VisualMicroDebug::OnBreakPointPrintEnd()

VM_DBG.cpp: 194:2: error: 'transport' was not declared in this scope
   transport->println("_VMDPE")
VM_DBG.cpp: At global scope

VM_DBG.cpp: 818:30: error: variable or field 'begin' declared void
 void VisualMicroDebug*: begin(UARTClass *theSerial, unsigned long baud)

VM_DBG.cpp: 818:30: error: 'UARTClass' was not declared in this scope

VM_DBG.cpp: 818:41: error: 'theSerial' was not declared in this scope
 void VisualMicroDebug*: begin(UARTClass *theSerial, unsigned long baud)

VM_DBG.cpp: 818:52: error: expected primary-expression before 'unsigned
 void VisualMicroDebug*: begin(UARTClass *theSerial, unsigned long baud)
VM_DBG.cpp: In member function unsigned char VisualMicroDebug::read()

VM_DBG.cpp: 959:6: error: 'transport' was not declared in this scope
   b = transport->read()
VM_DBG.cpp: In member function unsigned char VisualMicroDebug::peek()

VM_DBG.cpp: 974:6: error: 'transport' was not declared in this scope
   b = transport->peek()
VM_DBG.cpp: In member function uint8_t VisualMicroDebug::available()

VM_DBG.cpp: 989:6: error: 'transport' was not declared in this scope
   b = transport->available()
VM_DBG.cpp: In member function void VisualMicroDebug::sendContinuedACK(uint8_t)

VM_DBG.cpp: 1202:2: error: 'transport' was not declared in this scope
   transport->print("VMDPC_")
VM_DBG.cpp: In member function void VisualMicroDebug::sendMessage(const char*)

VM_DBG.cpp: 1228:2: error: 'transport' was not declared in this scope
   transport->print(debugger_message)

VM_DBG.cpp: In function void no_lvalue_err()

VM_DBG.cpp: 1589:13: error: 'class VisualMicroDebug' has no member named 'transport

   Attempt to set a read-only variable or data type not supported\r\n")
Error compiling libraries
   error: This hardware might not support the default Serial debugger.
	Try switching the toolbar from 'Debug' to 'Release' and build again.
		or switch off Automatic Debugging
		or configure the SoftwareSerial debugger option.
Debug build failed for project 'SD_Logger'
 

Back to top
« Last Edit: Jul 9th, 2017 at 10:31pm by Visual Micro »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Hologram Dash Intellisense support
Reply #19 - Jul 9th, 2017 at 10:32pm
 
You need to install the latest release using tools>extensions and updates as described previously.

You can also confirm which version you have installed in the "Installed" list.
Back to top
 
WWW  
IP Logged
 
orbitcoms
Junior Member
**
Offline



Posts: 45
Re: Hologram Dash Intellisense support
Reply #20 - Jul 9th, 2017 at 10:35pm
 
I am pretty sure the latest is installed, there is no option to update.

I only get buttons "Disable" and "Uninstall". The version shown is 1706.25.2


Back to top
 
 
IP Logged
 
orbitcoms
Junior Member
**
Offline



Posts: 45
Re: Hologram Dash Intellisense support
Reply #21 - Jul 9th, 2017 at 10:44pm
 
Just now I got update flag and installed version 1706.25.3.
I installed and rebooted VS. VSIX installed task for Visual Studio 2017 and installed ok. Restarted VS and checked installed list and see it is now 1706.25.3.

I set a breakpoint in the main loop.

Click vmicro -> debugger -> reset these settings.
Put dash into program mode and click Debug -> Start Debugging.

Output states "Launching debugger" and I get serial data in serial monitor from running program BUT no debug actions. I set the break point in main loop but the program does not stop at the breakpoint.

Is there something I need to do to get it to stop at breakpoint so I can watch variables and single step?







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



Posts: 10395
United Kingdom
Re: Hologram Dash Intellisense support
Reply #22 - Jul 9th, 2017 at 10:49pm
 
EDIT: I re-saved the gallery entry and it now appears to have pushed the update to the new gallery. try tools>extensions and updates again

...
Looks like microsoft have some gallery issues. Hopefully they sort them out over the next 24

The old gallery is still where they make us upload new extensions. You can see the latest release is in the gallery. try running it from here but that will only work if your vs2017 installer was installed after the vs2015 installer. Otherwise you have to download and run from vs 2017 command prompt (vsixinstaller.exe extension_file_name)
https://visualstudiogallery.msdn.microsoft.com/069a905d-387d-4415-bc37-665a5ac9c
aba?redir=0

The new gallery is what they are pushing users and ide's towards. They seem to have some system that copies updates from old to new.
https://marketplace.visualstudio.com/items?itemName=VisualMicro.ArduinoIDEforVis...

I have to say that Microsoft are making life pretty difficult at the moment in many ways. It's getting boring  Smiley

Back to top
« Last Edit: Jul 9th, 2017 at 10:50pm by Visual Micro »  
WWW  
IP Logged
 
orbitcoms
Junior Member
**
Offline



Posts: 45
Re: Hologram Dash Intellisense support
Reply #23 - Jul 9th, 2017 at 10:49pm
 
This time I set up a condition on breakpoint. The program ran to breakpoint and "paused". Then I clicked F8 to step and received the error below. (Got to "breakpoint 1" is the message I put into condition -> action)

07:46:08.835    SD_Logger.ino, line 35      setup()
   Got to breakpoint 1
SD_Logger is paused at SD_Logger.ino, line 35, setup()
SD_Logger Running
Trace Error: *Invalid debug data received. Local break-points do not match the remote: 1:2:5454:14:4294946593
Arithmetic operation resulted in an overflow.
Trace Error: *Invalid debug data received. Local break-points do not match the remote: 1:2:5966:526:4294946593
Arithmetic operation resulted in an overflow.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10395
United Kingdom
Re: Hologram Dash Intellisense support
Reply #24 - Jul 9th, 2017 at 10:54pm
 
Okay good to hear debug is running.

Please start a new thread for your breakpiont issue.

Also confirm in the new thread if you have any serial prints of your own and the type of micro-controller you are working with.
Back to top
 
WWW  
IP Logged
 
orbitcoms
Junior Member
**
Offline



Posts: 45
Re: Hologram Dash Intellisense support
Reply #25 - Jul 9th, 2017 at 11:01pm
 
What is the latest build number I should have installed?

What do you mean by any "serial prints of my own?
Back to top
 
 
IP Logged
 
orbitcoms
Junior Member
**
Offline



Posts: 45
Re: Hologram Dash Intellisense support
Reply #26 - Jul 10th, 2017 at 12:57am
 
Thanks.
The debugger is running now.

Do you have link to later info about breakpoints? The videos I have found show things like "When Hit", but I do not get these options in the breakpoint.

Back to top
 
 
IP Logged
 
Pages: 1 
Send Topic Print