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 Uno works well. Compile error with Arduino Uno R4 Minima (Read 806 times)
Henk Levels
Junior Member
**
Offline


Posts: 81
Joined: Sep 28th, 2015
Uno works well. Compile error with Arduino Uno R4 Minima
Mar 18th, 2024 at 10:54am
Print Post  
Hi I have some code that compiles well under visual studio 2022, with micro controller application Arduino 2 and an Arduino Uno board.
However when I compile the same code with a Arduino Uno R4 Minima board selected I get several errors
- avr\io.h: No such file or directory 
- avr\sleep.h: No such file or directory
-  and some more errors like 
PortsBMP085.cpp:7: In file included from
ports.h: In member function void Port::shift(uint8_t, uint8_t) const
 
ports.h: 112:58: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'BitOrder' [-fpermissive]
   { shiftOut(digiPin(), digiPin2(), bitOrder, value); }
How can this be solved?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2695
Joined: Feb 13th, 2019
Re: Uno works well. Compile error with Arduino Uno R4 Minima
Reply #1 - Mar 18th, 2024 at 11:39am
Print Post  
The Arduino Uno board has a very different core and architecture to the Arduino Uno R4 board, so a different set of core code is used.  Both boards are called Uno and have the same form factor for shields etc, however that is where the similarities end in reality.

This is likely why the same IO and Sleep headers cannot be found, along with the Port Shift functions.

You will need to use the functions and headers available on the Uno R4 specifically.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint