resolved merge conflicts from dev-168 sha3999533

This commit is contained in:
Alden Hart
2016-12-08 08:29:11 -05:00
67 changed files with 3094 additions and 1104 deletions
+2
View File
@@ -53,3 +53,5 @@ Tools/gcc-arm-none-eabi-*.tar.bz2
*/TinyG2.componentinfo.xml
g2core/g2core.componentinfo.xml
.tags
g2core/compile_commands.json
+1 -1
Submodule Motate updated: 1540f1af7f...18c93112f1
+2
View File
@@ -1,3 +1,5 @@
<img src="https://raw.githubusercontent.com/wiki/synthetos/g2/images/g2core.png" width="300" height="129" alt="g2core">
[![Build Status](https://travis-ci.org/synthetos/g2.svg?branch=edge)](https://travis-ci.org/synthetos/g2) [![Issues in Ready](https://badge.waffle.io/synthetos/g2.svg?label=ready&title=Ready)](http://waffle.io/synthetos/g2) [![Issues in Progress](https://badge.waffle.io/synthetos/g2.svg?label=in%20progress&title=In%20Progress)](http://waffle.io/synthetos/g2)
# g2core - Edge Branch
+7 -4
View File
@@ -25,13 +25,13 @@ def load_pool(filename):
if buf:
current_buffer = int(buf.groups()[0], 16)
pool[TUMBLER[tumbler_pos]] = current_buffer
# print "TUMBLER[tumbler_pos]: %s=%i" % (TUMBLER[tumbler_pos], current_buffer)
print "TUMBLER[tumbler_pos]: %s=%i" % (TUMBLER[tumbler_pos], current_buffer)
tumbler_pos += 1
else:
buf = re.search('\(mpBuf_t\s\*\)\s(0x[0-9a-fA-F]+)', line)
if buf:
current_buffer = int(buf.groups()[0], 16)
# print "setup current_buffer: %s" % current_buffer
print "setup current_buffer: %s" % current_buffer
pool[current_buffer] = {'move_time': 0}
if current_buffer == pool['r']:
pool[current_buffer]['is_r'] = True
@@ -49,9 +49,11 @@ def load_pool(filename):
if key == 'pv':
pv = int(val, 16)
pool[current_buffer]['pv'] = pv
print "pv: %s" % pv
elif key == 'nx':
nv = int(val, 16)
pool[current_buffer]['nx'] = nv
nx = int(val, 16)
pool[current_buffer]['nx'] = nx
print "nx: %s" % nx
elif key == 'buffer_state':
pool[current_buffer]['buffer_state'] = val
elif key == 'jerk':
@@ -60,6 +62,7 @@ def load_pool(filename):
pool[current_buffer]['linenum'] = val
elif key == 'buffer_number':
pool[current_buffer]['buffer_number'] = val
print "#: %s" % val
elif key == 'junction_vmax':
pool[current_buffer]['junction_vmax'] = float(val)
elif key == 'cruise_velocity':
Executable → Regular
+4 -3
View File
@@ -3,9 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{E66E83B9-2572-4076-B26E-6BE79FF3018A}") = "g2core", "g2core\g2core.cppproj", "{44EA8FEC-55D7-4149-8A78-A574FC26BF51}"
ProjectSection(ProjectDependencies) = postProject
{D7779B24-5CD6-4A1B-893C-2CAE8CF7A3A0} = {D7779B24-5CD6-4A1B-893C-2CAE8CF7A3A0}
EndProjectSection
EndProject
Project("{E66E83B9-2572-4076-B26E-6BE79FF3018A}") = "Motate", "Motate\Motate.cppproj", "{D7779B24-5CD6-4A1B-893C-2CAE8CF7A3A0}"
EndProject
@@ -22,6 +19,7 @@ Global
Shapeoko2|ARM = Shapeoko2|ARM
shopbotShield|ARM = shopbotShield|ARM
Stub|ARM = Stub|ARM
TestQuadratic|ARM = TestQuadratic|ARM
TestQuintic|ARM = TestQuintic|ARM
TestV9|ARM = TestV9|ARM
Ultimakerv9k|ARM = Ultimakerv9k|ARM
@@ -49,6 +47,8 @@ Global
{44EA8FEC-55D7-4149-8A78-A574FC26BF51}.shopbotShield|ARM.ActiveCfg = shopbotShield|ARM
{44EA8FEC-55D7-4149-8A78-A574FC26BF51}.shopbotShield|ARM.Build.0 = shopbotShield|ARM
{44EA8FEC-55D7-4149-8A78-A574FC26BF51}.Stub|ARM.ActiveCfg = Shapeoko2|ARM
{44EA8FEC-55D7-4149-8A78-A574FC26BF51}.TestQuadratic|ARM.ActiveCfg = TestQuadratic|ARM
{44EA8FEC-55D7-4149-8A78-A574FC26BF51}.TestQuadratic|ARM.Build.0 = TestQuadratic|ARM
{44EA8FEC-55D7-4149-8A78-A574FC26BF51}.TestQuintic|ARM.ActiveCfg = TestQuintic|ARM
{44EA8FEC-55D7-4149-8A78-A574FC26BF51}.TestQuintic|ARM.Build.0 = TestQuintic|ARM
{44EA8FEC-55D7-4149-8A78-A574FC26BF51}.TestV9|ARM.ActiveCfg = TestV9|ARM
@@ -68,6 +68,7 @@ Global
{D7779B24-5CD6-4A1B-893C-2CAE8CF7A3A0}.Shapeoko2|ARM.ActiveCfg = Stub|ARM
{D7779B24-5CD6-4A1B-893C-2CAE8CF7A3A0}.shopbotShield|ARM.ActiveCfg = Stub|ARM
{D7779B24-5CD6-4A1B-893C-2CAE8CF7A3A0}.Stub|ARM.ActiveCfg = Stub|ARM
{D7779B24-5CD6-4A1B-893C-2CAE8CF7A3A0}.TestQuadratic|ARM.ActiveCfg = Stub|ARM
{D7779B24-5CD6-4A1B-893C-2CAE8CF7A3A0}.TestQuintic|ARM.ActiveCfg = Stub|ARM
{D7779B24-5CD6-4A1B-893C-2CAE8CF7A3A0}.TestV9|ARM.ActiveCfg = Stub|ARM
{D7779B24-5CD6-4A1B-893C-2CAE8CF7A3A0}.Ultimakerv9k|ARM.ActiveCfg = Stub|ARM
+11 -8
View File
@@ -42,20 +42,23 @@ const Motate::USBSettings_t Motate::USBSettings = {
};
/*gProductVersion = */ //0.1,
//Motate::USBDevice< Motate::USBCDC > usb;
Motate::USBDevice< Motate::USBCDC, Motate::USBCDC > usb;
XIOUSBDevice_t usb;
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
#if USB_SERIAL_PORTS_EXPOSED == 2
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#endif
decltype(usb.mixin<0>::Serial) &SerialUSB = usb.mixin<0>::Serial;
decltype(usb.mixin<1>::Serial) &SerialUSB1 = usb.mixin<1>::Serial;
//decltype(usb.mixin<1>::Serial) &SerialUSB1 = usb.mixin<1>::Serial;
// 115200 is the default, as well.
//UART<kSerial_RXPinNumber, kSerial_TXPinNumber, kSerial_RTSPinNumber, kSerial_CTSPinNumber> Serial {115200, UARTMode::RTSCTSFlowControl};
MOTATE_SET_USB_VENDOR_STRING({'S', 'y', 'n', 't', 'h', 'e', 't', 'o', 's'})
MOTATE_SET_USB_PRODUCT_STRING({'T', 'i', 'n', 'y', 'G', ' ', 'v', '2'})
MOTATE_SET_USB_VENDOR_STRING( u"Synthetos" )
MOTATE_SET_USB_PRODUCT_STRING( u"TinyG v2" )
MOTATE_SET_USB_SERIAL_NUMBER_STRING_FROM_CHIPID()
#endif // XIO_HAS_USB
//******** SPI ********
#if XIO_HAS_SPI
Motate::SPI<kSocket4_SPISlaveSelectPinNumber> spi;
+12 -2
View File
@@ -29,15 +29,25 @@
#ifndef board_xio_h
#define board_xio_h
#include "settings.h"
//******** USB ********
#if XIO_HAS_USB
#include "MotateUSB.h"
#include "MotateUSBCDC.h"
// extern Motate::USBDevice< Motate::USBCDC > usb;
extern Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> usb;
#if USB_SERIAL_PORTS_EXPOSED == 1
typedef Motate::USBDevice< Motate::USBCDC > XIOUSBDevice_t;
#endif
#if USB_SERIAL_PORTS_EXPOSED == 2
typedef Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> XIOUSBDevice_t;
#endif
extern XIOUSBDevice_t usb;
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
#if USB_SERIAL_PORTS_EXPOSED == 2
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#endif
#endif // XIO_HAS_USB
Executable → Regular
+2 -3
View File
@@ -126,9 +126,8 @@ using Motate::OutputPin;
// Timer definitions. See stepper.h and other headers for setup
typedef TimerChannel<3,0> dda_timer_type; // stepper pulse generation in stepper.cpp
typedef TimerChannel<4,0> dwell_timer_type; // dwell timing in stepper.cpp
typedef ServiceCall<0> load_timer_type; // request load timer in stepper.cpp
typedef ServiceCall<1> exec_timer_type; // request exec timer in stepper.cpp
typedef TimerChannel<4,0> load_timer_type; // request load timer in stepper.cpp
typedef ServiceCall<1> exec_timer_type; // request exec timer in stepper.cpp
typedef ServiceCall<2> fwd_plan_timer_type; // request exec timer in stepper.cpp
// Pin assignments
+15 -11
View File
@@ -32,27 +32,31 @@
#include "board_xio.h"
//******** USB ********
#if XIO_HAS_USB
const Motate::USBSettings_t Motate::USBSettings = {
/*gVendorID = */ 0x1d50,
/*gProductID = */ 0x606d,
/*gProductVersion = */ G2CORE_FIRMWARE_VERSION,
/*gAttributes = */ kUSBConfigAttributeSelfPowered,
/*gPowerConsumption = */ 500};
/*gProductVersion = */ // 0.1,
/*gPowerConsumption = */ 500
};
/*gProductVersion = */ //0.1,
// Motate::USBDevice< Motate::USBCDC > usb;
Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> usb;
XIOUSBDevice_t usb;
decltype(usb.mixin<0>::Serial)& SerialUSB = usb.mixin<0>::Serial;
decltype(usb.mixin<1>::Serial)& SerialUSB1 = usb.mixin<1>::Serial;
// 115200 is the default, as well.
// UART<kSerial_RXPinNumber, kSerial_TXPinNumber, kSerial_RTSPinNumber, kSerial_CTSPinNumber> Serial {115200, UARTMode::RTSCTSFlowControl};
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
#if USB_SERIAL_PORTS_EXPOSED == 2
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#endif
MOTATE_SET_USB_VENDOR_STRING({'S', 'y', 'n', 't', 'h', 'e', 't', 'o', 's'})
MOTATE_SET_USB_PRODUCT_STRING({'T', 'i', 'n', 'y', 'G', ' ', 'v', '2'})
decltype(usb.mixin<0>::Serial) &SerialUSB = usb.mixin<0>::Serial;
//decltype(usb.mixin<1>::Serial) &SerialUSB1 = usb.mixin<1>::Serial;
MOTATE_SET_USB_VENDOR_STRING( u"Synthetos" )
MOTATE_SET_USB_PRODUCT_STRING( u"TinyG v2" )
MOTATE_SET_USB_SERIAL_NUMBER_STRING_FROM_CHIPID()
#endif // XIO_HAS_USB
+15 -4
View File
@@ -29,15 +29,26 @@
#ifndef board_xio_h
#define board_xio_h
#include "settings.h"
//******** USB ********
#if XIO_HAS_USB
#include "MotateUSB.h"
#include "MotateUSBCDC.h"
// extern Motate::USBDevice< Motate::USBCDC > usb;
extern Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> usb;
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#if USB_SERIAL_PORTS_EXPOSED == 1
typedef Motate::USBDevice< Motate::USBCDC > XIOUSBDevice_t;
#endif
#if USB_SERIAL_PORTS_EXPOSED == 2
typedef Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> XIOUSBDevice_t;
#endif
extern XIOUSBDevice_t usb;
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
#if USB_SERIAL_PORTS_EXPOSED == 2
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#endif
#endif // XIO_HAS_USB
//******** SPI ********
+2 -3
View File
@@ -128,9 +128,8 @@ using Motate::OutputPin;
// Timer definitions. See stepper.h and other headers for setup
typedef TimerChannel<3,0> dda_timer_type; // stepper pulse generation in stepper.cpp
typedef TimerChannel<4,0> dwell_timer_type; // dwell timing in stepper.cpp
typedef ServiceCall<0> load_timer_type; // request load timer in stepper.cpp
typedef ServiceCall<1> exec_timer_type; // request exec timer in stepper.cpp
typedef TimerChannel<4,0> load_timer_type; // request load timer in stepper.cpp
typedef ServiceCall<1> exec_timer_type; // request exec timer in stepper.cpp
typedef ServiceCall<2> fwd_plan_timer_type; // request exec timer in stepper.cpp
// Pin assignments
+15 -12
View File
@@ -32,28 +32,31 @@
#include "board_xio.h"
//******** USB ********
#if XIO_HAS_USB
const Motate::USBSettings_t Motate::USBSettings = {
/*gVendorID = */ 0x1d50,
/*gProductID = */ 0x606d,
/*gProductVersion = */ G2CORE_FIRMWARE_VERSION,
/*gAttributes = */ kUSBConfigAttributeSelfPowered,
/*gPowerConsumption = */ 500};
/*gProductVersion = */ // 0.1,
/*gPowerConsumption = */ 500
};
/*gProductVersion = */ //0.1,
// Motate::USBDevice< Motate::USBCDC > usb;
Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> usb;
XIOUSBDevice_t usb;
decltype(usb.mixin<0>::Serial)& SerialUSB = usb.mixin<0>::Serial;
decltype(usb.mixin<1>::Serial)& SerialUSB1 = usb.mixin<1>::Serial;
// 115200 is the default, as well.
// UART<kSerial_RXPinNumber, kSerial_TXPinNumber, kSerial_RTSPinNumber, kSerial_CTSPinNumber> Serial {115200, UARTMode::RTSCTSFlowControl};
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
#if USB_SERIAL_PORTS_EXPOSED == 2
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#endif
MOTATE_SET_USB_VENDOR_STRING({'S', 'y', 'n', 't', 'h', 'e', 't', 'o', 's'})
MOTATE_SET_USB_PRODUCT_STRING({'T', 'i', 'n', 'y', 'G', ' ', 'v', '2'})
decltype(usb.mixin<0>::Serial) &SerialUSB = usb.mixin<0>::Serial;
//decltype(usb.mixin<1>::Serial) &SerialUSB1 = usb.mixin<1>::Serial;
MOTATE_SET_USB_VENDOR_STRING( u"Synthetos" )
MOTATE_SET_USB_PRODUCT_STRING( u"TinyG v2" )
MOTATE_SET_USB_SERIAL_NUMBER_STRING_FROM_CHIPID()
#endif // XIO_HAS_USB
//******** SPI ********
+17 -7
View File
@@ -29,15 +29,26 @@
#ifndef board_xio_h
#define board_xio_h
#include "settings.h"
//******** USB ********
#if XIO_HAS_USB
#include "MotateUSB.h"
#include "MotateUSBCDC.h"
// extern Motate::USBDevice< Motate::USBCDC > usb;
extern Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> usb;
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#if USB_SERIAL_PORTS_EXPOSED == 1
typedef Motate::USBDevice< Motate::USBCDC > XIOUSBDevice_t;
#endif
#if USB_SERIAL_PORTS_EXPOSED == 2
typedef Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> XIOUSBDevice_t;
#endif
extern XIOUSBDevice_t usb;
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
#if USB_SERIAL_PORTS_EXPOSED == 2
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#endif
#endif // XIO_HAS_USB
//******** SPI ********
@@ -52,9 +63,8 @@ extern Motate::SPI<Motate::kSocket4_SPISlaveSelectPinNumber> spi;
extern Motate::UART<Motate::kSerial_RXPinNumber, Motate::kSerial_TXPinNumber, Motate::kSerial_RTSPinNumber, Motate::kSerial_CTSPinNumber> Serial;
#endif
//******* Generic Functions *******
void board_xio_init(void);
void board_hardware_init(void); // called 1st
void board_xio_init(void); // called later
#endif // board_xio_h
+1
View File
@@ -43,6 +43,7 @@
void hardware_init()
{
board_hardware_init();
return;
}
+2 -3
View File
@@ -129,9 +129,8 @@ using Motate::OutputPin;
// Timer definitions. See stepper.h and other headers for setup
typedef TimerChannel<3,0> dda_timer_type; // stepper pulse generation in stepper.cpp
typedef TimerChannel<4,0> dwell_timer_type; // dwell timing in stepper.cpp
typedef ServiceCall<0> load_timer_type; // request load timer in stepper.cpp
typedef ServiceCall<1> exec_timer_type; // request exec timer in stepper.cpp
typedef TimerChannel<4,0> load_timer_type; // request load timer in stepper.cpp
typedef ServiceCall<1> exec_timer_type; // request exec timer in stepper.cpp
typedef ServiceCall<2> fwd_plan_timer_type; // request exec timer in stepper.cpp
// Pin assignments
+4 -4
View File
@@ -12,15 +12,15 @@
##########
# BOARDs for use directly from the make command line (with default settings) or by CONFIGs.
ifeq ("$(BOARD)","gquadratic-a")
ifeq ("$(BOARD)","gquadratic-b")
BASE_BOARD=gquadratic
DEVICE_DEFINES += MOTATE_BOARD="gquadratic-a"
DEVICE_DEFINES += MOTATE_BOARD="gquadratic-b"
DEVICE_DEFINES += SETTINGS_FILE=${SETTINGS_FILE}
endif
##########
# The general pboard-a BASE_BOARD.
# The general gquadratic BASE_BOARD.
ifeq ("$(BASE_BOARD)","gquadratic")
_BOARD_FOUND = 1
@@ -34,7 +34,7 @@ ifeq ("$(BASE_BOARD)","gquadratic")
CHIP_LOWERCASE = sams70n19
BOARD_PATH = ./board/gquadratic
SOURCE_DIRS += ${BOARD_PATH} device/step_dir_driver
SOURCE_DIRS += ${BOARD_PATH} device/step_dir_driver device/step_dir_hobbyservo device/neopixel
PLATFORM_BASE = ${MOTATE_PATH}/platform/atmel_sam
include $(PLATFORM_BASE).mk
+3 -10
View File
@@ -47,15 +47,8 @@ StepDirStepper<Motate::kSocket2_StepPinNumber,
Motate::kSocket2_VrefPinNumber>
motor_2{};
// StepDirStepper<
// Motate::kSocket3_StepPinNumber,
// Motate::kSocket3_DirPinNumber,
// Motate::kSocket3_EnablePinNumber,
// Motate::kSocket3_Microstep_0PinNumber,
// Motate::kSocket3_Microstep_1PinNumber,
// Motate::kSocket3_Microstep_2PinNumber,
// Motate::kSocket3_VrefPinNumber> motor_3 {};
//
StepDirHobbyServo<Motate::kServo1_PinNumber> motor_3;
// StepDirStepper<
// Motate::kSocket4_StepPinNumber,
// Motate::kSocket4_DirPinNumber,
@@ -83,7 +76,7 @@ StepDirStepper<Motate::kSocket2_StepPinNumber,
// Motate::kSocket6_Microstep_2PinNumber,
// Motate::kSocket6_VrefPinNumber> motor_6 {};
Stepper* Motors[MOTORS] = {&motor_1, &motor_2};
Stepper* Motors[MOTORS] = {&motor_1, &motor_2, &motor_3};
void board_stepper_init() {
for (uint8_t motor = 0; motor < MOTORS; motor++) { Motors[motor]->init(); }
+4 -19
View File
@@ -30,6 +30,7 @@
#include "hardware.h" // for MOTORS
#include "step_dir_driver.h"
#include "step_dir_hobbyservo.h"
extern StepDirStepper<Motate::kSocket1_StepPinNumber,
Motate::kSocket1_DirPinNumber,
@@ -49,24 +50,8 @@ extern StepDirStepper<Motate::kSocket2_StepPinNumber,
Motate::kSocket2_VrefPinNumber>
motor_2;
// extern StepDirStepper<
// Motate::kSocket3_StepPinNumber,
// Motate::kSocket3_DirPinNumber,
// Motate::kSocket3_EnablePinNumber,
// Motate::kSocket3_Microstep_0PinNumber,
// Motate::kSocket3_Microstep_1PinNumber,
// Motate::kSocket3_Microstep_2PinNumber,
// Motate::kSocket3_VrefPinNumber> motor_3;
//
// extern StepDirStepper<
// Motate::kSocket4_StepPinNumber,
// Motate::kSocket4_DirPinNumber,
// Motate::kSocket4_EnablePinNumber,
// Motate::kSocket4_Microstep_0PinNumber,
// Motate::kSocket4_Microstep_1PinNumber,
// Motate::kSocket4_Microstep_2PinNumber,
// Motate::kSocket4_VrefPinNumber> motor_4;
//
extern StepDirHobbyServo<Motate::kServo1_PinNumber> motor_3;
// extern StepDirStepper<
// Motate::kSocket5_StepPinNumber,
// Motate::kSocket5_DirPinNumber,
@@ -89,4 +74,4 @@ extern Stepper* Motors[MOTORS];
void board_stepper_init();
#endif // BOARD_STEPPER_H_ONCE
#endif // BOARD_STEPPER_H_ONCE
+13 -10
View File
@@ -42,20 +42,23 @@ const Motate::USBSettings_t Motate::USBSettings = {
};
/*gProductVersion = */ //0.1,
//Motate::USBDevice< Motate::USBCDC > usb;
Motate::USBDevice< Motate::USBCDC, Motate::USBCDC > usb;
XIOUSBDevice_t usb;
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
#if USB_SERIAL_PORTS_EXPOSED == 2
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#endif
decltype(usb.mixin<0>::Serial) &SerialUSB = usb.mixin<0>::Serial;
decltype(usb.mixin<1>::Serial) &SerialUSB1 = usb.mixin<1>::Serial;
//decltype(usb.mixin<1>::Serial) &SerialUSB1 = usb.mixin<1>::Serial;
// 115200 is the default, as well.
//UART<kSerial_RX, kSerial_TX, kSerial_RTS, kSerial_CTS> Serial {115200, UARTMode::RTSCTSFlowControl};
MOTATE_SET_USB_VENDOR_STRING( u"Synthetos (http://synthetos.com)" )
MOTATE_SET_USB_PRODUCT_STRING( u"g2core gQuadratic" )
MOTATE_SET_USB_VENDOR_STRING( u"Synthetos" )
MOTATE_SET_USB_PRODUCT_STRING( u"TinyG v2" )
MOTATE_SET_USB_SERIAL_NUMBER_STRING_FROM_CHIPID()
#endif // XIO_HAS_USB
//******** SPI ********
#if XIO_HAS_SPI
Motate::SPI<kSocket4_SPISlaveSelectPinNumber> spi;
@@ -64,14 +67,14 @@ Motate::SPI<kSocket4_SPISlaveSelectPinNumber> spi;
//******** UART ********
#if XIO_HAS_UART
Motate::UART<Motate::kSerial_RX, Motate::kSerial_TX, Motate::kSerial_RTS, Motate::kSerial_CTS> Serial {115200, Motate::UARTMode::RTSCTSFlowControl};
Motate::UART<Motate::kSerial_RXPinNumber, Motate::kSerial_TXPinNumber, Motate::kSerial_RTSPinNumber, Motate::kSerial_CTSPinNumber> Serial {115200, Motate::UARTMode::RTSCTSFlowControl};
#endif
void board_hardware_init(void) // called 1st
{
#if XIO_HAS_USB
// Init USB
usb.attach(); // USB setup. Runs in "background" as the rest of this executes
usb.attach();
#endif // XIO_HAS_USB
}
+13 -3
View File
@@ -29,15 +29,25 @@
#ifndef board_xio_h
#define board_xio_h
#include "settings.h"
//******** USB ********
#if XIO_HAS_USB
#include "MotateUSB.h"
#include "MotateUSBCDC.h"
// extern Motate::USBDevice< Motate::USBCDC > usb;
extern Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> usb;
#if USB_SERIAL_PORTS_EXPOSED == 1
typedef Motate::USBDevice< Motate::USBCDC > XIOUSBDevice_t;
#endif
#if USB_SERIAL_PORTS_EXPOSED == 2
typedef Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> XIOUSBDevice_t;
#endif
extern XIOUSBDevice_t usb;
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
#if USB_SERIAL_PORTS_EXPOSED == 2
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#endif
#endif // XIO_HAS_USB
@@ -50,7 +60,7 @@ extern Motate::SPI<Motate::kSocket4_SPISlaveSelectPinNumber> spi;
//******** UART ********
#if XIO_HAS_UART
#include "MotateUART.h"
extern Motate::UART<Motate::kSerial_RX, Motate::kSerial_TX, Motate::kSerial_RTS, Motate::kSerial_CTS> Serial;
extern Motate::UART<Motate::kSerial_RXPinNumber, Motate::kSerial_TXPinNumber, Motate::kSerial_RTSPinNumber, Motate::kSerial_CTSPinNumber> Serial;
#endif
//******* Generic Functions *******
@@ -1,209 +0,0 @@
/*
* gquadratic-a-pinout.h - board pinout specification
* This file is part of the g2core project
*
* Copyright (c) 2016 Robert Giseburt
* Copyright (c) 2016 Alden S. Hart Jr.
*
* This file is part of the Motate Library.
*
* This file ("the software") is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2 as published by the
* Free Software Foundation. You should have received a copy of the GNU General Public
* License, version 2 along with the software. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, you may use this file as part of a software library without
* restriction. Specifically, if other files instantiate templates or use macros or
* inline functions from this file, or you compile this file and link it with other
* files to produce an executable, this file does not by itself cause the resulting
* executable to be covered by the GNU General Public License. This exception does not
* however invalidate any other reasons why the executable file might be covered by the
* GNU General Public License.
*
* THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY
* WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
* SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#ifndef GQUADRATIC_A_PINOUT_H
#define GQUADRATIC_A_PINOUT_H
/*
* USAGE NOTES
*
* Read this first:
* https://github.com/synthetos/g2/wiki/Adding-a-new-G2-board-(or-revision)-to-G2#making-a-new-pin-assignment
*
* USAGE:
*
* This file is lays out all the pin capabilities of the SAM3X8C organized by pin number.
* Each pin has its associated functions listed at the bottom of the file, and is essentially
* immutable for each processor.
*
* To use, assign Motate pin numbers to the first value in the _MAKE_MOTATE_PIN() macro.
* ALL PINS MUST BE ASSIGNED A NUMBER, even if they are not used. There will NOT be a
* code-size or speed penalty for unused pins, but the WILL be a compiler-failure for
* unassigned pins. This new restriction allows for simplification of linkages deep in
* Motate.
*/
/* See motate_pin_assignments.h for pin names to be used int he rest of the G2 code.
* EXAMPLES:
*
* *** Vanilla pin example ***
*
* _MAKE_MOTATE_PIN(4, A, 'A', 27); // SPI0_SCKPinNumber
*
* This assigns Motate pin 4 to Port A, pin 27 (A27)
* Look in motate_pin_assignments.h to see that this is kSPI_SCKPinNumber
*
* ** Other pin functions ***
*
* Please look in <Motate>/platform/atmel_sam/motate_chip_pin_functions.h
*/
#include <MotateTimers.h>
// We don't have all of the inputs, so we have to indicate as much:
#define INPUT1_AVAILABLE 1
#define INPUT2_AVAILABLE 1
#define INPUT3_AVAILABLE 1
#define INPUT4_AVAILABLE 1
#define INPUT5_AVAILABLE 0
#define INPUT6_AVAILABLE 0
#define INPUT7_AVAILABLE 0
#define INPUT8_AVAILABLE 0
#define INPUT9_AVAILABLE 0
#define INPUT10_AVAILABLE 0
#define INPUT11_AVAILABLE 0
#define INPUT12_AVAILABLE 0
#define INPUT13_AVAILABLE 0
#define ADC0_AVAILABLE 0
#define ADC1_AVAILABLE 0
#define ADC2_AVAILABLE 0
#define ADC3_AVAILABLE 0
#define XIO_HAS_USB 1
#define XIO_HAS_UART 1
#define XIO_HAS_SPI 0
#define XIO_HAS_I2C 0
#define TEMPERATURE_OUTPUT_ON 0 // NO ADC yet
// Some pins, if the PWM capability is turned on, it will cause timer conflicts.
// So we have to explicitly enable them as PWM pins.
// Generated with:
// perl -e 'for($i=1;$i<14;$i++) { print "#define OUTPUT${i}_PWM 0\n";}'
#define OUTPUT1_PWM 1 // Timer0ch0
#define OUTPUT2_PWM 1 // PWM0.0
#define OUTPUT3_PWM 1 // Timer0ch1
#define OUTPUT4_PWM 1 // PWM1.3
#define OUTPUT5_PWM 0 // unused
#define OUTPUT6_PWM 0 // unused
#define OUTPUT7_PWM 0 // unused
#define OUTPUT8_PWM 0 // unused
#define OUTPUT9_PWM 0 // unused
#define OUTPUT10_PWM 0 // unused
#define OUTPUT11_PWM 0 // unused
#define OUTPUT12_PWM 0 // Unused
#define OUTPUT13_PWM 0 // Unused
namespace Motate {
// Arduino pin name & function
_MAKE_MOTATE_PIN(kOutput1_PinNumber, 'A', 0); //
_MAKE_MOTATE_PIN(kOutput3_PinNumber, 'A', 1); //
_MAKE_MOTATE_PIN(kSocket2_VrefPinNumber, 'A', 2); //
_MAKE_MOTATE_PIN(kI2C1_SDAPinNumber, 'A', 3); //
_MAKE_MOTATE_PIN(kI2C1_SCLPinNumber, 'A', 4); //
_MAKE_MOTATE_PIN(kOutput4_PinNumber, 'A', 5); //
_MAKE_MOTATE_PIN(kUnassigned1, 'A', 6); // Missing in 100-pin package
_MAKE_MOTATE_PIN(kUnassigned2, 'A', 7); //
_MAKE_MOTATE_PIN(kUnassigned3, 'A', 8); //
_MAKE_MOTATE_PIN(kSerial_RX, 'A', 9); //
_MAKE_MOTATE_PIN(kSerial_TX, 'A', 10); //
_MAKE_MOTATE_PIN(kSocket1_Microstep_1PinNumber, 'A', 11); //
_MAKE_MOTATE_PIN(kSocket1_EnablePinNumber, 'A', 12); //
_MAKE_MOTATE_PIN(kUnassigned4, 'A', 13); //
_MAKE_MOTATE_PIN(kUnassigned6, 'A', 14); //
_MAKE_MOTATE_PIN(kUnassigned5, 'A', 15); //
_MAKE_MOTATE_PIN(kUnassigned7, 'A', 16); //
_MAKE_MOTATE_PIN(kUnassigned8, 'A', 17); //
_MAKE_MOTATE_PIN(kUnassigned9, 'A', 18); //
_MAKE_MOTATE_PIN(kUnassigned10, 'A', 19); //
_MAKE_MOTATE_PIN(kUnassigned11, 'A', 20); //
_MAKE_MOTATE_PIN(kUnassigned13, 'A', 21); //
_MAKE_MOTATE_PIN(kUnassigned12, 'A', 22); //
_MAKE_MOTATE_PIN(kUnassigned14, 'A', 23); //
_MAKE_MOTATE_PIN(kUnassigned15, 'A', 24); //
_MAKE_MOTATE_PIN(kUnassigned16, 'A', 25); //
_MAKE_MOTATE_PIN(kUnassigned17, 'A', 26); //
_MAKE_MOTATE_PIN(kSocket1_VrefPinNumber, 'A', 27); //
_MAKE_MOTATE_PIN(kSerial_CTS, 'A', 28); //
_MAKE_MOTATE_PIN(kUnassigned18, 'A', 29); // Missing in 100-pin package
_MAKE_MOTATE_PIN(kSerial_RTS, 'A', 30); //
_MAKE_MOTATE_PIN(kOutputSAFE_PinNumber, 'A', 31); //
_MAKE_MOTATE_PIN(kUnassigned20, 'B', 0); //
_MAKE_MOTATE_PIN(kUnassigned22, 'B', 1); //
_MAKE_MOTATE_PIN(kUnassigned21, 'B', 2); //
_MAKE_MOTATE_PIN(kUnassigned23, 'B', 3); //
//_MAKE_MOTATE_PIN( , 'B', 4); // TDI
//_MAKE_MOTATE_PIN( , 'B', 5); // TRACESDO
//_MAKE_MOTATE_PIN( , 'B', 6); // SWDIO
//_MAKE_MOTATE_PIN( , 'B', 7); // SWDCLK
//_MAKE_MOTATE_PIN( , 'B', 8); // XOUT
//_MAKE_MOTATE_PIN( , 'B', 9); // XIN
//_MAKE_MOTATE_PIN( , 'B', 10); // USB_D-
//_MAKE_MOTATE_PIN( , 'B', 11); // USB_D+
//_MAKE_MOTATE_PIN( , 'B', 12); // ERASE
_MAKE_MOTATE_PIN(kUnassigned38, 'B', 13); // LED_1 (Heartbeat) - PWM2
//_MAKE_MOTATE_PIN( , 'D', 0); // USB_VBUS
_MAKE_MOTATE_PIN(kInput1_PinNumber, 'D', 1); //
_MAKE_MOTATE_PIN(kInput2_PinNumber, 'D', 2); //
_MAKE_MOTATE_PIN(kUnassigned24, 'D', 3); //
_MAKE_MOTATE_PIN(kUnassigned25, 'D', 4); //
_MAKE_MOTATE_PIN(kUnassigned26, 'D', 5); //
_MAKE_MOTATE_PIN(kInput3_PinNumber, 'D', 6); //
_MAKE_MOTATE_PIN(kInput4_PinNumber, 'D', 7); //
_MAKE_MOTATE_PIN(kUnassigned19, 'D', 8); // INTERRUPT_OUT
_MAKE_MOTATE_PIN(kUnassigned27, 'D', 9); //
_MAKE_MOTATE_PIN(kOutput2_PinNumber, 'D', 10); //
_MAKE_MOTATE_PIN(kUnassigned28, 'D', 11); //
_MAKE_MOTATE_PIN(kSocket2_DirPinNumber, 'D', 12); //
_MAKE_MOTATE_PIN(kSocket2_EnablePinNumber, 'D', 13); //
_MAKE_MOTATE_PIN(kSocket2_StepPinNumber, 'D', 14); //
_MAKE_MOTATE_PIN(kUnassigned29, 'D', 15); //
_MAKE_MOTATE_PIN(kSocket2_Microstep_0PinNumber, 'D', 16); //
_MAKE_MOTATE_PIN(kSocket2_Microstep_1PinNumber, 'D', 17); //
_MAKE_MOTATE_PIN(kSocket1_DirPinNumber, 'D', 18); //
_MAKE_MOTATE_PIN(kSocket1_StepPinNumber, 'D', 19); //
_MAKE_MOTATE_PIN(kSocket1_Microstep_0PinNumber, 'D', 20); //
_MAKE_MOTATE_PIN(kSocket1_Microstep_2PinNumber, 'D', 21); //
_MAKE_MOTATE_PIN(kUnassigned30, 'D', 22); //
_MAKE_MOTATE_PIN(kUnassigned31, 'D', 23); // Missing in 100-pin package
_MAKE_MOTATE_PIN(kUnassigned32, 'D', 24); //
_MAKE_MOTATE_PIN(kUnassigned33, 'D', 25); //
_MAKE_MOTATE_PIN(kUnassigned34, 'D', 26); //
_MAKE_MOTATE_PIN(kUnassigned35, 'D', 27); //
_MAKE_MOTATE_PIN(kSocket2_Microstep_2PinNumber, 'D', 28); //
_MAKE_MOTATE_PIN(kUnassigned36, 'D', 29); // Missing in 100-pin package
_MAKE_MOTATE_PIN(kLEDPWM_PinNumber, 'D', 30); //
_MAKE_MOTATE_PIN(kUnassigned37, 'D', 31); //
} // namespace Motate
// We then allow each chip-type to have it's onw function definitions
// that will refer to these pin assignments.
#include "motate_chip_pin_functions.h"
#endif
// GQUADRATIC_A_PINOUT_H
+209
View File
@@ -0,0 +1,209 @@
/*
* gquadratic-b-pinout.h - board pinout specification
* This file is part of the g2core project
*
* Copyright (c) 2016 Robert Giseburt
* Copyright (c) 2016 Alden S. Hart Jr.
*
* This file is part of the Motate Library.
*
* This file ("the software") is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2 as published by the
* Free Software Foundation. You should have received a copy of the GNU General Public
* License, version 2 along with the software. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, you may use this file as part of a software library without
* restriction. Specifically, if other files instantiate templates or use macros or
* inline functions from this file, or you compile this file and link it with other
* files to produce an executable, this file does not by itself cause the resulting
* executable to be covered by the GNU General Public License. This exception does not
* however invalidate any other reasons why the executable file might be covered by the
* GNU General Public License.
*
* THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY
* WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
* SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#ifndef GQUADRATIC_B_PINOUT_H
#define GQUADRATIC_B_PINOUT_H
/*
* USAGE NOTES
*
* Read this first:
* https://github.com/synthetos/g2/wiki/Adding-a-new-G2-board-(or-revision)-to-G2#making-a-new-pin-assignment
*
* USAGE:
*
* This file is lays out all the pin capabilities of the SAM3X8C organized by pin number.
* Each pin has its associated functions listed at the bottom of the file, and is essentially
* immutable for each processor.
*
* To use, assign Motate pin numbers to the first value in the _MAKE_MOTATE_PIN() macro.
* ALL PINS MUST BE ASSIGNED A NUMBER, even if they are not used. There will NOT be a
* code-size or speed penalty for unused pins, but the WILL be a compiler-failure for
* unassigned pins. This new restriction allows for simplification of linkages deep in
* Motate.
*/
/* See motate_pin_assignments.h for pin names to be used int he rest of the G2 code.
* EXAMPLES:
*
* *** Vanilla pin example ***
*
* _MAKE_MOTATE_PIN(4, A, 'A', 27); // SPI0_SCKPinNumber
*
* This assigns Motate pin 4 to Port A, pin 27 (A27)
* Look in motate_pin_assignments.h to see that this is kSPI_SCKPinNumber
*
* ** Other pin functions ***
*
* Please look in <Motate>/platform/atmel_sam/motate_chip_pin_functions.h
*/
#include <MotateTimers.h>
// We don't have all of the inputs, so we have to indicate as much:
#define INPUT1_AVAILABLE 1
#define INPUT2_AVAILABLE 1
#define INPUT3_AVAILABLE 1
#define INPUT4_AVAILABLE 1
#define INPUT5_AVAILABLE 0
#define INPUT6_AVAILABLE 0
#define INPUT7_AVAILABLE 0
#define INPUT8_AVAILABLE 0
#define INPUT9_AVAILABLE 0
#define INPUT10_AVAILABLE 0
#define INPUT11_AVAILABLE 0
#define INPUT12_AVAILABLE 0
#define INPUT13_AVAILABLE 0
#define ADC0_AVAILABLE 0
#define ADC1_AVAILABLE 0
#define ADC2_AVAILABLE 0
#define ADC3_AVAILABLE 0
#define XIO_HAS_USB 1
#define XIO_HAS_UART 1
#define XIO_HAS_SPI 0
#define XIO_HAS_I2C 0
#define TEMPERATURE_OUTPUT_ON 0 // NO ADC yet
// Some pins, if the PWM capability is turned on, it will cause timer conflicts.
// So we have to explicitly enable them as PWM pins.
// Generated with:
// perl -e 'for($i=1;$i<14;$i++) { print "#define OUTPUT${i}_PWM 0\n";}'
#define OUTPUT1_PWM 1 // TC0.0
#define OUTPUT2_PWM 1 // PWM0.0
#define OUTPUT3_PWM 1 // TC0.1
#define OUTPUT4_PWM 1 // PWM1.3
#define OUTPUT5_PWM 0 // unused
#define OUTPUT6_PWM 0 // unused
#define OUTPUT7_PWM 0 // unused
#define OUTPUT8_PWM 0 // unused
#define OUTPUT9_PWM 0 // unused
#define OUTPUT10_PWM 0 // unused
#define OUTPUT11_PWM 0 // unused
#define OUTPUT12_PWM 0 // Unused
#define OUTPUT13_PWM 0 // Unused
namespace Motate {
// Arduino pin name & function
_MAKE_MOTATE_PIN(kOutput2_PinNumber, 'A', 0); // TC0.0 or PWM0
_MAKE_MOTATE_PIN(kOutput3_PinNumber, 'A', 1); // TC0.1 or PWM1
_MAKE_MOTATE_PIN(kSocket2_VrefPinNumber, 'A', 2); // PWM1
_MAKE_MOTATE_PIN(kI2C1_SDAPinNumber, 'A', 3); //
_MAKE_MOTATE_PIN(kI2C1_SCLPinNumber, 'A', 4); //
_MAKE_MOTATE_PIN(kUnassigned1, 'A', 5); //
_MAKE_MOTATE_PIN(kUnassigned2, 'A', 6); // Missing in 100-pin package
_MAKE_MOTATE_PIN(kUnassigned3, 'A', 7); //
_MAKE_MOTATE_PIN(kUnassigned4, 'A', 8); //
_MAKE_MOTATE_PIN(kSerial_RXPinNumber, 'A', 9); //
_MAKE_MOTATE_PIN(kSerial_TXPinNumber, 'A', 10); //
_MAKE_MOTATE_PIN(kSocket1_Microstep_1PinNumber, 'A', 11); //
_MAKE_MOTATE_PIN(kSocket1_EnablePinNumber, 'A', 12); //
_MAKE_MOTATE_PIN(kUnassigned5, 'A', 13); //
_MAKE_MOTATE_PIN(kUnassigned6, 'A', 14); //
_MAKE_MOTATE_PIN(kUnassigned7, 'A', 15); //
_MAKE_MOTATE_PIN(kUnassigned8, 'A', 16); //
_MAKE_MOTATE_PIN(kUnassigned9, 'A', 17); //
_MAKE_MOTATE_PIN(kUnassigned10, 'A', 18); //
_MAKE_MOTATE_PIN(kUnassigned11, 'A', 19); //
_MAKE_MOTATE_PIN(kUnassigned12, 'A', 20); //
_MAKE_MOTATE_PIN(kUnassigned13, 'A', 21); //
_MAKE_MOTATE_PIN(kUnassigned14, 'A', 22); //
_MAKE_MOTATE_PIN(kUnassigned15, 'A', 23); //
_MAKE_MOTATE_PIN(kUnassigned16, 'A', 24); //
_MAKE_MOTATE_PIN(kUnassigned17, 'A', 25); //
_MAKE_MOTATE_PIN(kUnassigned18, 'A', 26); //
_MAKE_MOTATE_PIN(kSocket1_VrefPinNumber, 'A', 27); // TC2.1
_MAKE_MOTATE_PIN(kSerial_CTSPinNumber, 'A', 28); //
_MAKE_MOTATE_PIN(kUnassigned19, 'A', 29); // Missing in 100-pin package
_MAKE_MOTATE_PIN(kServo1_PinNumber, 'A', 30); // PWM2
_MAKE_MOTATE_PIN(kInput4_PinNumber, 'A', 31); //
_MAKE_MOTATE_PIN(kUnassigned20, 'B', 0); //
_MAKE_MOTATE_PIN(kUnassigned21, 'B', 1); //
_MAKE_MOTATE_PIN(kUnassigned22, 'B', 2); //
_MAKE_MOTATE_PIN(kUnassigned23, 'B', 3); //
//_MAKE_MOTATE_PIN( , 'B', 4); // TDI
//_MAKE_MOTATE_PIN( , 'B', 5); // TRACESDO
//_MAKE_MOTATE_PIN( , 'B', 6); // SWDIO
//_MAKE_MOTATE_PIN( , 'B', 7); // SWDCLK
//_MAKE_MOTATE_PIN( , 'B', 8); // XOUT
//_MAKE_MOTATE_PIN( , 'B', 9); // XIN
//_MAKE_MOTATE_PIN( , 'B', 10); // USB_D-
//_MAKE_MOTATE_PIN( , 'B', 11); // USB_D+
//_MAKE_MOTATE_PIN( , 'B', 12); // ERASE
_MAKE_MOTATE_PIN(kUnassigned24, 'B', 13); // LED_1 (Heartbeat) - PWM2
//_MAKE_MOTATE_PIN( , 'D', 0); // USB_VBUS
_MAKE_MOTATE_PIN(kInput1_PinNumber, 'D', 1); //
_MAKE_MOTATE_PIN(kInput2_PinNumber, 'D', 2); //
_MAKE_MOTATE_PIN(kUnassigned25, 'D', 3); //
_MAKE_MOTATE_PIN(kUnassigned26, 'D', 4); //
_MAKE_MOTATE_PIN(kUnassigned27, 'D', 5); //
_MAKE_MOTATE_PIN(kInput3_PinNumber, 'D', 6); //
_MAKE_MOTATE_PIN(kSerial_RTSPinNumber, 'D', 7); //
_MAKE_MOTATE_PIN(kUnassigned28, 'D', 8); // INTERRUPT_OUT
_MAKE_MOTATE_PIN(kUnassigned29, 'D', 9); //
_MAKE_MOTATE_PIN(kUnassigned30, 'D', 10); //
_MAKE_MOTATE_PIN(kLED_RGBWPixelPinNumber, 'D', 11); // PWM0
_MAKE_MOTATE_PIN(kSocket2_DirPinNumber, 'D', 12); //
_MAKE_MOTATE_PIN(kSocket2_EnablePinNumber, 'D', 13); //
_MAKE_MOTATE_PIN(kSocket2_StepPinNumber, 'D', 14); //
_MAKE_MOTATE_PIN(kOutputSAFE_PinNumber, 'D', 15); //
_MAKE_MOTATE_PIN(kSocket2_Microstep_0PinNumber, 'D', 16); //
_MAKE_MOTATE_PIN(kSocket2_Microstep_1PinNumber, 'D', 17); //
_MAKE_MOTATE_PIN(kSocket1_DirPinNumber, 'D', 18); //
_MAKE_MOTATE_PIN(kSocket1_StepPinNumber, 'D', 19); //
_MAKE_MOTATE_PIN(kSocket1_Microstep_0PinNumber, 'D', 20); //
_MAKE_MOTATE_PIN(kSocket1_Microstep_2PinNumber, 'D', 21); //
_MAKE_MOTATE_PIN(kUnassigned31, 'D', 22); //
_MAKE_MOTATE_PIN(kUnassigned32, 'D', 23); // Missing in 100-pin package
_MAKE_MOTATE_PIN(kUnassigned33, 'D', 24); //
_MAKE_MOTATE_PIN(kUnassigned34, 'D', 25); //
_MAKE_MOTATE_PIN(kUnassigned35, 'D', 26); //
_MAKE_MOTATE_PIN(kUnassigned36, 'D', 27); //
_MAKE_MOTATE_PIN(kSocket2_Microstep_2PinNumber, 'D', 28); //
_MAKE_MOTATE_PIN(kUnassigned37, 'D', 29); // Missing in 100-pin package
_MAKE_MOTATE_PIN(kLEDPWM_PinNumber, 'D', 30); //
_MAKE_MOTATE_PIN(kUnassigned38, 'D', 31); //
} // namespace Motate
// We then allow each chip-type to have it's onw function definitions
// that will refer to these pin assignments.
#include "motate_chip_pin_functions.h"
#endif
// GQUADRATIC_B_PINOUT_H
+68 -2
View File
@@ -37,7 +37,37 @@
#include "MotatePower.h"
//Motate::ClockOutputPin<Motate::kExternalClock1_PinNumber> external_clk_pin {16000000}; // 16MHz optimally
Motate::OutputPin<Motate::kExternalClock1_PinNumber> external_clk_pin {Motate::kStartLow};
//Motate::OutputPin<Motate::kExternalClock1_PinNumber> external_clk_pin {Motate::kStartLow};
#include "neopixel.h"
#include "canonical_machine.h"
namespace LEDs {
NeoPixel<Motate::kLED_RGBWPixelPinNumber, 15> rgbw_leds {NeoPixelOrder::GRB};
RGB_Color_t display_color[15] {
{0, 0, 0, 5},
{0, 0, 0, 5},
{0, 0, 0, 5},
{0, 0, 0, 5},
{0, 0, 0, 5},
{0, 0, 0, 5},
{0, 0, 0, 5},
{0, 0, 0, 5},
{0, 0, 0, 5},
{0, 0, 0, 5},
{0, 0, 0, 5},
{0, 0, 0, 5},
{0, 0, 0, 5},
{0, 0, 0, 5},
{0, 0, 0, 5},
};
bool alarm_red = false; // if we are in alarm, the tells us if we're going to red (pulsing)
bool shutdown_white = false; // if we are in shutdown, the tells us if we're going to red (pulsing)
cmMachineState last_see_machine_state;
float old_x_pos = 0.0;
}
/*
* hardware_init() - lowest level hardware init
@@ -46,7 +76,13 @@ Motate::OutputPin<Motate::kExternalClock1_PinNumber> external_clk_pin {Motate::k
void hardware_init()
{
board_hardware_init();
external_clk_pin = 0; // Force external clock to 0 for now.
// external_clk_pin = 0; // Force external clock to 0 for now.
for (uint8_t pixel = 0; pixel < LEDs::rgbw_leds.count; pixel++) {
LEDs::display_color[pixel].startTransition(100, 0, 0, 0);
LEDs::rgbw_leds.setPixel(pixel, LEDs::display_color[pixel]);
}
LEDs::rgbw_leds.update();
}
/*
@@ -55,6 +91,36 @@ void hardware_init()
stat_t hardware_periodic()
{
float x_pos = cm_get_work_position(ACTIVE_MODEL, AXIS_X);
if (fabs(LEDs::old_x_pos - x_pos) > 0.01) {
LEDs::old_x_pos = x_pos;
float led_pos = x_pos * ((float)(LEDs::rgbw_leds.count-1) / 40);
for (uint8_t pixel = 0; pixel < LEDs::rgbw_leds.count; pixel++) {
float value = fabs(led_pos - (float)pixel);
if (value < 1.001) {
value = 1.0 - value;
if (LEDs::display_color[pixel].red < value) {
LEDs::display_color[pixel].startTransition(10, value, value, value);
} else {
LEDs::display_color[pixel].startTransition(500, 0, 0, 0);
}
} else {
// LEDs::display_color[pixel].startTransition(500, 0, 0, 0);
}
// LEDs::display_color[pixel].startTransition(100, std::max(0.0f, std::min(40.0f, (float)(x_pos/40.0) )), 0, 0);
}
}
for (uint8_t pixel = 0; pixel < LEDs::rgbw_leds.count; pixel++) {
if (LEDs::display_color[pixel].update()) {
LEDs::rgbw_leds.setPixel(pixel, LEDs::display_color[pixel]);
}
}
LEDs::rgbw_leds.update();
return STAT_OK;
}
+7 -8
View File
@@ -58,7 +58,7 @@ enum hwPlatform {
#define AXES 6 // number of axes supported in this version
#define HOMING_AXES 4 // number of axes that can be homed (assumes Zxyabc sequence)
#define MOTORS 2 // number of motors on the board
#define MOTORS 3 // number of motors on the board
#define COORDS 6 // number of supported coordinate systems (1-6)
#define PWMS 2 // number of supported PWM channels
@@ -110,8 +110,8 @@ using Motate::OutputPin;
*
* The following interrupts are defined w/indicated priorities
*
* 0 DDA_TIMER (3) for step pulse generation
* 1 DWELL_TIMER (4) for dwell timing
* 0 DDA_TIMER (9) for step pulse generation
* 1 DWELL_TIMER (10) for dwell timing
* 2 LOADER software generated interrupt (STIR / SGI)
* 3 Serial read character interrupt
* 4 EXEC software generated interrupt (STIR / SGI)
@@ -128,11 +128,10 @@ using Motate::OutputPin;
/**** Motate Definitions ****/
// Timer definitions. See stepper.h and other headers for setup
typedef TimerChannel<0, 0> dda_timer_type; // stepper pulse generation in stepper.cpp
typedef TimerChannel<1, 0> dwell_timer_type; // dwell timing in stepper.cpp
typedef ServiceCall<0> load_timer_type; // request load timer in stepper.cpp
typedef ServiceCall<1> exec_timer_type; // request exec timer in stepper.cpp
typedef ServiceCall<2> fwd_plan_timer_type; // request exec timer in stepper.cpp
typedef TimerChannel<9, 0> dda_timer_type; // stepper pulse generation in stepper.cpp
typedef TimerChannel<10, 0> load_timer_type; // request load timer in stepper.cpp
typedef ServiceCall<1> exec_timer_type; // request exec timer in stepper.cpp
typedef ServiceCall<2> fwd_plan_timer_type; // request exec timer in stepper.cpp
// Pin assignments
@@ -30,8 +30,6 @@
#ifndef motate_pin_assignments_h
#define motate_pin_assignments_h
#include <MotateTimers.h>
// Board pinout is pulled in after naming, so we can use the naming there.
namespace Motate {
@@ -40,15 +38,15 @@ namespace Motate {
// Undefined pins will be equivalent to Motate::NullPin, and return 1 for Pin<>::isNull();
pin_number kSerial_RX = 0;
pin_number kSerial_TX = 1;
pin_number kSerial_RTS = 2; // added later
pin_number kSerial_CTS = 3; // added later
pin_number kSerial_RXPinNumber = 0;
pin_number kSerial_TXPinNumber = 1;
pin_number kSerial_RTSPinNumber = 2; // added later
pin_number kSerial_CTSPinNumber = 3; // added later
pin_number kSerial0_RX = 0;
pin_number kSerial0_TX = 1;
pin_number kSerial0_RTS = 2; // added later
pin_number kSerial0_CTS = 3; // added later
pin_number kSerial0_RXPinNumber = 0;
pin_number kSerial0_TXPinNumber = 1;
pin_number kSerial0_RTSPinNumber = 2; // added later
pin_number kSerial0_CTSPinNumber = 3; // added later
pin_number kI2C_SDAPinNumber = 5;
pin_number kI2C_SCLPinNumber = 6;
@@ -159,13 +157,15 @@ pin_number kDebug3_PinNumber = -1; // 116; //e Not the out-of-order numbering &
pin_number kDebug4_PinNumber = -1; // 114;
// END DEBUG PINS
pin_number kLED_USBRXPinNumber = 117;
pin_number kLED_USBTXPinNumber = 118;
pin_number kSD_CardDetectPinNumber = 119;
pin_number kSD_ChipSelectPinNumber = 120;
pin_number kInterlock_InPinNumber = 121;
pin_number kOutputSAFE_PinNumber = 122; // SAFE signal
pin_number kLEDPWM_PinNumber = 123;
pin_number kLED_USBRXPinNumber = 117;
pin_number kLED_USBTXPinNumber = 118;
pin_number kSD_CardDetectPinNumber = 119;
pin_number kSD_ChipSelectPinNumber = 120;
pin_number kInterlock_InPinNumber = 121;
pin_number kOutputSAFE_PinNumber = 122; // SAFE signal
pin_number kLEDPWM_PinNumber = 123;
pin_number kOutputInterrupt_PinNumber = 124; // to-host interrupt signal
pin_number kLED_RGBWPixelPinNumber = 125; // 117;
// GRBL / gShield compatibility pins -- Due board ONLY
@@ -213,8 +213,12 @@ pin_number kADC14_PinNumber = 164; // Not physically pinned out
pin_number kExternalClock1_PinNumber = 170; // External pins for exporting a clock signal (for Trinamics)
pin_number kServo1_PinNumber = 171; //
pin_number kServo2_PinNumber = 172; //
pin_number kServo3_PinNumber = 173; //
// start next sequence at 171
// start next sequence at 174
// blank spots for unassigned pins - all unassigned pins need a unique number (do not re-use numbers)
+1 -1
View File
@@ -4,7 +4,7 @@ target remote | /usr/local/bin/openocd -c "set CHIPNAME ${CHIP}" -f ${MOTATE_PAT
source ./board/g2_default.gdb
define boot_from_flash
monitor at91sam4 gpnvm set 1
monitor atsamv gpnvm set 1
end
source -s arm.gdb
+8 -7
View File
@@ -6,32 +6,33 @@
# make BOARD=gquintic-a
# You can also choose a CONFIG from boards.mk:
# make CONFIG=PrintrbotPlus BOARD=gquintic-a
# make CONFIG=PrintrbotPlus BOARD=gquintic-b
##########
# BOARDs for use directly from the make command line (with default settings) or by CONFIGs.
ifeq ("$(BOARD)","gquintic-a")
ifeq ("$(BOARD)","gquintic-b")
BASE_BOARD=gquintic
DEVICE_DEFINES += MOTATE_BOARD="gquintic-a"
DEVICE_DEFINES += MOTATE_BOARD="gquintic-b"
DEVICE_DEFINES += SETTINGS_FILE=${SETTINGS_FILE}
endif
##########
# The general pboard-a BASE_BOARD.
# The general gquintic BASE_BOARD.
# NOTE: rev a is no longer supported!
ifeq ("$(BASE_BOARD)","gquintic")
_BOARD_FOUND = 1
DEVICE_DEFINES += MOTATE_CONFIG_HAS_USBSERIAL=1
FIRST_LINK_SOURCES += $(sort $(wildcard ${MOTATE_PATH}/Atmel_sam_common/*.cpp)) $(sort $(wildcard ${MOTATE_PATH}/Atmel_sam4e/*.cpp))
FIRST_LINK_SOURCES += $(sort $(wildcard ${MOTATE_PATH}/Atmel_sam_common/*.cpp)) $(sort $(wildcard ${MOTATE_PATH}/Atmel_sams70/*.cpp))
CHIP = SAM4E8C
CHIP = SAMS70N19
export CHIP
CHIP_LOWERCASE = sam4e8c
CHIP_LOWERCASE = sams70n19
BOARD_PATH = ./board/gquintic
SOURCE_DIRS += ${BOARD_PATH} device/trinamic
+2 -2
View File
@@ -31,7 +31,7 @@
#include "hardware.h" // for MOTORS
#include "tmc2130.h"
typedef Motate::SPIBus<Motate::kSPI_MISOPinNumber, Motate::kSPI_MOSIPinNumber, Motate::kSPI_SCKPinNumber> SPIBus_used_t;
typedef Motate::SPIBus<Motate::kSPI_MISOPinNumber, Motate::kSPI_MOSIPinNumber, Motate::kSPI_SCKPinNumber, kSPI_ServiceCallNumber> SPIBus_used_t;
// These are identical to board_stepper.h, except for the word "extern" and the initialization
extern Trinamic2130<SPIBus_used_t::SPIBusDevice,
@@ -64,4 +64,4 @@ extern Stepper* Motors[MOTORS];
void board_stepper_init();
#endif // BOARD_STEPPER_H_ONCE
#endif // BOARD_STEPPER_H_ONCE
+13 -10
View File
@@ -42,20 +42,23 @@ const Motate::USBSettings_t Motate::USBSettings = {
};
/*gProductVersion = */ //0.1,
//Motate::USBDevice< Motate::USBCDC > usb;
Motate::USBDevice< Motate::USBCDC, Motate::USBCDC > usb;
XIOUSBDevice_t usb;
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
#if USB_SERIAL_PORTS_EXPOSED == 2
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#endif
decltype(usb.mixin<0>::Serial) &SerialUSB = usb.mixin<0>::Serial;
decltype(usb.mixin<1>::Serial) &SerialUSB1 = usb.mixin<1>::Serial;
//decltype(usb.mixin<1>::Serial) &SerialUSB1 = usb.mixin<1>::Serial;
// 115200 is the default, as well.
//UART<kSerial_RX, kSerial_TX, kSerial_RTS, kSerial_CTS> Serial {115200, UARTMode::RTSCTSFlowControl};
MOTATE_SET_USB_VENDOR_STRING( {'S' ,'y', 'n', 't', 'h', 'e', 't', 'o', 's'} )
MOTATE_SET_USB_PRODUCT_STRING( {'T', 'i', 'n', 'y', 'G', ' ', 'v', '2'} )
MOTATE_SET_USB_VENDOR_STRING( u"Synthetos" )
MOTATE_SET_USB_PRODUCT_STRING( u"TinyG v2" )
MOTATE_SET_USB_SERIAL_NUMBER_STRING_FROM_CHIPID()
#endif // XIO_HAS_USB
//******** SPI ********
#if XIO_HAS_SPI
Motate::SPI<kSocket4_SPISlaveSelectPinNumber> spi;
@@ -64,14 +67,14 @@ Motate::SPI<kSocket4_SPISlaveSelectPinNumber> spi;
//******** UART ********
#if XIO_HAS_UART
Motate::UART<Motate::kSerial_RX, Motate::kSerial_TX, Motate::kSerial_RTS, Motate::kSerial_CTS> Serial {115200, Motate::UARTMode::RTSCTSFlowControl};
Motate::UART<Motate::kSerial_RXPinNumber, Motate::kSerial_TXPinNumber, Motate::kSerial_RTSPinNumber, Motate::kSerial_CTSPinNumber> Serial {115200, Motate::UARTMode::RTSCTSFlowControl};
#endif
void board_hardware_init(void) // called 1st
{
#if XIO_HAS_USB
// Init USB
usb.attach(); // USB setup. Runs in "background" as the rest of this executes
usb.attach();
#endif // XIO_HAS_USB
}
+13 -3
View File
@@ -29,15 +29,25 @@
#ifndef board_xio_h
#define board_xio_h
#include "settings.h"
//******** USB ********
#if XIO_HAS_USB
#include "MotateUSB.h"
#include "MotateUSBCDC.h"
// extern Motate::USBDevice< Motate::USBCDC > usb;
extern Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> usb;
#if USB_SERIAL_PORTS_EXPOSED == 1
typedef Motate::USBDevice< Motate::USBCDC > XIOUSBDevice_t;
#endif
#if USB_SERIAL_PORTS_EXPOSED == 2
typedef Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> XIOUSBDevice_t;
#endif
extern XIOUSBDevice_t usb;
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
#if USB_SERIAL_PORTS_EXPOSED == 2
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#endif
#endif // XIO_HAS_USB
@@ -50,7 +60,7 @@ extern Motate::SPI<Motate::kSocket4_SPISlaveSelectPinNumber> spi;
//******** UART ********
#if XIO_HAS_UART
#include "MotateUART.h"
extern Motate::UART<Motate::kSerial_RX, Motate::kSerial_TX, Motate::kSerial_RTS, Motate::kSerial_CTS> Serial;
extern Motate::UART<Motate::kSerial_RXPinNumber, Motate::kSerial_TXPinNumber, Motate::kSerial_RTSPinNumber, Motate::kSerial_CTSPinNumber> Serial;
#endif
//******* Generic Functions *******
@@ -89,7 +89,7 @@
#define ADC2_AVAILABLE 0
#define ADC3_AVAILABLE 0
#define XIO_HAS_USB 0
#define XIO_HAS_USB 1
#define XIO_HAS_UART 1
#define XIO_HAS_SPI 0
#define XIO_HAS_I2C 0
@@ -100,60 +100,66 @@
// So we have to explicitly enable them as PWM pins.
// Generated with:
// perl -e 'for($i=1;$i<14;$i++) { print "#define OUTPUT${i}_PWM 0\n";}'
#define OUTPUT1_PWM 1 // PWM1 - Fet 1
#define OUTPUT2_PWM 1 // PWM2 - Fet 2
#define OUTPUT3_PWM 1 // PWM3 - Fan 1
#define OUTPUT4_PWM 0 // PWM2 - Fan 2
#define OUTPUT5_PWM 1 // Timer2ch0 - Fan 3
#define OUTPUT6_PWM 1 // Timer2ch1
#define OUTPUT7_PWM 0 // PWM2
#define OUTPUT8_PWM 1 // PWM0
#define OUTPUT9_PWM 0 // PWM3 or Timer1ch0
#define OUTPUT10_PWM 0 // PWM1
#define OUTPUT11_PWM 0 // Can't PWM - Fet 3
#define OUTPUT1_PWM 1 // TC0,1 - Fet 1
#define OUTPUT2_PWM 1 // PWM1 - Fet 2
#define OUTPUT3_PWM 1 // TC1,0 - Fan 1
#define OUTPUT4_PWM 1 // TC1,1 - Fan 2
#define OUTPUT5_PWM 1 // TC2,0 - Fan 3
#define OUTPUT6_PWM 1 // PWM8+0
#define OUTPUT7_PWM 1 // PWM3
#define OUTPUT8_PWM 1 // PWM2
#define OUTPUT9_PWM 0 // PWM2
#define OUTPUT10_PWM 1 // PWM8+2
#define OUTPUT11_PWM 1 // PWM8+3 - Fet 3
#define OUTPUT12_PWM 0 // Unused
#define OUTPUT13_PWM 0 // Unused
namespace Motate {
// Arduino pin name & function
_MAKE_MOTATE_PIN(kOutput2_PinNumber, 'A', 0); //
// Unused:
//
//
//
//
//
_MAKE_MOTATE_PIN(kLED_RGBWPixelPinNumber, 'A', 0); //
_MAKE_MOTATE_PIN(kOutput1_PinNumber, 'A', 1); //
_MAKE_MOTATE_PIN(kSocket5_EnablePinNumber, 'A', 2); //
_MAKE_MOTATE_PIN(kOutput2_PinNumber, 'A', 2); //
_MAKE_MOTATE_PIN(kI2C1_SDAPinNumber, 'A', 3); //
_MAKE_MOTATE_PIN(kI2C1_SCLPinNumber, 'A', 4); //
_MAKE_MOTATE_PIN(kUnassigned1, 'A', 5); //
_MAKE_MOTATE_PIN(kOutput11_PinNumber, 'A', 5); //
_MAKE_MOTATE_PIN(kExternalClock1_PinNumber, 'A', 6); // CPU_CLK
_MAKE_MOTATE_PIN(kSerial_CTS, 'A', 7); //
_MAKE_MOTATE_PIN(kUnassigned2, 'A', 8); //
_MAKE_MOTATE_PIN(kSerial_RX, 'A', 9); //
_MAKE_MOTATE_PIN(kSerial_TX, 'A', 10); //
_MAKE_MOTATE_PIN(kSocket1_SPISlaveSelectPinNumber, 'A', 11); //
_MAKE_MOTATE_PIN(kSPI0_MISOPinNumber, 'A', 12); //
_MAKE_MOTATE_PIN(kSPI0_MOSIPinNumber, 'A', 13); //
_MAKE_MOTATE_PIN(kSPI0_SCKPinNumber, 'A', 14); //
_MAKE_MOTATE_PIN(kOutput9_PinNumber, 'A', 15); //
_MAKE_MOTATE_PIN(kOutput7_PinNumber, 'A', 16); //
_MAKE_MOTATE_PIN(kOutput7_PinNumber, 'A', 7); //
_MAKE_MOTATE_PIN(kSerial_RTSPinNumber, 'A', 8); //
_MAKE_MOTATE_PIN(kSerial_RXPinNumber, 'A', 9); //
_MAKE_MOTATE_PIN(kSerial_TXPinNumber, 'A', 10); //
_MAKE_MOTATE_PIN(kSocket2_EnablePinNumber, 'A', 11); //
_MAKE_MOTATE_PIN(kOutput6_PinNumber, 'A', 12); //
_MAKE_MOTATE_PIN(kOutput8_PinNumber, 'A', 13); //
_MAKE_MOTATE_PIN(kSocket1_StepPinNumber, 'A', 14); //
_MAKE_MOTATE_PIN(kOutput3_PinNumber, 'A', 15); //
_MAKE_MOTATE_PIN(kOutput4_PinNumber, 'A', 16); //
_MAKE_MOTATE_PIN(kADC3_PinNumber, 'A', 17); //
_MAKE_MOTATE_PIN(kADC2_PinNumber, 'A', 18); //
_MAKE_MOTATE_PIN(kADC1_PinNumber, 'A', 19); //
_MAKE_MOTATE_PIN(kADC0_PinNumber, 'A', 20); //
_MAKE_MOTATE_PIN(kUnassigned3, 'A', 21); //
_MAKE_MOTATE_PIN(kSocket2_SPISlaveSelectPinNumber, 'A', 22); //
_MAKE_MOTATE_PIN(kOutput8_PinNumber, 'A', 23); //
_MAKE_MOTATE_PIN(kOutput10_PinNumber, 'A', 24); //
_MAKE_MOTATE_PIN(kOutput4_PinNumber, 'A', 25); //
_MAKE_MOTATE_PIN(kSerial_CTSPinNumber, 'A', 21); //
_MAKE_MOTATE_PIN(kSocket1_EnablePinNumber, 'A', 22); //
_MAKE_MOTATE_PIN(kOutput10_PinNumber, 'A', 23); //
_MAKE_MOTATE_PIN(kSocket3_EnablePinNumber, 'A', 24); //
_MAKE_MOTATE_PIN(kSocket2_DirPinNumber, 'A', 25); //
_MAKE_MOTATE_PIN(kOutput5_PinNumber, 'A', 26); // On Timer 2!
_MAKE_MOTATE_PIN(kOutput6_PinNumber, 'A', 27); // On Timer 2!
_MAKE_MOTATE_PIN(kUnassigned13, 'A', 28); // DIAG0
_MAKE_MOTATE_PIN(kInput8_PinNumber, 'A', 29); //
_MAKE_MOTATE_PIN(kSocket3_StepPinNumber, 'A', 27); // On Timer 2!
_MAKE_MOTATE_PIN(kUnassigned1, 'A', 28); // DIAG1
_MAKE_MOTATE_PIN(kUnassigned2, 'A', 29); //
_MAKE_MOTATE_PIN(kInput1_PinNumber, 'A', 30); //
_MAKE_MOTATE_PIN(kInput2_PinNumber, 'A', 31); //
_MAKE_MOTATE_PIN(kInput4_PinNumber, 'A', 31); //
_MAKE_MOTATE_PIN(kInput12_PinNumber, 'B', 0); //
_MAKE_MOTATE_PIN(kInput11_PinNumber, 'B', 1); //
_MAKE_MOTATE_PIN(kSocket3_SPISlaveSelectPinNumber, 'B', 2); //
_MAKE_MOTATE_PIN(kSerial_RTS, 'B', 3); //
_MAKE_MOTATE_PIN(kSocket1_SPISlaveSelectPinNumber, 'B', 2); //
_MAKE_MOTATE_PIN(kOutputSAFE_PinNumber, 'B', 3); //
//_MAKE_MOTATE_PIN( , 'B', 4); // TDI
//_MAKE_MOTATE_PIN( , 'B', 5); // TRACESDO
//_MAKE_MOTATE_PIN( , 'B', 6); // SWDIO
@@ -168,35 +174,35 @@ _MAKE_MOTATE_PIN(kSocket4_SPISlaveSelectPinNumber, 'B', 14); // NOT CONNECTED
//_MAKE_MOTATE_PIN( , 'D', 0); // USB_VBUS
_MAKE_MOTATE_PIN(kInput10_PinNumber, 'D', 1); //
_MAKE_MOTATE_PIN(kInput9_PinNumber, 'D', 2); //
_MAKE_MOTATE_PIN(kInput7_PinNumber, 'D', 3); //
_MAKE_MOTATE_PIN(kInput6_PinNumber, 'D', 4); //
_MAKE_MOTATE_PIN(kInput5_PinNumber, 'D', 5); //
_MAKE_MOTATE_PIN(kInput4_PinNumber, 'D', 6); //
_MAKE_MOTATE_PIN(kInput9_PinNumber, 'D', 1); //
_MAKE_MOTATE_PIN(kInput10_PinNumber, 'D', 2); //
_MAKE_MOTATE_PIN(kInput8_PinNumber, 'D', 3); //
_MAKE_MOTATE_PIN(kInput7_PinNumber, 'D', 4); //
_MAKE_MOTATE_PIN(kInput6_PinNumber, 'D', 5); //
_MAKE_MOTATE_PIN(kInput5_PinNumber, 'D', 6); //
_MAKE_MOTATE_PIN(kInput3_PinNumber, 'D', 7); //
_MAKE_MOTATE_PIN(kUnassigned11, 'D', 8); // DIAG1
_MAKE_MOTATE_PIN(kOutputSAFE_PinNumber, 'D', 9); //
_MAKE_MOTATE_PIN(kSocket5_StepPinNumber, 'D', 10); //
_MAKE_MOTATE_PIN(kSocket5_DirPinNumber, 'D', 11); //
_MAKE_MOTATE_PIN(kSocket4_StepPinNumber, 'D', 12); //
_MAKE_MOTATE_PIN(kUnassigned5, 'D', 13); //
_MAKE_MOTATE_PIN(kSocket4_DirPinNumber, 'D', 14); //
_MAKE_MOTATE_PIN(kUnassigned6, 'D', 15); //
_MAKE_MOTATE_PIN(kSocket4_EnablePinNumber, 'D', 16); //
_MAKE_MOTATE_PIN(kSocket3_DirPinNumber, 'D', 17); //
_MAKE_MOTATE_PIN(kUnassigned7, 'D', 18); //
_MAKE_MOTATE_PIN(kSocket3_EnablePinNumber, 'D', 19); //
_MAKE_MOTATE_PIN(kSocket2_StepPinNumber, 'D', 20); //
_MAKE_MOTATE_PIN(kSocket2_DirPinNumber, 'D', 21); //
_MAKE_MOTATE_PIN(kUnassigned8, 'D', 22); //
_MAKE_MOTATE_PIN(kOutput3_PinNumber, 'D', 23); //
_MAKE_MOTATE_PIN(kSocket2_EnablePinNumber, 'D', 24); //
_MAKE_MOTATE_PIN(kSocket1_DirPinNumber, 'D', 25); //
_MAKE_MOTATE_PIN(kSocket1_StepPinNumber, 'D', 26); //
_MAKE_MOTATE_PIN(kSocket1_EnablePinNumber, 'D', 27); //
_MAKE_MOTATE_PIN(kSocket3_StepPinNumber, 'D', 28); //
_MAKE_MOTATE_PIN(kOutput11_PinNumber, 'D', 29); //
_MAKE_MOTATE_PIN(kInput2_PinNumber, 'D', 8); // ]
_MAKE_MOTATE_PIN(kUnassigned3, 'D', 9); // DIAG0
_MAKE_MOTATE_PIN(kUnassigned4, 'D', 10); //
_MAKE_MOTATE_PIN(kSocket5_StepPinNumber, 'D', 11); //
_MAKE_MOTATE_PIN(kSocket3_SPISlaveSelectPinNumber, 'D', 12); //
_MAKE_MOTATE_PIN(kSocket5_DirPinNumber, 'D', 13); //
_MAKE_MOTATE_PIN(kSocket5_EnablePinNumber, 'D', 14); //
_MAKE_MOTATE_PIN(kUnassigned5, 'D', 15); //
_MAKE_MOTATE_PIN(kSocket4_StepPinNumber, 'D', 16); //
_MAKE_MOTATE_PIN(kSocket4_DirPinNumber, 'D', 17); //
_MAKE_MOTATE_PIN(kSocket3_DirPinNumber, 'D', 18); //
_MAKE_MOTATE_PIN(kUnassigned6, 'D', 19); //
_MAKE_MOTATE_PIN(kSPI0_MISOPinNumber, 'D', 20); //
_MAKE_MOTATE_PIN(kSPI0_MOSIPinNumber, 'D', 21); //
_MAKE_MOTATE_PIN(kSPI0_SCKPinNumber, 'D', 22); //
_MAKE_MOTATE_PIN(kUnassigned7, 'D', 23); //
_MAKE_MOTATE_PIN(kSocket2_StepPinNumber, 'D', 24); //
_MAKE_MOTATE_PIN(kSocket2_SPISlaveSelectPinNumber, 'D', 25); //
_MAKE_MOTATE_PIN(kOutput9_PinNumber, 'D', 26); //
_MAKE_MOTATE_PIN(kSocket1_DirPinNumber, 'D', 27); //
_MAKE_MOTATE_PIN(kSocket4_EnablePinNumber, 'D', 28); //
_MAKE_MOTATE_PIN(kUnassigned8, 'D', 29); //
_MAKE_MOTATE_PIN(kUnassigned9, 'D', 30); // INTERRUPT_OUT
_MAKE_MOTATE_PIN(kUnassigned10, 'D', 31); //
+7 -6
View File
@@ -119,18 +119,19 @@ using Motate::OutputPin;
/**** Stepper DDA and dwell timer settings ****/
//#define FREQUENCY_DDA 200000UL // Hz step frequency. Interrupts actually fire at 2x (400 KHz)
#define FREQUENCY_DDA 150000UL // Hz step frequency. Interrupts actually fire at 2x (300 KHz)
#define FREQUENCY_DDA 300000UL // Hz step frequency. Interrupts actually fire at 2x (300 KHz)
#define FREQUENCY_DWELL 1000UL
#define FREQUENCY_SGI 200000UL // 200,000 Hz means software interrupts will fire 5 uSec after being called
/**** Motate Definitions ****/
// Timer definitions. See stepper.h and other headers for setup
typedef TimerChannel<0,0> dda_timer_type; // stepper pulse generation in stepper.cpp
typedef TimerChannel<1,0> dwell_timer_type; // dwell timing in stepper.cpp
typedef ServiceCall<0> load_timer_type; // request load timer in stepper.cpp
typedef ServiceCall<1> exec_timer_type; // request exec timer in stepper.cpp
typedef ServiceCall<2> fwd_plan_timer_type; // request exec timer in stepper.cpp
typedef TimerChannel<9, 0> dda_timer_type; // stepper pulse generation in stepper.cpp
typedef TimerChannel<10, 0> load_timer_type; // request load timer in stepper.cpp
typedef ServiceCall<1> exec_timer_type; // request exec timer in stepper.cpp
typedef ServiceCall<2> fwd_plan_timer_type; // request exec timer in stepper.cpp
Motate::service_call_number kSPI_ServiceCallNumber = 3;
// Pin assignments
+10 -14
View File
@@ -40,15 +40,15 @@ namespace Motate {
// Undefined pins will be equivalent to Motate::NullPin, and return 1 for Pin<>::isNull();
pin_number kSerial_RX = 0;
pin_number kSerial_TX = 1;
pin_number kSerial_RTS = 2; // added later
pin_number kSerial_CTS = 3; // added later
pin_number kSerial_RXPinNumber = 0;
pin_number kSerial_TXPinNumber = 1;
pin_number kSerial_RTSPinNumber = 2; // added later
pin_number kSerial_CTSPinNumber = 3; // added later
pin_number kSerial0_RX = 0;
pin_number kSerial0_TX = 1;
pin_number kSerial0_RTS = 2; // added later
pin_number kSerial0_CTS = 3; // added later
pin_number kSerial0_RXPinNumber = 0;
pin_number kSerial0_TXPinNumber = 1;
pin_number kSerial0_RTSPinNumber = 2; // added later
pin_number kSerial0_CTSPinNumber = 3; // added later
pin_number kI2C_SDAPinNumber = 5;
pin_number kI2C_SCLPinNumber = 6;
@@ -166,6 +166,8 @@ pin_number kSD_ChipSelectPinNumber = 120;
pin_number kInterlock_InPinNumber = 121;
pin_number kOutputSAFE_PinNumber = 122; // SAFE signal
pin_number kLEDPWM_PinNumber = 123;
pin_number kOutputInterrupt_PinNumber = 124; // to-host interrupt signal
pin_number kLED_RGBWPixelPinNumber = 125; // 117;
// GRBL / gShield compatibility pins -- Due board ONLY
@@ -238,12 +240,6 @@ pin_number kUnassigned4 = 251;
pin_number kUnassigned3 = 252;
pin_number kUnassigned2 = 253;
pin_number kUnassigned1 = 254; // 254 is the max.. Do not exceed this number
/** NOTE: When adding pin definitions here, they must be
* added to ALL board pin assignment files, even if
* they are defined as -1.
**/
} // namespace Motate
// For the SAM3X8C boards, we actually use the same NUMBERING, but have different number to pin linkages
+15 -9
View File
@@ -32,6 +32,7 @@
#include "board_xio.h"
//******** USB ********
#if XIO_HAS_USB
const Motate::USBSettings_t Motate::USBSettings = {
/*gVendorID = */ 0x1d50,
/*gProductID = */ 0x606d,
@@ -41,18 +42,21 @@ const Motate::USBSettings_t Motate::USBSettings = {
};
/*gProductVersion = */ //0.1,
//Motate::USBDevice< Motate::USBCDC > usb;
Motate::USBDevice< Motate::USBCDC, Motate::USBCDC > usb;
XIOUSBDevice_t usb;
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
#if USB_SERIAL_PORTS_EXPOSED == 2
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#endif
decltype(usb.mixin<0>::Serial) &SerialUSB = usb.mixin<0>::Serial;
decltype(usb.mixin<1>::Serial) &SerialUSB1 = usb.mixin<1>::Serial;
//decltype(usb.mixin<1>::Serial) &SerialUSB1 = usb.mixin<1>::Serial;
// 115200 is the default, as well.
//UART<kSerial_RXPinNumber, kSerial_TXPinNumber, kSerial_RTSPinNumber, kSerial_CTSPinNumber> Serial {115200, UARTMode::RTSCTSFlowControl};
MOTATE_SET_USB_VENDOR_STRING( {'S' ,'y', 'n', 't', 'h', 'e', 't', 'o', 's'} )
MOTATE_SET_USB_PRODUCT_STRING( {'T', 'i', 'n', 'y', 'G', ' ', 'v', '2'} )
MOTATE_SET_USB_VENDOR_STRING( u"Synthetos" )
MOTATE_SET_USB_PRODUCT_STRING( u"TinyG v2" )
MOTATE_SET_USB_SERIAL_NUMBER_STRING_FROM_CHIPID()
#endif // XIO_HAS_USB
//******** SPI ********
@@ -68,8 +72,10 @@ Motate::UART<Motate::kSerial_RXPinNumber, Motate::kSerial_TXPinNumber, Motate::k
void board_hardware_init(void) // called 1st
{
#if XIO_HAS_USB
// Init USB
usb.attach(); // USB setup. Runs in "background" as the rest of this executes
usb.attach();
#endif // XIO_HAS_USB
}
+15 -4
View File
@@ -29,15 +29,26 @@
#ifndef board_xio_h
#define board_xio_h
#include "settings.h"
//******** USB ********
#if XIO_HAS_USB
#include "MotateUSB.h"
#include "MotateUSBCDC.h"
// extern Motate::USBDevice< Motate::USBCDC > usb;
extern Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> usb;
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#if USB_SERIAL_PORTS_EXPOSED == 1
typedef Motate::USBDevice< Motate::USBCDC > XIOUSBDevice_t;
#endif
#if USB_SERIAL_PORTS_EXPOSED == 2
typedef Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> XIOUSBDevice_t;
#endif
extern XIOUSBDevice_t usb;
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
#if USB_SERIAL_PORTS_EXPOSED == 2
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#endif
#endif // XIO_HAS_USB
//******** SPI ********
#if XIO_HAS_SPI
+1 -2
View File
@@ -126,8 +126,7 @@ using Motate::OutputPin;
// Timer definitions. See stepper.h and other headers for setup
typedef TimerChannel<3,0> dda_timer_type; // stepper pulse generation in stepper.cpp
typedef TimerChannel<4,0> dwell_timer_type; // dwell timing in stepper.cpp
typedef ServiceCall<0> load_timer_type; // request load timer in stepper.cpp
typedef TimerChannel<4,0> load_timer_type; // request load timer in stepper.cpp
typedef ServiceCall<1> exec_timer_type; // request exec timer in stepper.cpp
typedef ServiceCall<2> fwd_plan_timer_type; // request exec timer in stepper.cpp
+21 -18
View File
@@ -32,6 +32,7 @@
#include "board_xio.h"
//******** USB ********
#if XIO_HAS_USB
const Motate::USBSettings_t Motate::USBSettings = {
/*gVendorID = */ 0x1d50,
/*gProductID = */ 0x606d,
@@ -41,20 +42,21 @@ const Motate::USBSettings_t Motate::USBSettings = {
};
/*gProductVersion = */ //0.1,
//Motate::USBDevice< Motate::USBCDC > usb;
Motate::USBDevice< Motate::USBCDC, Motate::USBCDC > usb;
XIOUSBDevice_t usb;
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
#if USB_SERIAL_PORTS_EXPOSED == 2
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#endif
decltype(usb.mixin<0>::Serial) &SerialUSB = usb.mixin<0>::Serial;
decltype(usb.mixin<1>::Serial) &SerialUSB1 = usb.mixin<1>::Serial;
//decltype(usb.mixin<1>::Serial) &SerialUSB1 = usb.mixin<1>::Serial;
// 115200 is the default, as well.
//UART<kSerial_RXPinNumber, kSerial_TXPinNumber, kSerial_RTSPinNumber, kSerial_CTSPinNumber> Serial {115200, UARTMode::RTSCTSFlowControl};
MOTATE_SET_USB_VENDOR_STRING( {'S' ,'y', 'n', 't', 'h', 'e', 't', 'o', 's'} )
MOTATE_SET_USB_PRODUCT_STRING( {'T', 'i', 'n', 'y', 'G', ' ', 'v', '2'} )
MOTATE_SET_USB_VENDOR_STRING( u"Synthetos" )
MOTATE_SET_USB_PRODUCT_STRING( u"TinyG v2" )
MOTATE_SET_USB_SERIAL_NUMBER_STRING_FROM_CHIPID()
#endif // XIO_HAS_USB
//******** SPI ********
@@ -65,25 +67,26 @@ Motate::SPI<kSocket4_SPISlaveSelectPinNumber> spi;
//******** UART ********
#if XIO_HAS_UART
Motate::UART<Motate::kSerial_RXPinNumber, Motate::kSerial_TXPinNumber, Motate::kSerial_RTSPinNumber, Motate::kSerial_CTSPinNumber> Serial{
115200, Motate::UARTMode::RTSCTSFlowControl};
Motate::UART<Motate::kSerial_RXPinNumber, Motate::kSerial_TXPinNumber, Motate::kSerial_RTSPinNumber, Motate::kSerial_CTSPinNumber> Serial {115200, Motate::UARTMode::RTSCTSFlowControl};
#endif
void board_hardware_init(void) // called 1st
void board_hardware_init(void) // called 1st
{
#if XIO_HAS_USB
// Init USB
usb.attach(); // USB setup. Runs in "background" as the rest of this executes
usb.attach();
#endif // XIO_HAS_USB
}
void board_xio_init(void) // called later than board_hardware_init (there are thing in between)
void board_xio_init(void) // called later than board_hardware_init (there are thing in between)
{
// Init SPI
// Init SPI
#if XIO_HAS_SPI
// handled internally for now
// handled internally for now
#endif
// Init UART
// Init UART
#if XIO_HAS_UART
Serial.init();
#endif
+22 -12
View File
@@ -29,28 +29,38 @@
#ifndef board_xio_h
#define board_xio_h
#include "settings.h"
//******** USB ********
#if XIO_HAS_USB
#include "MotateUSB.h"
#include "MotateUSBCDC.h"
// extern Motate::USBDevice< Motate::USBCDC > usb;
extern Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> usb;
#if USB_SERIAL_PORTS_EXPOSED == 1
typedef Motate::USBDevice< Motate::USBCDC > XIOUSBDevice_t;
#endif
#if USB_SERIAL_PORTS_EXPOSED == 2
typedef Motate::USBDevice<Motate::USBCDC, Motate::USBCDC> XIOUSBDevice_t;
#endif
extern XIOUSBDevice_t usb;
extern decltype(usb.mixin<0>::Serial)& SerialUSB;
#if USB_SERIAL_PORTS_EXPOSED == 2
extern decltype(usb.mixin<1>::Serial)& SerialUSB1;
#endif
#endif // XIO_HAS_USB
//******** SPI ********
//#include "MotateSPI.h"
// extern Motate::SPI<Motate::kSocket4_SPISlaveSelectPinNumber> spi;
#if XIO_HAS_SPI
#include "MotateSPI.h"
extern Motate::SPI<Motate::kSocket4_SPISlaveSelectPinNumber> spi;
#endif
//******** UART ********
//#include "MotateUART.h"
// extern Motate::UART<Motate::kSerial_RXPinNumber, Motate::kSerial_TXPinNumber, Motate::kSerial_RTSPinNumber, Motate::kSerial_CTSPinNumber> Serial;
#if XIO_HAS_UART
#include "MotateUART.h"
extern Motate::UART<Motate::kSerial_RXPinNumber, Motate::kSerial_TXPinNumber, Motate::kSerial_RTSPinNumber, Motate::kSerial_CTSPinNumber> Serial;
#endif
//******* Generic Functions *******
void board_hardware_init(void); // called 1st
+1 -2
View File
@@ -126,8 +126,7 @@ using Motate::OutputPin;
// Timer definitions. See stepper.h and other headers for setup
typedef TimerChannel<3,0> dda_timer_type; // stepper pulse generation in stepper.cpp
typedef TimerChannel<4,0> dwell_timer_type; // dwell timing in stepper.cpp
typedef ServiceCall<0> load_timer_type; // request load timer in stepper.cpp
typedef TimerChannel<4,0> load_timer_type; // request load timer in stepper.cpp
typedef ServiceCall<1> exec_timer_type; // request exec timer in stepper.cpp
typedef ServiceCall<2> fwd_plan_timer_type; // request exec timer in stepper.cpp
+20 -3
View File
@@ -72,7 +72,7 @@ endif
ifeq ("$(CONFIG)","TestQuintic")
ifeq ("$(BOARD)","NONE")
BOARD=gquintic-a
BOARD=gquintic-b
endif
SETTINGS_FILE="settings_test.h"
endif
@@ -80,12 +80,11 @@ endif
ifeq ("$(CONFIG)","TestQuadratic")
ifeq ("$(BOARD)","NONE")
BOARD=gquadratic-a
BOARD=gquadratic-b
endif
SETTINGS_FILE="settings_test.h"
endif
##########
# Shopbot configs:
@@ -138,5 +137,23 @@ ifeq ("$(CONFIG)","Ultimakerv9k")
SETTINGS_FILE="settings_ultimaker.h"
endif
##########
# EMSL configs:
ifeq ("$(CONFIG)","WaterColorBotv2")
ifeq ("$(BOARD)","NONE")
BOARD=gquadratic-b
endif
SETTINGS_FILE="settings_watercolorbot_v2.h"
endif
ifeq ("$(CONFIG)","EggBot")
ifeq ("$(BOARD)","NONE")
BOARD=gquadratic-b
endif
SETTINGS_FILE="settings_eggbot.h"
endif
include $(wildcard ./board/$(STAR).mk)
+4 -3
View File
@@ -225,7 +225,7 @@ cmCombinedState cm_get_combined_state()
* ACTIVE_MODEL cm.am // active model pointer is maintained by state management
*/
uint32_t cm_get_linenum(const GCodeState_t *gcode_state) { return gcode_state->linenum;}
uint8_t cm_get_motion_mode(const GCodeState_t *gcode_state) { return gcode_state->motion_mode;}
cmMotionMode cm_get_motion_mode(const GCodeState_t *gcode_state) { return gcode_state->motion_mode;}
uint8_t cm_get_coord_system(const GCodeState_t *gcode_state) { return gcode_state->coord_system;}
uint8_t cm_get_units_mode(const GCodeState_t *gcode_state) { return gcode_state->units_mode;}
uint8_t cm_get_select_plane(const GCodeState_t *gcode_state) { return gcode_state->select_plane;}
@@ -1683,8 +1683,9 @@ void cm_request_queue_flush()
{
if ((cm.hold_state != FEEDHOLD_OFF) && // don't honor request unless you are in a feedhold
(cm.queue_flush_state == FLUSH_OFF)) { // ...and only once
xio_flush_read(); // flush the input buffers - you can do that now
cm.queue_flush_state = FLUSH_REQUESTED; // request planner flush once motion has stopped
// NOTE: we used to flush the input buffers, but this is handled in xio *prior* to queue flush now
}
}
@@ -2311,7 +2312,7 @@ void _cm_recalc_max_junction_accel(const uint8_t axis) {
void cm_set_axis_jerk(const uint8_t axis, const float jerk)
{
cm.a[axis].jerk_max = jerk;
cm.a[axis].recip_jerk = 1/(jerk * JERK_MULTIPLIER);
//cm.a[axis].recip_jerk = 1/(jerk * JERK_MULTIPLIER);
// Must recalculate the max_junction_accel now that the jerk has changed.
_cm_recalc_max_junction_accel(axis);
+30 -5
View File
@@ -320,7 +320,7 @@ typedef enum { // axis modes (ordered: see _cm_get_feed_time())
*/
typedef struct GCodeState { // Gcode model state - used by model, planning and runtime
uint32_t linenum; // Gcode block line number
uint8_t motion_mode; // Group1: G0, G1, G2, G3, G38.2, G80, G81,
cmMotionMode motion_mode; // Group1: G0, G1, G2, G3, G38.2, G80, G81,
// G82, G83 G84, G85, G86, G87, G88, G89
float target[AXES]; // XYZABC where the move should go
@@ -340,6 +340,31 @@ typedef struct GCodeState { // Gcode model state - used by model, pl
cmCoordSystem coord_system; // G54-G59 - select coordinate system 1-9
uint8_t tool; // G // M6 tool change - moves "tool_select" to "tool"
uint8_t tool_select; // G // T value - T sets this value
void reset() {
linenum = 0;
motion_mode = MOTION_MODE_STRAIGHT_TRAVERSE;
for (uint8_t i = 0; i< AXES; i++) {
target[i] = 0.0;
work_offset[i] = 0.0;
}
feed_rate = 0.0;
parameter = 0.0;
feed_rate_mode = INVERSE_TIME_MODE;
select_plane = CANON_PLANE_XY;
units_mode = INCHES;
path_control = PATH_EXACT_PATH;
distance_mode = ABSOLUTE_MODE;
arc_distance_mode = ABSOLUTE_MODE;
absolute_override = ABSOLUTE_OVERRIDE_OFF;
coord_system = ABSOLUTE_COORDS;
tool = 0;
tool_select = 0;
};
} GCodeState_t;
typedef struct GCodeStateExtended { // Gcode dynamic state extensions - used by model and arcs
@@ -372,7 +397,7 @@ typedef struct GCodeStateExtended { // Gcode dynamic state extensions - used
typedef struct GCodeInput { // Gcode model inputs - meaning depends on context
uint8_t next_action; // handles G modal group 1 moves & non-modals
uint8_t motion_mode; // Group1: G0, G1, G2, G3, G38.2, G80, G81, G82
cmMotionMode motion_mode; // Group1: G0, G1, G2, G3, G38.2, G80, G81, G82
// G83, G84, G85, G86, G87, G88, G89
uint8_t program_flow; // used only by the gcode_parser
@@ -472,7 +497,7 @@ typedef struct cmAxis {
float travel_min; // min work envelope for soft limits
float jerk_max; // max jerk (Jm) in mm/min^3 divided by 1 million
float jerk_high; // high speed deceleration jerk (Jh) in mm/min^3 divided by 1 million
float recip_jerk; // stored reciprocal of current jerk value - has the million in it
//float recip_jerk; // stored reciprocal of current jerk value - has the million in it
float max_junction_accel; // high speed deceleration jerk (Jh) in mm/min^3 divided by 1 million
float junction_dev; // aka cornering delta -- DEPRICATED!
float radius; // radius in mm for rotary axis modes
@@ -581,7 +606,7 @@ float cm_get_axis_jerk(const uint8_t axis);
void cm_set_axis_jerk(const uint8_t axis, const float jerk);
uint32_t cm_get_linenum(const GCodeState_t *gcode_state);
uint8_t cm_get_motion_mode(const GCodeState_t *gcode_state);
cmMotionMode cm_get_motion_mode(const GCodeState_t *gcode_state);
uint8_t cm_get_coord_system(const GCodeState_t *gcode_state);
uint8_t cm_get_units_mode(const GCodeState_t *gcode_state);
uint8_t cm_get_select_plane(const GCodeState_t *gcode_state);
@@ -676,7 +701,7 @@ stat_t cm_arc_feed(const float target[], const bool target_f[], // G
const float radius, const bool radius_f, // radius if radius mode
const float P_word, const bool P_word_f, // parameter
const bool modal_g1_f, // modal group flag for motion group
const uint8_t motion_mode); // defined motion mode
const cmMotionMode motion_mode); // defined motion mode
// Spindle Functions (4.3.7)
// see spindle.h for spindle functions - which would go right here
Executable → Regular
+15 -5
View File
@@ -584,7 +584,9 @@ nvObj_t *nv_add_object(const char *token) // add an object to the body usi
nvObj_t *nv = nv_body;
for (uint8_t i=0; i<NV_BODY_LEN; i++) {
if (nv->valuetype != TYPE_EMPTY) {
if ((nv = nv->nx) == NULL) return(NULL); // not supposed to find a NULL; here for safety
if ((nv = nv->nx) == NULL) { // not supposed to find a NULL; here for safety
return(NULL);
}
continue;
}
// load the index from the token or die trying
@@ -600,7 +602,9 @@ nvObj_t *nv_add_integer(const char *token, const uint32_t value)// add an intege
nvObj_t *nv = nv_body;
for (uint8_t i=0; i<NV_BODY_LEN; i++) {
if (nv->valuetype != TYPE_EMPTY) {
if ((nv = nv->nx) == NULL) return(NULL); // not supposed to find a NULL; here for safety
if ((nv = nv->nx) == NULL) { // not supposed to find a NULL; here for safety
return(NULL);
}
continue;
}
strncpy(nv->token, token, TOKEN_LEN);
@@ -616,7 +620,9 @@ nvObj_t *nv_add_data(const char *token, const uint32_t value)// add an integer o
nvObj_t *nv = nv_body;
for (uint8_t i=0; i<NV_BODY_LEN; i++) {
if (nv->valuetype != TYPE_EMPTY) {
if ((nv = nv->nx) == NULL) return(NULL); // not supposed to find a NULL; here for safety
if ((nv = nv->nx) == NULL) { // not supposed to find a NULL; here for safety
return(NULL);
}
continue;
}
strcpy(nv->token, token);
@@ -633,7 +639,9 @@ nvObj_t *nv_add_float(const char *token, const float value) // add a float ob
nvObj_t *nv = nv_body;
for (uint8_t i=0; i<NV_BODY_LEN; i++) {
if (nv->valuetype != TYPE_EMPTY) {
if ((nv = nv->nx) == NULL) return(NULL); // not supposed to find a NULL; here for safety
if ((nv = nv->nx) == NULL) { // not supposed to find a NULL; here for safety
return(NULL);
}
continue;
}
strncpy(nv->token, token, TOKEN_LEN);
@@ -649,7 +657,9 @@ nvObj_t *nv_add_string(const char *token, const char *string) // add a string ob
nvObj_t *nv = nv_body;
for (uint8_t i=0; i<NV_BODY_LEN; i++) {
if (nv->valuetype != TYPE_EMPTY) {
if ((nv = nv->nx) == NULL) return(NULL); // not supposed to find a NULL; here for safety
if ((nv = nv->nx) == NULL) { // not supposed to find a NULL; here for safety
return(NULL);
}
continue;
}
strncpy(nv->token, token, TOKEN_LEN);
+46 -25
View File
@@ -215,6 +215,12 @@ struct RGB_Color_t : NeopixelColorTag {
float green;
float blue;
enum ColorFilter {
Set = 0,
Lighten,
Darken
};
const uint32_t _update_timeout_ms;
Motate::Timeout _update_timeout;
@@ -233,7 +239,18 @@ struct RGB_Color_t : NeopixelColorTag {
_update_timeout.set(0);
};
void startTransition(uint32_t milliseconds, float to_red, float to_green, float to_blue) {
void startTransition(uint32_t milliseconds, float to_red, float to_green, float to_blue, ColorFilter cf = Set) {
if (cf == Lighten) {
to_red = std::max(to_red, red);
to_green = std::max(to_green, green);
to_blue = std::max(to_blue, blue);
}
else if (cf == Darken) {
to_red = std::min(to_red, red);
to_green = std::min(to_green, green);
to_blue = std::min(to_blue, blue);
}
_transition_steps_left = 0.5 + (milliseconds / _update_timeout_ms);
float h = 1.0 / _transition_steps_left;
float h_2 = h * h;
@@ -418,6 +435,10 @@ struct NeoPixel {
};
void setPixel(uint8_t pixel, uint8_t red, uint8_t green, uint8_t blue, int16_t white = -1) {
uint8_t data_width = 32;
if (!_has_white) {
data_width = 24;
}
if (_has_white && (white == -1)) {
// Adjust all of the RGB to accomodate white
white = std::min(red, std::min(green, blue));
@@ -425,32 +446,32 @@ struct NeoPixel {
// green -= white;
// blue -= white;
}
_period_buffer[0 + 1 + _red_offset + (pixel * 32)] = (red & 0b10000000) ? led_ON : led_OFF;
_period_buffer[1 + 1 + _red_offset + (pixel * 32)] = (red & 0b01000000) ? led_ON : led_OFF;
_period_buffer[2 + 1 + _red_offset + (pixel * 32)] = (red & 0b00100000) ? led_ON : led_OFF;
_period_buffer[3 + 1 + _red_offset + (pixel * 32)] = (red & 0b00010000) ? led_ON : led_OFF;
_period_buffer[4 + 1 + _red_offset + (pixel * 32)] = (red & 0b00001000) ? led_ON : led_OFF;
_period_buffer[5 + 1 + _red_offset + (pixel * 32)] = (red & 0b00000100) ? led_ON : led_OFF;
_period_buffer[6 + 1 + _red_offset + (pixel * 32)] = (red & 0b00000010) ? led_ON : led_OFF;
_period_buffer[7 + 1 + _red_offset + (pixel * 32)] = (red & 0b00000001) ? led_ON : led_OFF;
_period_buffer[0 + 1 + _red_offset + (pixel * data_width)] = (red & 0b10000000) ? led_ON : led_OFF;
_period_buffer[1 + 1 + _red_offset + (pixel * data_width)] = (red & 0b01000000) ? led_ON : led_OFF;
_period_buffer[2 + 1 + _red_offset + (pixel * data_width)] = (red & 0b00100000) ? led_ON : led_OFF;
_period_buffer[3 + 1 + _red_offset + (pixel * data_width)] = (red & 0b00010000) ? led_ON : led_OFF;
_period_buffer[4 + 1 + _red_offset + (pixel * data_width)] = (red & 0b00001000) ? led_ON : led_OFF;
_period_buffer[5 + 1 + _red_offset + (pixel * data_width)] = (red & 0b00000100) ? led_ON : led_OFF;
_period_buffer[6 + 1 + _red_offset + (pixel * data_width)] = (red & 0b00000010) ? led_ON : led_OFF;
_period_buffer[7 + 1 + _red_offset + (pixel * data_width)] = (red & 0b00000001) ? led_ON : led_OFF;
_period_buffer[0 + 1 + _green_offset + (pixel * 32)] = (green & 0b10000000) ? led_ON : led_OFF;
_period_buffer[1 + 1 + _green_offset + (pixel * 32)] = (green & 0b01000000) ? led_ON : led_OFF;
_period_buffer[2 + 1 + _green_offset + (pixel * 32)] = (green & 0b00100000) ? led_ON : led_OFF;
_period_buffer[3 + 1 + _green_offset + (pixel * 32)] = (green & 0b00010000) ? led_ON : led_OFF;
_period_buffer[4 + 1 + _green_offset + (pixel * 32)] = (green & 0b00001000) ? led_ON : led_OFF;
_period_buffer[5 + 1 + _green_offset + (pixel * 32)] = (green & 0b00000100) ? led_ON : led_OFF;
_period_buffer[6 + 1 + _green_offset + (pixel * 32)] = (green & 0b00000010) ? led_ON : led_OFF;
_period_buffer[7 + 1 + _green_offset + (pixel * 32)] = (green & 0b00000001) ? led_ON : led_OFF;
_period_buffer[0 + 1 + _green_offset + (pixel * data_width)] = (green & 0b10000000) ? led_ON : led_OFF;
_period_buffer[1 + 1 + _green_offset + (pixel * data_width)] = (green & 0b01000000) ? led_ON : led_OFF;
_period_buffer[2 + 1 + _green_offset + (pixel * data_width)] = (green & 0b00100000) ? led_ON : led_OFF;
_period_buffer[3 + 1 + _green_offset + (pixel * data_width)] = (green & 0b00010000) ? led_ON : led_OFF;
_period_buffer[4 + 1 + _green_offset + (pixel * data_width)] = (green & 0b00001000) ? led_ON : led_OFF;
_period_buffer[5 + 1 + _green_offset + (pixel * data_width)] = (green & 0b00000100) ? led_ON : led_OFF;
_period_buffer[6 + 1 + _green_offset + (pixel * data_width)] = (green & 0b00000010) ? led_ON : led_OFF;
_period_buffer[7 + 1 + _green_offset + (pixel * data_width)] = (green & 0b00000001) ? led_ON : led_OFF;
_period_buffer[0 + 1 + _blue_offset + (pixel * 32)] = (blue & 0b10000000) ? led_ON : led_OFF;
_period_buffer[1 + 1 + _blue_offset + (pixel * 32)] = (blue & 0b01000000) ? led_ON : led_OFF;
_period_buffer[2 + 1 + _blue_offset + (pixel * 32)] = (blue & 0b00100000) ? led_ON : led_OFF;
_period_buffer[3 + 1 + _blue_offset + (pixel * 32)] = (blue & 0b00010000) ? led_ON : led_OFF;
_period_buffer[4 + 1 + _blue_offset + (pixel * 32)] = (blue & 0b00001000) ? led_ON : led_OFF;
_period_buffer[5 + 1 + _blue_offset + (pixel * 32)] = (blue & 0b00000100) ? led_ON : led_OFF;
_period_buffer[6 + 1 + _blue_offset + (pixel * 32)] = (blue & 0b00000010) ? led_ON : led_OFF;
_period_buffer[7 + 1 + _blue_offset + (pixel * 32)] = (blue & 0b00000001) ? led_ON : led_OFF;
_period_buffer[0 + 1 + _blue_offset + (pixel * data_width)] = (blue & 0b10000000) ? led_ON : led_OFF;
_period_buffer[1 + 1 + _blue_offset + (pixel * data_width)] = (blue & 0b01000000) ? led_ON : led_OFF;
_period_buffer[2 + 1 + _blue_offset + (pixel * data_width)] = (blue & 0b00100000) ? led_ON : led_OFF;
_period_buffer[3 + 1 + _blue_offset + (pixel * data_width)] = (blue & 0b00010000) ? led_ON : led_OFF;
_period_buffer[4 + 1 + _blue_offset + (pixel * data_width)] = (blue & 0b00001000) ? led_ON : led_OFF;
_period_buffer[5 + 1 + _blue_offset + (pixel * data_width)] = (blue & 0b00000100) ? led_ON : led_OFF;
_period_buffer[6 + 1 + _blue_offset + (pixel * data_width)] = (blue & 0b00000010) ? led_ON : led_OFF;
_period_buffer[7 + 1 + _blue_offset + (pixel * data_width)] = (blue & 0b00000001) ? led_ON : led_OFF;
if (_has_white) {
_period_buffer[0 + 1 + _white_offset + (pixel * 32)] = (white & 0b10000000) ? led_ON : led_OFF;
@@ -49,7 +49,7 @@ template <pin_number step_num, // Setup a stepper template to hold our pins
pin_number ms1_num,
pin_number ms2_num,
pin_number vref_num>
struct StepDirStepper : Stepper {
struct StepDirStepper final : Stepper {
/* stepper pin assignments */
OutputPin<step_num> _step;
@@ -0,0 +1,153 @@
/*
* step_dir_hobbyservo.cpp - control over a hobby servo (PWM-driven) using steper Step/Direction/Enable from software
* This file is part of G2 project
*
* Copyright (c) 2016 Alden S. Hart, Jr.
* Copyright (c) 2016 Robert Giseburt
*
* This file ("the software") is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2 as published by the
* Free Software Foundation. You should have received a copy of the GNU General Public
* License, version 2 along with the software. If not, see <http://www.gnu.org/licenses/>.
*
* As a special exception, you may use this file as part of a software library without
* restriction. Specifically, if other files instantiate templates or use macros or
* inline functions from this file, or you compile this file and link it with other
* files to produce an executable, this file does not by itself cause the resulting
* executable to be covered by the GNU General Public License. This exception does not
* however invalidate any other reasons why the executable file might be covered by the
* GNU General Public License.
*
* THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY
* WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
* SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef STEPP_DIR_HOBBYSERVO_H_ONCE
#define STEPP_DIR_HOBBYSERVO_H_ONCE
#include "MotatePins.h"
#include "MotateTimers.h"
#include "stepper.h"
using Motate::pin_number;
using Motate::OutputPin;
using Motate::PWMOutputPin;
using Motate::kStartHigh;
using Motate::kNormal;
using Motate::Timeout;
// Motor structures
template <pin_number pwm_pin_num> // Setup a stepper template to hold our pins
struct StepDirHobbyServo final : Stepper {
/* stepper pin assignments */
int16_t _microsteps_per_step = 1;
bool _step_is_forward = false;
int32_t _position = 0; // in steps from 0 - 6400 for a full "rotation"
int32_t _position_computed = 0; // in steps from 0 - 6400 for a full "rotation"
float _min_value;
float _max_value;
float _value_range;
bool _enabled = false;
PWMOutputPin<pwm_pin_num> _pwm_pin;
Motate::Timeout check_timer;
// sets default pwm freq for all motor vrefs (commented line below also sets HiZ)
StepDirHobbyServo(const uint32_t frequency = 50) : Stepper{}, _pwm_pin{kNormal, frequency} {
_pwm_pin.setFrequency(frequency); // redundant due to a bug
uint16_t _top_value = _pwm_pin.getTopValue();
float frequency_inv = 1.0/(float)frequency;
_min_value = (float)_top_value / ((frequency_inv)/(750.0/1000000.0));
_max_value = (float)_top_value / ((frequency_inv)/(2000.0/1000000.0));
_value_range = _max_value - _min_value;
_position_computed = _min_value;
check_timer.set(1);
};
/* Optional override of init */
/* Functions that must be implemented in subclasses */
bool canStep() override { return true; };
void setMicrosteps(const uint8_t microsteps) override {
switch (microsteps) {
case (1): {
_microsteps_per_step = 32;
break;
}
case (2): {
_microsteps_per_step = 16;
break;
}
case (4): {
_microsteps_per_step = 8;
break;
}
case (8): {
_microsteps_per_step = 4;
break;
}
case (16): {
_microsteps_per_step = 2;
break;
}
case (32): {
_microsteps_per_step = 1;
break;
}
}
};
void _enableImpl() override {
_enabled = true;
_pwm_pin.setExactDutyCycle(_position_computed, true);
};
void _disableImpl() override {
_enabled = false;
_pwm_pin.setExactDutyCycle(0, true);
};
void stepStart() override {
if (!_enabled) return;
if (_step_is_forward) {
_position += _microsteps_per_step;
} else {
_position -= _microsteps_per_step;
}
if (!check_timer.isPast()) { return; }
check_timer.set(10);
float used_position = _position;
if (used_position > 6400.0) {
used_position = 6400.0;
}
if (used_position < 0.0) {
used_position = 0.0;
}
_position_computed = _min_value + ((used_position/6400.0) * _value_range);
_pwm_pin.setExactDutyCycle(_position_computed, true); // apply the change
};
void stepEnd() override {
};
void setDirection(uint8_t new_direction) override {
_step_is_forward = new_direction;
};
void setPowerLevel(float new_pl) override {
; // ignore this
};
};
#endif // STEPP_DIR_HOBBYSERVO_H_ONCE
+4 -3
View File
@@ -46,7 +46,7 @@ template <typename device_t,
pin_number step_num,
pin_number dir_num,
pin_number enable_num>
struct Trinamic2130 : Stepper {
struct Trinamic2130 final : Stepper {
// Pins that are directly managed
OutputPin<step_num> _step;
OutputPin<dir_num> _dir;
@@ -501,7 +501,8 @@ struct Trinamic2130 : Stepper {
}
out_buffer.addr = (uint8_t) next_reg;
_device.queueMessage(_message.setup((uint8_t *)&out_buffer, (uint8_t *)&in_buffer, 5, SPIMessage::DeassertAfter, SPIMessage::KeepTransaction));
_message.setup((uint8_t *)&out_buffer, (uint8_t *)&in_buffer, 5, SPIMessage::DeassertAfter, SPIMessage::KeepTransaction);
_device.queueMessage(&_message);
};
void _doneReadingCallback()
@@ -538,7 +539,7 @@ struct Trinamic2130 : Stepper {
_reading_only = false;
_transmitting = false;
_startNextReadWrite();
//_startNextReadWrite();
};
void init() override
Executable → Regular
View File
+68 -2
View File
@@ -1454,6 +1454,72 @@
<ExternalMakeFilePath>Makefile</ExternalMakeFilePath>
<OutputPath>bin\PrintrbotSimple1608-printrboardG2v3\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'TestQuadratic' ">
<ToolchainSettings>
<ArmGccCpp xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<armgcc.common.outputfiles.hex>True</armgcc.common.outputfiles.hex>
<armgcc.common.outputfiles.lss>True</armgcc.common.outputfiles.lss>
<armgcc.common.outputfiles.eep>True</armgcc.common.outputfiles.eep>
<armgcc.common.outputfiles.bin>True</armgcc.common.outputfiles.bin>
<armgcc.common.outputfiles.srec>True</armgcc.common.outputfiles.srec>
<armgcc.compiler.directories.IncludePaths>
<ListValues>
<Value>C:\Program Files\Atmel\Atmel Studio 6.0\extensions\Atmel\ARMGCC\3.3.1.128\ARMSupportFiles</Value>
<Value>C:\Program Files\Atmel\Atmel Studio 6.0\extensions\Atmel\ARMGCC\3.3.1.128\ARMSupportFiles\CMSIS\Include</Value>
<Value>C:\Program Files\Atmel\Atmel Studio 6.0\extensions\Atmel\ARMGCC\3.3.1.128\ARMSupportFiles\Device\ATMEL</Value>
<Value>C:\Program Files\Atmel\Atmel Studio 6.0\extensions\Atmel\ARMGCC\3.3.1.128\ARMSupportFiles\Device\ATMEL\sam3xa\include</Value>
<Value>C:\Program Files\Atmel\Atmel Toolchain\ARM GCC\Native\4.7.2.87\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel</Value>
<Value>C:\Program Files\Atmel\Atmel Toolchain\ARM GCC\Native\4.7.2.87\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel\CMSIS\Include</Value>
<Value>C:\Program Files\Atmel\Atmel Toolchain\ARM GCC\Native\4.7.2.87\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel\Device\ATMEL</Value>
<Value>C:\Program Files\Atmel\Atmel Toolchain\ARM GCC\Native\4.7.2.87\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel\Device\ATMEL\sam3xa\include</Value>
</ListValues>
</armgcc.compiler.directories.IncludePaths>
<armgcc.compiler.optimization.level>Optimize (-O1)</armgcc.compiler.optimization.level>
<armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>True</armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>
<armgcc.compiler.optimization.DebugLevel>Maximum (-g3)</armgcc.compiler.optimization.DebugLevel>
<armgcc.compiler.warnings.AllWarnings>True</armgcc.compiler.warnings.AllWarnings>
<armgcccpp.compiler.directories.IncludePaths>
<ListValues>
<Value>C:\Program Files\Atmel\Atmel Studio 6.0\extensions\Atmel\ARMGCC\3.3.1.128\ARMSupportFiles</Value>
<Value>C:\Program Files\Atmel\Atmel Studio 6.0\extensions\Atmel\ARMGCC\3.3.1.128\ARMSupportFiles\CMSIS\Include</Value>
<Value>C:\Program Files\Atmel\Atmel Studio 6.0\extensions\Atmel\ARMGCC\3.3.1.128\ARMSupportFiles\Device\ATMEL</Value>
<Value>C:\Program Files\Atmel\Atmel Studio 6.0\extensions\Atmel\ARMGCC\3.3.1.128\ARMSupportFiles\Device\ATMEL\sam3xa\include</Value>
<Value>C:\Program Files\Atmel\Atmel Toolchain\ARM GCC\Native\4.7.2.87\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel</Value>
<Value>C:\Program Files\Atmel\Atmel Toolchain\ARM GCC\Native\4.7.2.87\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel\CMSIS\Include</Value>
<Value>C:\Program Files\Atmel\Atmel Toolchain\ARM GCC\Native\4.7.2.87\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel\Device\ATMEL</Value>
<Value>C:\Program Files\Atmel\Atmel Toolchain\ARM GCC\Native\4.7.2.87\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel\Device\ATMEL\sam3xa\include</Value>
</ListValues>
</armgcccpp.compiler.directories.IncludePaths>
<armgcccpp.compiler.optimization.level>Optimize (-O1)</armgcccpp.compiler.optimization.level>
<armgcccpp.compiler.optimization.PrepareFunctionsForGarbageCollection>True</armgcccpp.compiler.optimization.PrepareFunctionsForGarbageCollection>
<armgcccpp.compiler.optimization.DebugLevel>Maximum (-g3)</armgcccpp.compiler.optimization.DebugLevel>
<armgcccpp.compiler.warnings.AllWarnings>True</armgcccpp.compiler.warnings.AllWarnings>
<armgcccpp.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
</ListValues>
</armgcccpp.linker.libraries.Libraries>
<armgcccpp.linker.optimization.GarbageCollectUnusedSections>True</armgcccpp.linker.optimization.GarbageCollectUnusedSections>
<armgcccpp.linker.miscellaneous.LinkerFlags>-Tsam3x8c_flash.ld</armgcccpp.linker.miscellaneous.LinkerFlags>
<armgcccpp.assembler.debugging.DebugLevel>Default (-g)</armgcccpp.assembler.debugging.DebugLevel>
<armgcccpp.preprocessingassembler.general.IncludePaths>
<ListValues>
<Value>C:\Program Files\Atmel\Atmel Toolchain\ARM GCC\Native\4.7.2.87\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel</Value>
<Value>C:\Program Files\Atmel\Atmel Toolchain\ARM GCC\Native\4.7.2.87\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel\CMSIS\Include</Value>
<Value>C:\Program Files\Atmel\Atmel Toolchain\ARM GCC\Native\4.7.2.87\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel\Device\ATMEL</Value>
<Value>C:\Program Files\Atmel\Atmel Toolchain\ARM GCC\Native\4.7.2.87\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel\Device\ATMEL\sam3xa\include</Value>
</ListValues>
</armgcccpp.preprocessingassembler.general.IncludePaths>
<armgcccpp.preprocessingassembler.debugging.DebugLevel>Default (-Wa,-g)</armgcccpp.preprocessingassembler.debugging.DebugLevel>
</ArmGccCpp>
</ToolchainSettings>
<UsesExternalMakeFile>True</UsesExternalMakeFile>
<OutputDirectory />
<BuildTarget>CONFIG=TestQuadratic COLOR=0 VERBOSE=1 DEBUG=1</BuildTarget>
<CleanTarget>clean CONFIG=TestQuintic</CleanTarget>
<ExternalMakeFilePath>Makefile</ExternalMakeFilePath>
<OutputPath>bin\TestQuadratic\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="board\Archim\Archim-pinout.h">
<SubType>compile</SubType>
@@ -1542,7 +1608,7 @@
<Compile Include="board\gquadratic\board_xio.h">
<SubType>compile</SubType>
</Compile>
<Compile Include="board\gquadratic\gquadratic-a-pinout.h">
<Compile Include="board\gquadratic\gquadratic-b-pinout.h">
<SubType>compile</SubType>
</Compile>
<Compile Include="board\gquadratic\hardware.cpp">
@@ -1566,7 +1632,7 @@
<Compile Include="board\gquintic\board_xio.h">
<SubType>compile</SubType>
</Compile>
<Compile Include="board\gquintic\gquintic-a-pinout.h">
<Compile Include="board\gquintic\gquintic-b-pinout.h">
<SubType>compile</SubType>
</Compile>
<Compile Include="board\gquintic\hardware.cpp">
+85 -1
View File
@@ -58,6 +58,8 @@
D44E72C21D663B0F00ECD5DD /* coolant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = coolant.h; sourceTree = "<group>"; };
D4522DC91C45F41D0086AAE6 /* g2core_info.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = g2core_info.h; sourceTree = "<group>"; };
D457117B17053EFA00EA19A8 /* Makefile */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile; sourceTree = "<group>"; usesTabs = 1; xcLanguageSpecificationIdentifier = xcode.lang.sh; };
D4782AB21D9B5F9400B32136 /* settings_watercolorbot_v2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = settings_watercolorbot_v2.h; sourceTree = "<group>"; };
D4782AB41D9E2FF300B32136 /* settings_eggbot.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = settings_eggbot.h; sourceTree = "<group>"; };
D47B744C1D4925B4004FAB53 /* device */ = {isa = PBXFileReference; lastKnownFileType = folder; path = device; sourceTree = "<group>"; };
D48F5A40172CB1F900D0E055 /* canonical_machine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = canonical_machine.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
D48F5A41172CB1F900D0E055 /* config_app.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = config_app.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
@@ -146,6 +148,8 @@
isa = PBXGroup;
children = (
D4AC39081C77C1F20098D685 /* settings_default.h */,
D4782AB41D9E2FF300B32136 /* settings_eggbot.h */,
D4782AB21D9B5F9400B32136 /* settings_watercolorbot_v2.h */,
D4AC39091C77C1F20098D685 /* settings_makeblock.h */,
D4AC390A1C77C1F20098D685 /* settings_othermill_test.h */,
D4AC390B1C77C1F20098D685 /* settings_othermill.h */,
@@ -291,6 +295,34 @@
passBuildSettingsInEnvironment = 1;
productName = g3_due;
};
D4782AAE1D9B16BE00B32136 /* G2 Probotix */ = {
isa = PBXLegacyTarget;
buildArgumentsString = "$(ACTION) VERBOSE=1 COLOR=0 CONFIG=ProbotixV90 DEBUG=1";
buildConfigurationList = D4782AAF1D9B16BE00B32136 /* Build configuration list for PBXLegacyTarget "G2 Probotix" */;
buildPhases = (
);
buildToolPath = /usr/bin/make;
buildWorkingDirectory = .;
dependencies = (
);
name = "G2 Probotix";
passBuildSettingsInEnvironment = 1;
productName = g3_due;
};
D4782AB61D9E39EC00B32136 /* G2 EggBot */ = {
isa = PBXLegacyTarget;
buildArgumentsString = "$(ACTION) VERBOSE=1 COLOR=0 CONFIG=EggBot DEBUG=1";
buildConfigurationList = D4782AB71D9E39EC00B32136 /* Build configuration list for PBXLegacyTarget "G2 EggBot" */;
buildPhases = (
);
buildToolPath = /usr/bin/make;
buildWorkingDirectory = .;
dependencies = (
);
name = "G2 EggBot";
passBuildSettingsInEnvironment = 1;
productName = g3_due;
};
D4AC391A1C7BAB8E0098D685 /* G2 sbv300 */ = {
isa = PBXLegacyTarget;
buildArgumentsString = "$(ACTION) VERBOSE=1 COLOR=0 CONFIG=sbv300 DEBUG=2";
@@ -349,7 +381,7 @@
};
D4F226F31D088A48008ED57C /* G2 gQuintic PrintrbotPlus */ = {
isa = PBXLegacyTarget;
buildArgumentsString = "$(ACTION) VERBOSE=1 COLOR=0 CONFIG=PrintrbotPlus BOARD=gquintic-a DEBUG=2";
buildArgumentsString = "$(ACTION) VERBOSE=1 COLOR=0 CONFIG=PrintrbotPlus BOARD=gquintic-b DEBUG=2";
buildConfigurationList = D4F226F41D088A48008ED57C /* Build configuration list for PBXLegacyTarget "G2 gQuintic PrintrbotPlus" */;
buildPhases = (
);
@@ -411,7 +443,9 @@
D4AC391A1C7BAB8E0098D685 /* G2 sbv300 */,
D4F226F31D088A48008ED57C /* G2 gQuintic PrintrbotPlus */,
D43FF7141D537A5C00FB5B53 /* G2 gQuadratic Test */,
D4782AAE1D9B16BE00B32136 /* G2 Probotix */,
D457112317053BFB00EA19A8 /* index */,
D4782AB61D9E39EC00B32136 /* G2 EggBot */,
);
};
/* End PBXProject section */
@@ -653,6 +687,38 @@
};
name = Release;
};
D4782AB01D9B16BE00B32136 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
PATH = "$PATH:/usr/local/gcc-arm-none-eabi/bin";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
D4782AB11D9B16BE00B32136 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
PATH = "$PATH:/usr/local/gcc-arm-none-eabi/bin";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
D4782AB81D9E39EC00B32136 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
PATH = "$PATH:/usr/local/gcc-arm-none-eabi/bin";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
D4782AB91D9E39EC00B32136 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
PATH = "$PATH:/usr/local/gcc-arm-none-eabi/bin";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
D4AC391C1C7BAB8E0098D685 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -790,6 +856,24 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D4782AAF1D9B16BE00B32136 /* Build configuration list for PBXLegacyTarget "G2 Probotix" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D4782AB01D9B16BE00B32136 /* Debug */,
D4782AB11D9B16BE00B32136 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D4782AB71D9E39EC00B32136 /* Build configuration list for PBXLegacyTarget "G2 EggBot" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D4782AB81D9E39EC00B32136 /* Debug */,
D4782AB91D9E39EC00B32136 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D4AC391B1C7BAB8E0098D685 /* Build configuration list for PBXLegacyTarget "G2 sbv300" */ = {
isa = XCConfigurationList;
buildConfigurations = (

Some files were not shown because too many files have changed in this diff Show More