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
Normal Topic VM_DBG template, missing request for member (Read 7817 times)
klausc12
Newbies
*
Offline


Posts: 3
Joined: Nov 24th, 2014
VM_DBG template, missing request for member
Nov 24th, 2014 at 4:35pm
Print Post  
Hello, 
I`m getting the following errors, when trying to debug.
Without debug everithing works well.


Code
Select All
stepper.c:In file included from
VM_DBG.h:71:1: error: unknown type name 'class'
:class VisualMicroDebug
:^
VM_DBG.h:72:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
:{
:^
VM_DBG.h:258:2: error: unknown type name 'VisualMicroDebug'
:extern VisualMicroDebug MicroDebug;
:^
VM_DBG.h:265:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
:template<typename T>
:^
VM_DBG.h:279:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
:template<typename T>
:^
VM_DBG.h:285:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
:template<typename T>
:^
VM_DBG.h:308:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
:template<typename T>
:^
stepper.c:In function '__vector_11'
stepper.c:311:38: error: request for member 'outPacketStart' in something not a structure or union
:TCNT0 = kWait(1);
:^
stepper.c:311:66: error: request for member 'transport' in something not a structure or union
:TCNT0 = kWait(1);
:^
stepper.c:311:105: error: request for member 'transport' in something not a structure or union
:TCNT0 = kWait(1);
:^
stepper.c:311:164: error: request for member 'breakWait' in something not a structure or union
:TCNT0 = kWait(1);
:^
"C:\Program Files (x86)\Arduino/hardware/tools/avr/bin/avr-gcc" -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" -I"C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\default\debuggers\VM_DBG" -I"C:\Program Files (x86)\Arduino\libraries" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries" -I"C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\default\debuggers" -I"C:\Users\Klaus\Documents\Arduino\libraries" "C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\default\debuggers\VM_DBG\VM_mem_check.c" -o \VM_mem_check.c.o" -DVISUALMICRO_COMPILER_VER=1 -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=100 -DVM_DEBUGGER_TYPE_HARDWARESERIAL=0 -DVM_DEBUGGER_TYPE_SOFTWARESERIAL=1 -DVM_DEBUGGER_TYPE_FASTSERIAL=2 -DVM_DEBUGGER_TYPE_USB=3 -DVM_DEBUGGER_TYPE_TEENSY=4 -DVM_DEBUGGER_TYPE_UART=5 -DVM_DEBUGGER_TYPE_USART=6 -DVM_DEBUGGER_TYPE_USBSERIAL=7 -DVM_DEBUGGER_TYPE_TTYUART=8 -DVM_DEBUGGER_TYPE_NET_CONSOLE=9 -DVM_DEBUGGER_TYPE_Uart=10 -DVM_DEBUGGER_TYPE=VM_DEBUGGER_TYPE_HARDWARESERIAL -DVM_DEBUG_BREAKPAUSE
"C:\Program Files (x86)\Arduino/hardware/tools/avr/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" -I"C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\default\debuggers\VM_DBG" -I"C:\Program Files (x86)\Arduino\libraries" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries" -I"C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\default\debuggers" -I"C:\Users\Klaus\Documents\Arduino\libraries" "C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\default\debuggers\VM_DBG\VM_DBG.cpp" -o \VM_DBG.cpp.o" -DVISUALMICRO_COMPILER_VER=1 -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=100 -DVM_DEBUGGER_TYPE_HARDWARESERIAL=0 -DVM_DEBUGGER_TYPE_SOFTWARESERIAL=1 -DVM_DEBUGGER_TYPE_FASTSERIAL=2 -DVM_DEBUGGER_TYPE_USB=3 -DVM_DEBUGGER_TYPE_TEENSY=4 -DVM_DEBUGGER_TYPE_UART=5 -DVM_DEBUGGER_TYPE_USART=6 -DVM_DEBUGGER_TYPE_USBSERIAL=7 -DVM_DEBUGGER_TYPE_TTYUART=8 -DVM_DEBUGGER_TYPE_NET_CONSOLE=9 -DVM_DEBUGGER_TYPE_Uart=10 -DVM_DEBUGGER_TYPE=VM_DEBUGGER_TYPE_HARDWARESERIAL -DVM_DEBUG_BREAKPAUSE
 


The st.step_pulse_time is defined as:

Code
Select All
typedef struct {
// Used by the bresenham line algorithm
uint32_t counter_x,        // Counter variables for the bresenham line tracer
		counter_y, counter_z;
#ifdef STEP_PULSE_DELAY
uint8_t step_bits;  // Stores out_bits output to complete the step pulse delay
#endif

uint8_t execute_step;     // Flags step execution for each interrupt.
uint8_t step_pulse_time;  // Step pulse reset time after step rise
uint8_t step_outbits;         // The next stepping-bits to be output
uint8_t dir_outbits;
#ifdef ADAPTIVE_MULTI_AXIS_STEP_SMOOTHING
uint32_t steps[N_AXIS];
#endif

uint16_t step_count;       // Steps remaining in line segment motion
uint8_t exec_block_index; // Tracks the current st_block index. Change indicates new block.
st_block_t *exec_block; // Pointer to the block data for the segment being executed
segment_t *exec_segment;  // Pointer to the segment being executed
} stepper_t;
static stepper_t st; 


I don't understand the VM_DBG.h message and why missing the member. I already tried without "static"
The also defined st.step_bits are used 2 lines before and seem to be ok.
Any Ideas
Thanks in advance 
Klaus

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VM_DBG template, missing request for member
Reply #1 - Nov 24th, 2014 at 4:42pm
Print Post  
Hi,

Can you confirm if you have placed a break point in stepper.c?

Thanks
  
Back to top
IP Logged
 
klausc12
Newbies
*
Offline


Posts: 3
Joined: Nov 24th, 2014
Re: VM_DBG template, missing request for member
Reply #2 - Nov 25th, 2014 at 7:48am
Print Post  
Hi,
Yes there was a breakpoint somehow, I don't know.
Now I get the following:
Code
Select All
core.a(wiring.c.o)*:In function `delayMicroseconds'
wiring.c:multiple definition of `__vector_16'
a328\stepper.c:441: first defined here
core.a(HardwareSerial0.cpp.o)*:In function `Print'
HardwareSerial0.cpp:multiple definition of `__vector_18'
328\serial.c:169: first defined here
core.a(HardwareSerial0.cpp.o)*:In function `HardwareSerial'
HardwareSerial0.cpp:multiple definition of `__vector_19'
328\serial.c:115: first defined here
collect2*:error: ld returned 1 exit status
Error creating .elf 


I am not using any functionality of arduino. I have a main with this:
Code
Select All
#include "system.h"
#include "serial.h"
#include "settings.h"
#include "protocol.h"
#include "gcode.h"
#include "planner.h"
#include "stepper.h"
#include "spindle_control.h"
#include "coolant_control.h"
#include "motion_control.h"
#include "limits.h"
#include "probe.h"
#include "report.h"
#include "print.h"
#include "SPI.h" 


The vectors are related to a timer and rx tx which have defs of my own for.
I don't want to the arduino stuff for this.
Thanks in advance
Klaus
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VM_DBG template, missing request for member
Reply #3 - Nov 25th, 2014 at 1:32pm
Print Post  
Arduino does not have debugging so Visual Micro uses Serial behind the scenes.

The default for the Visual Micro debugger is to use the primary Arduino Serial port. With your board Serial is actually HardwareSerial

Because you are redefining things I expect that your code can not do things like this:-

Serial.begin(115200);
Serial.println("Hello World");

So you must either:- 

switch off the Visual Micro debugger 
or 
provide your own fake HardwareSerial class without the problems
or 
switch Visual Micro to use SoftwareSerial on one or two digital pins.
  
Back to top
IP Logged
 
klausc12
Newbies
*
Offline


Posts: 3
Joined: Nov 24th, 2014
Re: VM_DBG template, missing request for member
Reply #4 - Nov 25th, 2014 at 2:26pm
Print Post  
Thanks,
my app must use serial very hard, so I need to use hard-serial.
May be on a later board layout I could have add. pins free for soft-serial. How would I switch VM to use SoftSerial on one or two pins?
This could only be at a later time, so how could I get back to the trial stage of VM then.
For now I went to debug-wire with all its discomfort  Undecided
Thank you again
Klaus
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VM_DBG template, missing request for member
Reply #5 - Nov 25th, 2014 at 2:32pm
Print Post  
Hi,

If you use serial without a problem then the issue must be to do with using millis() or something else which the debugger is using?


Anyway this page explains how to use SoftwareSerial if needed:-

http://www.visualmicro.com/page/User-Guide.aspx?doc=Debugging-With-Different-Por...
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint