Skip to content

Commit 2aa677f

Browse files
committed
Merge remote-tracking branch 'origin/master' into PR_picohal_plugin_init
2 parents e2ad52c + 390c11b commit 2aa677f

38 files changed

Lines changed: 1931 additions & 571 deletions

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ target_sources(grbl INTERFACE
1010
${CMAKE_CURRENT_LIST_DIR}/machine_limits.c
1111
${CMAKE_CURRENT_LIST_DIR}/messages.c
1212
${CMAKE_CURRENT_LIST_DIR}/modbus.c
13+
${CMAKE_CURRENT_LIST_DIR}/modbus_rtu.c
1314
${CMAKE_CURRENT_LIST_DIR}/motion_control.c
1415
${CMAKE_CURRENT_LIST_DIR}/my_plugin.c
1516
${CMAKE_CURRENT_LIST_DIR}/nuts_bolts.c

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## grblHAL ##
22

3-
Latest build date is 20250405, see the [changelog](changelog.md) for details.
3+
Latest build date is 20250425, see the [changelog](changelog.md) for details.
44

55
> [!NOTE]
66
> A settings reset will be performed on an update of builds prior to 20241208. Backup and restore of settings is recommended.
@@ -89,4 +89,4 @@ G/M-codes not supported by [legacy Grbl](https://github.com/gnea/grbl/wiki) are
8989
Some [plugins](https://github.com/grblHAL/plugins) implements additional M-codes.
9090

9191
---
92-
20250328
92+
20250425

changelog.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,116 @@
11
## grblHAL changelog
22

3+
<a name="20250425">20250425
4+
5+
Core:
6+
7+
* Updated `$N0` and `$N1` startup commands to allow multi-block \(line\) gcode commands by using `|` \(vertical bar\) as the separator.
8+
9+
* No longer configures auxiliary output pins claimed for basic functions in order to avoid affecting any previously set alternate pin function.
10+
11+
Drivers:
12+
13+
* iMXRT1062: fix for issue [#95](https://github.com/grblHAL/iMXRT1062/issues/95), spindle PWM output missing.
14+
15+
---
16+
17+
<a name="20250424">20250424
18+
19+
Core:
20+
21+
* Moved part of the driver based spindle sync code to the core.
22+
Spindle sync now has to be enabled in [grbl/config.h}(https://github.com/grblHAL/core/blob/b41018543b35b0f14f9ab29d9ccc43bd0e4045dc/config.h#L526-L534).
23+
24+
Drivers:
25+
26+
* iMXRT1062, MSP432P401R, STM32F4xx, STM32F7xx: removed spindle sync code now in the core.
27+
28+
* RP2040: Added tentative support for spindle sync, board maps has to be updated for spindle encoder inputs - not all can be due to pin restrictions.
29+
Fixed regression causing the PicoCNC board to lose spindle PWM output.
30+
31+
* LPC176x, ESP32, TM4C123, STM32F1xx: replaced deprecated code.
32+
33+
Plugins:
34+
35+
* Some: replaced deprecated code.
36+
37+
---
38+
39+
<a name="20250419">20250419
40+
41+
Core:
42+
43+
* Fixed regression introduced with [PR#673](https://github.com/grblHAL/core/pull/673), added G30 as optional position for tool change and moved new tool change mode from PR#673 to `$346` - _Tool change options_.
44+
45+
* Moved Modbus RTU code from spindle plugin to the core.
46+
47+
* For developers: deprecated `protocol_enqueue_foreground_task()`, replaced by `task_run_on_startup()` - added alias for the deprecated version.
48+
Changed signature of `modbus_isup()` to return capabilities flag instead of boolean.
49+
50+
* Fixed bug in delayed task handler, might occasionally hang the controller. May be part of keypad issue [#17](https://github.com/grblHAL/Plugin_keypad/issues/17).
51+
52+
Plugins:
53+
54+
Keypad and spindle: updated for core changes.
55+
56+
Keypad, I2C display interface: fixed alignment issue that caused hardfault on WCO changes on some platforms. May resolve issue [#17](https://github.com/grblHAL/Plugin_keypad/issues/17).
57+
58+
---
59+
60+
<a name="20250415">20250415
61+
62+
Core:
63+
64+
* Fixed long standing "bug" where settings `$370` and `$372` for auxiliary ports where applied before the underlying GPIO pins were initialized by the driver.
65+
Improved handling of same settings for external \(I2C, ModBus, ...\) ports.
66+
67+
Drivers:
68+
69+
* iMXRT1062: removed reference to deleted odometer include. Ref. odometer issue [#2](https://github.com/grblHAL/Plugin_odometer/issues/2).
70+
71+
Plugins:
72+
73+
* Misc: updated PCA9654E driver.
74+
75+
---
76+
77+
<a name="20250413">20250413
78+
79+
Core:
80+
81+
* For developers: added wrappers/veneers for `hal.port` functions, plugin code should be changed to use these instead of calling via `hal.port` functions or accessing `hal.port` properties.
82+
Improved the [ioports API](https://svn.io-engineering.com/grblHAL/html/ioports_8c.html), updated core code to make use of it. Flagged some calls and (part of) some stuctures as deprecated.
83+
84+
Drivers:
85+
86+
* Most: updated to make use of the new ioports API functionality.
87+
88+
* Some: removed references to deleted odometer include. Ref. odometer issue [#2](https://github.com/grblHAL/Plugin_odometer/issues/2).
89+
90+
Plugins:
91+
92+
* Fans: fixed bug preventing selection of ports to use. Possibly related to issue [#242 comment](https://github.com/grblHAL/core/issues/242#issuecomment-2798816316).
93+
94+
* Many: updated to make use of the new ioports API functionality.
95+
96+
---
97+
98+
<a name="20250411">20250411
99+
100+
Core:
101+
102+
* Added MCP4725 I2C DAC to IO expander plugins.
103+
104+
Drivers:
105+
106+
* iMXRT1062, STM32F4xx, STM32F7xx, MSP432: fixed regression causing spindle encoder data to be reset shortly before starting spindle synced motion - resulting in error 41.
107+
108+
Plugins:
109+
110+
* Misc: added MCP4725 I2C DAC.
111+
112+
---
113+
3114
<a name="20250409">Build 20250409
4115

5116
Core:

config.h

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,14 +523,24 @@ Number of tools in tool table, edit to enable (max. 32 allowed)
523523
#endif
524524
#endif
525525

526+
/*! \def SPINDLE_SYNC_ENABLE
527+
\brief
528+
Set to \ref On or 1 to enable experimental support for spindle synced motion, G33 and G76.
529+
530+
_NOTE:_ require driver and board support for spindle encoder input.
531+
*/
532+
#if !defined SPINDLE_SYNC_ENABLE || defined __DOXYGEN__
533+
#define SPINDLE_SYNC_ENABLE Off
534+
#endif
535+
526536
/*! \def NGC_EXPRESSIONS_ENABLE
527537
\brief
528538
Set to \ref On or 1 to enable experimental support for expressions.
529539
530540
Some LinuxCNC extensions are supported, conditionals and subroutines are not.
531541
*/
532542
#if !defined NGC_EXPRESSIONS_ENABLE || defined __DOXYGEN__
533-
#define NGC_EXPRESSIONS_ENABLE On
543+
#define NGC_EXPRESSIONS_ENABLE Off
534544
#endif
535545

536546
/*! \def NGC_PARAMETERS_ENABLE
@@ -1351,7 +1361,7 @@ and less range over the total 255 PWM levels to signal different spindle speeds.
13511361
// Tool change settings (Group_Toolchange)
13521362

13531363
/*! @name $341 - Setting_ToolChangeMode
1354-
0 = Normal mode, 1 = Manual change, 2 = Manual change @ G59.3, 3 = Manual change and probe sensor @ G59.3 - sets TLO
1364+
0 = Normal mode, 1 = Manual change, 2 = Manual change @ G59.3, 3 = Manual change and probe tolsetter @ G59.3, 4 = Ignore M6
13551365
*/
13561366
///@{
13571367
#if !defined DEFAULT_TOOLCHANGE_MODE || defined __DOXYGEN__
@@ -1392,12 +1402,18 @@ and less range over the total 255 PWM levels to signal different spindle speeds.
13921402
#endif
13931403
///@}
13941404

1395-
/*! @name $346 - Setting_ToolChangeRestorePosition
1405+
/*! @name $346 - Setting_ToolChangeOptions
13961406
*/
13971407
///@{
13981408
#if !defined DEFAULT_TOOLCHANGE_NO_RESTORE_POSITION || defined __DOXYGEN__
13991409
#define DEFAULT_TOOLCHANGE_NO_RESTORE_POSITION Off
14001410
#endif
1411+
#if !defined DEFAULT_TOOLCHANGE_AT_G30 || defined __DOXYGEN__
1412+
#define DEFAULT_TOOLCHANGE_AT_G30 Off
1413+
#endif
1414+
#if !defined DEFAULT_TOOLCHANGE_FAST_PROBE_PULLOFF || defined __DOXYGEN__
1415+
#define DEFAULT_TOOLCHANGE_FAST_PROBE_PULLOFF Off
1416+
#endif
14011417
///@}
14021418

14031419
// Homing settings (Group_Homing)

core_handlers.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ typedef void (*on_state_change_ptr)(sys_state_t state);
8989
typedef void (*on_override_changed_ptr)(override_changed_t override);
9090
typedef void (*on_spindle_programmed_ptr)(spindle_ptrs_t *spindle, spindle_state_t state, float rpm, spindle_rpm_mode_t mode);
9191
typedef void (*on_wco_changed_ptr)(void);
92+
typedef void (*on_wco_saved_ptr)(coord_system_id_t id, coord_data_t *data);
9293
typedef void (*on_program_completed_ptr)(program_flow_t program_flow, bool check_mode);
9394
typedef void (*on_execute_realtime_ptr)(sys_state_t state);
9495
typedef void (*on_unknown_accessory_override_ptr)(uint8_t cmd);
@@ -220,6 +221,7 @@ typedef struct {
220221
on_report_handlers_init_ptr on_report_handlers_init;
221222
on_spindle_programmed_ptr on_spindle_programmed;
222223
on_wco_changed_ptr on_wco_changed;
224+
on_wco_saved_ptr on_wco_saved;
223225
on_program_completed_ptr on_program_completed;
224226
on_execute_realtime_ptr on_execute_realtime;
225227
on_execute_realtime_ptr on_execute_delay;

crossbar.h

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,20 @@ typedef enum {
5858
Input_MPGSelect,
5959
Input_ModeSelect = Input_MPGSelect, // Deprecated
6060
Input_LimitX,
61-
Input_LimitX_2,
61+
Input_LimitX2,
62+
Input_LimitX_2 = Input_LimitX2, // Deprecated
6263
Input_LimitX_Max,
6364
Input_HomeX,
6465
Input_HomeX_2,
6566
Input_LimitY,
66-
Input_LimitY_2,
67+
Input_LimitY2,
68+
Input_LimitY_2 = Input_LimitY2, // Deprecated
6769
Input_LimitY_Max,
6870
Input_HomeY,
6971
Input_HomeY_2,
7072
Input_LimitZ,
71-
Input_LimitZ_2,
73+
Input_LimitZ2,
74+
Input_LimitZ_2 = Input_LimitZ2, // Deprecated
7275
Input_LimitZ_Max,
7376
Input_HomeZ,
7477
Input_HomeZ_2,
@@ -126,22 +129,28 @@ typedef enum {
126129
// Output pins
127130
Output_StepX,
128131
Outputs = Output_StepX,
129-
Output_StepX_2,
132+
Output_StepX2,
133+
Output_StepX_2 = Output_StepX2, // deprecated
130134
Output_StepY,
131-
Output_StepY_2,
135+
Output_StepY2,
136+
Output_StepY_2 = Output_StepY2, // deprecated
132137
Output_StepZ,
133-
Output_StepZ_2,
138+
Output_StepZ2,
139+
Output_StepZ_2 = Output_StepZ2, // deprecated
134140
Output_StepA,
135141
Output_StepB,
136142
Output_StepC,
137143
Output_StepU,
138144
Output_StepV,
139145
Output_DirX,
140-
Output_DirX_2,
146+
Output_DirX2,
147+
Output_DirX_2 = Output_DirX2, // deprecated
141148
Output_DirY,
142-
Output_DirY_2,
149+
Output_DirY2,
150+
Output_DirY_2 = Output_DirY2, // deprecated
143151
Output_DirZ,
144-
Output_DirZ_2,
152+
Output_DirZ2,
153+
Output_DirZ_2 = Output_DirZ2, // deprecated
145154
Output_DirA,
146155
Output_DirB,
147156
Output_DirC,
@@ -158,9 +167,13 @@ typedef enum {
158167
Output_MotorChipSelectM7,
159168
Output_StepperPower,
160169
Output_StepperEnable,
170+
Output_StepperEnableSTEPPERS = Output_StepperEnable,
161171
Output_StepperEnableX,
172+
Output_StepperEnableX2 = Output_StepperEnableX,
162173
Output_StepperEnableY,
174+
Output_StepperEnableY2 = Output_StepperEnableY,
163175
Output_StepperEnableZ,
176+
Output_StepperEnableZ2 = Output_StepperEnableZ,
164177
Output_StepperEnableA,
165178
Output_StepperEnableB,
166179
Output_StepperEnableU,
@@ -342,17 +355,17 @@ PROGMEM static const pin_name_t pin_names[] = {
342355
{ .function = Input_Analog_Aux7, .name = "Aux analog in 7" },
343356
#endif
344357
{ .function = Output_StepX, .name = "X step" },
345-
{ .function = Output_StepX_2, .name = "X2 step" },
358+
{ .function = Output_StepX2, .name = "X2 step" },
346359
{ .function = Output_StepY, .name = "Y step" },
347-
{ .function = Output_StepY_2, .name = "Y2 step" },
360+
{ .function = Output_StepY2, .name = "Y2 step" },
348361
{ .function = Output_StepZ, .name = "Z step" },
349-
{ .function = Output_StepZ_2, .name = "Z2 step" },
362+
{ .function = Output_StepZ2, .name = "Z2 step" },
350363
{ .function = Output_DirX, .name = "X dir" },
351-
{ .function = Output_DirX_2, .name = "X2 dir" },
364+
{ .function = Output_DirX2, .name = "X2 dir" },
352365
{ .function = Output_DirY, .name = "Y dir" },
353-
{ .function = Output_DirY_2, .name = "Y2 dir" },
366+
{ .function = Output_DirY2, .name = "Y2 dir" },
354367
{ .function = Output_DirZ, .name = "Z dir" },
355-
{ .function = Output_DirZ_2, .name = "Z2 dir" },
368+
{ .function = Output_DirZ2, .name = "Z2 dir" },
356369
{ .function = Output_StepperPower, .name = "Stepper power" },
357370
{ .function = Output_StepperEnable, .name = "Steppers enable" },
358371
{ .function = Output_StepperEnableX, .name = "X enable" },
@@ -726,6 +739,7 @@ typedef struct {
726739
} aux_ctrl_out_t;
727740

728741
typedef struct xbar {
742+
void *ports_id;
729743
uint8_t id; //!< Pin id.
730744
pin_function_t function; //!< Pin function.
731745
pin_group_t group; //!< Pin group.

0 commit comments

Comments
 (0)