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] 2  Send TopicPrint
Very Hot Topic (More than 25 Replies) Re: Hologram Dash Intellisense support (Read 22420 times)
orbitcoms
Junior Member
**
Offline


Posts: 45
Joined: Jun 21st, 2017
Re: Hologram Dash Intellisense support
Jul 4th, 2017 at 11:49am
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hologram Dash Intellisense support
Reply #1 - Jul 4th, 2017 at 11:11pm
Print Post  
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
Joined: Jun 21st, 2017
Re: Hologram Dash Intellisense support
Reply #2 - Jul 4th, 2017 at 11:57pm
Print Post  
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.
« Last Edit: Jul 5th, 2017 at 12:05am by orbitcoms »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hologram Dash Intellisense support
Reply #3 - Jul 5th, 2017 at 1:03pm
Print Post  
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
Joined: Jun 21st, 2017
Re: Hologram Dash Intellisense support
Reply #4 - Jul 5th, 2017 at 9:03pm
Print Post  
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
Joined: Jun 21st, 2017
Re: Hologram Dash Intellisense support
Reply #5 - Jul 5th, 2017 at 9:34pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hologram Dash Intellisense support
Reply #6 - Jul 7th, 2017 at 3:41pm
Print Post  
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.
« Last Edit: Jul 7th, 2017 at 3:42pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
orbitcoms
Junior Member
**
Offline


Posts: 45
Joined: Jun 21st, 2017
Re: Hologram Dash Intellisense support
Reply #7 - Jul 7th, 2017 at 9:17pm
Print Post  
Are you still looking at changes to support the Hologram Dash hardware?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hologram Dash Intellisense support
Reply #8 - Jul 8th, 2017 at 11:48am
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hologram Dash Intellisense support
Reply #9 - Jul 8th, 2017 at 1:16pm
Print Post  
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
« Last Edit: Jul 8th, 2017 at 8:10pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
orbitcoms
Junior Member
**
Offline


Posts: 45
Joined: Jun 21st, 2017
Re: Hologram Dash Intellisense support
Reply #10 - Jul 8th, 2017 at 10:52pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hologram Dash Intellisense support
Reply #11 - Jul 8th, 2017 at 11:30pm
Print Post  
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
Joined: Jun 21st, 2017
Re: Hologram Dash Intellisense support
Reply #12 - Jul 9th, 2017 at 3:46am
Print Post  
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
Joined: Jun 21st, 2017
Re: Hologram Dash Intellisense support
Reply #13 - Jul 9th, 2017 at 4:02am
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hologram Dash Intellisense support
Reply #14 - Jul 9th, 2017 at 11:58am
Print Post  
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
Joined: Jun 21st, 2017
Re: Hologram Dash Intellisense support
Reply #15 - Jul 9th, 2017 at 12:24pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hologram Dash Intellisense support
Reply #16 - Jul 9th, 2017 at 2:47pm
Print Post  
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
Joined: Jun 21st, 2017
Re: Hologram Dash Intellisense support
Reply #17 - Jul 9th, 2017 at 9:24pm
Print Post  
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
Joined: Jun 21st, 2017
Re: Hologram Dash Intellisense support
Reply #18 - Jul 9th, 2017 at 9:26pm
Print Post  
Here is the actual output when I attempt to run indebug mode:

Code
Select All
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'
 

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hologram Dash Intellisense support
Reply #19 - Jul 9th, 2017 at 9:32pm
Print Post  
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
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint