Author Topic: include files for C  (Read 1668 times)

0 Members and 1 Guest are viewing this topic.

Offline yalectTopic starter

  • Regular Contributor
  • *
  • Posts: 123
include files for C
« on: December 20, 2017, 11:13:23 am »
Hello,
I would like to ask you where I can find this include files or headers and How to add them to mikroC PRO compiler :
#include <avr/io.h>
#include <util/delay.h>
#include <avr/delay.h>
Thank you

 

Offline dgtl

  • Regular Contributor
  • *
  • Posts: 183
  • Country: ee
Re: include files for C
« Reply #1 on: December 20, 2017, 03:08:30 pm »
You are probably referring to the files from avr-libc. Source repository of avr-libc is here: http://svn.savannah.nongnu.org/viewvc/avr-libc/trunk/avr-libc/include/
 

Offline yalectTopic starter

  • Regular Contributor
  • *
  • Posts: 123
Re: include files for C
« Reply #2 on: December 20, 2017, 03:59:25 pm »
Thank you for your reply but how I can copy that file from the website or download it may you try with one here or there is another website?
Thank you
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: include files for C
« Reply #3 on: December 20, 2017, 06:29:35 pm »
 

Offline senso

  • Frequent Contributor
  • **
  • Posts: 951
  • Country: pt
    • My AVR tutorials
Re: include files for C
« Reply #4 on: December 20, 2017, 09:55:33 pm »
You might want to explain a bit more what you are doing...

If you want to program an AVR in C, use the toolchain, you cant just slap .h files into a random c compiler..
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: include files for C
« Reply #5 on: December 21, 2017, 01:32:30 am »
You can't simply grab the headers and libraries that work with avr-gcc and expect to incorporate them in MikroC.  What you need to do is see if MikroC provides the functions you need - and they certainly do.

In fact, document page 108 (PDF page 138) shows that MikroC does include delay_us() and delay_ms().

http://download.mikroe.com/documents/compilers/mikroc/avr/mikroc-avr-manual-v100.pdf
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf