Similar problem here. I've been running a CNC with GRBL on an UNO R3 just fine. I decided to upgrade the driver board and went with the new Minima board also. My computer recognizes the board, installed the grbl library, but I can't flash the firmware itself onto the board. I'm getting the following error message:
In file included from C:\Users\Brian\AppData\Local\Temp.arduinoIDE-unsaved202363-10480-1ead8bs.nlss\grblUpload\grblUpload.ino:27:0:
C:\Users\Brian\Documents\Arduino\libraries\grbl/grbl.h:29:10: fatal error: avr/io.h: No such file or directory #include <avr/io.h>
^~~~~~~~~~
compilation terminated.
exit status 1
Compilation error: exit status 1
Everything loads fine onto the R3 yet. I've tried reinstalling IDE, updating to 2.1.1, reverting back to 1.8.19, redownloading the grbl package. Nothing gets past this message.
Fair enough. Is there some way I can get around this? Can I just delete there avr related files, or will the code not work then? Are there any alternatives that I can use? I'm not very familiar with this type of programming. I'm a machinist getting into the Arduino setup at home.
You will have a better chance for a solution if you move this to the dedicated Uno R4 category.
You are aware that grbl officially states that it only supports 328P based boards?
From grblUpload.h
If it works on anything else, you're (kind of) lucky. I'm reasonably sure that it will work on some other AVR based boards (no experience with grbl) but the Uno R4 is not an AVR based board.
I am a machinist, not a computer programmer. I admit I get lost on a good portion of this electronic/coding technicals. There are machining methods that require a processor to be able to run the code extremely fast, which I ran into problems with using the R3.
I was hoping the new processor on the R4 could run the code more efficiently.
While I appreciate your endorsement of what an UNO can do, the CNC code is solid. I've run high feed, dynamic, and surface milling programs many times for work.
Does the code has any documentation? If so, it should clearly indicated, on which arduino boards it can be used.
You can upgrade your Uno R3 only to boards, listed in the CNC manual as supported. Obviously Uno R4 is not on the list.
I didn't say what code could or could not be run on an Arduino. I said the CNC code was solid. I believe the issue is the processor on the R3 might not be able to run the code at the speed intended by the CAM programming, and that maybe the R4 would work better having a faster processor. I also stated very early on in my posts that I'm a machinist, not a computer programmer. I am just starting out in the Arduino tinkering. I admit I get lost in a lot of the electronic/technical points. Honestly, I doubt I'll get much helpful information as the responses I'm getting are aggressive and demeaning.
Unfortunately, there was a misunderstanding between us. My answers are not at all aggressive, I'm just trying to explain to you how you can solve your problem.
Of course, the R4 processor is more powerful and faster than the uno R3, but since the CNC code does not work with it, it does not suit you.
Addition
My posts may seem aggressive, but it certainly wasn't intentional. Maybe it's from bad translation, english is not my native language
I have the IDE 2.1.1 and from the menu:
File>Examples>TFT>"any sketch"
I get the same error! In file included from C:\Users\Miche\AppData\Local\Arduino15\libraries\TFT\src\utility\Adafruit_GFX.cpp:35:0: C:\Users\Miche\AppData\Local\Arduino15\libraries\TFT\src\utility\glcdfont.c:3:10: fatal error: avr/io.h: No such file or directory #include <avr/io.h> ^~~~~~~~~~ compilation terminated.
Mind you this is under the "Examples for the Arduino UNO R4 WIFI", looks like there is a problem somewhere...
On gitub it says that the TFTLCD-Library failed for the UNO R4:
I emailed Arduino support and they gave me a couple links. They are list of hardware and firmware that is confirmed to work with the R4 boards.
I eventually went to a different board altogether. I wanted to be able to run a 4th axis, LCD display, and have extra ports to expand later. It's been a lot of trial and error with marlin, but I'm getting a much better grasp in the firmware now.
I was able to get the tftbmp example from the TFT_Touch_Shield_V2-master to work on the Nucleo-F446RE board (an ARM STM32 with Uno R3 shields compatibility). I worked quite a bit on this but in the end it turned out that the TFTv2 library needed a couple of simple changes: 1) the library has microcontroller specific conditional compile directive, I added the appropriate code for the Nucleo, 2) in the TFT library the 'CS' (SPI chip select pin) was controlled by the user, I changed it to be controlled by SPI i.e. on each call to SPI I specify the 'CS' pin as an argument. I suspect that the tftbmp example will work on the Uno R4 Wifi with similar changes... I may give it a try...