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


Posts: 6
Joined: Dec 31st, 2012
How to use Timer0 in your Visual Studio project
Aug 16th, 2015 at 4:00pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to use Timer0 in your Visual Studio project
Reply #1 - Aug 16th, 2015 at 5:33pm
Print Post  
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 TopicPrint