-
Notifications
You must be signed in to change notification settings - Fork 65
AVR: Compiling
Paciente8159 edited this page Jul 27, 2020
·
9 revisions
µCNC for AVR can be built in a couple of ways
- Download µCNC souce code and unzip-it.
- Go to the
uCNC folder
source code directory and prepare all files:-
copy (not move) all the content inside the directory
uCNC/mcus/avr
and paste it inside theuCNC folder
.
-
copy (not move) all the content inside the directory
- Open
uCNC Arduino sketch file
- Edit the board
config.h file
if you need to select a different AVR board. µCNC is configured by default to mimicGrbl
pin configuration in the Arduino UNO board. - Compile and upload µCNC to your board.
- Download and install GCC tools for AVR inside your PC. You can download the latest version of GCC tool for AVR from Microchip from here.
- If your are compiling with this method on a Windows machine you will also need to install Make. You can download Make for Windows from here.
- Go to the
uCNC folder
and edit the boardconfig.h file
if you need to select a different AVR board. µCNC is configured by default to mimicGrbl
pin configuration in the Arduino UNO board. - Go to the
uCNC/mcus/avr folder
.- The makefile is configured by default to compile the code for the MCU (atmega328p) and working frequency (16Mhz) in Arduino UNO board. If the chosen board has a different MCU/working frequency the makefile must be adjusted by modifying
MCU = atmega328p
andF_CPU = 16000000UL
- The makefile is configured by default to compile the code for the MCU (atmega328p) and working frequency (16Mhz) in Arduino UNO board. If the chosen board has a different MCU/working frequency the makefile must be adjusted by modifying
- Open a command console inside
uCNC/mcus/avr folder
and runmake clean all
- If everything went well you should have a hex file inside
uCNC/mcus/avr/build folder
- Now just upload µCNC to your board using an appropriate tool. xLoader for AVR is an easy tool to use.
µCNC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. µCNC is distributed WITHOUT ANY WARRANTY.
Also without the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
µCNC Wiki
- Home
- Basic user guide
- Porting µCNC and adding custom HAL
- Customizing the HAL file
- Adding custom Tools and Modules to µCNC
- FAQ
µCNC for ALL MCU
µCNC for AVR
µCNC for STM32F1 and STM32F4
µCNC for SAMD21
µCNC for ESP8266
µCNC for ESP32
µCNC for NXP LPC176x
µCNC for NXP RP2040