Project created in GCC, reports and error about avr\io.h in codevision...

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

 Can anybody inform me, with what ".h" file, I must replace avr\io.h, in order to ghet rid of "Error: C:\cvavr2\ncode.c(47): can't open #include file: avr\io.h" message from Codevision, please ? Also the other .h files, like <avr/eeprom.h> and <util/delay.h are compatible with cv ?

 

Thank You !

Last Edited: Mon. Oct 13, 2014 - 12:17 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

for <avr/io.h> i think you have to use <stdio.h>

for delay: <delay.h>

for eeprom: <eeprom.h>

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

#include <io.h>

#include <delay.h>

 

Codevision handles interrupts,  flash, eeprom natively.   i.e. no specific headers.

However the syntax is different to GCC.

 

Note that you do need <stdint.h> for CV to understand types like uint8_t

 

Codevision also comes with Help.    You just need to press F1 or click on the Help menu.

It also comes with example projects.   (look in /cvavr/examples directory )

 

Good Luck.

 

David.

Last Edited: Mon. Oct 13, 2014 - 12:29 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

for <avr/io.h> i think you have to use <stdio.h>

No, those two files have absolutely nothing to do with each other.

Regards,
Steve A.

The Board helps those that help themselves.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Also the other .h files, like <avr/eeprom.h> and <util/delay.h are compatible with cv ?

As CV has more-or-less transparent EEPROM access, there is no such thing as eeprom.h for CV.  You will need to examine all GCC EEPROM references and translate to CV, including definitions and declarations.

 

Re delay functions, you will need to examine all uses and translate to CV syntax and semantics.  E.g. you will now be using delay_ms(), which is based on the AVR speed set in the project settings and not on an F_CPU value.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

Last Edited: Wed. Oct 15, 2014 - 03:54 PM