Compare commits

..

411 Commits

Author SHA1 Message Date
InsanityAutomation f3ed2473ea Update runout.h 2024-07-13 12:36:49 -04:00
InsanityAutomation 2a570b8983 Update runout.h 2024-07-13 12:36:48 -04:00
InsanityAutomation e8d124886e Pass 1 builds - Switch and Motion support dropped temporarily 2024-07-13 12:36:48 -04:00
InsanityAutomation 180832ef0c First Pass M591 Import 2024-07-13 12:36:48 -04:00
thinkyhead c961f3ab2b [cron] Bump distribution date (2024-07-12) 2024-07-12 00:23:21 +00:00
Scott Lahteine 3469cb9d24 🔧 Fallback STRING_CONFIG_H_AUTHOR 2024-07-11 16:27:52 -05:00
thinkyhead 6c09b83f30 [cron] Bump distribution date (2024-07-11) 2024-07-11 00:23:57 +00:00
ellensp 17a1363f4d 🐛 Fix ERR_EEPROM_NOPROM result (#27255)
Followup to #27199
2024-07-09 21:15:34 -05:00
thinkyhead 115350317c [cron] Bump distribution date (2024-07-10) 2024-07-10 00:23:49 +00:00
Justin Nesselrotte 44c2682168 RS485 support with G-code M485 (#25680)
Co-authored-by: Stephen Hawes <sphawes@gmail.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-09 17:00:14 -05:00
ellensp 8b81aae870 Update preflight-checks.py for windows 2024-07-09 18:55:36 +12:00
thinkyhead 72a2699b10 [cron] Bump distribution date (2024-07-09) 2024-07-09 00:23:05 +00:00
Keith Bennett b7c07f1329 🚸 Fix G33 display precision (3 digits) (#27186) 2024-07-08 19:13:21 -05:00
Vovodroid 2b9a62093a 🚸 Edit IS frequency while moving (#27248) 2024-07-08 19:03:20 -05:00
ellensp 3385b4c280 🔨 Auto-replace BOTH / EITHER in configs (#27249)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-08 18:46:03 -05:00
thinkyhead 7c1f82cd96 [cron] Bump distribution date (2024-07-08) 2024-07-08 18:06:51 +00:00
Roxy-3D 9ebfdc4a86 Update README.md with hotlink to all supported boards 2024-07-08 10:35:41 -05:00
thinkyhead 586313c2fb [cron] Bump distribution date (2024-07-07) 2024-07-07 00:25:40 +00:00
David Buezas 571783fc04 🚸 SD card wake on insert, status screen on remove (#27197)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-06 17:41:02 -05:00
Scott Lahteine 4af5229cee 🧑‍💻 Conditional HAS_LED_POWEROFF_TIMEOUT 2024-07-05 20:08:07 -05:00
thinkyhead e0dcc610da [cron] Bump distribution date (2024-07-06) 2024-07-06 00:22:12 +00:00
Scott Lahteine 4aff10785e 🧑‍💻 Use "enum class" 2024-07-05 18:48:41 -05:00
thinkyhead d0e110d666 [cron] Bump distribution date (2024-07-05) 2024-07-05 06:08:13 +00:00
Vovodroid 10ffb9cb68 FAN_KICKSTART_LINEAR (#27072) 2024-07-04 21:22:16 -05:00
Keith Bennett b303bb1e56 🔧 English as default on MKS H43 (#27218) 2024-07-04 20:57:21 -05:00
Keith Bennett e6a61b182f 🐛 Fix E3S1PRO DGUS builds (#27211)
Partially reverts #26261
2024-07-04 20:37:43 -05:00
Keith Bennett 785b1da021 🐛 Fix YHCB2004 builds (#27210)
Co-authored-by: ellensp <530024+ellensp@users.noreply.github.com>
2024-07-04 20:36:17 -05:00
tombrazier a4d20031ec 🐛 Fix backlash intial direction (#27208)
Fix regression from #25791
2024-07-04 20:33:45 -05:00
tombrazier 3c60145792 🩹 Fix "calibration" endstop report (#27207)
Followup to #27204
2024-07-04 20:31:25 -05:00
Keith Bennett f2940adcf1 🔥 Drop BTT Manta XFER environments (#27240)
USB is connected to SoC (CM4/CB1/CB2), not MCU
2024-07-04 19:50:34 -05:00
Keith Bennett b5b9cc0b79 🔥 Drop BOARD_BIGTREE_SKR_V1_2 "renamed" reference (#27230) 2024-07-04 19:48:48 -05:00
ellensp 1d1eb97567 🚸 Update Zonestar OLEDs to SPI (#27220)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-07-04 19:43:17 -05:00
thinkyhead 0103cffcd0 [cron] Bump distribution date (2024-07-02) 2024-07-02 00:23:05 +00:00
Mihai 6fed66dd42 🩹️ Fix judder, optimize planner (#27035) 2024-07-01 13:56:06 -05:00
thinkyhead c81416438d [cron] Bump distribution date (2024-06-30) 2024-06-30 00:25:29 +00:00
Scott Lahteine c95825a0ff 🔧 Simplify sensitive pins (#27219) 2024-06-29 15:50:35 -05:00
David Buezas b6284c9f01 🚸 Skip REINIT_NOISY_LCD for I2C OLED (#27222) 2024-06-29 15:43:08 -05:00
thinkyhead f84a97f51c [cron] Bump distribution date (2024-06-29) 2024-06-29 00:22:24 +00:00
Scott Lahteine 563296fc8b 🩹 LCD_CONTRAST => LCD_CONTRAST_INIT 2024-06-28 12:52:36 -05:00
thinkyhead 13290e798b [cron] Bump distribution date (2024-06-28) 2024-06-28 00:22:46 +00:00
thisiskeithb 96e3dfed46 🩹 Fix/Add Malyan M300 E0_AUTO_FAN_PIN 2024-06-27 19:00:20 -05:00
David Buezas cb6fd130ba ️ Load/init (most) settings after showing boot-screen (#27199)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Peter Ellens <ellensp@users.noreply.github.com>
2024-06-27 18:37:35 -05:00
Scott Lahteine 11f90de873 🩹 Set color 1 on DOGM clear
Followup to `clear_for_drawing`
2024-06-27 18:35:00 -05:00
Keith Bennett 9240ec89d0 Add fail-fast: true default strategy to build test CI (#27215) 2024-06-27 11:50:26 -05:00
thinkyhead 8cf2a41f81 [cron] Bump distribution date (2024-06-27) 2024-06-27 00:22:45 +00:00
Scott Lahteine 1f9fc665ec 🚸 MarlinUI:: clear_for_drawing 2024-06-26 18:27:05 -05:00
Keith Bennett bf1995140a 🔨 TMC2100 is STANDALONE (#27209) 2024-06-26 16:26:42 -05:00
David Buezas 7b21cd5d72 🩹 Don't reinit i2c LCDs (#27194)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-06-26 16:04:58 -05:00
thinkyhead 37fc32d972 [cron] Bump distribution date (2024-06-26) 2024-06-26 06:07:26 +00:00
Ben 9a6d4b5e56 🚸 PLR: Add FR and Flow (#27201)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-06-25 22:34:33 -05:00
thinkyhead 1e0719dac5 [cron] Bump distribution date (2024-06-25) 2024-06-25 00:22:37 +00:00
Jonathan Brazier f2248f79d3 ️ Implement CALIBRATION_GCODE as endstop (#27204) 2024-06-24 14:52:49 -05:00
thinkyhead 60d843b540 [cron] Bump distribution date (2024-06-22) 2024-06-22 06:07:24 +00:00
Keith Bennett 6d7d281559 🔧 Warning for ZV Shaping on CoreQZ (#27200) 2024-06-21 19:38:11 -05:00
thinkyhead b3d462b890 [cron] Bump distribution date (2024-06-20) 2024-06-20 18:07:46 +00:00
Scott Lahteine a7444021c6 🔨 Fatal error for wrong GCC on macOS Native Sim 2024-06-20 12:53:58 -05:00
thinkyhead a93acbd35c [cron] Bump distribution date (2024-06-17) 2024-06-17 00:24:05 +00:00
Vovodroid d978123289 🔧 Nonlinear Extrusion optional Adaptive Smoothing (#27175) 2024-06-16 16:21:57 -05:00
Keith Bennett ee8dada752 ♻️ DISABLE_ENCODER => NO_BACK_MENU_ITEM (#27180) 2024-06-16 16:10:12 -05:00
ellensp 7bc6261d2a 🐛 Mount media early for POWER_LOSS_RECOVERY (#27177) 2024-06-15 20:14:46 -05:00
thinkyhead 013c3bcd82 [cron] Bump distribution date (2024-06-16) 2024-06-16 00:31:38 +00:00
Scott Lahteine 2fc86ad836 🐛 Fix homing when FT Motion exists (#27179) 2024-06-15 19:11:19 -05:00
Mihai 082dc24865 🧑‍💻 Adjust pulse_phase_isr code guards (#27112) 2024-06-15 18:01:36 -05:00
Mihai d7b6acc03d ️ Optimize LPC176x set_pwm_duty (#27178) 2024-06-15 17:55:45 -05:00
thinkyhead a1dc2856de [cron] Bump distribution date (2024-06-15) 2024-06-15 00:22:26 +00:00
Andrew 959be66cc2 🔨 Build scripts cleanup (#27157)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-06-14 16:01:34 -05:00
thinkyhead ae2843940f [cron] Bump distribution date (2024-06-14) 2024-06-14 06:07:52 +00:00
Mihai 611ceedc1d 🐛 Fix step oversampling with NONLINEAR_EXTRUSION (#27171)
Followup to #27113
2024-06-13 23:05:05 -05:00
thinkyhead 38298076d6 [cron] Bump distribution date (2024-06-13) 2024-06-13 18:06:44 +00:00
Nicolas Graziano 1f0b8d6cd8 🚸 AnyCubic Vyper LCD improvements (#27158)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-06-13 11:50:16 -05:00
thinkyhead e0d683baed [cron] Bump distribution date (2024-06-12) 2024-06-12 00:22:43 +00:00
Nicolas Graziano f4f75b6b12 🔨 Rename AnyCubic Vyper binary (#27167)
The vyper board need a file name which begin with 'main_board_'
2024-06-11 14:31:57 -05:00
thinkyhead fb6dc90a85 [cron] Bump distribution date (2024-06-11) 2024-06-11 00:22:36 +00:00
Bob Kuhn b99391c810 🚸🐛 Anycubic Vyper fixes (1) (#26261) 2024-06-10 14:20:03 -05:00
Vovodroid d9fc4f3a99 🚸 Nonlinear Extrusion polynomial Av^2+Bv+C (#27162) 2024-06-10 13:42:28 -05:00
Scott Lahteine daeffbc944 🚸 Prefer friendly Power Off over Auto-unalive 2024-06-10 12:51:21 -05:00
Scott Lahteine 87dde46fb0 🔧 Assume RAMPS_CREALITY is not CR2020 2024-06-10 12:51:21 -05:00
thinkyhead d96c6f867d [cron] Bump distribution date (2024-06-10) 2024-06-10 06:07:31 +00:00
Scott Lahteine 1f2e6d5434 📝 "Boards Manager" 2024-06-09 17:38:55 -05:00
thinkyhead 232b989d50 [cron] Bump distribution date (2024-06-09) 2024-06-09 00:25:46 +00:00
TheRaf974 d38261c908 🔧 Overridable SUICIDE_PIN for RAMPS_CREALITY (#27143) 2024-06-08 16:45:51 -05:00
Ryan P 3075bc3b7b 🚸🐛 SW SPI Mode 3 for U8G on STM32 (#27111) 2024-06-08 16:03:21 -05:00
Scott Lahteine 842d0b1c9f 🎨 Misc. SPI cleanup 2024-06-08 15:55:36 -05:00
Scott Lahteine 042b238dd8 🧑‍💻 USE_SOFTWARE_SPI => SDFAT_USE_SOFTWARE_SPI 2024-06-08 15:55:36 -05:00
Scott Lahteine c30904b631 🧑‍💻 U8G_SPI_USE_MODE_3 for *_MINI_12864 2024-06-08 15:55:36 -05:00
Mihai 225a71f4cd ️ Optimize LPC176x pin toggle (#27149) 2024-06-08 13:33:08 -05:00
ellensp 1d29a56344 🔧 Fix Z_MULTI_ENDSTOPS pin post-process (#27137) 2024-06-08 13:27:13 -05:00
ellensp 320e00267d ✏️ Fix comma typo (#27138) 2024-06-07 20:38:44 -05:00
thinkyhead 9869629b67 [cron] Bump distribution date (2024-06-08) 2024-06-08 00:23:12 +00:00
Scott Lahteine 3da78e85bf 📝 Remove dead video links 2024-06-07 17:25:42 -05:00
thinkyhead 11a4314261 [cron] Bump distribution date (2024-06-06) 2024-06-06 06:07:15 +00:00
Mihai 65c19f82b9 🔧 Minimum Stepper Pulse in Nanoseconds (#27113) 2024-06-05 21:26:09 -05:00
thinkyhead 0169cde8a4 [cron] Bump distribution date (2024-06-03) 2024-06-03 00:23:09 +00:00
InsanityAutomation ab0173b7e6 🚸 ExtUI: Shaping, Probing limits (#26754) 2024-06-02 14:45:19 -05:00
thinkyhead 95f81d2565 [cron] Bump distribution date (2024-05-29) 2024-05-29 00:26:13 +00:00
Scott Lahteine 9c922f0eab 🧑‍💻 Fix test STM32F103RC_btt_USB 2024-05-28 19:05:03 -05:00
Scott Lahteine 35a03d66e5 🔨 Update SAMD51 build deps 2024-05-28 18:49:39 -05:00
Mihai a4a0887fa7 🐛 Fix NONE, ALL, EVAL macro collision (#27132) 2024-05-28 18:22:39 -05:00
thinkyhead e7c9cf3e1d [cron] Bump distribution date (2024-05-27) 2024-05-27 00:22:53 +00:00
ellensp 6710616a09 🩹 Longer3D LK has ONBOARD_SDIO (#27129) 2024-05-26 12:09:18 -05:00
Scott Lahteine 2064c83c66 🚸 Fix SD nav after "one click print" (2) 2024-05-26 12:04:14 -05:00
thinkyhead 2e97ad1f4b [cron] Bump distribution date (2024-05-26) 2024-05-26 12:07:31 +00:00
Scott Lahteine 4f85f88ae3 🚸 Fix SD nav after "one click print" 2024-05-26 02:18:37 -05:00
thinkyhead 181a57ae9b [cron] Bump distribution date (2024-05-24) 2024-05-24 00:22:18 +00:00
Keith Bennett 3ee1248cf2 🩹 Even more Z input shaper followup (#27119)
Followup to #27118
2024-05-23 14:58:22 +12:00
thinkyhead 68c3916d46 [cron] Bump distribution date (2024-05-23) 2024-05-23 00:21:53 +00:00
Keith Bennett e3bbacd8b9 📝 Update Input Shaping comments (#27116)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-05-22 18:30:44 -05:00
Scott Lahteine f915371248 🧑‍💻 More language cleanup 2024-05-22 17:37:13 -05:00
Andrew ea848aa891 🩹 Z input shaper followup (#27118)
Followup to #27073
2024-05-22 14:07:04 -05:00
Scott Lahteine 5157849c60 🧑‍💻 Remove unused strings, label some 2024-05-22 13:07:33 -05:00
Scott Lahteine ca31f9789e 🩹 Fix LCD getFreeTxBuffer typo 2024-05-21 19:26:18 -05:00
Scott Lahteine 78d3cf1de1 🎨 PGM => _P rename 2024-05-21 19:26:18 -05:00
Scott Lahteine 521e7eafce 🧑‍💻 Clarify media "mounted" 2024-05-21 19:26:18 -05:00
thinkyhead 2d78a80cf6 [cron] Bump distribution date (2024-05-22) 2024-05-22 00:21:43 +00:00
Miguel Risco-Castillo 5f32698da5 Ender-3 V3 board CR4NS200320C13 (#27003) 2024-05-21 15:20:12 -05:00
thinkyhead 1845056014 [cron] Bump distribution date (2024-05-21) 2024-05-21 00:22:16 +00:00
Jason Smith 0b8ec2aa74 🎨 Decimal TMC address (#27028) 2024-05-20 17:16:49 -05:00
ellensp 578bdd4b20 🧑‍💻 Address trailing spaces (#27108) 2024-05-20 00:04:51 -05:00
Jonathan Brazier 6b6865d068 INPUT_SHAPING_Z (#27073) 2024-05-20 00:03:03 -05:00
Andrew 6c018eb770 📝 Update some G-code and other comments (#27034) 2024-05-20 00:01:05 -05:00
ellensp 5561bafbe6 M110 Get Command Line Number (#27090)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-05-19 23:11:30 -05:00
ellensp 75eee04972 🩹 Return 0 for bad index in Temperature::getHeaterPower (#27037)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-05-19 23:10:15 -05:00
ellensp ee1d1faa52 🔨 Sim pins / INI cleanup 2024-05-19 23:07:24 -05:00
Chris dbd3e10959 🩹 Solid background for DWIN_MARLINUI text (#27029) 2024-05-19 22:53:45 -05:00
Andrew fde330af5a 🎨 Fix MarlinUI "untyped" string args (#27046) 2024-05-19 21:50:24 -05:00
Keith Bennett e8d953257e 🔨 Warn about Input Shaping + I2S_STEPPER_STREAM (#27051) 2024-05-19 21:45:57 -05:00
Keith Bennett cc86e9ecce Fix CI badge (#27060) 2024-05-19 21:44:22 -05:00
vrooze 5a6db519d6 Ender-3 V2 LCD with SKR 3[EZ] (#27061) 2024-05-19 20:31:53 -05:00
thinkyhead 98d09e5304 [cron] Bump distribution date (2024-05-20) 2024-05-20 00:35:32 +00:00
Vovodroid d87a0ea7f7 🚸 Quickly apply touch screen fan/laser edit (#27064) 2024-05-19 19:32:43 -05:00
Dave Gateman 0e2bd069d4 🩹 Fix cutter power extra '%' (#27105) 2024-05-19 18:53:38 -05:00
ellensp feca9a33d5 SHOW_CUSTOM_BOOTSCREEN for HD44780 (#26793)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-05-19 18:51:52 -05:00
Scott Lahteine eec1aec071 🐛 Fix multi-byte menu string buffer overrun (#27100) 2024-05-19 18:43:04 -05:00
Scott Lahteine a97d1088f0 🔧 Ensure distinct languages (#27107) 2024-05-19 18:42:07 -05:00
Scott Lahteine a7317de3b4 🔨 Sim needs GLM_ENABLE_EXPERIMENTAL 2024-05-19 14:12:17 -05:00
thinkyhead 06762db050 [cron] Bump distribution date (2024-05-18) 2024-05-18 00:22:00 +00:00
Vovodroid 4f3ebea3a6 🐛 Fix FT_MOTION block reference (#27063) 2024-05-17 16:47:44 -05:00
ellensp fa88e0f054 🔨 Windows Simulator needs -DGLM_ENABLE_EXPERIMENTAL (#27092) 2024-05-17 16:04:36 -05:00
Mihai 2fd7c2b865 ️ Fix motion smoothness (#27013) 2024-05-16 20:48:21 -05:00
jam-berg ef0bd975cf 🩹 Fix Ender 2 Pro EXP1-7 pin (PB15 / LCD_RS) (#27074) 2024-05-16 20:23:17 -05:00
Keith Bennett bdc14ddbd7 ️ Revert DELTA Z endstop homing patch (#27088)
Reverts #26297 f7a3172c20
2024-05-16 20:18:41 -05:00
Mihai 383e6f4646 🐛 Move LASER_POWER_TRAP cruise to cruise block (#27031) 2024-05-16 20:05:27 -05:00
thinkyhead e37415c95b [cron] Bump distribution date (2024-05-17) 2024-05-17 00:22:14 +00:00
Scott Lahteine a33112a4c0 🐛 Reorder FLOAT_SQ
Followup to 5f96dffb
2024-05-15 20:30:14 -05:00
thinkyhead 7e8007f024 [cron] Bump distribution date (2024-05-16) 2024-05-16 00:21:28 +00:00
Chris f320c2a455 🧑‍💻 Define, apply F_CPU on HC32 (#27086)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-05-15 18:10:04 -05:00
Chris 6eedeaedaf 🐛 Fix HC32 temperature ADC (#27085) 2024-05-15 15:49:40 -05:00
Chris 6b5e19cfc4 🐛 Fix HC32 watchdog timeout (#27084)
by reducing PCLK3 clock
2024-05-15 15:45:52 -05:00
ellensp 3dc437add4 🎨 Apply TERN0/1 for some contexts (#27036) 2024-05-15 15:42:19 -05:00
Scott Lahteine 5f96dffb9b 🧑‍💻 FLOAT_SQ macro 2024-05-15 15:21:39 -05:00
Mihai 6423b8031d ️ Add / enforce min_entry_speed_sqr (#27089) 2024-05-15 15:01:56 -05:00
thinkyhead bbdad79ce5 [cron] Bump distribution date (2024-05-13) 2024-05-13 00:22:55 +00:00
Keith Bennett a2daee8f7a 📝 MPCTEMP is tested (#27075) 2024-05-12 17:39:58 -05:00
ellensp 909e3ad116 🩹 Motor PWM followup (#27087)
Followup to 08fe8a3076
2024-05-12 17:31:02 -05:00
Scott Lahteine 556616c4f0 🧑‍💻 Controller warning as macro 2024-05-12 14:37:27 -05:00
Miguel Risco-Castillo 46e426ce96 📝 Use "based on" for partial ProUI (#26998) 2024-05-12 13:28:38 -05:00
Alexander Thomas Julian f5f6c37c17 🐛 LCD Bed Tramming fixes (#26962)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-05-12 13:25:14 -05:00
Scott Lahteine 08fe8a3076 🔧 Undef motor current PWM for unused axes 2024-05-12 13:21:32 -05:00
thinkyhead dabcea991f [cron] Bump distribution date (2024-05-12) 2024-05-12 00:24:03 +00:00
Scott Lahteine 4a5bd47b6a 🎨 Apply MUL_TERN 2024-05-11 13:41:15 -05:00
thinkyhead e5742a98df [cron] Bump distribution date (2024-05-11) 2024-05-11 18:06:35 +00:00
Keith Bennett 774cecc3b4 🩹 Fix AT90USB1286 PIO upload (#27070) 2024-05-11 12:03:04 -05:00
Keith Bennett 83b7e32ec4 🩹 Fix Nextion cstr/fstr typo (#27071) 2024-05-11 12:02:17 -05:00
thinkyhead a22155bd96 [cron] Bump distribution date (2024-05-10) 2024-05-10 00:21:41 +00:00
narno2202 1da947f548 ️ FT_MOTION : Core and other refinements (#26720)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Ulendo Alex <alex@ulendo.io>
2024-05-09 16:57:23 -05:00
David Buezas a3960dfa53 🚸 New encoder logic & debounce (#26723)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-05-09 16:20:57 -05:00
thinkyhead bab1917311 [cron] Bump distribution date (2024-05-07) 2024-05-07 01:00:35 +00:00
Andrew 49348716f5 🩹 Fix printf et.al. expecting F-strings (#27032) 2024-05-06 18:58:00 -05:00
thinkyhead eb781afe7b [cron] Bump distribution date (2024-05-03) 2024-05-03 00:21:23 +00:00
Jason Smith 39f53c3f8c 🧑‍💻Improve make tests-all-local (#27040)
* Sleep 5 seconds between platforms

* Inform users if they need to install pyyaml

* Fix old workflow name

* Skip linux_native on Darwin
2024-05-02 06:36:24 -07:00
thinkyhead b5307aaaad [cron] Bump distribution date (2024-05-02) 2024-05-02 00:21:16 +00:00
Andrew f5cf667c95 🎨 Clarify some string parameters (#26949)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-05-01 15:08:15 -05:00
thinkyhead 737095f852 [cron] Bump distribution date (2024-04-30) 2024-04-30 00:20:48 +00:00
Keith Bennett f56952c9e6 🔧 Assert TMC slave addresses, minor pins cleanup (#26842) 2024-04-28 22:17:02 -07:00
Keith Bennett ca5a7be5e8 🔧 More suppressible warnings (#27009)
* 🔧 Suppressible LCD contrast warning

* 🔧 Suppressible Z_SAFE_HOMING warning

* 🔧 Suppressible user feedback warning
2024-04-28 18:15:07 -07:00
thinkyhead 582c5a36d7 [cron] Bump distribution date (2024-04-29) 2024-04-29 00:21:47 +00:00
Chris a8058729cc 🩹Free debug pins in HC32 HAL (#26985)
implements DISABLE_DEBUG and DISABLE_JTAG in HAL
2024-04-28 15:59:28 -07:00
Keith Bennett a2f024ffe3 🔧 Rework MKS Monster8 pins (#26988) 2024-04-28 15:53:48 -07:00
thinkyhead e1d65cc5e0 [cron] Bump distribution date (2024-04-28) 2024-04-28 00:23:55 +00:00
ellensp 75cda8d191 📝Update comments to match board labeling (#27016) 2024-04-27 13:13:00 -07:00
thinkyhead af8dcc6ee8 [cron] Bump distribution date (2024-04-25) 2024-04-25 00:29:51 +00:00
Scott Lahteine 2270bf41d7 🩹 IA-Creality minor cleanup 2024-04-24 18:09:32 -05:00
Scott Lahteine 489ef6e5e1 🩹 Simple IA-Creality babystep patch
See https://github.com/MarlinFirmware/Marlin/issues/26896#issuecomment-2015630458

Co-Authored-By: ellensp <530024+ellensp@users.noreply.github.com>
2024-04-24 17:58:51 -05:00
InsanityAutomation cecc745844 🚸 Fix duplicate temperature report (#26952) 2024-04-24 17:51:08 -05:00
thinkyhead 5366362e47 [cron] Bump distribution date (2024-04-24) 2024-04-24 00:46:36 +00:00
ellensp a1ecea60fd ✏️ MPCTEMP_START => MPC_STARTED (#27002) 2024-04-23 19:35:11 -05:00
Keith Bennett 882421a03e 🔧 BIQU MicroProbe V2 pull-up warning (#27008) 2024-04-23 19:19:02 -05:00
Jason Smith a36f72e886 🎨 Format pins which fail validation (#27007) 2024-04-23 14:19:14 -07:00
Jason Smith 247e989377 CI - Validate Pins Formatting (#26996) 2024-04-22 21:10:35 -05:00
thinkyhead 91ae676b9b [cron] Bump distribution date (2024-04-23) 2024-04-23 00:21:36 +00:00
Scott Lahteine a955e06259 🎨 Clean up after recent PRs 2024-04-22 18:59:18 -05:00
thinkyhead 31683ce35b [cron] Bump distribution date (2024-04-22) 2024-04-22 00:22:27 +00:00
Jason Smith d773570cd6 🐛 Fix Flags<N> data storage width (#26995)
* Fix Flags and associated unit tests
2024-04-21 00:24:57 -07:00
Jason Smith 556da2b3fc Add additional unit tests for types.h (#26994)
* Add more XYval (and similar) unit tests

* Add  Flags tests, with multiple BUGs identified
2024-04-20 23:59:43 -07:00
Jason Smith 9e19a6efe1 Unit test improvements (#26993)
- Reset config.ini in restore_configs
- Allow running a single configuration of unit tests locally
2024-04-20 23:40:26 -07:00
InsanityAutomation f433b2c433 🔧 Add RAMPS TMC SPI pins when !TMC_USE_SW_SPI (#26960)
* Allows RAMPS to auto assign HW SPI Pins for TMC
2024-04-20 18:27:56 -07:00
Aron List bc0d7d7140 🐛 Fix PID upon entering PID_FUNCTIONAL_RANGE (#26926)
The PID algorithm did not cache the last seen temperature until it entered the PID_FUNCTIONAL_RANGE. This caused an incorrect output power to be calculated temporarily while the algorithm caught up.

This has likely always been a problem for bed and chamber PID. For the hotend this error was introduced in refactoring in commit 54e7b933cd.
2024-04-20 18:18:49 -07:00
thinkyhead 24f8831021 [cron] Bump distribution date (2024-04-21) 2024-04-21 00:23:15 +00:00
Jason Smith 9a8fb80eed 🎨Match unit test folder structure to code (#26990) 2024-04-20 17:00:07 -07:00
Jason Smith ca12459b9c Skip compile tests when editing unit tests (#26991) 2024-04-20 15:55:30 -07:00
InsanityAutomation e1ab911c35 📝Improve Freeze Feature comment (#26959)
* Fix and Improve Freeze Feature comment
2024-04-20 14:58:13 -07:00
ellensp 58d4494365 add ui_api.h include (#26977) 2024-04-20 14:48:31 -07:00
ellensp d502e5beaa 🐛 Fix auto-assignment errors for J and U axis (#26979) 2024-04-20 14:46:48 -07:00
Chris b4a95db7da 🚨Fix buffer overrun warning in UBL (#26984)
to account for null terminator
2024-04-20 14:43:31 -07:00
thinkyhead 02ba6f9f3a [cron] Bump distribution date (2024-04-19) 2024-04-19 00:21:25 +00:00
Andrew dba0010607 🎨 Rename some G-code files (#26981) 2024-04-18 18:04:03 -05:00
I3DBeeTech 90667f6114 🐛 Fix BLACKBEEZMINI fan, info (#26983) 2024-04-18 15:54:17 -05:00
thinkyhead d6961b2626 [cron] Bump distribution date (2024-04-17) 2024-04-17 06:06:51 +00:00
Javlon Sodikov 07ebb8171f 🩹Fix ProUI error when !CASELIGHT_USES_BRIGHTNESS (#26976)
* Fix the compile error with the case light menu

Fix the compile error with the case light menu

* Add failing test

---------

Co-authored-by: Jason Smith <jason.inet@gmail.com>
2024-04-16 22:25:22 -07:00
thinkyhead 245db73929 [cron] Bump distribution date (2024-04-16) 2024-04-16 18:06:16 +00:00
Scott Lahteine 9342dae8f0 📝 Remove dead PDF links 2024-04-16 12:18:26 -05:00
thinkyhead 1f84f50fd8 [cron] Bump distribution date (2024-04-15) 2024-04-15 02:38:10 +00:00
Scott Lahteine 3326c749f8 📝 Minor README changes 2024-04-14 16:36:56 -05:00
Scott Lahteine 0269106066 🎨 Dagoma D6 followup 2024-04-14 16:24:51 -05:00
Sophist 95d38a8e54 Add Dagoma D6 as found in DiscoUltimate v2 TMC (#26874)
* Add Dagoma D6 board as used in their DiscoUltimate v2 TMC.

Taken from the Dagoma fork of Marlin DU_MC branch where it is called FYSETC_DAGOMA_F5 and explicitly confirmed by Dagoma as being the D6:

"the BOARD_FYSETC_DAGOMA_F5 is effectively the definition for the D6"

---------

Co-authored-by: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com>
Co-authored-by: Orel <37673727+0r31@users.noreply.github.com>
2024-04-14 13:04:52 -07:00
Chris dca6afc26e 🐛 HC32 - Add SERIAL_DMA, fix SDIO and MEATPACK (#26845)
* fix meatpack on hc32

* add support for SERIAL_DMA on HC32

* add additional checks in HC32 HAL

* migrate HC32 HAL to use app_config.h

* fix memory leak in HC32 sdio HAL
https://github.com/MarlinFirmware/Marlin/pull/26845#issuecomment-1980218771

* hc32: fail if both EMERGENCY_PARSER and SERIAL_DMA are enabled
2024-04-14 11:42:57 -07:00
Jason Smith 19684f23bc Add unit tests for macros.h (#26968) 2024-04-13 17:49:08 -07:00
Keith Bennett 52a561399e ️ Revert unintended README changes (#26967)
* Revert all the changes that went in with the unit test framework
This restored broken links and other changes. Restoring to the prior revision seems the most appropriate action until the intentions of those file changes are known.
---------

Co-authored-by: Jason Smith <jason.inet@gmail.com>
2024-04-13 17:47:16 -07:00
thinkyhead 0683e8a9a3 [cron] Bump distribution date (2024-04-14) 2024-04-14 00:24:15 +00:00
Jason Smith 1bb4a042e2 Unit test improvements (#26965)
* Do not warn about display in unit tests

* Treat warnings as errors in unit tests

* Report actual filenames with unit tests
2024-04-13 14:11:51 -07:00
Jason Smith d10861e478 Add unit testing framework (#26948)
- Add a framework to build and execute unit tests for Marlin.
- Enable unit test execution as part of PR checks.

---------

Co-authored-by: Costas Basdekis <costas.basdekis@gmail.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-04-13 12:06:08 -07:00
Andrew cf7c86d581 🔧Fix M936 in features.ini (#26957) 2024-04-13 11:59:59 -07:00
David Buezas d99e150097 ️Reduce DISPLAY_SLEEP_MINUTES overhead (#26964) 2024-04-13 09:54:25 -07:00
thinkyhead 9e88eb6100 [cron] Bump distribution date (2024-04-13) 2024-04-13 12:06:36 +00:00
Vovodroid 71d9a3e1df 🩹 Fix M413 report (#26846) 2024-04-13 00:04:34 -07:00
InsanityAutomation 6575dcc803 🩹 Reduce Kill Pin Wait (#26945)
Reduce kill pin wait time, and allow override by setting KILL_DELAY
2024-04-12 23:40:59 -07:00
InsanityAutomation 2715e5ba1b 🐛Fix IDEX X2 Direction (#26958)
* Fix IDEX X2 Direction

* Sanity Check IDEX X1_MAX_POS
2024-04-12 23:29:59 -07:00
thinkyhead 9a570b23a3 [cron] Bump distribution date (2024-04-11) 2024-04-11 12:07:54 +00:00
Andrew 1b091ecb87 ✏️Minor style and typo fixups (#26947)
* tweaks from PR, whitespace, wording in pause.h

* Update Marlin/src/feature/pause.h
2024-04-10 23:13:54 -07:00
thinkyhead a75a5f8b2a [cron] Bump distribution date (2024-04-10) 2024-04-10 06:13:36 +00:00
ellensp 80dd02fbdb 📝 Update RGB565 color picker url (#26951) 2024-04-09 23:02:32 -07:00
Keith Bennett e6755450df 🩹 Fix ESP3D WiFi Support (#26822) 2024-04-09 22:58:13 -07:00
ellensp 9215bf791b 🔨 MarlinSimUI updates (#26955) 2024-04-09 22:50:21 -07:00
thinkyhead 311bfc99f3 [cron] Bump distribution date (2024-04-08) 2024-04-08 00:21:49 +00:00
Keith Bennett a3434de2e6 🩹 Fix MCU check for STM32H7-based BTT Octopus Pro V1 (#26831)
* 🩹 Fix MCU check for STM32H7-based BTT Octopus Pro V1

Co-authored-by: ellensp <530024+ellensp@users.noreply.github.com>

* Update Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h

---------

Co-authored-by: ellensp <530024+ellensp@users.noreply.github.com>
2024-04-07 12:05:35 -07:00
Keith Bennett 2bf56b00d4 🔧 Improve BIQU BX pins, allow Z swap (#26871)
* Add a swap Z & E1 option for BIQU BX

Users can add #define BX_SWAP_ZM_E1M to their config instead of opening their printer up & swapping Z & E1 motor cables. Allows G34 to work correctly on early BX printers since both Z motor wires were installed without a standard procedure in place and wires could be swapped from the factory.

* Add BOARD URL, DIAG pin info, update pin comments

* Add WIFISUPPORT defines for documentation purposes

WIFISUPPORT does not need to be enabled (read: shouldn't be enabled). Simply enable an available SERIAL_PORT*, set it to 4, and connect an ESP-01/ESP-01S flashed with luc-github's ESP3D firmware for basic WiFi functionality.

* Sanity check TOUCH_SCREEN_CALIBRATION on GT911 TFTs (BIQU BX TFT70)

Use a sanity check so it's clear which options are valid for TFT_TOUCH_DEVICE_GT911 / BIQU_BX_TFT70.
2024-04-07 10:49:36 -07:00
Andrew Bortz c31d9e717b 🩹Fix ProUI Z probe offset text (#26832) 2024-04-07 09:37:37 -07:00
narno2202 d9d7820b0d 🩹 Set correct LCD serial port for MKS_MONSTER8_V1 (#26879) 2024-04-07 08:52:35 -07:00
sargonphin 9343247e07 🩹Increase range of G34 accuracy target (#26771)
* Allow G34 accuracy down to 0.001mm, previous minimum was 0.01mm.
2024-04-07 08:48:13 -07:00
ellensp 351a1a1332 🔧 Add UART 5 for SKR Mini E3 V3.0 (#26825) 2024-04-06 23:29:19 -07:00
thinkyhead 7e9868d762 [cron] Bump distribution date (2024-04-07) 2024-04-07 06:05:53 +00:00
ellensp d1cf817660 🐛 Fix CREALITY_ENDER2P_V24S4 pins (#26908) 2024-04-06 22:57:42 -07:00
Vovodroid c91771a51e 🩹Disable nonlinear extrusion on unretract (#26824)
* Fixes disable NLE on unretract #26808, which reported blobs at the start of lines during unretract.
2024-04-06 22:41:01 -07:00
ellensp a337a43bfd 🩹 Fix type mismatch when SEGMENT_LEVELED_MOVES disabled (#26819) 2024-04-06 21:47:40 -07:00
Keith Bennett 77f93e0b8c 🩹 Fix Mini 12864 on BTT Kraken (#26918)
Co-authored-by: ellensp <530024+ellensp@users.noreply.github.com>
2024-04-06 21:22:25 -07:00
Keith Bennett 7dc7195696 🩹 Fix active extruder indicator (#26834)
* 🩹 No active extruder when any of several incompatible features are enabled
2024-04-06 21:17:00 -07:00
ellensp 56773bd80e 🩹 add onSetMinExtrusionTemp to anycubic_viper (#26933) 2024-04-06 21:11:32 -07:00
thinkyhead 1dec9831d3 [cron] Bump distribution date (2024-04-06) 2024-04-06 06:06:36 +00:00
Jason Smith 390f1f7c69 🐛 Don't apply settings during validation (#26935)
Check the `validating` variable before applying settings for several features.
This specifically avoids settings corruption for BACKLASH_PREVENTION, which has side-effects when first applied using incorrect values.
2024-04-05 17:27:30 -07:00
Jason Smith d30fcb8fff 🐛 Fix bool evalution of XYval and similar types (#26936)
Require explicit cast to get T* pointers from XYval and similar types. This prevents the pointer from being implicitly returned and checked for nullptr when trying to evaluate these structs in boolean expressions.
2024-04-05 17:24:58 -07:00
thinkyhead 17dfe8edc9 [cron] Bump distribution date (2024-04-03) 2024-04-03 00:20:46 +00:00
Scott Lahteine 7b6b6e1c3e 🩹 Revert motion change 2024-04-01 22:20:28 -05:00
Sophist 60f2837a98 🔧 Minor INPUT_SHAPING config fixes (#26882)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-04-01 21:30:04 -05:00
thinkyhead ef5fb390ec [cron] Bump distribution date (2024-04-02) 2024-04-02 00:20:47 +00:00
Andrew 87e94f4563 🚸 Update ProUI Plot graph - part 2 (#26563)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-04-01 15:05:11 -05:00
thinkyhead 017a9032f1 [cron] Bump distribution date (2024-04-01) 2024-04-01 00:23:48 +00:00
Scott Lahteine 466282f322 🩹 Misc. changes from ProUI / ExtUI updates (#26928) 2024-03-31 18:20:37 -05:00
thinkyhead 17594298e1 [cron] Bump distribution date (2024-03-28) 2024-03-28 00:20:53 +00:00
Jordan Stocker 0b9f487ab9 🔨 Fix binary upload firmware path (#26909) 2024-03-27 14:44:03 -05:00
Chris d3e1a92b84 🔨 Fix HC32 preflight (#26912) 2024-03-27 14:39:54 -05:00
Holger Mößinger cd357b0278 🔧🚸 Tweaks for (MiniRambo) CNC (#26892)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-03-27 14:38:08 -05:00
thinkyhead d0d229e380 [cron] Bump distribution date (2024-03-25) 2024-03-25 00:21:58 +00:00
Ikko Eltociear Ashimine eb897e65a1 📝 Fix Cutter.md typo (#26901) 2024-03-24 13:49:25 -05:00
thinkyhead 825ebfd5fe [cron] Bump distribution date (2024-03-24) 2024-03-24 00:23:21 +00:00
John Robertson 3ee3964bec 🐛 Fix ESP32 laser M4 exception (#26884) 2024-03-22 19:57:23 -05:00
Sophist aecfb257e9 🚸 Hide auto-run as needed (#26853) 2024-03-22 19:29:06 -05:00
thinkyhead 896a6a93af [cron] Bump distribution date (2024-03-23) 2024-03-23 00:20:15 +00:00
Holger Mößinger 075f96d2bf ✏️ Fix stepper MS pin typos (#26891) 2024-03-22 16:36:42 -05:00
thinkyhead 05896551f1 [cron] Bump distribution date (2024-03-18) 2024-03-18 00:21:39 +00:00
Manuel McLure ea6a891038 MAX7219_REINIT_ON_POWERUP (#26163) 2024-03-17 14:23:12 -05:00
Giuliano Zaro 983aee5718 🌐 Update Italian language (#26837) 2024-03-16 19:46:22 -05:00
thinkyhead c913020dc2 [cron] Bump distribution date (2024-03-17) 2024-03-17 00:22:34 +00:00
Scott Lahteine a50490b11f 👷 Minor signature.py adjustments 2024-03-16 16:39:47 -05:00
Sophist 4b01c901bc 📝 Fix M201 typos (#26854) 2024-03-16 15:00:16 -05:00
Keith Bennett c1be36bc66 🎨 Add MKS TinyBee silkscreen labels (#26777) 2024-03-16 14:58:53 -05:00
Keith Bennett e0222d3e01 🩹 Fix G35 "Probing Failed" output (#26780) 2024-03-16 14:56:33 -05:00
janenen c0264ae787 🐛 Fix DETECT_BROKEN_ENDSTOP on IDEX (#26790)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-03-16 14:52:14 -05:00
Sophist 3a2c50c199 🩹 Thermistor name fixes (#26857) 2024-03-16 14:09:50 -05:00
Scott Lahteine 3b4adac579 🎨 Trailing ws 2024-03-16 13:55:35 -05:00
ellensp d36b3fbf9d 🧑‍💻 Fix RLE script for infille == outfile (#26795) 2024-03-16 13:37:42 -05:00
Keith Bennett bca40e07e3 📝 Remove Flattr Link (#26796) 2024-03-16 13:34:02 -05:00
thinkyhead 9a1c993719 [cron] Bump distribution date (2024-03-10) 2024-03-10 06:05:40 +00:00
InsanityAutomation 504219817c Redundant PSU Control with EDM (#26751) 2024-03-09 21:22:23 -06:00
thinkyhead 4f2b7271bd [cron] Bump distribution date (2024-03-04) 2024-03-04 00:21:13 +00:00
fredycpu ec6f9dd5c8 🔧 MKS_ROBIN_PRO : I2C EEPROM + MKS Wifi (#26823)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-03-03 12:39:50 -06:00
thinkyhead e6cda9932b [cron] Bump distribution date (2024-03-02) 2024-03-02 06:06:49 +00:00
Keith Bennett b9cfbaa8d4 Update Actions versions (#26814) 2024-03-01 22:34:12 -06:00
ellensp 3fd175af8e 🚸 M115 "KINEMATICS:…" (#26806) 2024-03-01 22:31:42 -06:00
Keith Bennett a9e72b2a2c 🔧 Simpler CREALITY_V422 warning (#26826) 2024-03-01 22:09:12 -06:00
ellensp ecde3a3158 🩹 Fix AVR bootscreen RLE decode (#26827) 2024-03-01 21:58:56 -06:00
DerAndere c8d51c2723 🚸 Enable G92.9 with rotational axes (#26174)
- Supporting axes that can rotate forever.
2024-03-01 21:16:39 -06:00
thinkyhead d609bb4671 [cron] Bump distribution date (2024-02-28) 2024-02-28 06:06:10 +00:00
Scott Lahteine 982b425792 🔥 Drop TMC26X support (#26770) 2024-02-27 20:45:34 -06:00
thinkyhead 9e879a5b1f [cron] Bump distribution date (2024-02-11) 2024-02-11 00:22:45 +00:00
ellensp 9974327d33 extend uart checks 2024-02-11 03:28:37 +13:00
thinkyhead 4eba643ae1 [cron] Bump distribution date (2024-02-10) 2024-02-10 06:17:34 +00:00
Scott Lahteine 8d7be79108 👷 Improve BIGTREE_GTR_V1_0 tests 2024-02-09 19:14:15 -06:00
Scott Lahteine 76b5688304 🚸 Optional encoder multipliers 2024-02-09 19:14:15 -06:00
thinkyhead 1e8fbb7bbb [cron] Bump distribution date (2024-02-09) 2024-02-09 00:20:11 +00:00
Scott Lahteine 20c6a6233b 🧑‍💻 HC32 endstop interrupts for X2/Y2/Z4 2024-02-08 16:49:13 -06:00
Scott Lahteine 1d295f7983 🔥 Clean up SCARA/TPARA 2024-02-07 23:45:51 -06:00
Scott Lahteine 669814d0d4 MARLIN_SMALL_BUILD option (#26775) 2024-02-07 23:40:54 -06:00
Scott Lahteine 4aa48beb37 🚸 Adjust encoder multiplier 2024-02-07 19:48:36 -06:00
thinkyhead 371fb5a256 [cron] Bump distribution date (2024-02-08) 2024-02-08 00:20:32 +00:00
Scott Lahteine 0829a511f0 🧑‍💻 "static_warning" 2024-02-07 18:09:36 -06:00
Scott Lahteine a3c78c4510 🎨 Delete old FTDI Eve bootscreen 2024-02-07 14:01:25 -06:00
Scott Lahteine a3211253a0 🩹 Fix FTDI Eve Touch UI M84 2024-02-07 13:58:49 -06:00
thinkyhead 2c8e7bd5a5 [cron] Bump distribution date (2024-02-07) 2024-02-07 12:07:15 +00:00
ellensp 005d6879d9 🔧 Restore probe XY edit defaults, remove arbitrary Z limit (#26774) 2024-02-07 00:33:54 -06:00
thinkyhead 3dd22349a9 [cron] Bump distribution date (2024-02-06) 2024-02-06 06:06:16 +00:00
Scott Mikutsky e61a84a717 🚸 Keep Filament Change near the top (#26172) 2024-02-05 23:37:29 -06:00
thinkyhead d8e73d3036 [cron] Bump distribution date (2024-02-05) 2024-02-05 00:21:40 +00:00
Robherc b12340b1d5 🔧 Fix extraneous DIAG warnings (#26694) 2024-02-04 16:10:11 -06:00
Scott Lahteine ec46a59539 🧑‍💻 Fix uncrustify config 2024-02-04 16:07:27 -06:00
Keith Bennett 5003681414 🩹 Fix HOTEND_IDLE_TIMEOUT with no heated bed (#26746) 2024-02-04 12:14:49 -06:00
Keith Bennett d9396929aa 🩹 Update BTT GTR v1.0 DIAG jumper/pin (#26764) 2024-02-04 12:13:03 -06:00
Scott Lahteine 1dee4d92c6 🔧 TOUCH_IDLE_SLEEP_MINS => DISPLAY_SLEEP_MINUTES
Follow up to #26517
2024-02-04 12:09:48 -06:00
Smokey Pell 9364cbb4b5 🚸 Tronxy V10 w/ TFT_TRONXY_X5SA + MKS_ROBIN_TFT43 (#26747) 2024-02-04 09:37:32 -06:00
Taylor Talkington 755b661c2d 🔧 Fix USE_Z_MIN conditions (#26762) 2024-02-04 09:03:08 -06:00
thinkyhead 7f4792e47c [cron] Bump distribution date (2024-02-04) 2024-02-04 00:22:42 +00:00
Keith Bennett e6837b2b8d 🩹 Fix STM32 HW Serial 6 (#26763)
Followup to #26328
2024-02-03 17:19:19 -06:00
thinkyhead 9e21330d7a [cron] Bump distribution date (2024-02-03) 2024-02-03 00:20:49 +00:00
Davide Rombolà c476e62a6f 🩹 Fix STM32 HW Serial (#26531)
Followup to #26328
2024-02-01 19:31:39 -06:00
thinkyhead 4c5d7831c1 [cron] Bump distribution date (2024-02-02) 2024-02-02 00:20:22 +00:00
Abdullah YILMAZ 9a5cfb3f26 🌐 Turkish language update (#26739) 2024-01-31 20:11:08 -06:00
InsanityAutomation 5a87bea762 🚸 Fix repeating "Power Off" message (#26755) 2024-01-31 19:24:08 -06:00
thinkyhead d62f45bdc1 [cron] Bump distribution date (2024-02-01) 2024-02-01 00:21:39 +00:00
ellensp f9d5ee04b4 🩹 Patch STM32 serial UUID (#26737)
Followup to #26715

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-31 12:33:42 -06:00
thinkyhead ef04680cc5 [cron] Bump distribution date (2024-01-31) 2024-01-31 06:06:35 +00:00
Keith Bennett 1c6cfc3ffe 🐛 Fix I/J/K chopper timing (#26736)
Followup to #19112
2024-01-30 23:00:02 -06:00
Keith Bennett 0266e7fe53 📝 Biqu => BIQU (#26735) 2024-01-30 22:58:06 -06:00
ellensp 610ea0a9d3 🔨 No strlcpy in Windows (#26748) 2024-01-30 22:56:46 -06:00
thinkyhead 70d942a184 [cron] Bump distribution date (2024-01-30) 2024-01-30 06:06:23 +00:00
Scott Lahteine 5639237e2b 🎨 Misc. cleanup 29-01 2024-01-29 23:10:12 -06:00
thinkyhead 541bd26cd7 [cron] Bump distribution date (2024-01-29) 2024-01-29 00:21:02 +00:00
Keith Bennett 7a4d601f4d 🩹 Temp constraints followup (#26744)
Followup to cb291e8d
2024-01-28 16:13:23 -06:00
thinkyhead bf8675b44a [cron] Bump distribution date (2024-01-28) 2024-01-28 00:22:35 +00:00
Scott Lahteine ebea672240 🐛 Protect EEPROM bytes 916-926
Followup to #26729

Ender-3S1 STM32F401 Bootloader
2024-01-27 11:49:57 -06:00
Scott Lahteine ce8535f01c 🧑‍💻 Fix warning, adjust tests 2024-01-27 11:49:57 -06:00
thinkyhead 0ba4cd2b3b [cron] Bump distribution date (2024-01-27) 2024-01-27 00:19:36 +00:00
Scott Lahteine afc2dd6cab 🎨 Misc. cleanup 25-01 2024-01-25 22:09:19 -06:00
Scott Lahteine 5768b42c39 Add Conditionals_type.h 2024-01-25 22:06:09 -06:00
thinkyhead ee8630c282 [cron] Bump distribution date (2024-01-26) 2024-01-26 00:42:39 +00:00
Miguel Risco-Castillo 01094ea6aa 🔨 EEPROM exclusion zone (#26729)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-25 18:18:49 -06:00
qwertymodo 6c1fd1f69c 🩹 Fix single Neo strip M150 K (#26709)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-25 18:16:32 -06:00
sargonphin 4f65466161 🔧 HYBRID_THRESHOLD sanity checks (#26681) 2024-01-25 18:13:18 -06:00
ellensp 9b3119393f 🩹 Followup to EDITABLE_STEPS_PER_UNIT (#26677)
Followup to #26618
2024-01-25 17:39:09 -06:00
ejhoness 8594e9462c ✏️ Fix draw_dialog.cpp typo (#26684) 2024-01-25 17:37:35 -06:00
Cesar Guillermo Montiel 16acb57b22 Creality v2.4.S4_170 (Ender 2 Pro, HC32F460KCTA) (#26730) 2024-01-25 17:12:49 -06:00
Scott Lahteine 04c8a3138e 🎨 Misc. LCD pins comments 2024-01-25 15:07:48 -06:00
engrenage 38560378fc 🔧 Allow float Z_PROBE_LOW_POINT (#26711) 2024-01-25 14:31:39 -06:00
Scott Lahteine ffbf4a6a90 🩹 Fix IA Creality IDEX case 2024-01-25 14:31:39 -06:00
thinkyhead a215bc2ca3 [cron] Bump distribution date (2024-01-25) 2024-01-25 00:28:09 +00:00
minding-myown-business cbc674ff99 📝 Fix dead LCD link (#26669) 2024-01-24 18:24:25 -06:00
ellensp 97546bf55b 🚸 PLR recover chamber temp (#26696) 2024-01-24 14:33:02 -06:00
Vovodroid ed1391ee5d 🔧 Wrap POWER_LOSS_RETRACT_LEN (#26695) 2024-01-24 14:21:00 -06:00
Keith Bennett 7fbd9ec5f4 🔧 Allow RAMPS FAN1_PIN override (#26725) 2024-01-24 12:55:59 -06:00
Keith Bennett 63989023b8 🔧 Update SKR_MINI_SCREEN_ADAPTER error (#26726) 2024-01-24 12:54:37 -06:00
ellensp e668d5afd7 🔧 STM32 UID followup (#26727)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-24 12:50:48 -06:00
thinkyhead a2228276bb [cron] Bump distribution date (2024-01-24) 2024-01-24 00:22:20 +00:00
Scott Lahteine 3ef192e7c7 🎨 Cosmetic cleanup 23-01 2024-01-23 16:05:41 -06:00
Scott Lahteine 5fea79fd07 🔧 Fix ROTATIONAL_AXIS_GANG
Co-Authored-By: DerAndere <26200979+DerAndere1@users.noreply.github.com>
2024-01-23 16:02:33 -06:00
Scott Lahteine 18e65f5eb4 🩹 Fix _U and other conflicts
Fix #26220
2024-01-23 15:55:13 -06:00
Scott Lahteine 5ed6bf65ba 🔧 Allow for no STOP pin
Co-Authored-By: DerAndere <26200979+DerAndere1@users.noreply.github.com>
2024-01-23 15:44:51 -06:00
DerAndere d79bcef802 🔧 Sanity check Z_CLEARANCE_FOR_HOMING (#26721) 2024-01-23 14:09:31 -06:00
Anson Liu f1a53407e7 🚸 DOGM active extruder indicator (#26152) 2024-01-23 10:24:49 -06:00
Scott Lahteine 4309e6ab76 🧑‍💻 Fix build_all_examples 2024-01-22 23:58:17 -06:00
thinkyhead 0c3d1cf566 [cron] Bump distribution date (2024-01-23) 2024-01-23 00:50:39 +00:00
Scott Lahteine aa7d571486 ♻️ LCD pins migration precursor (#26719)
Preliminary changes for #25650
2024-01-22 17:32:01 -06:00
Scott Lahteine 604d3e8fad 🎨 Move EXIT_M303 2024-01-22 16:38:08 -06:00
Scott Lahteine 22fc07d72b 🧑‍💻 ExtUI::onPlayTone optional duration 2024-01-22 00:04:08 -06:00
Scott Lahteine dd3b5a10a0 Misc. aesthetic adjustments
Co-Authored-By: Andrew <18502096+classicrocker883@users.noreply.github.com>
2024-01-21 22:15:16 -06:00
thinkyhead 416f94f03a [cron] Bump distribution date (2024-01-22) 2024-01-22 00:23:03 +00:00
Keith Bennett 204de723f1 BIQU MicroProbe (#26527) 2024-01-21 06:01:25 -06:00
Vovodroid 80cd89d8f7 🩹 Fix M592 report (#26680) 2024-01-21 05:11:03 -06:00
ellensp 624226c91d 🩹 Fix STM32 CPU serial UUID (#26715)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-21 05:09:36 -06:00
Keith Bennett 3adf73a2cd 🔥 Remove ALLOW_LOW_EJERK (#26712) 2024-01-20 23:47:26 -06:00
thinkyhead eb7b207e4c [cron] Bump distribution date (2024-01-21) 2024-01-21 00:24:10 +00:00
ellensp d7e45367af 🔨 Fix POLAR build (#26687) 2024-01-20 00:24:30 -06:00
thinkyhead 388c7018c4 [cron] Bump distribution date (2024-01-20) 2024-01-20 00:21:13 +00:00
Vovodroid da96607b65 🔧 Adjust DEFAULT_EJERK settings (#26665) 2024-01-19 16:38:25 -06:00
ellensp fb49645b32 📝 Fix Anet pins typo (#26660) 2024-01-19 13:49:35 -06:00
German Borisov 7d751a20b1 Status Screen flow adjustment (#26627) 2024-01-19 13:17:36 -06:00
thinkyhead 9f7d5bbc86 [cron] Bump distribution date (2024-01-19) 2024-01-19 00:22:09 +00:00
Abdullah YILMAZ 0df25b1008 🌐 Update Turkish language (#26676) 2024-01-18 18:00:43 -06:00
engrenage cef623b7d2 🔧 Clarify M600 sanity-check (#26702) 2024-01-18 17:57:46 -06:00
Andrew 12434e78e4 🔨 Improve CMakeLists.txt (#26700) 2024-01-18 17:55:37 -06:00
thinkyhead 2200607989 [cron] Bump distribution date (2024-01-17) 2024-01-17 06:06:41 +00:00
Scott Lahteine c31381183b Minor Orca update
Followup to #26534
2024-01-16 23:15:04 -06:00
thinkyhead 76dce41580 [cron] Bump distribution date (2024-01-16) 2024-01-16 06:06:41 +00:00
Scott Lahteine 1f1ca34ea6 🧑‍💻 Tweak limit_and_warn 2024-01-15 22:22:08 -06:00
Scott Lahteine 8d4ab15748 🧑‍💻 Tweak planner debug 2024-01-15 21:36:15 -06:00
thinkyhead 745577693d [cron] Bump distribution date (2024-01-15) 2024-01-15 00:22:58 +00:00
Scott Lahteine 3019af1c93 🔨 Make / pins-format patches 2024-01-13 18:34:12 -06:00
thinkyhead 8916e6f826 [cron] Bump distribution date (2024-01-14) 2024-01-14 00:24:03 +00:00
Robherc b2fd631d82 🔧 Fix SD connection defaults (#26666)
Co-authored-by: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com>
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-12 22:03:34 -06:00
thinkyhead cadef64418 [cron] Bump distribution date (2024-01-13) 2024-01-13 00:21:34 +00:00
ThomasToka ab3497161a 🐛 Fix PLR pos/sdpos (#26365)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-11 23:56:45 -06:00
thinkyhead 46f370ae3c [cron] Bump distribution date (2024-01-12) 2024-01-12 00:21:50 +00:00
Scott Lahteine 0f43ac79f6 ️ Revert encoder changes
Reverts #26501
2024-01-10 18:25:17 -06:00
thinkyhead ef92b6c369 [cron] Bump distribution date (2024-01-11) 2024-01-11 00:21:50 +00:00
Scott Lahteine f44f9eb9f8 🎨 Misc. style adjustments 2024-01-10 14:49:28 -06:00
plampix 854f3315af EDITABLE_STEPS_PER_UNIT (#26618)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-10 00:33:54 -06:00
Vovodroid 1d46e67de2 PLR_BED_THRESHOLD (#26649)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-09 23:13:10 -06:00
Scott Lahteine 85ded0b9bd 🩹 Clarify servo µs min/max 2024-01-09 22:41:54 -06:00
Scott Lahteine cb291e8d00 🩹 Fix some temp constraints 2024-01-09 22:41:00 -06:00
ellensp 25caae1e8c 🩹 Fix PID / MPC tune background tasks (#26652)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-09 20:55:20 -06:00
Scott Lahteine 12d7995a18 🎨 Minor temp / UI refactor 2024-01-09 18:45:17 -06:00
thinkyhead 320b7a9ac3 [cron] Bump distribution date (2024-01-10) 2024-01-10 00:21:58 +00:00
Vovodroid a533e9e637 🩹 Fix edit Z jerk step size (#26650)
Followup to #25514

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-09 15:42:08 -06:00
ellensp f6ecdae972 🔧 Base NUM_SERVO_PLUGS on SERVO PINS (#26640)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
2024-01-09 15:19:47 -06:00
954 changed files with 29400 additions and 24292 deletions
-40
View File
@@ -1,40 +0,0 @@
#
# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app
#
# Number of days of inactivity before a closed issue or pull request is locked
daysUntilLock: 60
# Skip issues and pull requests created before a given timestamp. Timestamp must
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
skipCreatedBefore: false
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
exemptLabels: [ 'no-locking' ]
# Label to add before locking, such as `outdated`. Set to `false` to disable
lockLabel: false
# Comment to post before locking. Set to `false` to disable
lockComment: >
This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.
# Assign `resolved` as the reason for locking. Set to `false` to disable
setLockReason: true
# Limit to only `issues` or `pulls`
# only: issues
# Optionally, specify configuration settings just for `issues` or `pulls`
# issues:
# exemptLabels:
# - help-wanted
# lockLabel: outdated
# pulls:
# daysUntilLock: 30
# Repository to extend settings from
# _extends: repo
+2 -2
View File
@@ -19,7 +19,7 @@ jobs:
steps:
- name: Check out bugfix-2.0.x
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: bugfix-2.0.x
@@ -39,7 +39,7 @@ jobs:
exit 0
- name: Check out bugfix-2.1.x
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: bugfix-2.1.x
@@ -1,9 +1,9 @@
#
# test-builds.yml
# ci-build-tests.yml
# Do test builds to catch compile errors
#
name: CI
name: CI - Build Tests
on:
pull_request:
@@ -14,6 +14,8 @@ on:
- config/**
- data/**
- docs/**
- test/**
- Marlin/tests/**
- '**/*.md'
push:
branches:
@@ -23,16 +25,19 @@ on:
- config/**
- data/**
- docs/**
- test/**
- Marlin/tests/**
- '**/*.md'
jobs:
test_builds:
name: Run All Tests
name: Build Test
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
test-platform:
@@ -152,7 +157,7 @@ jobs:
uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
@@ -160,13 +165,13 @@ jobs:
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Select Python 3.9
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: 'x64'
+73
View File
@@ -0,0 +1,73 @@
#
# ci-unit-tests.yml
# Build and execute unit tests to catch functional issues in code
#
name: CI - Unit Tests
on:
pull_request:
branches:
- bugfix-2.1.x
# Cannot be enabled on 2.1.x until it contains the unit test framework
#- 2.1.x
paths-ignore:
- config/**
- data/**
- docs/**
- '**/*.md'
push:
branches:
- bugfix-2.1.x
# Cannot be enabled on 2.1.x until it contains the unit test framework
#- 2.1.x
paths-ignore:
- config/**
- data/**
- docs/**
- '**/*.md'
jobs:
# This runs all unit tests as a single job. While it should be possible to break this up into
# multiple jobs, they currently run quickly and finish long before the compilation tests.
run_unit_tests:
name: Unit Test
# These tests will only be able to run on the bugfix-2.1.x branch, until the next release
# pulls them into additional branches.
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- name: Check out the PR
uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Select Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: 'x64'
- name: Install PlatformIO
run: |
pip install -U platformio
pio upgrade --dev
pio pkg update --global
- name: Run All Unit Tests
run: |
make unit-test-all-local
+51
View File
@@ -0,0 +1,51 @@
#
# ci-validate-pins.yml
# Validate that all of the pins files are unchanged by pinsformat.py
#
name: CI - Validate Pins Files
on:
pull_request:
branches:
- bugfix-2.1.x
# Cannot be enabled on 2.1.x until it contains the unit test framework
#- 2.1.x
paths:
- 'Marlin/src/pins/*/**'
push:
branches:
- bugfix-2.1.x
# Cannot be enabled on 2.1.x until it contains the unit test framework
#- 2.1.x
paths:
- 'Marlin/src/pins/*/**'
jobs:
validate_pins_files:
name: Validate Pins Files
if: github.repository == 'MarlinFirmware/Marlin'
runs-on: ubuntu-latest
steps:
- name: Check out the PR
uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Select Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
architecture: 'x64'
- name: Validate all pins files
run: |
make validate-pins -j
+1 -1
View File
@@ -32,7 +32,7 @@ jobs:
- "Needs: Work"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Remove Labels
uses: actions-ecosystem/action-remove-labels@v1
with:
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: |
+6 -6
View File
@@ -17,15 +17,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v2
- uses: dessant/lock-threads@v5
with:
github-token: ${{ github.token }}
process-only: 'issues'
issue-lock-inactive-days: '60'
issue-exclude-created-before: ''
issue-exclude-labels: 'no-locking'
issue-lock-labels: ''
issue-lock-comment: >
issue-inactive-days: '60'
exclude-issue-created-before: ''
exclude-any-issue-labels: 'no-locking'
add-issue-labels: ''
issue-comment: >
This issue has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.
+55 -20
View File
@@ -2,16 +2,23 @@ SCRIPTS_DIR := buildroot/share/scripts
CONTAINER_RT_BIN := docker
CONTAINER_RT_OPTS := --rm -v $(PWD):/code -v platformio-cache:/root/.platformio
CONTAINER_IMAGE := marlin-dev
UNIT_TEST_CONFIG ?= default
help:
@echo "Tasks for local development:"
@echo "* format-pins: Reformat all pins files"
@echo "* tests-single-ci: Run a single test from inside the CI"
@echo "* tests-single-local: Run a single test locally"
@echo "* tests-single-local-docker: Run a single test locally, using docker"
@echo "* tests-all-local: Run all tests locally"
@echo "* tests-all-local-docker: Run all tests locally, using docker"
@echo "* setup-local-docker: Build the local docker image"
@echo "make marlin : Build marlin for the configured board"
@echo "make format-pins -j : Reformat all pins files (-j for parallel execution)"
@echo "make validate-pins -j : Validate all pins files, fails if any require reformatting"
@echo "make tests-single-ci : Run a single test from inside the CI"
@echo "make tests-single-local : Run a single test locally"
@echo "make tests-single-local-docker : Run a single test locally, using docker"
@echo "make tests-all-local : Run all tests locally"
@echo "make tests-all-local-docker : Run all tests locally, using docker"
@echo "make unit-test-single-local : Run unit tests for a single config locally"
@echo "make unit-test-single-local-docker : Run unit tests for a single config locally, using docker"
@echo "make unit-test-all-local : Run all code tests locally"
@echo "make unit-test-all-local-docker : Run all code tests locally, using docker"
@echo "make setup-local-docker : Setup local docker using buildx"
@echo ""
@echo "Options for testing:"
@echo " TEST_TARGET Set when running tests-single-*, to select the"
@@ -21,49 +28,77 @@ help:
@echo " run on GitHub CI"
@echo " ONLY_TEST Limit tests to only those that contain this, or"
@echo " the index of the test (1-based)"
@echo " UNIT_TEST_CONFIG Set the name of the config from the test folder, without"
@echo " the leading number. Default is 'default'". Used with the
@echo " unit-test-single-* tasks"
@echo " VERBOSE_PLATFORMIO If you want the full PIO output, set any value"
@echo " GIT_RESET_HARD Used by CI: reset all local changes. WARNING:"
@echo " THIS WILL UNDO ANY CHANGES YOU'VE MADE!"
.PHONY: help
marlin:
./buildroot/bin/mftest -a
.PHONY: marlin
tests-single-ci:
export GIT_RESET_HARD=true
$(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) PLATFORMIO_BUILD_FLAGS=-DGITHUB_ACTION
.PHONY: tests-single-ci
tests-single-local:
@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local" ; return 1; fi
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
&& run_tests . $(TEST_TARGET) "$(ONLY_TEST)"
.PHONY: tests-single-local
tests-single-local-docker:
@if ! test -n "$(TEST_TARGET)" ; then echo "***ERROR*** Set TEST_TARGET=<your-module> or use make tests-all-local-docker" ; return 1; fi
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) $(MAKE) tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)"
.PHONY: tests-single-local-docker
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make tests-single-local TEST_TARGET=$(TEST_TARGET) VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD) ONLY_TEST="$(ONLY_TEST)"
tests-all-local:
@python -c "import yaml" 2>/dev/null || (echo 'pyyaml module is not installed. Install it with "python -m pip install pyyaml"' && exit 1)
export PATH="./buildroot/bin/:./buildroot/tests/:${PATH}" \
&& export VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) \
&& for TEST_TARGET in $$($(SCRIPTS_DIR)/get_test_targets.py) ; do echo "Running tests for $$TEST_TARGET" ; run_tests . $$TEST_TARGET ; done
.PHONY: tests-all-local
&& for TEST_TARGET in $$(python $(SCRIPTS_DIR)/get_test_targets.py) ; do \
if [ "$$TEST_TARGET" = "linux_native" ] && [ "$$(uname)" = "Darwin" ]; then \
echo "Skipping tests for $$TEST_TARGET on macOS" ; \
continue ; \
fi ; \
echo "Running tests for $$TEST_TARGET" ; \
run_tests . $$TEST_TARGET || exit 1 ; \
sleep 5; \
done
tests-all-local-docker:
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) $(MAKE) tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD)
.PHONY: tests-all-local-docker
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make tests-all-local VERBOSE_PLATFORMIO=$(VERBOSE_PLATFORMIO) GIT_RESET_HARD=$(GIT_RESET_HARD)
unit-test-single-local:
platformio run -t marlin_$(UNIT_TEST_CONFIG) -e linux_native_test
unit-test-single-local-docker:
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make unit-test-single-local UNIT_TEST_CONFIG=$(UNIT_TEST_CONFIG)
unit-test-all-local:
platformio run -t test-marlin -e linux_native_test
unit-test-all-local-docker:
@if ! $(CONTAINER_RT_BIN) images -q $(CONTAINER_IMAGE) > /dev/null ; then $(MAKE) setup-local-docker ; fi
$(CONTAINER_RT_BIN) run $(CONTAINER_RT_OPTS) $(CONTAINER_IMAGE) make unit-test-all-local
setup-local-docker:
$(CONTAINER_RT_BIN) build -t $(CONTAINER_IMAGE) -f docker/Dockerfile .
.PHONY: setup-local-docker
$(CONTAINER_RT_BIN) buildx build -t $(CONTAINER_IMAGE) -f docker/Dockerfile .
PINS := $(shell find Marlin/src/pins -mindepth 2 -name '*.h')
.PHONY: $(PINS)
.PHONY: $(PINS) format-pins validate-pins
$(PINS): %:
@echo "Formatting $@" && node buildroot/share/scripts/pinsformat.js $@
@echo "Formatting $@"
@python $(SCRIPTS_DIR)/pinsformat.py $< $@
format-pins: $(PINS)
validate-pins: format-pins
@echo "Validating pins files"
@git diff --exit-code || (git status && echo "\nError: Pins files are not formatted correctly. Run \"make format-pins\" to fix.\n" && exit 1)
+211 -512
View File
File diff suppressed because it is too large Load Diff
+254 -423
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -2,7 +2,7 @@
Marlin Firmware
(c) 2011-2023 MarlinFirmware
(c) 2011-2024 MarlinFirmware
Portions of Marlin are (c) by their respective authors.
All code complies with GPLv2 and/or GPLv3
+1 -1
View File
@@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2024-01-09"
//#define STRING_DISTRIBUTION_DATE "2024-07-12"
/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
-103
View File
@@ -1,103 +0,0 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* Custom Bitmap for splashscreen
*
* You may use one of the following tools to generate the C++ bitmap array from
* a black and white image:
*
* - http://www.marlinfw.org/tools/u8glib/converter.html
* - http://www.digole.com/tools/PicturetoC_Hex_converter.php
*/
#include <avr/pgmspace.h>
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
#define CUSTOM_BOOTSCREEN_BMPWIDTH 60
#define CUSTOM_BOOTSCREEN_BMPHEIGHT 64
const unsigned char custom_start_bmp[574] PROGMEM = {
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x12, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x23, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x21, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x4c, 0x80, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x5e, 0x80, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x92, 0x40, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0xa1, 0x40, 0x0, 0x0, 0x0,
0x0, 0x0, 0x1, 0x21, 0x20, 0x0, 0x0, 0x0,
0x0, 0x0, 0x2, 0x7f, 0x90, 0x0, 0x0, 0x0,
0x0, 0x0, 0x2, 0x0, 0x10, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0xff, 0xf8, 0x0, 0x0, 0x0,
0x0, 0x0, 0x4, 0x0, 0x8, 0x0, 0x0, 0x0,
0x0, 0x0, 0x8, 0x0, 0x4, 0x0, 0x0, 0x0,
0x0, 0x0, 0x8, 0x0, 0x6, 0x0, 0x0, 0x0,
0x0, 0x0, 0x10, 0x0, 0x2, 0x0, 0x0, 0x0,
0x0, 0x0, 0x30, 0x1e, 0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0x20, 0x7f, 0x81, 0x0, 0x0, 0x0,
0x0, 0x0, 0x41, 0xff, 0xe0, 0x80, 0x0, 0x0,
0x0, 0x0, 0x43, 0xfc, 0xf0, 0x80, 0x0, 0x0,
0x0, 0x0, 0x87, 0x3b, 0x78, 0x40, 0x0, 0x0,
0x0, 0x1, 0x8e, 0xdb, 0xfc, 0x60, 0x0, 0x0,
0x0, 0x1, 0xf, 0xeb, 0xcc, 0x20, 0x0, 0x0,
0x0, 0x2, 0x1f, 0xed, 0xb6, 0x10, 0x0, 0x0,
0x0, 0x2, 0x1f, 0xde, 0xb6, 0x10, 0x0, 0x0,
0x0, 0x4, 0x39, 0xcd, 0x7f, 0x8, 0x0, 0x0,
0x0, 0x4, 0x36, 0xe0, 0xff, 0x8, 0x0, 0x0,
0x0, 0x8, 0x7e, 0xc0, 0xbb, 0x84, 0x0, 0x0,
0x0, 0x18, 0x7f, 0x0, 0x5d, 0x86, 0x0, 0x0,
0x0, 0x10, 0x7f, 0xc0, 0xed, 0x82, 0x0, 0x0,
0x0, 0x20, 0x3c, 0xc0, 0x73, 0x1, 0x0, 0x0,
0x0, 0x20, 0x3b, 0x33, 0x7f, 0x1, 0x0, 0x0,
0x0, 0x70, 0x1b, 0xe7, 0x7e, 0x3, 0x80, 0x0,
0x0, 0xc8, 0x1d, 0xee, 0xde, 0x4, 0xc0, 0x0,
0x0, 0x88, 0xf, 0xde, 0xdc, 0x4, 0x40, 0x0,
0x1, 0x24, 0xf, 0xdf, 0x3c, 0x9, 0x20, 0x0,
0x1, 0x26, 0x7, 0xdb, 0xf8, 0x19, 0x20, 0x0,
0x2, 0x72, 0x3, 0xe7, 0xf0, 0x13, 0x90, 0x0,
0x2, 0x51, 0x1, 0xff, 0xe0, 0x22, 0x90, 0x0,
0x4, 0x89, 0x0, 0x7f, 0x80, 0x24, 0x48, 0x0,
0x9, 0x4, 0x80, 0x1e, 0x0, 0x48, 0x24, 0x0,
0xb, 0xfe, 0x40, 0x0, 0x0, 0xdf, 0xf4, 0x0,
0x10, 0x0, 0x40, 0x0, 0x0, 0x80, 0x2, 0x0,
0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x10, 0x22, 0x10, 0x3c, 0x3c, 0xe, 0x1f, 0x0,
0x10, 0x22, 0x10, 0x4, 0x22, 0x11, 0x4, 0x0,
0x10, 0x22, 0x10, 0x8, 0x22, 0x11, 0x4, 0x0,
0x10, 0x22, 0x10, 0x8, 0x3c, 0x11, 0x4, 0x0,
0x10, 0x22, 0x10, 0x10, 0x22, 0x11, 0x4, 0x0,
0x10, 0x22, 0x10, 0x20, 0x22, 0x11, 0x4, 0x0,
0x1e, 0x1c, 0x1e, 0x3c, 0x3c, 0xe, 0x4, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
};
+6
View File
@@ -81,6 +81,12 @@ void MarlinHAL::init() {
#if HAS_SERVO_3
OUT_WRITE(SERVO3_PIN, LOW);
#endif
#if HAS_SERVO_4
OUT_WRITE(SERVO4_PIN, LOW);
#endif
#if HAS_SERVO_5
OUT_WRITE(SERVO5_PIN, LOW);
#endif
init_pwm_timers(); // Init user timers to default frequency - 1000HZ
+2 -2
View File
@@ -141,7 +141,7 @@ typedef Servo hal_servo_t;
#error "LCD_SERIAL_PORT must be from 0 to 3."
#endif
#define LCD_SERIAL lcdSerial
#if HAS_DGUS_LCD
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
#endif
#endif
@@ -159,7 +159,7 @@ typedef Servo hal_servo_t;
#define GET_PIN_MAP_INDEX(pin) pin
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
#define HAL_SENSITIVE_PINS 0, 1,
#define HAL_SENSITIVE_PINS 0, 1
#ifdef __AVR_AT90USB1286__
#define JTAG_DISABLE() do{ MCUCR = 0x80; MCUCR = 0x80; }while(0)
-2
View File
@@ -119,7 +119,6 @@ void spiBegin() {
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
}
/** begin spi transaction */
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
// Based on Arduino SPI library
@@ -175,7 +174,6 @@ void spiBegin() {
SPSR = clockDiv | 0x01;
}
#else // SOFTWARE_SPI || FORCE_SOFT_SPI
// ------------------------
+1 -1
View File
@@ -629,7 +629,7 @@ MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser);
template class MarlinSerial< LCDSerialCfg<LCD_SERIAL_PORT> >;
MSerialLCD lcdSerial(MSerialLCD::HasEmergencyParser);
#if HAS_DGUS_LCD
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
template<typename Cfg>
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::get_tx_buffer_free() {
const ring_buffer_pos_t t = tx_buffer.tail, // next byte to send.
+1 -1
View File
@@ -205,7 +205,7 @@
static ring_buffer_pos_t available();
static void write(const uint8_t c);
static void flushTX();
#if HAS_DGUS_LCD
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
static ring_buffer_pos_t get_tx_buffer_free();
#endif
-1
View File
@@ -63,7 +63,6 @@
static volatile int8_t Channel[_Nbr_16timers]; // counter for the servo being pulsed for each timer (or -1 if refresh interval)
/************ static functions common to all instances ***********************/
static inline void handle_interrupts(const timer16_Sequence_t timer, volatile uint16_t* TCNTn, volatile uint16_t* OCRnA) {
+3 -3
View File
@@ -35,14 +35,14 @@
#ifndef MARLIN_EEPROM_SIZE
#define MARLIN_EEPROM_SIZE size_t(E2END + 1)
#endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() { return true; }
bool PersistentStore::access_finish() { return true; }
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
uint16_t written = 0;
while (size--) {
uint8_t * const p = (uint8_t * const)pos;
uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
uint8_t v = *value;
if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
eeprom_write_byte(p, v);
@@ -61,7 +61,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
uint8_t c = eeprom_read_byte((uint8_t*)pos);
const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos));
if (writing) *value = c;
crc16(crc, &c, 1);
pos++;
+8 -1
View File
@@ -91,7 +91,6 @@ void endstop_ISR() { endstops.update(); }
#endif
// Install Pin change interrupt for a pin. Can be called multiple times.
void pciSetup(const int8_t pin) {
if (digitalPinHasPCICR(pin)) {
@@ -346,6 +345,14 @@ void setup_endstop_interrupts() {
pciSetup(Z_MIN_PROBE_PIN);
#endif
#endif
#if USE_CALIBRATION
#if (digitalPinToInterrupt(CALIBRATION_PIN) != NOT_AN_INTERRUPT)
_ATTACH(CALIBRATION_PIN);
#else
static_assert(digitalPinHasPCICR(CALIBRATION_PIN), "CALIBRATION_PIN is not interrupt-capable. Disable ENDSTOP_INTERRUPTS_FEATURE to continue.");
pciSetup(CALIBRATION_PIN);
#endif
#endif
// If we arrive here without raising an assertion, each pin has either an EXT-interrupt or a PCI.
}
+1 -1
View File
@@ -150,7 +150,7 @@ void MarlinHAL::set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
else {
if (p == 32 || p == 128) continue; // Skip TIMER2 specific prescalers when not TIMER2
const uint16_t rft = (F_CPU) / (p * f_desired);
DEBUG_ECHOLNPGM("(Not Timer 2) F_CPU=" STRINGIFY(F_CPU), " prescaler=", p, " f_desired=", f_desired);
DEBUG_ECHOLNPGM("(Not Timer 2) F_CPU=", STRINGIFY(F_CPU), " prescaler=", p, " f_desired=", f_desired);
res_fast_temp = rft - 1;
res_pc_temp = rft / 2;
}
-3
View File
@@ -28,9 +28,6 @@
* Port : E0 E1 E4 E5 G5 E3 H3 H4 H5 H6 B4 B5 B6 B7 J1 J0 H1 H0 D3 D2 D1 D0 A0 A1 A2 A3 A4 A5 A6 A7 C7 C6 C5 C4 C3 C2 C1 C0 D7 G2 G1 G0 L7 L6 L5 L4 L3 L2 L1 L0 B3 B2 B1 B0 F0 F1 F2 F3 F4 F5 F6 F7 K0 K1 K2 K3 K4 K5 K6 K7 | E2 E6 E7 xx xx H2 H7 G3 G4 xx xx xx xx xx D4 D5 D6 xx xx J2 J3 J4 J5 J6 J7 xx xx xx xx xx
* Logical Pin : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 78 79 80 xx xx 84 85 71 70 xx xx xx xx xx 81 82 83 xx xx 72 73 75 76 77 74 xx xx xx xx xx
* Analog Input : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
*
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/
#include "../fastio.h"
-3
View File
@@ -26,9 +26,6 @@
*
* Logical Pin: 38 39 40 41 42 43 44 45 16 10 11 12 06 07 08 09 30 31 32 33 34 35 36 37 17 18 19 20 21 22 23 24 00 01 13 05 02 03 14 15 46 47 48 49 50 51 52 53 25 26 27 28 29 04
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5
*
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/
#include "../fastio.h"
-3
View File
@@ -26,9 +26,6 @@
*
* Logical Pin: 08 09 10 11 12 13 14 15 16 17 18 19 20 21 00 01 02 03 04 05 06 07
* Port: B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7
*
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/
#include "../fastio.h"
-3
View File
@@ -26,9 +26,6 @@
*
* Logical Pin: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
* Port: B0 B1 B2 B3 B4 B5 B6 B7 D0 D1 D2 D3 D4 D5 D6 D7 C0 C1 C2 C3 C4 C5 C6 C7 A7 A6 A5 A4 A3 A2 A1 A0
*
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/
/** ATMega644
@@ -27,9 +27,6 @@
* Logical Pin: 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
* The logical pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3
*
* Arduino Pin Layout video: https://youtu.be/rIqeVCX09FA
* AVR alternate pin function overview video: https://youtu.be/1yd8wuI5Plg
*/
#include "../fastio.h"
@@ -679,7 +676,6 @@
#define PF7_PWM 0
#define PF7_DDR DDRF
/**
* Some of the pin mapping functions of the Teensduino extension to the Arduino IDE
* do not function the same as the other Arduino extensions.
@@ -0,0 +1,22 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
-3
View File
@@ -163,7 +163,6 @@ bool pwm_status(uint8_t pin) {
SERIAL_ECHO_SP(2);
} // pwm_status
const volatile uint8_t* const PWM_other[][3] PROGMEM = {
{ &TCCR0A, &TCCR0B, &TIMSK0 },
{ &TCCR1A, &TCCR1B, &TIMSK1 },
@@ -181,7 +180,6 @@ const volatile uint8_t* const PWM_other[][3] PROGMEM = {
#endif
};
const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
#ifdef TIMER0A
@@ -217,7 +215,6 @@ const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
#endif
};
#define TCCR_A(T) pgm_read_word(&PWM_other[T][0])
#define TCCR_B(T) pgm_read_word(&PWM_other[T][1])
#define TIMSK(T) pgm_read_word(&PWM_other[T][2])
@@ -120,8 +120,7 @@ void u8g_spiSend_sw_AVR_mode_3(uint8_t val) {
U8G_ATOMIC_END();
}
#if ENABLED(FYSETC_MINI_12864)
#if U8G_SPI_USE_MODE_3
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_3
#else
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_0
@@ -144,9 +143,9 @@ uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
break;
case U8G_COM_MSG_CHIP_SELECT:
#if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
#if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
u8g_com_arduino_digital_write(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
u8g_com_arduino_digital_write(u8g, U8G_PI_CS, LOW);
}
+1 -1
View File
@@ -42,7 +42,7 @@
// Public functions
// ------------------------
#if ANY(DUE_SOFTWARE_SPI, FORCE_SOFT_SPI)
#if ANY(SOFTWARE_SPI, FORCE_SOFT_SPI)
// ------------------------
// Software SPI
-1
View File
@@ -474,7 +474,6 @@ void MarlinSerial<Cfg>::flushTX() {
}
}
// If not using the USB port as serial port
#if defined(SERIAL_PORT) && SERIAL_PORT >= 0
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT> >;
+3 -3
View File
@@ -958,14 +958,14 @@ static void ee_Init() {
#ifndef MARLIN_EEPROM_SIZE
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
#endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() { ee_Init(); return true; }
bool PersistentStore::access_finish() { ee_Flush(); return true; }
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
uint16_t written = 0;
while (size--) {
uint8_t * const p = (uint8_t * const)pos;
uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
uint8_t v = *value;
if (v != ee_Read(uint32_t(p))) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
ee_Write(uint32_t(p), v);
@@ -984,7 +984,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
uint8_t c = ee_Read(uint32_t(pos));
uint8_t c = ee_Read(uint32_t(REAL_EEPROM_ADDR(pos)));
if (writing) *value = c;
crc16(crc, &c, 1);
pos++;
+3 -3
View File
@@ -36,14 +36,14 @@
#ifndef MARLIN_EEPROM_SIZE
#error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM."
#endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() { eeprom_init(); return true; }
bool PersistentStore::access_finish() { return true; }
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
uint16_t written = 0;
while (size--) {
uint8_t * const p = (uint8_t * const)pos;
uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
uint8_t v = *value;
if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed!
eeprom_write_byte(p, v);
@@ -62,7 +62,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
uint8_t c = eeprom_read_byte((uint8_t*)pos);
const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos));
if (writing) *value = c;
crc16(crc, &c, 1);
pos++;
+1
View File
@@ -64,6 +64,7 @@ void setup_endstop_interrupts() {
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
+1 -1
View File
@@ -61,7 +61,7 @@
#else
#define G2_PWM_Z 0
#endif
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
#if HAS_MOTOR_CURRENT_PWM_E
#define G2_PWM_E 1
#else
#define G2_PWM_E 0
-1
View File
@@ -49,7 +49,6 @@ extern volatile uint32_t *SODR_A, *SODR_B, *CODR_A, *CODR_B;
#define PWM_MAP_INIT_ROW(IO,ZZ) { ZZ == 'A' ? SODR_A : SODR_B, ZZ == 'A' ? CODR_A : CODR_B, 1 << _PIN(IO) }
#define PWM_MAP_INIT { PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_X_PIN, 'B'), \
PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Y_PIN, 'B'), \
PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Z_PIN, 'B'), \
-1
View File
@@ -168,7 +168,6 @@ const G2_PinDescription G2_g_APinDescription[] = {
{ PIOB, PIO_PB21, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 52
{ PIOB, PIO_PB14, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 53
// 54 .. 65 - Analog pins
// ----------------------
{ PIOA, PIO_PA16X1_AD7, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC0, ADC7, NOT_ON_PWM, NOT_ON_TIMER }, // AD0
@@ -0,0 +1,22 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
+6 -7
View File
@@ -68,16 +68,15 @@
* Usually the hardware SPI pins are only available to the LCD. This makes the DUE hard SPI used at the same time
* as the TMC2130 soft SPI the most common setup.
*/
#define _IS_HW_SPI(P) (defined(TMC_SPI_##P) && (TMC_SPI_##P == SD_MOSI_PIN || TMC_SPI_##P == SD_MISO_PIN || TMC_SPI_##P == SD_SCK_PIN))
#if HAS_MEDIA && HAS_DRIVER(TMC2130)
#if ENABLED(TMC_USE_SW_SPI)
#if DISABLED(DUE_SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
#error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."
#endif
#elif ENABLED(DUE_SOFTWARE_SPI)
#define _IS_HW_SPI(P) (defined(TMC_SPI_##P) && (TMC_SPI_##P == SD_MOSI_PIN || TMC_SPI_##P == SD_MISO_PIN || TMC_SPI_##P == SD_SCK_PIN))
#if DISABLED(SOFTWARE_SPI) && ENABLED(TMC_USE_SW_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
#error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."
#endif
#if ENABLED(SOFTWARE_SPI) && DISABLED(TMC_USE_SW_SPI)
#error "DUE software SPI is required but is incompatible with TMC2130 hardware SPI. Enable TMC_USE_SW_SPI to fix."
#endif
#undef _IS_HW_SPI
#endif
#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY
+2 -2
View File
@@ -24,7 +24,7 @@
/**
* Define SPI Pins: SCK, MISO, MOSI, SS
*
* Available chip select pins for HW SPI are 4 10 52 77
* Available chip select pins for HW SPI are 4 10 52 77 87
*/
#if SDSS == 4 || SDSS == 10 || SDSS == 52 || SDSS == 77 || SDSS == 87
#if SDSS == 4
@@ -48,7 +48,7 @@
#define SD_MOSI_PIN 75
#else
// defaults
#define DUE_SOFTWARE_SPI
#define SOFTWARE_SPI
#ifndef SD_SCK_PIN
#define SD_SCK_PIN 52
#endif
@@ -66,7 +66,7 @@
#include <U8glib-HAL.h>
#if ENABLED(FYSETC_MINI_12864)
#if U8G_SPI_USE_MODE_3
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_3
#else
#define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_0
@@ -96,15 +96,15 @@ uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void
break;
case U8G_COM_MSG_CHIP_SELECT:
#if ENABLED(FYSETC_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 1); //set SCK to mode 3 idle state before CS goes active
#if U8G_SPI_USE_MODE_3 // LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, LOW);
}
else {
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, HIGH);
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0); //set SCK to mode 0 idle state after CS goes inactive
u8g_SetPILevel_DUE(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive
}
#else
u8g_SetPILevel_DUE(u8g, U8G_PI_CS, !arg_val);
+1 -1
View File
@@ -11,7 +11,7 @@ if pioutil.is_pio_build():
if current_OS == 'Windows':
Import("env")
env = pioutil.env
# Use bossac.exe on Windows
env.Replace(
-11
View File
@@ -142,7 +142,6 @@
*/
#define COMPILER_PACK_RESET() COMPILER_PRAGMA(pack())
/**
* \brief Set aligned boundary.
*/
@@ -283,7 +282,6 @@ typedef double F64; //!< 64-bit floating-point number.
typedef uint32_t iram_size_t;
//! @}
/*! \name Status Types
*/
//! @{
@@ -291,7 +289,6 @@ typedef bool Status_bool_t; //!< Boolean status.
typedef U8 Status_t; //!< 8-bit-coded status.
//! @}
/*! \name Aliasing Aggregate Types
*/
//! @{
@@ -462,7 +459,6 @@ typedef struct
#endif
//! @}
#ifndef __ASSEMBLY__ // not for assembling.
//! \name Optimization Control
@@ -581,7 +577,6 @@ typedef struct
//! @}
/*! \name Zero-Bit Counting
*
* Under GCC, __builtin_clz and __builtin_ctz behave like macros when
@@ -692,7 +687,6 @@ typedef struct
//! @}
/*! \name Bit Reversing
*/
//! @{
@@ -732,7 +726,6 @@ typedef struct
//! @}
/*! \name Alignment
*/
//! @{
@@ -798,7 +791,6 @@ typedef struct
*/
#define Long_call(addr) ((*(void (*)(void))(addr))())
/*! \name MCU Endianism Handling
* ARM is MCU little endianism.
*/
@@ -868,7 +860,6 @@ typedef struct
#define CPU_TO_BE32(x) swap32(x)
//! @}
/*! \name Endianism Conversion
*
* The same considerations as for clz and ctz apply here but GCC's
@@ -955,7 +946,6 @@ typedef struct
//! @}
/*! \name Target Abstraction
*/
//! @{
@@ -997,7 +987,6 @@ typedef U8 Byte; //!< 8-bit unsigned integer.
#endif // #ifndef __ASSEMBLY__
#ifdef __ICCARM__
#define SHORTENUM __packed
#elif defined(__GNUC__)
-2
View File
@@ -81,7 +81,6 @@
#define LUN_0_NAME "\"SD/MMC Card\""
//! @}
/*! \name Actions Associated with Memory Accesses
*
* Write here the action to associate with each memory access.
@@ -112,5 +111,4 @@
#define GLOBAL_WR_PROTECT false //!< Management of a global write protection.
//! @}
#endif // _CONF_ACCESS_H_
-1
View File
@@ -96,5 +96,4 @@
// - UPLL frequency: 480MHz
// - USB clock: 480 / 1 = 480MHz
#endif /* CONF_CLOCK_H_INCLUDED */
-4
View File
@@ -88,7 +88,6 @@
#endif
//@}
/**
* USB Device Callbacks definitions (Optional)
* @{
@@ -150,7 +149,6 @@
//@}
/**
* USB Interface Configuration
* @{
@@ -210,7 +208,6 @@
//@}
//@}
/**
* Configuration of MSC interface
* @{
@@ -245,7 +242,6 @@
//@}
/**
* Description of Composite Device
* @{
-28
View File
@@ -68,7 +68,6 @@
#endif
#include "ctrl_access.h"
//_____ D E F I N I T I O N S ______________________________________________
#ifdef FREERTOS_USED
@@ -112,7 +111,6 @@ static xSemaphoreHandle ctrl_access_semphr = NULL;
#endif // FREERTOS_USED
#if MAX_LUN
/*! \brief Initializes an entry of the LUN descriptor table.
@@ -242,17 +240,14 @@ static const struct
#endif
#if GLOBAL_WR_PROTECT == true
bool g_wr_protect;
#endif
/*! \name Control Interface
*/
//! @{
#ifdef FREERTOS_USED
bool ctrl_access_init(void)
@@ -270,7 +265,6 @@ bool ctrl_access_init(void)
return true;
}
/*! \brief Locks accesses to LUNs.
*
* \return \c true if the access was successfully locked, else \c false.
@@ -288,7 +282,6 @@ static bool ctrl_access_lock(void)
#endif // FREERTOS_USED
U8 get_nb_lun(void)
{
#if MEM_USB == ENABLE
@@ -309,13 +302,11 @@ U8 get_nb_lun(void)
#endif
}
U8 get_cur_lun(void)
{
return LUN_ID_0;
}
Ctrl_status mem_test_unit_ready(U8 lun)
{
Ctrl_status status;
@@ -337,7 +328,6 @@ Ctrl_status mem_test_unit_ready(U8 lun)
return status;
}
Ctrl_status mem_read_capacity(U8 lun, U32 *u32_nb_sector)
{
Ctrl_status status;
@@ -359,7 +349,6 @@ Ctrl_status mem_read_capacity(U8 lun, U32 *u32_nb_sector)
return status;
}
U8 mem_sector_size(U8 lun)
{
U8 sector_size;
@@ -381,7 +370,6 @@ U8 mem_sector_size(U8 lun)
return sector_size;
}
bool mem_unload(U8 lun, bool unload)
{
bool unloaded;
@@ -433,7 +421,6 @@ bool mem_wr_protect(U8 lun)
return wr_protect;
}
bool mem_removal(U8 lun)
{
bool removal;
@@ -458,7 +445,6 @@ bool mem_removal(U8 lun)
return removal;
}
const char *mem_name(U8 lun)
{
#if MAX_LUN==0
@@ -475,17 +461,14 @@ const char *mem_name(U8 lun)
#endif
}
//! @}
#if ACCESS_USB == true
/*! \name MEM <-> USB Interface
*/
//! @{
Ctrl_status memory_2_usb(U8 lun, U32 addr, U16 nb_sector)
{
Ctrl_status status;
@@ -505,7 +488,6 @@ Ctrl_status memory_2_usb(U8 lun, U32 addr, U16 nb_sector)
return status;
}
Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector)
{
Ctrl_status status;
@@ -525,19 +507,16 @@ Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector)
return status;
}
//! @}
#endif // ACCESS_USB == true
#if ACCESS_MEM_TO_RAM == true
/*! \name MEM <-> RAM Interface
*/
//! @{
Ctrl_status memory_2_ram(U8 lun, U32 addr, void *ram)
{
Ctrl_status status;
@@ -564,7 +543,6 @@ Ctrl_status memory_2_ram(U8 lun, U32 addr, void *ram)
return status;
}
Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram)
{
Ctrl_status status;
@@ -591,19 +569,16 @@ Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram)
return status;
}
//! @}
#endif // ACCESS_MEM_TO_RAM == true
#if ACCESS_STREAM == true
/*! \name Streaming MEM <-> MEM Interface
*/
//! @{
#if ACCESS_MEM_TO_MEM == true
#include "fat.h"
@@ -625,21 +600,18 @@ Ctrl_status stream_mem_to_mem(U8 src_lun, U32 src_addr, U8 dest_lun, U32 dest_ad
#endif // ACCESS_MEM_TO_MEM == true
Ctrl_status stream_state(U8 id)
{
UNUSED(id);
return CTRL_GOOD;
}
U16 stream_stop(U8 id)
{
UNUSED(id);
return 0;
}
//! @}
#endif // ACCESS_STREAM
-9
View File
@@ -56,7 +56,6 @@
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
*/
#ifndef _CTRL_ACCESS_H_
#define _CTRL_ACCESS_H_
@@ -89,7 +88,6 @@ typedef enum
CTRL_BUSY = FAIL + 2 //!< Memory not initialized or changed.
} Ctrl_status;
// FYI: Each Logical Unit Number (LUN) corresponds to a memory.
// Check LUN defines.
@@ -136,7 +134,6 @@ typedef enum
#define LUN_ID_USB (MAX_LUN) //!< First dynamic LUN (USB host mass storage).
//! @}
// Include LUN header files.
#if LUN_0 == ENABLE
#include LUN_0_INCLUDE
@@ -166,13 +163,11 @@ typedef enum
#include LUN_USB_INCLUDE
#endif
// Check the configuration of write protection in conf_access.h.
#ifndef GLOBAL_WR_PROTECT
#error GLOBAL_WR_PROTECT must be defined as true or false in conf_access.h
#endif
#if GLOBAL_WR_PROTECT == true
//! Write protect.
@@ -180,7 +175,6 @@ extern bool g_wr_protect;
#endif
/*! \name Control Interface
*/
//! @{
@@ -279,7 +273,6 @@ extern const char *mem_name(U8 lun);
//! @}
#if ACCESS_USB == true
/*! \name MEM <-> USB Interface
@@ -310,7 +303,6 @@ extern Ctrl_status usb_2_memory(U8 lun, U32 addr, U16 nb_sector);
#endif // ACCESS_USB == true
#if ACCESS_MEM_TO_RAM == true
/*! \name MEM <-> RAM Interface
@@ -341,7 +333,6 @@ extern Ctrl_status ram_2_memory(U8 lun, U32 addr, const void *ram);
#endif // ACCESS_MEM_TO_RAM == true
#if ACCESS_STREAM == true
/*! \name Streaming MEM <-> MEM Interface
-1
View File
@@ -57,7 +57,6 @@
#include "preprocessor.h"
//! Maximal number of repetitions supported by MREPEAT.
#define MREPEAT_LIMIT 256
-2
View File
@@ -128,7 +128,6 @@ static inline void osc_enable(uint32_t ul_id) {
pmc_switch_sclk_to_32kxtal(PMC_OSC_BYPASS);
break;
case OSC_MAINCK_4M_RC:
pmc_switch_mainck_to_fastrc(CKGR_MOR_MOSCRCF_4_MHz);
break;
@@ -141,7 +140,6 @@ static inline void osc_enable(uint32_t ul_id) {
pmc_switch_mainck_to_fastrc(CKGR_MOR_MOSCRCF_12_MHz);
break;
case OSC_MAINCK_XTAL:
pmc_switch_mainck_to_xtal(PMC_OSC_XTAL/*,
pmc_us_to_moscxtst(BOARD_OSC_STARTUP_US,
-1
View File
@@ -51,5 +51,4 @@
#include "stringz.h"
#include "mrepeat.h"
#endif // _PREPROCESSOR_H_
-1
View File
@@ -86,7 +86,6 @@ enum scsi_sbc_mode {
SCSI_MS_MODE_CACHING = 0x08, //!< Caching mode page
};
//! \name SBC-2 Device-Specific Parameter
//@{
#define SCSI_MS_SBC_WP 0x80 //!< Write Protected
+20 -22
View File
@@ -18,30 +18,30 @@ extern "C" {
void sd_mmc_spi_mem_init() {
}
Ctrl_status sd_mmc_spi_test_unit_ready() {
#ifdef DISABLE_DUE_SD_MMC
return CTRL_NO_PRESENT;
#endif
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
return CTRL_NO_PRESENT;
return CTRL_GOOD;
}
// NOTE: This function is defined as returning the address of the last block
// in the card, which is cardSize() - 1
Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector) {
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
return CTRL_NO_PRESENT;
*nb_sector = card.diskIODriver()->cardSize() - 1;
return CTRL_GOOD;
inline bool media_ready() {
return IS_SD_INSERTED() && !IS_SD_PRINTING() && !IS_SD_FILE_OPEN() && card.isMounted();
}
bool sd_mmc_spi_unload(bool) { return true; }
bool sd_mmc_spi_wr_protect() { return false; }
bool sd_mmc_spi_removal() {
return (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted());
bool sd_mmc_spi_removal() { return !media_ready(); }
Ctrl_status sd_mmc_spi_test_unit_ready() {
#ifdef DISABLE_DUE_SD_MMC
return CTRL_NO_PRESENT;
#endif
if (!media_ready()) return CTRL_NO_PRESENT;
return CTRL_GOOD;
}
// NOTE: This function is defined as returning the address of the last block
// in the card, which is cardSize() - 1
Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector) {
if (!media_ready()) return CTRL_NO_PRESENT;
*nb_sector = card.diskIODriver()->cardSize() - 1;
return CTRL_GOOD;
}
#if ACCESS_USB == true
@@ -61,8 +61,7 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) {
#ifdef DISABLE_DUE_SD_MMC
return CTRL_NO_PRESENT;
#endif
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
return CTRL_NO_PRESENT;
if (!media_ready()) return CTRL_NO_PRESENT;
#ifdef DEBUG_MMC
{
@@ -101,8 +100,7 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) {
#ifdef DISABLE_DUE_SD_MMC
return CTRL_NO_PRESENT;
#endif
if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted())
return CTRL_NO_PRESENT;
if (!media_ready()) return CTRL_NO_PRESENT;
#ifdef DEBUG_MMC
{
+8 -13
View File
@@ -45,7 +45,6 @@
* Support and FAQ: visit <a href="https://www.atmel.com/design-support/">Atmel Support</a>
*/
#ifndef _SD_MMC_SPI_MEM_H_
#define _SD_MMC_SPI_MEM_H_
@@ -63,22 +62,19 @@
#error sd_mmc_spi_mem.h is #included although SD_MMC_SPI_MEM is disabled
#endif
#include "ctrl_access.h"
//_____ D E F I N I T I O N S ______________________________________________
#define SD_MMC_REMOVED 0
#define SD_MMC_INSERTED 1
#define SD_MMC_REMOVING 2
//---- CONTROL FUNCTIONS ----
//!
//! @brief This function initializes the hw/sw resources required to drive the SD_MMC_SPI.
//!/
extern void sd_mmc_spi_mem_init(void);
void sd_mmc_spi_mem_init();
//!
//! @brief This function tests the state of the SD_MMC memory and sends it to the Host.
@@ -91,7 +87,7 @@ extern void sd_mmc_spi_mem_init(void);
//! Media not present -> CTRL_NO_PRESENT
//! Media has changed -> CTRL_BUSY
//!/
extern Ctrl_status sd_mmc_spi_test_unit_ready(void);
Ctrl_status sd_mmc_spi_test_unit_ready();
//!
//! @brief This function gives the address of the last valid sector.
@@ -102,7 +98,7 @@ extern Ctrl_status sd_mmc_spi_test_unit_ready(void);
//! Media ready -> CTRL_GOOD
//! Media not present -> CTRL_NO_PRESENT
//!/
extern Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
/*! \brief Unload/Load the SD/MMC card selected
*
@@ -113,7 +109,7 @@ extern Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector);
*
* \return \c true if unload/load done success.
*/
extern bool sd_mmc_spi_unload(bool unload);
bool sd_mmc_spi_unload(bool unload);
//!
//! @brief This function returns the write protected status of the memory.
@@ -124,15 +120,14 @@ extern bool sd_mmc_spi_unload(bool unload);
//!
//! @return false -> the memory is not write-protected (always)
//!/
extern bool sd_mmc_spi_wr_protect(void);
bool sd_mmc_spi_wr_protect();
//!
//! @brief This function tells if the memory has been removed or not.
//!
//! @return false -> The memory isn't removed
//!
extern bool sd_mmc_spi_removal(void);
bool sd_mmc_spi_removal();
//---- ACCESS DATA FUNCTIONS ----
@@ -152,7 +147,7 @@ extern bool sd_mmc_spi_removal(void);
//! It is ready -> CTRL_GOOD
//! A error occur -> CTRL_FAIL
//!
extern Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
//! This function initializes the SD/MMC memory for a write operation
//!
@@ -166,7 +161,7 @@ extern Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector);
//! It is ready -> CTRL_GOOD
//! An error occurs -> CTRL_FAIL
//!
extern Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector);
Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector);
#endif // #if ACCESS_USB == true
-1
View File
@@ -212,7 +212,6 @@ extern "C" {
#define CONFIG_USBCLK_DIV
#endif
extern void sysclk_enable_usb(void);
extern void sysclk_disable_usb(void);
-1
View File
@@ -83,7 +83,6 @@ static usb_iface_desc_t UDC_DESC_STORAGE *udc_ptr_iface;
//! @}
//! \name Internal structure to store the USB device main strings
//! @{
-2
View File
@@ -685,6 +685,4 @@ usb_iface_desc_t UDC_DESC_STORAGE *udc_get_interface_desc(void);
} \endcode
*/
#endif // _UDC_H_
-1
View File
@@ -213,7 +213,6 @@ void udd_send_remotewakeup(void);
*/
void udd_set_setup_payload( uint8_t *payload, uint16_t payload_size );
/**
* \name Endpoint Management
*
-10
View File
@@ -457,7 +457,6 @@ void udi_cdc_data_sof_notify(void)
#endif
}
// ------------------------
//------- Internal routines to control serial line
@@ -520,7 +519,6 @@ static void udi_cdc_ctrl_state_change(uint8_t port, bool b_set, le16_t bit_mask)
udi_cdc_ctrl_state_notify(port, ep_comm);
}
static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep)
{
#if UDI_CDC_PORT_NB == 1 // To optimize code
@@ -542,7 +540,6 @@ static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep)
}
}
static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
{
uint8_t port;
@@ -578,11 +575,9 @@ static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n,
udi_cdc_ctrl_state_notify(port, ep);
}
// ------------------------
//------- Internal routines to process data transfer
static bool udi_cdc_rx_start(uint8_t port)
{
irqflags_t flags;
@@ -632,7 +627,6 @@ static bool udi_cdc_rx_start(uint8_t port)
udi_cdc_data_received);
}
static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
{
uint8_t buf_sel_trans;
@@ -668,7 +662,6 @@ static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_
udi_cdc_rx_start(port);
}
static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep)
{
uint8_t port;
@@ -700,7 +693,6 @@ static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t
udi_cdc_tx_send(port);
}
static void udi_cdc_tx_send(uint8_t port)
{
irqflags_t flags;
@@ -780,11 +772,9 @@ static void udi_cdc_tx_send(uint8_t port)
udi_cdc_data_sent);
}
// ------------------------
//------- Application interface
//------- Application interface
void udi_cdc_ctrl_signal_dcd(bool b_set)
-2
View File
@@ -106,7 +106,6 @@ typedef struct {
usb_ep_desc_t ep_notify;
} udi_cdc_comm_desc_t;
/**
* \brief Data Class interface descriptor
*
@@ -121,7 +120,6 @@ typedef struct {
usb_ep_desc_t ep_out;
} udi_cdc_data_desc_t;
//! CDC communication endpoints size for all speeds
#define UDI_CDC_COMM_EP_SIZE 64
//! CDC data endpoints size for FS speed (8B, 16B, 32B, 64B)
-1
View File
@@ -109,7 +109,6 @@ UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
.bNumConfigurations = 1
};
#ifdef USB_DEVICE_HS_SUPPORT
//! USB Device Qualifier Descriptor for HS
COMPILER_WORD_ALIGNED
@@ -93,7 +93,6 @@ UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {
.bNumConfigurations = 1
};
#ifdef USB_DEVICE_HS_SUPPORT
//! USB Device Qualifier Descriptor for HS
COMPILER_WORD_ALIGNED
@@ -147,7 +146,6 @@ UDC_DESC_STORAGE udc_desc_t udc_desc_hs = {
};
#endif
/**
* \name UDC structures which contains all USB Device definitions
*/
-6
View File
@@ -86,7 +86,6 @@ UDC_DESC_STORAGE udi_api_t udi_api_msc = {
};
//@}
/**
* \ingroup udi_msc_group
* \defgroup udi_msc_group_internal Implementation of UDI MSC
@@ -137,7 +136,6 @@ volatile bool udi_msc_b_reset_trans = true;
//@}
/**
* \name Internal routines
*/
@@ -190,7 +188,6 @@ static void udi_msc_cbw_received(udd_ep_status_t status,
static bool udi_msc_cbw_validate(uint32_t alloc_len, uint8_t dir_flag);
//@}
/**
* \name Routines to process small data packet
*/
@@ -217,7 +214,6 @@ static void udi_msc_data_sent(udd_ep_status_t status, iram_size_t nb_sent,
udd_ep_id_t ep);
//@}
/**
* \name Routines to process CSW packet
*/
@@ -250,7 +246,6 @@ static void udi_msc_csw_sent(udd_ep_status_t status, iram_size_t nb_sent,
udd_ep_id_t ep);
//@}
/**
* \name Routines manage sense data
*/
@@ -307,7 +302,6 @@ static void udi_msc_sense_fail_cdb_invalid(void);
static void udi_msc_sense_command_invalid(void);
//@}
/**
* \name Routines manage SCSI Commands
*/
@@ -293,7 +293,6 @@ do { \
# endif
#endif
/**
* \name Power management routine.
*/
@@ -310,7 +309,6 @@ static bool udd_b_idle;
//! State of sleep manager
static bool udd_b_sleep_initialized = false;
/*! \brief Authorize or not the CPU powerdown mode
*
* \param b_enable true to authorize idle mode
@@ -338,7 +336,6 @@ static void udd_sleep_mode(bool b_idle)
//@}
/**
* \name Control endpoint low level management routine.
*
@@ -410,7 +407,6 @@ static void udd_ctrl_send_zlp_out(void);
//! \brief Call callback associated to setup request
static void udd_ctrl_endofrequest(void);
/**
* \brief Main interrupt routine for control endpoint
*
@@ -422,7 +418,6 @@ static bool udd_ctrl_interrupt(void);
//@}
/**
* \name Management of bulk/interrupt/isochronous endpoints
*
@@ -460,7 +455,6 @@ typedef struct {
uint8_t stall_requested:1;
} udd_ep_job_t;
//! Array to register a job on bulk/interrupt/isochronous endpoint
static udd_ep_job_t udd_ep_job[USB_DEVICE_MAX_EP];
@@ -522,7 +516,6 @@ static bool udd_ep_interrupt(void);
#endif // (0!=USB_DEVICE_MAX_EP)
//@}
// ------------------------
//--- INTERNAL ROUTINES TO MANAGED GLOBAL EVENTS
@@ -671,13 +664,11 @@ udd_interrupt_sof_end:
return;
}
bool udd_include_vbus_monitoring(void)
{
return true;
}
void udd_enable(void)
{
irqflags_t flags;
@@ -764,7 +755,6 @@ void udd_enable(void)
cpu_irq_restore(flags);
}
void udd_disable(void)
{
irqflags_t flags;
@@ -866,7 +856,6 @@ void udd_attach(void)
cpu_irq_restore(flags);
}
void udd_detach(void)
{
otg_unfreeze_clock();
@@ -883,7 +872,6 @@ void udd_detach(void)
udd_sleep_mode(false);
}
bool udd_is_high_speed(void)
{
#ifdef USB_DEVICE_HS_SUPPORT
@@ -893,7 +881,6 @@ bool udd_is_high_speed(void)
#endif
}
void udd_set_address(uint8_t address)
{
udd_disable_address();
@@ -901,13 +888,11 @@ void udd_set_address(uint8_t address)
udd_enable_address();
}
uint8_t udd_getaddress(void)
{
return udd_get_configured_address();
}
uint16_t udd_get_frame_number(void)
{
return udd_frame_number();
@@ -930,14 +915,12 @@ void udd_send_remotewakeup(void)
}
}
void udd_set_setup_payload(uint8_t *payload, uint16_t payload_size)
{
udd_g_ctrlreq.payload = payload;
udd_g_ctrlreq.payload_size = payload_size;
}
#if (0 != USB_DEVICE_MAX_EP)
bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes,
uint16_t MaxEndpointSize)
@@ -1061,7 +1044,6 @@ bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes,
return true;
}
void udd_ep_free(udd_ep_id_t ep)
{
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
@@ -1074,14 +1056,12 @@ void udd_ep_free(udd_ep_id_t ep)
udd_ep_job[ep_index - 1].stall_requested = false;
}
bool udd_ep_is_halted(udd_ep_id_t ep)
{
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
return Is_udd_endpoint_stall_requested(ep_index);
}
bool udd_ep_set_halt(udd_ep_id_t ep)
{
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
@@ -1122,7 +1102,6 @@ bool udd_ep_set_halt(udd_ep_id_t ep)
return true;
}
bool udd_ep_clear_halt(udd_ep_id_t ep)
{
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
@@ -1163,7 +1142,6 @@ bool udd_ep_clear_halt(udd_ep_id_t ep)
return true;
}
bool udd_ep_run(udd_ep_id_t ep, bool b_shortpacket,
uint8_t * buf, iram_size_t buf_size,
udd_callback_trans_t callback)
@@ -1230,7 +1208,6 @@ bool udd_ep_run(udd_ep_id_t ep, bool b_shortpacket,
#endif
}
void udd_ep_abort(udd_ep_id_t ep)
{
uint8_t ep_index = ep & USB_EP_ADDR_MASK;
@@ -1259,7 +1236,6 @@ void udd_ep_abort(udd_ep_id_t ep)
udd_ep_abort_job(ep);
}
bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
udd_callback_halt_cleared_t callback)
{
@@ -1294,7 +1270,6 @@ bool udd_ep_wait_stall_clear(udd_ep_id_t ep,
}
#endif // (0 != USB_DEVICE_MAX_EP)
#ifdef USB_DEVICE_HS_SUPPORT
void udd_test_mode_j(void)
@@ -1303,20 +1278,17 @@ void udd_test_mode_j(void)
udd_enable_hs_test_mode_j();
}
void udd_test_mode_k(void)
{
udd_enable_hs_test_mode();
udd_enable_hs_test_mode_k();
}
void udd_test_mode_se0_nak(void)
{
udd_enable_hs_test_mode();
}
void udd_test_mode_packet(void)
{
uint8_t i;
@@ -1360,8 +1332,6 @@ void udd_test_mode_packet(void)
}
#endif // USB_DEVICE_HS_SUPPORT
// ------------------------
//--- INTERNAL ROUTINES TO MANAGED THE CONTROL ENDPOINT
@@ -1411,7 +1381,6 @@ static void udd_ctrl_init(void)
udd_ep_control_state = UDD_EPCTRL_SETUP;
}
static void udd_ctrl_setup_received(void)
{
irqflags_t flags;
@@ -1473,7 +1442,6 @@ static void udd_ctrl_setup_received(void)
}
}
static void udd_ctrl_in_sent(void)
{
static bool b_shortpacket = false;
@@ -1557,7 +1525,6 @@ static void udd_ctrl_in_sent(void)
cpu_irq_restore(flags);
}
static void udd_ctrl_out_received(void)
{
irqflags_t flags;
@@ -1648,7 +1615,6 @@ static void udd_ctrl_out_received(void)
cpu_irq_restore(flags);
}
static void udd_ctrl_underflow(void)
{
if (Is_udd_out_received(0))
@@ -1665,7 +1631,6 @@ static void udd_ctrl_underflow(void)
}
}
static void udd_ctrl_overflow(void)
{
if (Is_udd_in_send(0))
@@ -1681,7 +1646,6 @@ static void udd_ctrl_overflow(void)
}
}
static void udd_ctrl_stall_data(void)
{
// Stall all packets on IN & OUT control endpoint
@@ -1689,7 +1653,6 @@ static void udd_ctrl_stall_data(void)
udd_enable_stall_handshake(0);
}
static void udd_ctrl_send_zlp_in(void)
{
irqflags_t flags;
@@ -1707,7 +1670,6 @@ static void udd_ctrl_send_zlp_in(void)
cpu_irq_restore(flags);
}
static void udd_ctrl_send_zlp_out(void)
{
irqflags_t flags;
@@ -1723,7 +1685,6 @@ static void udd_ctrl_send_zlp_out(void)
cpu_irq_restore(flags);
}
static void udd_ctrl_endofrequest(void)
{
// If a callback is registered then call it
@@ -1732,7 +1693,6 @@ static void udd_ctrl_endofrequest(void)
}
}
static bool udd_ctrl_interrupt(void)
{
@@ -1783,7 +1743,6 @@ static bool udd_ctrl_interrupt(void)
return false;
}
// ------------------------
//--- INTERNAL ROUTINES TO MANAGED THE BULK/INTERRUPT/ISOCHRONOUS ENDPOINTS
@@ -1798,7 +1757,6 @@ static void udd_ep_job_table_reset(void)
}
}
static void udd_ep_job_table_kill(void)
{
uint8_t i;
@@ -1809,7 +1767,6 @@ static void udd_ep_job_table_kill(void)
}
}
static void udd_ep_abort_job(udd_ep_id_t ep)
{
ep &= USB_EP_ADDR_MASK;
@@ -1818,7 +1775,6 @@ static void udd_ep_abort_job(udd_ep_id_t ep)
udd_ep_finish_job(&udd_ep_job[ep - 1], true, ep);
}
static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_num)
{
if (ptr_job->busy == false) {
@@ -1889,7 +1845,6 @@ static void udd_ep_trans_done(udd_ep_id_t ep)
udd_dma_ctrl |= UOTGHS_DEVDMACONTROL_END_BUFFIT |
UOTGHS_DEVDMACONTROL_CHANN_ENB;
// Disable IRQs to have a short sequence
// between read of EOT_STA and DMA enable
flags = cpu_irq_save();
@@ -129,7 +129,6 @@ extern "C" {
#define Is_udd_vbus_transition() (Tst_bits(UOTGHS->UOTGHS_SR, UOTGHS_SR_VBUSTI))
//! @}
//! @name UOTGHS device attach control
//! These macros manage the UOTGHS Device attach.
//! @{
@@ -141,7 +140,6 @@ extern "C" {
#define Is_udd_detached() (Tst_bits(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_DETACH))
//! @}
//! @name UOTGHS device bus events control
//! These macros manage the UOTGHS Device bus events.
//! @{
@@ -246,7 +244,6 @@ extern "C" {
#define udd_get_configured_address() (Rd_bitfield(UOTGHS->UOTGHS_DEVCTRL, UOTGHS_DEVCTRL_UADD_Msk))
//! @}
//! @name UOTGHS Device endpoint drivers
//! These macros manage the common features of the endpoints.
//! @{
@@ -330,7 +327,6 @@ extern "C" {
#define udd_data_toggle(ep) (Rd_bitfield(UOTGHS_ARRAY(UOTGHS_DEVEPTISR[0], ep), UOTGHS_DEVEPTISR_DTSEQ_Msk))
//! @}
//! @name UOTGHS Device control endpoint
//! These macros control the endpoints.
//! @{
@@ -530,7 +526,6 @@ extern "C" {
//! Tests if IN sending interrupt is enabled
#define Is_udd_in_send_interrupt_enabled(ep) (Tst_bits(UOTGHS_ARRAY(UOTGHS_DEVEPTIMR[0], ep), UOTGHS_DEVEPTIMR_TXINE))
//! Get 64-, 32-, 16- or 8-bit access to FIFO data register of selected endpoint.
//! @param ep Endpoint of which to access FIFO data register
//! @param scale Data scale in bits: 64, 32, 16 or 8
@@ -652,7 +647,6 @@ typedef struct {
//! @}
//! @}
/// @cond 0
/**INDENT-OFF**/
#ifdef __cplusplus
-2
View File
@@ -53,7 +53,6 @@
extern "C" {
#endif
//! \ingroup usb_group
//! \defgroup otg_group UOTGHS OTG Driver
//! UOTGHS low-level driver for OTG features
@@ -74,7 +73,6 @@ bool otg_dual_enable(void);
*/
void otg_dual_disable(void);
//! @name UOTGHS OTG ID pin management
//! The ID pin come from the USB OTG connector (A and B receptable) and
//! allows to select the USB mode host or device.
-4
View File
@@ -374,7 +374,6 @@ typedef struct {
uint8_t bNumDeviceCaps;
} usb_dev_bos_desc_t;
/**
* \brief USB Device Capabilities - USB 2.0 Extension Descriptor structure
*
@@ -411,7 +410,6 @@ typedef struct {
uint8_t iFunction; //!< Index of string descriptor
} usb_association_desc_t;
/**
* \brief Standard USB configuration descriptor structure
*/
@@ -426,7 +424,6 @@ typedef struct {
uint8_t bMaxPower;
} usb_conf_desc_t;
#define USB_CONFIG_ATTR_MUST_SET (1 << 7) //!< Must always be set
#define USB_CONFIG_ATTR_BUS_POWERED (0 << 6) //!< Bus-powered
#define USB_CONFIG_ATTR_SELF_POWERED (1 << 6) //!< Self-powered
@@ -475,7 +472,6 @@ typedef struct {
uint8_t bInterval;
} usb_ep_desc_t;
/**
* \brief A standard USB string descriptor structure
*/
@@ -168,7 +168,6 @@ COMPILER_PACK_SET(1)
//! \name USB CDC Descriptors
//@{
//! CDC Header Functional Descriptor
typedef struct {
uint8_t bFunctionLength;
@@ -203,7 +202,6 @@ typedef struct {
uint8_t bSlaveInterface0;
} usb_cdc_union_desc_t;
//! \name USB CDC Call Management Capabilities
//@{
//! Device handles call management itself
@@ -278,7 +276,6 @@ typedef struct {
//@}
//@}
//! \name USB CDC notification message
//@{
@@ -47,7 +47,6 @@
#ifndef _USB_PROTOCOL_MSC_H_
#define _USB_PROTOCOL_MSC_H_
/**
* \ingroup usb_protocol_group
* \defgroup usb_msc_protocol USB Mass Storage Class (MSC) protocol definitions
@@ -89,7 +88,6 @@
#define MSC_PROTOCOL_BULK 0x50 //!< Bulk-only
//@}
/**
* \brief MSC USB requests (bRequest)
*/
@@ -98,7 +96,6 @@ enum usb_reqid_msc {
USB_REQ_MSC_GET_MAX_LUN = 0xFE //!< Get Max LUN
};
COMPILER_PACK_SET(1)
/**
@@ -122,7 +119,6 @@ struct usb_msc_cbw {
#define USB_CBW_LEN_MASK 0x1F //!< Valid bits in bCBWCBLength
//@}
/**
* \name A Command Status Wrapper (CSW).
*/
+7 -3
View File
@@ -31,24 +31,28 @@
#ifndef MARLIN_EEPROM_SIZE
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
#endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() { return EEPROM.begin(MARLIN_EEPROM_SIZE); }
bool PersistentStore::access_finish() { EEPROM.end(); return true; }
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
for (size_t i = 0; i < size; i++) {
EEPROM.write(pos++, value[i]);
const int p = REAL_EEPROM_ADDR(pos);
EEPROM.write(p, value[i]);
crc16(crc, &value[i], 1);
++pos;
}
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
for (size_t i = 0; i < size; i++) {
uint8_t c = EEPROM.read(pos++);
const int p = REAL_EEPROM_ADDR(pos);
uint8_t c = EEPROM.read(p);
if (writing) value[i] = c;
crc16(crc, &c, 1);
++pos;
}
return false;
}
@@ -59,6 +59,7 @@ void setup_endstop_interrupts() {
TERN_(USE_Z4_MAX, _ATTACH(Z4_MAX_PIN));
TERN_(USE_Z4_MIN, _ATTACH(Z4_MIN_PIN));
TERN_(USE_Z_MIN_PROBE, _ATTACH(Z_MIN_PROBE_PIN));
TERN_(USE_CALIBRATION, _ATTACH(CALIBRATION_PIN));
TERN_(USE_I_MAX, _ATTACH(I_MAX_PIN));
TERN_(USE_I_MIN, _ATTACH(I_MIN_PIN));
TERN_(USE_J_MAX, _ATTACH(J_MAX_PIN));
@@ -0,0 +1,22 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
+20 -1
View File
@@ -142,12 +142,31 @@
// ADC
//
#define HAL_ADC_VREF_MV 3300
#define HAL_ADC_RESOLUTION 10
#define HAL_ADC_RESOLUTION 12
#define GET_PIN_MAP_PIN(index) index
#define GET_PIN_MAP_INDEX(pin) pin
#define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
//
// Debug port disable
// JTMS / SWDIO = PA13
// JTCK / SWCLK = PA14
// JTDI = PA15
// JTDO = PB3
// NJTRST = PB4
//
#define DBG_SWCLK _BV(0)
#define DBG_SWDIO _BV(1)
#define DBG_TDO _BV(2)
#define DBG_TDI _BV(3)
#define DBG_TRST _BV(4)
#define DBG_ALL (DBG_SWCLK | DBG_SWDIO | DBG_TDO | DBG_TDI | DBG_TRST)
#define JTAGSWD_RESET() PORT_DebugPortSetting(DBG_ALL, Enable);
#define JTAG_DISABLE() PORT_DebugPortSetting(DBG_TDO | DBG_TDI | DBG_TRST, Disable);
#define JTAGSWD_DISABLE() PORT_DebugPortSetting(DBG_ALL, Disable);
//
// MarlinHAL implementation
//
+33 -2
View File
@@ -123,6 +123,11 @@ void MarlinHAL::init() {
// Register min serial
TERN_(POSTMORTEM_DEBUGGING, install_min_serial());
// warn if low memory after init
if (freeMemory() < 1024) {
SERIAL_WARN_MSG("HAL: low memory after init!\n");
}
}
void MarlinHAL::init_board() {}
@@ -147,7 +152,31 @@ void MarlinHAL::delay_ms(const int ms) {
delay(ms);
}
void MarlinHAL::idletask() {}
void MarlinHAL::idletask() {
#if ENABLED(MARLIN_DEV_MODE)
// check & print serial RX errors
MSerialT *serials[] = { &MSerial1, &MSerial2 };
for (int serial = 0; serial < 2; serial++) {
usart_receive_error_t err = serials[serial]->getReceiveError();
if (err != usart_receive_error_t::None) {
// "Warning: MSerial[n] RX [Framing|Parity|Overrun] Error"
SERIAL_WARN_START();
SERIAL_ECHOPGM(" MSerial");
SERIAL_ECHO(serial + 1);
SERIAL_ECHOPGM(" RX ");
switch(err) {
case usart_receive_error_t::FramingError: SERIAL_ECHOPGM("Framing"); break;
case usart_receive_error_t::ParityError: SERIAL_ECHOPGM("Parity"); break;
case usart_receive_error_t::OverrunError: SERIAL_ECHOPGM("Overrun"); break;
case usart_receive_error_t::RxDataDropped: SERIAL_ECHOPGM("DataDropped"); break;
default: break;
}
SERIAL_ECHOPGM(" Error");
SERIAL_EOL();
}
}
#endif
}
uint8_t MarlinHAL::get_reset_source() {
// Query reset cause from RMU
@@ -203,7 +232,9 @@ int MarlinHAL::freeMemory() {
return &top - _sbrk(0);
}
void MarlinHAL::adc_init() {}
void MarlinHAL::adc_init() {
analogReadResolution(HAL_ADC_RESOLUTION);
}
void MarlinHAL::adc_enable(const pin_t pin) {
#if TEMP_SENSOR_SOC
+24 -4
View File
@@ -27,7 +27,7 @@
/**
* Not every MarlinSerial instance should handle emergency parsing, as
* it would not make sense to parse GCode from TMC responses
* it would not make sense to parse G-Code from TMC responses
*/
constexpr bool serial_handles_emergency(int port) {
return false
@@ -46,14 +46,34 @@ constexpr bool serial_handles_emergency(int port) {
//
// Define serial ports
//
#define DEFINE_HWSERIAL_MARLIN(name, n) \
// serial port where RX and TX use IRQs
#define DEFINE_IRQ_SERIAL_MARLIN(name, n) \
MSerialT name(serial_handles_emergency(n), \
&USART##n##_config, \
BOARD_USART##n##_TX_PIN, \
BOARD_USART##n##_RX_PIN);
DEFINE_HWSERIAL_MARLIN(MSerial1, 1);
DEFINE_HWSERIAL_MARLIN(MSerial2, 2);
// serial port where RX uses DMA and TX uses IRQs
// all serial ports use DMA1
// since there are 4 USARTs and 4 DMA channels, we can use the USART number as the DMA channel
#define DEFINE_DMA_SERIAL_MARLIN(name, n) \
MSerialT name(serial_handles_emergency(n), \
&USART##n##_config, \
BOARD_USART##n##_TX_PIN, \
BOARD_USART##n##_RX_PIN, \
M4_DMA1, \
((en_dma_channel_t)(n - 1))); // map USART1 to DMA channel 0, USART2 to DMA channel 1, etc.
#define DEFINE_SERIAL_MARLIN(name, n) TERN(SERIAL_DMA, DEFINE_DMA_SERIAL_MARLIN(name, n), DEFINE_IRQ_SERIAL_MARLIN(name, n))
DEFINE_SERIAL_MARLIN(MSerial1, 1);
DEFINE_SERIAL_MARLIN(MSerial2, 2);
// TODO: remove this warning when SERIAL_DMA has been tested some more
#if ENABLED(SERIAL_DMA)
#warning "SERIAL_DMA may be unstable on HC32F460."
#endif
//
// Serial port assertions
+38 -8
View File
@@ -25,17 +25,42 @@
#include <drivers/usart/Usart.h>
// Optionally set uart IRQ priority to reduce overflow errors
// #define UART_IRQ_PRIO 1
//#define UART_RX_IRQ_PRIO 1
//#define UART_TX_IRQ_PRIO 1
//#define UART_RX_DMA_IRQ_PRIO 1
struct MarlinSerial : public Usart {
MarlinSerial(struct usart_config_t *usart_device, gpio_pin_t tx_pin, gpio_pin_t rx_pin) : Usart(usart_device, tx_pin, rx_pin) {}
MarlinSerial(
struct usart_config_t *usart_device,
gpio_pin_t tx_pin,
gpio_pin_t rx_pin
#if ENABLED(SERIAL_DMA)
, M4_DMA_TypeDef *dma_unit = nullptr,
en_dma_channel_t rx_dma_channel = DmaCh0
#endif
) : Usart(usart_device, tx_pin, rx_pin) {
#if ENABLED(SERIAL_DMA)
if (dma_unit != nullptr) {
enableRxDma(dma_unit, rx_dma_channel);
}
#endif
}
#ifdef UART_IRQ_PRIO
#if defined(UART_RX_IRQ_PRIO) || defined(UART_TX_IRQ_PRIO) || defined(UART_RX_DMA_IRQ_PRIO)
void setPriority() {
NVIC_SetPriority(c_dev()->interrupts.rx_data_available.interrupt_number, UART_IRQ_PRIO);
NVIC_SetPriority(c_dev()->interrupts.rx_error.interrupt_number, UART_IRQ_PRIO);
NVIC_SetPriority(c_dev()->interrupts.tx_buffer_empty.interrupt_number, UART_IRQ_PRIO);
NVIC_SetPriority(c_dev()->interrupts.tx_complete.interrupt_number, UART_IRQ_PRIO);
#if defined(UART_RX_IRQ_PRIO)
NVIC_SetPriority(c_dev()->interrupts.rx_data_available.interrupt_number, UART_RX_IRQ_PRIO);
NVIC_SetPriority(c_dev()->interrupts.rx_error.interrupt_number, UART_RX_IRQ_PRIO);
#endif
#if defined(UART_TX_IRQ_PRIO)
NVIC_SetPriority(c_dev()->interrupts.tx_buffer_empty.interrupt_number, UART_TX_IRQ_PRIO);
NVIC_SetPriority(c_dev()->interrupts.tx_complete.interrupt_number, UART_TX_IRQ_PRIO);
#endif
#if defined(UART_RX_DMA_IRQ_PRIO) && ENABLED(SERIAL_DMA)
NVIC_SetPriority(c_dev()->dma.rx.rx_data_available_dma_btc.interrupt_number, UART_RX_DMA_IRQ_PRIO);
#endif
}
void begin(uint32_t baud) {
@@ -47,7 +72,12 @@ struct MarlinSerial : public Usart {
Usart::begin(baud, config);
setPriority();
}
#endif
void begin(uint32_t baud, const stc_usart_uart_init_t *config, const bool rxNoiseFilter = true) {
Usart::begin(baud, config, rxNoiseFilter);
setPriority();
}
#endif // UART_RX_IRQ_PRIO || UART_TX_IRQ_PRIO || UART_RX_DMA_IRQ_PRIO
};
typedef Serial1Class<MarlinSerial> MSerialT;
+75
View File
@@ -0,0 +1,75 @@
/**
* app_config.h is included by the hc32f460 arduino build script for every source file.
* it is used to configure the arduino core (and ddl) automatically according
* to the settings in Configuration.h and Configuration_adv.h.
*/
#pragma once
#ifndef _HC32_APP_CONFIG_H_
#define _HC32_APP_CONFIG_H_
#include "../../inc/MarlinConfigPre.h"
//
// dev mode
//
#if ENABLED(MARLIN_DEV_MODE)
#define __DEBUG 1
#define __CORE_DEBUG 1
#endif
//
// Fault Handlers and Panic
//
#if ENABLED(POSTMORTEM_DEBUGGING)
// disable arduino core fault handler, as we define our own
#define CORE_DISABLE_FAULT_HANDLER 1
#endif
// force-enable panic handler so that we can use our custom one (in MinSerial)
#define PANIC_ENABLE 1
// use short filenames in ddl debug and core panic output
#define __DEBUG_SHORT_FILENAMES 1
#define __PANIC_SHORT_FILENAMES 1
// omit panic messages in core panic output
#define __OMIT_PANIC_MESSAGE 1
//
// Usart
//
// disable serial globals (Serial1, Serial2, ...), as we define our own
#define DISABLE_SERIAL_GLOBALS 1
// increase the size of the Usart buffers (both RX and TX)
// NOTE:
// the heap usage will increase by (SERIAL_BUFFER_SIZE - 64) * "number of serial ports used"
// if running out of heap, the system may become unstable
//#define SERIAL_BUFFER_SIZE 256
// enable support for Usart Clock Divider / Oversampling auto config
#define USART_AUTO_CLKDIV_OS_CONFIG 1
// enable USART_RX_DMA_SUPPORT core option when SERIAL_DMA is enabled
#if ENABLED(SERIAL_DMA)
#define USART_RX_DMA_SUPPORT 1
#endif
//
// Misc.
//
// redirect printf to host serial
#define REDIRECT_PRINTF_TO_SERIAL 1
// F_CPU must be known at compile time, but on HC32F460 it's not.
// Thus we assume HCLK to be 200MHz, as that's what is configured in
// 'core_hook_sysclock_init' in 'sysclock.cpp'.
// If you face issues with this assumption, please double-check with the values
// printed by 'MarlinHAL::HAL_clock_frequencies_dump'.
// see also: HAL_TIMER_RATE in timers.h
#define F_CPU 200000000 // 200MHz HCLK
#endif // _HC32_APP_CONFIG_H_
+5 -11
View File
@@ -37,7 +37,7 @@
#error "MARLIN_EEPROM_SIZE is required for IIC_BL24CXX_EEPROM."
#endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() {
eeprom_init();
@@ -49,7 +49,7 @@ bool PersistentStore::access_finish() { return true; }
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
while (size--) {
uint8_t v = *value;
uint8_t *const p = (uint8_t *const)pos;
uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
// EEPROM has only ~100,000 write cycles,
// so only write bytes that have changed!
@@ -70,16 +70,10 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size,
uint16_t *crc, const bool writing /*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing /*=true*/) {
do {
uint8_t *const p = (uint8_t *const)pos;
uint8_t c = eeprom_read_byte(p);
if (writing)
{
*value = c;
}
const uint8_t c = eeprom_read_byte((uint8_t*)REAL_EEPROM_ADDR(pos));
if (writing) *value = c;
crc16(crc, &c, 1);
pos++;
value++;
+2 -5
View File
@@ -38,9 +38,7 @@
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
#endif
size_t PersistentStore::capacity() {
return MARLIN_EEPROM_SIZE;
}
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
#define _ALIGN(x) __attribute__((aligned(x)))
static char _ALIGN(4) HAL_eeprom_data[MARLIN_EEPROM_SIZE];
@@ -85,11 +83,10 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
bool PersistentStore::read_data(int &pos, uint8_t *value, const size_t size, uint16_t *crc, const bool writing /*=true*/) {
for (size_t i = 0; i < size; i++) {
uint8_t c = HAL_eeprom_data[pos + i];
const uint8_t c = HAL_eeprom_data[pos + i];
if (writing) value[i] = c;
crc16(crc, &c, 1);
}
pos += size;
return false;
}
+4 -6
View File
@@ -35,7 +35,7 @@
#ifndef MARLIN_EEPROM_SIZE
#error "MARLIN_EEPROM_SIZE is required for I2C / SPI EEPROM."
#endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_finish() { return true; }
@@ -56,7 +56,7 @@ bool PersistentStore::access_start() {
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
while (size--) {
uint8_t *const p = (uint8_t *const)pos;
uint8_t * const p = (uint8_t * const)REAL_EEPROM_ADDR(pos);
uint8_t v = *value;
// EEPROM has only ~100,000 write cycles,
// so only write bytes that have changed!
@@ -77,10 +77,8 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing /*=true*/) {
do {
uint8_t c = eeprom_read_byte((uint8_t *)pos);
if (writing && value) {
*value = c;
}
const uint8_t c = eeprom_read_byte((uint8_t *)REAL_EEPROM_ADDR(pos));
if (writing && value) *value = c;
crc16(crc, &c, 1);
pos++;
+21 -1
View File
@@ -40,9 +40,15 @@ void endstopIRQHandler() {
CHECK(X_MAX);
CHECK(X_MIN);
CHECK(X2_MAX);
CHECK(X2_MIN);
CHECK(Y_MAX);
CHECK(Y_MIN);
CHECK(Y2_MAX);
CHECK(Y2_MIN);
CHECK(Z_MAX);
CHECK(Z_MIN);
@@ -52,6 +58,9 @@ void endstopIRQHandler() {
CHECK(Z3_MAX);
CHECK(Z3_MIN);
CHECK(Z4_MAX);
CHECK(Z4_MIN);
CHECK(Z_MIN_PROBE);
// Update endstops
@@ -69,9 +78,15 @@ void setup_endstop_interrupts() {
SETUP(X_MAX);
SETUP(X_MIN);
SETUP(X2_MAX);
SETUP(X2_MIN);
SETUP(Y_MAX);
SETUP(Y_MIN);
SETUP(Y2_MAX);
SETUP(Y2_MIN);
SETUP(Z_MAX);
SETUP(Z_MIN);
@@ -81,14 +96,19 @@ void setup_endstop_interrupts() {
SETUP(Z3_MAX);
SETUP(Z3_MIN);
SETUP(Z4_MAX);
SETUP(Z4_MIN);
SETUP(Z_MIN_PROBE);
SETUP(CALIBRATION);
#undef SETUP
}
// Ensure 1 - 10 IRQs are registered
// Disable some endstops if you encounter this error
#define ENDSTOPS_INTERRUPTS_COUNT COUNT_ENABLED(USE_X_MAX, USE_X_MIN, USE_Y_MAX, USE_Y_MIN, USE_Z_MAX, USE_Z_MIN, USE_Z2_MAX, USE_Z2_MIN, USE_Z3_MAX, USE_Z3_MIN, USE_Z_MIN_PROBE)
#define ENDSTOPS_INTERRUPTS_COUNT COUNT_ENABLED(USE_X_MAX, USE_X_MIN, USE_X2_MAX, USE_X2_MIN, USE_Y_MAX, USE_Y_MIN, USE_Y2_MAX, USE_Y2_MIN, USE_Z_MAX, USE_Z_MIN, USE_Z2_MAX, USE_Z2_MIN, USE_Z3_MAX, USE_Z3_MIN, USE_Z4_MAX, USE_Z4_MIN, USE_Z_MIN_PROBE, USE_CALIBRATION)
#if ENDSTOPS_INTERRUPTS_COUNT > 10
#error "Too many endstop interrupts! HC32F460 only supports 10 endstop interrupts."
#elif ENDSTOPS_INTERRUPTS_COUNT == 0
@@ -0,0 +1,22 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
+31 -4
View File
@@ -20,6 +20,20 @@
*
*/
#pragma once
#include <core_util.h>
#if !defined(ARDUINO_CORE_VERSION_INT) || !defined(GET_VERSION_INT)
// version macros were introduced in arduino core version 1.1.0
// below that version, we polyfill them
#define GET_VERSION_INT(major, minor, patch) ((major * 100000) + (minor * 1000) + patch)
#define ARDUINO_CORE_VERSION_INT GET_VERSION_INT(1, 0, 0)
#endif
#if ARDUINO_CORE_VERSION_INT < GET_VERSION_INT(1, 1, 0)
// because we use app_config.h introduced in arduino core version 1.1.0, the
// HAL is not compatible with older versions
#error "The HC32 HAL is not compatible with Arduino Core versions < 1.1.0. Consider updating the Arduino Core."
#endif
#ifndef BOARD_XTAL_FREQUENCY
#error "BOARD_XTAL_FREQUENCY is required for HC32F460."
@@ -58,11 +72,9 @@
#endif
#if TEMP_SENSOR_SOC
#if !defined(TEMP_SOC_PIN)
#ifndef TEMP_SOC_PIN
#error "TEMP_SOC_PIN must be defined to use TEMP_SENSOR_SOC."
#endif
#if defined(TEMP_SOC_PIN) && IS_GPIO_PIN(TEMP_SOC_PIN)
#elif IS_GPIO_PIN(TEMP_SOC_PIN)
#error "TEMP_SOC_PIN must not be a valid GPIO pin to avoid conflicts."
#endif
#endif
@@ -76,3 +88,18 @@
#error "HC32 HAL uses a custom panic handler. Do not define PANIC_USARTx_TX_PIN."
#endif
#endif
#if ENABLED(SERIAL_DMA)
#if !defined(USART_RX_DMA_SUPPORT)
#error "SERIAL_DMA requires USART_RX_DMA_SUPPORT to be enabled in the arduino core."
#endif
// USART_RX_DMA_SUPPORT does not implement core_hook_usart_rx_irq, which is required for the emergency parser
#if ENABLED(EMERGENCY_PARSER)
#error "EMERGENCY_PARSER is not supported with SERIAL_DMA. Please disable either SERIAL_DMA or EMERGENCY_PARSER."
#endif
#if ARDUINO_CORE_VERSION_INT < GET_VERSION_INT(1, 1, 0)
#error "SERIAL_DMA is not supported with arduino core version < 1.1.0."
#endif
#endif
+1 -1
View File
@@ -23,7 +23,7 @@
#ifdef ARDUINO_ARCH_HC32
#ifdef REDIRECT_PRINTF_TO_SERIAL
#if !defined(__GNUC__)
#ifndef __GNUC__
#error "only GCC is supported"
#endif
+26 -17
View File
@@ -54,7 +54,7 @@
fn \
}
stc_sd_handle_t *handle;
stc_sd_handle_t *handle = nullptr;
bool SDIO_Init() {
// Configure SDIO pins
@@ -66,36 +66,45 @@ bool SDIO_Init() {
GPIO_SetFunc(BOARD_SDIO_CMD, Func_Sdio);
GPIO_SetFunc(BOARD_SDIO_DET, Func_Sdio);
// If a handle is already initialized, free it before creating a new one
// otherwise, we will leak memory, which will eventually crash the system
if (handle != nullptr) {
delete handle->pstcDmaInitCfg;
delete handle->pstcCardInitCfg;
delete handle;
handle = nullptr;
}
// Create DMA configuration
stc_sdcard_dma_init_t *dmaConf = new stc_sdcard_dma_init_t;
dmaConf->DMAx = SDIO_DMA_PERIPHERAL;
dmaConf->enDmaCh = SDIO_DMA_CHANNEL;
// Create card configuration
// This should be a fairly safe configuration for most cards
stc_sdcard_init_t *cardConf = new stc_sdcard_init_t;
cardConf->enBusWidth = SdiocBusWidth4Bit;
cardConf->enClkFreq = SdiocClk400K;
cardConf->enSpeedMode = SdiocNormalSpeedMode;
cardConf->pstcInitCfg = nullptr;
// Create handle in DMA mode
handle = new stc_sd_handle_t;
handle->SDIOCx = SDIO_PERIPHERAL;
handle->enDevMode = SdCardDmaMode;
handle->pstcDmaInitCfg = dmaConf;
// Create card configuration
// This should be a fairly safe configuration for most cards
stc_sdcard_init_t cardConf = {
.enBusWidth = SdiocBusWidth4Bit,
.enClkFreq = SdiocClk400K,
.enSpeedMode = SdiocNormalSpeedMode,
//.pstcInitCfg = NULL,
};
//handle->pstcCardInitCfg = cardConf; // assigned in SDCARD_Init
// Initialize sd card
en_result_t rc = SDCARD_Init(handle, &cardConf);
en_result_t rc = SDCARD_Init(handle, cardConf);
if (rc != Ok) printf("SDIO_Init() error (rc=%u)\n", rc);
return rc == Ok;
}
bool SDIO_ReadBlock(uint32_t block, uint8_t *dst) {
CORE_ASSERT(handle != NULL, "SDIO not initialized");
CORE_ASSERT(dst != NULL, "SDIO_ReadBlock dst is NULL");
CORE_ASSERT(handle != nullptr, "SDIO not initialized", return false);
CORE_ASSERT(dst != nullptr, "SDIO_ReadBlock dst is NULL", return false);
WITH_RETRY(SDIO_READ_RETRIES, {
en_result_t rc = SDCARD_ReadBlocks(handle, block, 1, dst, SDIO_READ_TIMEOUT);
@@ -107,8 +116,8 @@ bool SDIO_ReadBlock(uint32_t block, uint8_t *dst) {
}
bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) {
CORE_ASSERT(handle != NULL, "SDIO not initialized");
CORE_ASSERT(src != NULL, "SDIO_WriteBlock src is NULL");
CORE_ASSERT(handle != nullptr, "SDIO not initialized", return false);
CORE_ASSERT(src != nullptr, "SDIO_WriteBlock src is NULL", return false);
WITH_RETRY(SDIO_WRITE_RETRIES, {
en_result_t rc = SDCARD_WriteBlocks(handle, block, 1, (uint8_t *)src, SDIO_WRITE_TIMEOUT);
@@ -120,12 +129,12 @@ bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) {
}
bool SDIO_IsReady() {
CORE_ASSERT(handle != NULL, "SDIO not initialized");
CORE_ASSERT(handle != nullptr, "SDIO not initialized", return false);
return bool(handle->stcCardStatus.READY_FOR_DATA);
}
uint32_t SDIO_GetCardSize() {
CORE_ASSERT(handle != NULL, "SDIO not initialized");
CORE_ASSERT(handle != nullptr, "SDIO not initialized", return 0);
// Multiply number of blocks with block size to get size in bytes
const uint64_t cardSizeBytes = uint64_t(handle->stcSdCardInfo.u32LogBlockNbr) * uint64_t(handle->stcSdCardInfo.u32LogBlockSize);
+24 -9
View File
@@ -96,29 +96,44 @@ void core_hook_sysclock_init() {
#endif
#endif
// Setup clock divisors for sysclk = 200 MHz:
// sysclk is now configured according to F_CPU (i.e., 200MHz PLL output)
constexpr uint32_t sysclock = F_CPU;
// Setup clock divisors for sysclk = 200 MHz
// Note: PCLK1 is used for step+temp timers, and need to be kept at 50 MHz (until there is a better solution)
stc_clk_sysclk_cfg_t sysClkConf = {
constexpr stc_clk_sysclk_cfg_t sysClkConf = {
.enHclkDiv = ClkSysclkDiv1, // HCLK = 200 MHz (CPU)
.enExclkDiv = ClkSysclkDiv2, // EXCLK = 100 MHz (SDIO)
.enPclk0Div = ClkSysclkDiv1, // PCLK0 = 200 MHz (Timer6 (not used))
.enPclk0Div = ClkSysclkDiv2, // PCLK0 = 100 MHz (Timer6 (not used))
.enPclk1Div = ClkSysclkDiv4, // PCLK1 = 50 MHz (USART, SPI, I2S, Timer0 (step+temp), TimerA (Servo))
.enPclk2Div = ClkSysclkDiv4, // PCLK2 = 50 MHz (ADC)
.enPclk3Div = ClkSysclkDiv4, // PCLK3 = 50 MHz (I2C, WDT)
.enPclk2Div = ClkSysclkDiv8, // PCLK2 = 25 MHz (ADC)
.enPclk3Div = ClkSysclkDiv8, // PCLK3 = 25 MHz (I2C, WDT)
.enPclk4Div = ClkSysclkDiv2, // PCLK4 = 100 MHz (ADC ctl)
};
#if ARDUINO_CORE_VERSION_INT >= GET_VERSION_INT(1, 2, 0)
assert_system_clocks_valid<
sysclock,
sysClkConf.enHclkDiv,
sysClkConf.enPclk0Div,
sysClkConf.enPclk1Div,
sysClkConf.enPclk2Div,
sysClkConf.enPclk3Div,
sysClkConf.enPclk4Div,
sysClkConf.enExclkDiv
>();
#endif
sysclock_set_clock_dividers(&sysClkConf);
// Set power mode
#define POWER_MODE_SYSTEM_CLOCK 200000000 // 200 MHz
power_mode_update_pre(POWER_MODE_SYSTEM_CLOCK);
power_mode_update_pre(sysclock);
// Switch to MPLL as sysclk source
CLK_SetSysClkSource(CLKSysSrcMPLL);
// Set power mode
power_mode_update_post(POWER_MODE_SYSTEM_CLOCK);
#undef POWER_MODE_SYSTEM_CLOCK
power_mode_update_post(sysclock);
}
#endif // ARDUINO_ARCH_HC32
+31 -27
View File
@@ -38,44 +38,48 @@ extern Timer0 step_timer;
// Timer Configurations
//
// TODO: some calculations (step irq min_step_rate) require the timer rate to be known at compile time
// this is not possible with the HC32F460, as the timer rate depends on PCLK1
// as a workaround, PCLK1 = 50MHz is assumed (check with clock dump in MarlinHAL::init())
#define HAL_TIMER_RATE 50000000 // 50MHz
// #define HAL_TIMER_RATE TIMER0_BASE_FREQUENCY
// TODO: CYCLES_PER_MICROSECOND seems to be used by Marlin to calculate the number of cycles per microsecond in the timer ISRs
// by default, it uses F_CPU, but since that is not known at compile time for HC32, we overwrite it here
#undef CYCLES_PER_MICROSECOND
#define CYCLES_PER_MICROSECOND (HAL_TIMER_RATE / 1000000UL)
/**
* HAL_TIMER_RATE must be known at compile time since it's used to calculate
* STEPPER_TIMER_RATE, which is used in 'constexpr' calculations.
* On the HC32F460 the timer rate depends on PCLK1, which is derived from the
* system clock configured at runtime. As a workaround, we use the existing
* assumption of a 200MHz clock, defining F_CPU as 200000000, then configure PCLK1
* as F_CPU with a divider of 4 in 'sysclock.cpp::core_hook_sysclock_init'.
*
* If you face issues with this assumption, please double-check with the values
* printed by 'MarlinHAL::HAL_clock_frequencies_dump'.
*
* TODO: If the 'constexpr' requirement is ever lifted, use TIMER0_BASE_FREQUENCY instead
*/
#define HAL_TIMER_RATE (F_CPU / 4) // i.e., 50MHz
//#define HAL_TIMER_RATE TIMER0_BASE_FREQUENCY
// Temperature timer
#define TEMP_TIMER_NUM (&temp_timer)
#define TEMP_TIMER_PRIORITY DDL_IRQ_PRIORITY_02
#define TEMP_TIMER_PRESCALE 16ul
#define TEMP_TIMER_RATE 1000 // 1kHz
#define TEMP_TIMER_FREQUENCY TEMP_TIMER_RATE // Alias for Marlin
#define TEMP_TIMER_NUM (&temp_timer)
#define TEMP_TIMER_PRIORITY DDL_IRQ_PRIORITY_02
#define TEMP_TIMER_PRESCALE 16UL // 12.5MHz
#define TEMP_TIMER_RATE 1000 // 1kHz
#define TEMP_TIMER_FREQUENCY TEMP_TIMER_RATE // 1kHz also
// Stepper timer
#define STEP_TIMER_NUM (&step_timer)
#define STEP_TIMER_PRIORITY DDL_IRQ_PRIORITY_01
#define STEPPER_TIMER_PRESCALE 16ul
#define STEP_TIMER_NUM (&step_timer)
#define STEP_TIMER_PRIORITY DDL_IRQ_PRIORITY_00 // Top priority, nothing else uses it
#define STEPPER_TIMER_PRESCALE 16UL // 12.5MHz
// TODO: STEPPER_TIMER_RATE seems to work fine like this, but requires further testing...
#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // 50MHz / 16 = 3.125MHz
#define STEPPER_TIMER_TICKS_PER_US (STEPPER_TIMER_RATE / 1000000)
#define STEPPER_TIMER_RATE (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) // 50MHz / 16 = 3.125MHz
#define STEPPER_TIMER_TICKS_PER_US (STEPPER_TIMER_RATE / 1000000UL) // Integer 3
// Pulse timer (== stepper timer)
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
#define PULSE_TIMER_NUM STEP_TIMER_NUM
#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE
#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US
//
// Channel aliases
//
#define MF_TIMER_TEMP TEMP_TIMER_NUM
#define MF_TIMER_STEP STEP_TIMER_NUM
#define MF_TIMER_PULSE PULSE_TIMER_NUM
#define MF_TIMER_TEMP TEMP_TIMER_NUM
#define MF_TIMER_STEP STEP_TIMER_NUM
#define MF_TIMER_PULSE PULSE_TIMER_NUM
//
// HAL functions
@@ -82,7 +82,7 @@ static inline uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, c
}
static void u8g_sw_spi_shift_out(uint8_t val) {
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864)
#if U8G_SPI_USE_MODE_3
swSpiTransfer_mode_3(val, SPI_speed);
#else
swSpiTransfer_mode_0(val, SPI_speed);
@@ -116,15 +116,15 @@ uint8_t u8g_com_HAL_HC32_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, voi
break;
case U8G_COM_MSG_CHIP_SELECT:
#if ANY(FYSETC_MINI_12864, MKS_MINI_12864) // This LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
WRITE(DOGLCD_SCK, HIGH); // Set SCK to mode 3 idle state before CS goes active
#if U8G_SPI_USE_MODE_3 // This LCD SPI is running mode 3 while SD card is running mode 0
if (arg_val) { // SCK idle state needs to be set to the proper idle state before
// the next chip select goes active
WRITE(DOGLCD_SCK, HIGH); // Set SCK to mode 3 idle state before CS goes active
WRITE(DOGLCD_CS, LOW);
}
else {
WRITE(DOGLCD_CS, HIGH);
WRITE(DOGLCD_SCK, LOW); // Set SCK to mode 0 idle state after CS goes inactive
WRITE(DOGLCD_SCK, LOW); // Set SCK to mode 0 idle state after CS goes inactive
}
#else
WRITE(DOGLCD_CS, !arg_val);
+1 -1
View File
@@ -35,7 +35,7 @@
uint8_t buffer[MARLIN_EEPROM_SIZE];
char filename[] = "eeprom.dat";
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() {
const char eeprom_erase_value = 0xFF;
+4 -1
View File
@@ -37,7 +37,10 @@ Timer::Timer() {
}
Timer::~Timer() {
timer_delete(timerid);
if (timerid != 0) {
timer_delete(timerid);
timerid = 0;
}
}
void Timer::init(uint32_t sig_id, uint32_t sim_freq, callback_fn* fn) {
@@ -0,0 +1,22 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2024 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once
+2
View File
@@ -21,6 +21,7 @@
*/
#ifdef __PLAT_LINUX__
#ifndef UNIT_TEST
//#define GPIO_LOGGING // Full GPIO and Positional Logging
@@ -135,4 +136,5 @@ int main() {
read_serial.join();
}
#endif // UNIT_TEST
#endif // __PLAT_LINUX__
-1
View File
@@ -60,7 +60,6 @@
#define INVALID_SERVO 255 // flag indicating an invalid servo index
// Types
typedef struct {
-9
View File
@@ -21,9 +21,6 @@
*/
#pragma once
#include "../../core/macros.h"
#include "../../inc/MarlinConfigPre.h"
#if ALL(HAS_MARLINUI_U8GLIB, HAS_MEDIA) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
// needed due to the speed and mode required for communicating with each device being different.
@@ -31,12 +28,6 @@
// spiBeginTransaction.
#endif
// Onboard SD
//#define SD_SCK_PIN P0_07
//#define SD_MISO_PIN P0_08
//#define SD_MOSI_PIN P0_09
//#define SD_SS_PIN P0_06
// External SD
#ifndef SD_SCK_PIN
#define SD_SCK_PIN 50
+6
View File
@@ -111,6 +111,12 @@ void MarlinHAL::init() {
#if HAS_SERVO_3
INIT_SERVO(3);
#endif
#if HAS_SERVO_4
INIT_SERVO(4);
#endif
#if HAS_SERVO_5
INIT_SERVO(5);
#endif
//debug_frmwrk_init();
//_DBG("\n\nDebug running\n");
+2 -2
View File
@@ -100,7 +100,7 @@ extern DefaultSerial1 USBSerial;
#else
#error "LCD_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
#endif
#if HAS_DGUS_LCD
#if ANY(HAS_DGUS_LCD, EXTENSIBLE_UI)
#define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.available()
#endif
#endif
@@ -159,7 +159,7 @@ constexpr pin_t GET_PIN_MAP_PIN(const int16_t index) {
// Parse a G-code word into a pin index
int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
// P0.6 thru P0.9 are for the onboard SD card
#define HAL_SENSITIVE_PINS P0_06, P0_07, P0_08, P0_09,
#define HAL_SENSITIVE_PINS P0_06, P0_07, P0_08, P0_09
// ------------------------
// Defines
+5 -3
View File
@@ -61,7 +61,7 @@ static uint8_t ram_eeprom[MARLIN_EEPROM_SIZE] __attribute__((aligned(4))) = {0};
static bool eeprom_dirty = false;
static int current_slot = 0;
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() {
uint32_t first_nblank_loc, first_nblank_val;
@@ -112,7 +112,8 @@ bool PersistentStore::access_finish() {
}
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
for (size_t i = 0; i < size; i++) ram_eeprom[pos + i] = value[i];
const int p = REAL_EEPROM_ADDR(pos);
for (size_t i = 0; i < size; i++) ram_eeprom[p + i] = value[i];
eeprom_dirty = true;
crc16(crc, value, size);
pos += size;
@@ -120,8 +121,9 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
}
bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
const int p = REAL_EEPROM_ADDR(pos);
const uint8_t * const buff = writing ? &value[0] : &ram_eeprom[pos];
if (writing) for (size_t i = 0; i < size; i++) value[i] = ram_eeprom[pos + i];
if (writing) for (size_t i = 0; i < size; i++) value[i] = ram_eeprom[p + i];
crc16(crc, buff, size);
pos += size;
return false; // return true for any error
+1 -1
View File
@@ -49,7 +49,7 @@ bool eeprom_file_open = false;
#define MARLIN_EEPROM_SIZE size_t(0x1000) // 4KiB of Emulated EEPROM
#endif
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; }
size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE - eeprom_exclude_size; }
bool PersistentStore::access_start() {
const char eeprom_erase_value = 0xFF;

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