This repository has been archived by the owner on Mar 31, 2021. It is now read-only.
forked from grbl/grbl
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
4,714 additions
and
14,130 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// GRBL RAMPS 1.4 port | ||
// By ArSi arsi@arsi.sk | ||
//************************************************************************************** | ||
// Steppers redirected to fastio.h from marlin firmware | ||
// min switches remaped to AUX-3, GBRL uses pin change interrupts | ||
// simple scheme to allow future porting of next releases | ||
// command buttons currently disabled | ||
// Ramps pins config moved to ramps.h | ||
// cpu_map.h - min switches | ||
// added GRBL_RAMPS1_4.ino for arduino IDE | ||
//************************************************************************************** | ||
// Ramps 1.4 | GRBL | Test | ||
// X axis | X axis | OK working | ||
// Z axis | Y axis for dual motor Y axis | OK working | ||
// Y axis | Z axis | OK working | ||
// Ramps AUX-3 pin 3 | min X | OK working | ||
// Ramps AUX-3 pin 4 | min Y | OK working | ||
// Ramps AUX-3 pin 5 | min Z | not tested | ||
// D10 | motor ON | not tested | ||
// D9 | motor direction | not tested | ||
// D8 | coolant on | not tested | ||
//*************************************************************************************** | ||
|
||
|
||
|
||
//#Grbl - An embedded g-code interpreter and motion-controller for the Arduino/AVR328 microcontroller | ||
// | ||
//*** | ||
|
||
//Grbl is a no-compromise, high performance, low cost alternative to parallel-port-based motion control for CNC milling. It will run on a vanilla Arduino //(Duemillanove/Uno) as long as it sports an Atmega 328. | ||
|
||
//The controller is written in highly optimized C utilizing every clever feature of the AVR-chips to achieve precise timing and asynchronous operation. It is able to //maintain up to 30kHz of stable, jitter free control pulses. | ||
|
||
//It accepts standards-compliant g-code and has been tested with the output of several CAM tools with no problems. Arcs, circles and helical motion are fully supported, //as well as, all other primary g-code commands. Macro functions, variables, and most canned cycles are not supported, but we think GUIs can do a much better job at //translating them into straight g-code anyhow. | ||
|
||
//Grbl includes full acceleration management with look ahead. That means the controller will look up to 18 motions into the future and plan its velocities ahead to //deliver smooth acceleration and jerk-free cornering. | ||
|
||
// [Licensing](https://github.com/grbl/grbl/wiki/Licensing): Grbl v0.9 is free software, released under the GPLv3 license. Obsolete versions of Grbl, v0.8 and prior, //are released under the permissive MIT-license. This will ensure Grbl will always be an open-source project while making the code permissive for others. | ||
|
||
//For more information and help, check out our **[Wiki pages!](https://github.com/grbl/grbl/wiki)** If you find that the information is out-dated, please to help us //keep it updated by editing it or notifying our community! Thanks! | ||
|
||
//Lead Developer [_2011 - Current_]: Sonny Jeon, Ph.D. (USA) | ||
|
||
//Lead Developer [_2009 - 2011_]: Simen Svale Skogsrud (Norway). aka The Originator/Creator/Pioneer/Father of Grbl. | ||
|
||
|
||
|
||
|
||
|
||
|
||
#include <system.h> | ||
#include <nuts_bolts.h> | ||
#include <eeprom.h> | ||
#include <gcode.h> | ||
|
||
#include <config.h> | ||
#include <defaults.h> | ||
#include <settings.h> | ||
#include <fastio.h> | ||
|
||
#include <stepper.h> | ||
#include <planner.h> | ||
#include <report.h> | ||
#include <serial.h> | ||
#include <cpu_map.h> | ||
#include <limits.h> | ||
#include <motion_control.h> | ||
#include <spindle_control.h> | ||
#include <protocol.h> | ||
#include <probe.h> | ||
#include <print.h> | ||
#include <coolant_control.h> | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,128 @@ | ||
# Part of Grbl | ||
# | ||
# Copyright (c) 2009-2011 Simen Svale Skogsrud | ||
# Copyright (c) 2012 Sungeun K. Jeon | ||
# There exist several targets which are by default empty and which can be | ||
# used for execution of your targets. These targets are usually executed | ||
# before and after some main targets. They are: | ||
# | ||
# Grbl 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. | ||
# .build-pre: called before 'build' target | ||
# .build-post: called after 'build' target | ||
# .clean-pre: called before 'clean' target | ||
# .clean-post: called after 'clean' target | ||
# .clobber-pre: called before 'clobber' target | ||
# .clobber-post: called after 'clobber' target | ||
# .all-pre: called before 'all' target | ||
# .all-post: called after 'all' target | ||
# .help-pre: called before 'help' target | ||
# .help-post: called after 'help' target | ||
# | ||
# Grbl is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# Targets beginning with '.' are not intended to be called on their own. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with Grbl. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
# This is a prototype Makefile. Modify it according to your needs. | ||
# You should at least check the settings for | ||
# DEVICE ....... The AVR device you compile for | ||
# CLOCK ........ Target AVR clock rate in Hertz | ||
# OBJECTS ...... The object files created from your source files. This list is | ||
# usually the same as the list of source files with suffix ".o". | ||
# PROGRAMMER ... Options to avrdude which define the hardware you use for | ||
# uploading to the AVR and the interface where this hardware | ||
# is connected. | ||
# FUSES ........ Parameters for avrdude to flash the fuses appropriately. | ||
|
||
DEVICE ?= atmega328p | ||
CLOCK = 16000000 | ||
PROGRAMMER ?= -c avrisp2 -P usb | ||
OBJECTS = main.o motion_control.o gcode.o spindle_control.o coolant_control.o serial.o \ | ||
protocol.o stepper.o eeprom.o settings.o planner.o nuts_bolts.o limits.o \ | ||
print.o probe.o report.o system.o | ||
# FUSES = -U hfuse:w:0xd9:m -U lfuse:w:0x24:m | ||
FUSES = -U hfuse:w:0xd2:m -U lfuse:w:0xff:m | ||
|
||
# Tune the lines below only if you know what you are doing: | ||
|
||
AVRDUDE = avrdude $(PROGRAMMER) -p $(DEVICE) -B 10 -F | ||
COMPILE = avr-gcc -Wall -Os -DF_CPU=$(CLOCK) -mmcu=$(DEVICE) -I. -ffunction-sections | ||
|
||
# symbolic targets: | ||
all: grbl.hex | ||
|
||
.c.o: | ||
$(COMPILE) -c $< -o $@ | ||
@$(COMPILE) -MM $< > $*.d | ||
|
||
.S.o: | ||
$(COMPILE) -x assembler-with-cpp -c $< -o $@ | ||
# "-x assembler-with-cpp" should not be necessary since this is the default | ||
# file type for the .S (with capital S) extension. However, upper case | ||
# characters are not always preserved on Windows. To ensure WinAVR | ||
# compatibility define the file type manually. | ||
|
||
.c.s: | ||
$(COMPILE) -S $< -o $@ | ||
|
||
flash: all | ||
$(AVRDUDE) -U flash:w:grbl.hex:i | ||
|
||
fuse: | ||
$(AVRDUDE) $(FUSES) | ||
|
||
# Xcode uses the Makefile targets "", "clean" and "install" | ||
install: flash fuse | ||
|
||
# if you use a bootloader, change the command below appropriately: | ||
load: all | ||
bootloadHID grbl.hex | ||
|
||
clean: | ||
rm -f grbl.hex main.elf $(OBJECTS) $(OBJECTS:.o=.d) | ||
|
||
# file targets: | ||
main.elf: $(OBJECTS) | ||
$(COMPILE) -o main.elf $(OBJECTS) -lm -Wl,--gc-sections | ||
|
||
grbl.hex: main.elf | ||
rm -f grbl.hex | ||
avr-objcopy -j .text -j .data -O ihex main.elf grbl.hex | ||
avr-size --format=berkeley main.elf | ||
# If you have an EEPROM section, you must also create a hex file for the | ||
# EEPROM and add it to the "flash" target. | ||
|
||
# Targets for code debugging and analysis: | ||
disasm: main.elf | ||
avr-objdump -d main.elf | ||
|
||
cpp: | ||
$(COMPILE) -E main.c | ||
|
||
# include generated header dependencies | ||
-include $(OBJECTS:.o=.d) | ||
# Main targets can be executed directly, and they are: | ||
# | ||
# build build a specific configuration | ||
# clean remove built files from a configuration | ||
# clobber remove all built files | ||
# all build all configurations | ||
# help print help mesage | ||
# | ||
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and | ||
# .help-impl are implemented in nbproject/makefile-impl.mk. | ||
# | ||
# Available make variables: | ||
# | ||
# CND_BASEDIR base directory for relative paths | ||
# CND_DISTDIR default top distribution directory (build artifacts) | ||
# CND_BUILDDIR default top build directory (object files, ...) | ||
# CONF name of current configuration | ||
# CND_PLATFORM_${CONF} platform name (current configuration) | ||
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) | ||
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) | ||
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) | ||
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) | ||
# CND_PACKAGE_NAME_${CONF} name of package (current configuration) | ||
# CND_PACKAGE_PATH_${CONF} path to package (current configuration) | ||
# | ||
# NOCDDL | ||
|
||
|
||
# Environment | ||
MKDIR=mkdir | ||
CP=cp | ||
CCADMIN=CCadmin | ||
|
||
|
||
# build | ||
build: .build-post | ||
|
||
.build-pre: | ||
# Add your pre 'build' code here... | ||
|
||
.build-post: .build-impl | ||
# Add your post 'build' code here... | ||
|
||
|
||
# clean | ||
clean: .clean-post | ||
|
||
.clean-pre: | ||
# Add your pre 'clean' code here... | ||
|
||
.clean-post: .clean-impl | ||
# Add your post 'clean' code here... | ||
|
||
|
||
# clobber | ||
clobber: .clobber-post | ||
|
||
.clobber-pre: | ||
# Add your pre 'clobber' code here... | ||
|
||
.clobber-post: .clobber-impl | ||
# Add your post 'clobber' code here... | ||
|
||
|
||
# all | ||
all: .all-post | ||
|
||
.all-pre: | ||
# Add your pre 'all' code here... | ||
|
||
.all-post: .all-impl | ||
# Add your post 'all' code here... | ||
|
||
|
||
# build tests | ||
build-tests: .build-tests-post | ||
|
||
.build-tests-pre: | ||
# Add your pre 'build-tests' code here... | ||
|
||
.build-tests-post: .build-tests-impl | ||
# Add your post 'build-tests' code here... | ||
|
||
|
||
# run tests | ||
test: .test-post | ||
|
||
.test-pre: build-tests | ||
# Add your pre 'test' code here... | ||
|
||
.test-post: .test-impl | ||
# Add your post 'test' code here... | ||
|
||
|
||
# help | ||
help: .help-post | ||
|
||
.help-pre: | ||
# Add your pre 'help' code here... | ||
|
||
.help-post: .help-impl | ||
# Add your post 'help' code here... | ||
|
||
|
||
|
||
# include project implementation makefile | ||
include nbproject/Makefile-impl.mk | ||
|
||
# include project make variables | ||
include nbproject/Makefile-variables.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.