From da34c0c82a0b3152287752174b37f8831f7e1f3b Mon Sep 17 00:00:00 2001 From: Riley Porter Date: Wed, 9 Sep 2020 18:45:43 -0400 Subject: [PATCH 1/2] Added change message to Makefile for compiling on a Raspberry Pi --- g2core/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/g2core/Makefile b/g2core/Makefile index c2b2558b..83a5eb3c 100644 --- a/g2core/Makefile +++ b/g2core/Makefile @@ -65,6 +65,7 @@ endif # DEVICE_DEFINES += DEBUG=1 IN_DEBUGGER=1 DEBUG_SEMIHOSTING=1 #endif +#Switch this to 9m if you are compiling the g2core binary on a Raspberry Pi TOOLS_VERSION = 7u2 # TOOLS_VERSION = 9m From 441003f36ed4fc13a7ddefb61c0db4fecc67a463 Mon Sep 17 00:00:00 2001 From: Riley Porter Date: Fri, 11 Sep 2020 13:20:32 -0400 Subject: [PATCH 2/2] slight change that allows for compiling on arm7 arch (raspi) --- g2core/cycle_homing.cpp | 2 +- g2core/cycle_probing.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/g2core/cycle_homing.cpp b/g2core/cycle_homing.cpp index 519afcb5..2873aa48 100644 --- a/g2core/cycle_homing.cpp +++ b/g2core/cycle_homing.cpp @@ -100,7 +100,7 @@ static stat_t _set_homing_func(stat_t (*func)(int8_t axis)) { * Will be registered only during homing mode - see gpio.h for more info */ gpioDigitalInputHandler _homing_handler { - [&](const bool state, const inputEdgeFlag edge, const uint8_t triggering_pin_number) { + [](const bool state, const inputEdgeFlag edge, const uint8_t triggering_pin_number) { if (cm->cycle_type != CYCLE_HOMING) { return GPIO_NOT_HANDLED; } if (triggering_pin_number != hm.homing_input) { return GPIO_NOT_HANDLED; } if (edge != INPUT_EDGE_LEADING) { return GPIO_NOT_HANDLED; } diff --git a/g2core/cycle_probing.cpp b/g2core/cycle_probing.cpp index 77ec1665..bd7e9b4f 100644 --- a/g2core/cycle_probing.cpp +++ b/g2core/cycle_probing.cpp @@ -129,7 +129,7 @@ static void _motion_end_callback(float* vect, bool* flag) * Will be registered only during homing mode - see gpio.h for more info */ gpioDigitalInputHandler _probing_handler { - [&](const bool state, const inputEdgeFlag edge, const uint8_t triggering_pin_number) { + [](const bool state, const inputEdgeFlag edge, const uint8_t triggering_pin_number) { if (cm->cycle_type != CYCLE_PROBE) { return GPIO_NOT_HANDLED; } if (triggering_pin_number != pb.probe_input) { return GPIO_NOT_HANDLED; }