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
How to use Timer0 in your Visual Studio project (Read 2181 times)
SwissRoLL
Newbies
*
Offline



Posts: 6
How to use Timer0 in your Visual Studio project
Aug 16th, 2015 at 5:00pm
 
Hi All,
I have a project where I need to have all 3 timers in PWM mode, and their associated interrupts as well. I use very little of the ardunio core library apart from Serial (and probably the boot vectors).

However the project won't build due to ISR(TIMER0_OVF_vect) already defined in wiring.c
cora.a(wiring.c.o)*:In function 'delayMicroseconds'
collect2*:error ld returned 1 exit status
Error creating .elf
Is there a simple way of removing the arduino core from the build (or include just parts of it), as the inclusion of core.a doesn't appear to be in the project properties under dev studio.

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



Posts: 10381
United Kingdom
Re: How to use Timer0 in your Visual Studio project
Reply #1 - Aug 16th, 2015 at 6:33pm
 
An arduino.h include and compile of the files in core are always made, it's how arduino works.

But you can create your own cores, starting with a clone of the arduino core and then changing or removing whatever you want.

You should also ensure you are using visual micro in release mode or via SoftwareSerial otherwise Serial will also be included in your program (behind the scenes)

Cloning a core is not that simple. What can be easier is to clone your arduino ide then hack the arduino\hardware\arduino\avr\cores
Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print