Commit Graph

94 Commits

Author SHA1 Message Date
3d-gussner f9bdb8b8aa Add DEBUG_EEPROM_CHANGES 2024-02-27 08:56:18 +01:00
Guðni Már Gilbert 21faa52aab Rename axis_steps_per_unit to axis_steps_per_mm 2023-07-25 17:10:44 +02:00
Guðni Már Gilbert ff1cd2bfb2 dcodes: fix build when DEBUG_DCODES is enabled 2023-07-25 15:02:49 +00:00
Guðni Már Gilbert 5288d615f8 optimisation: lcd avoid streams
Author: leptun

Change in memory:
Flash: -124 bytes
SRAM: 0 bytes
2023-07-25 15:02:49 +00:00
Yuri D'Elia b8c1f34e31 Handle CALIBRATION_STATUS_{Z,XYZ} 2022-12-30 14:14:01 +01:00
Alex Voinea 7fb53899dc Merge branch 'MK3' into MK3_MMU2_fix1 2022-09-23 14:55:23 +02:00
Tom Mittendorf 24b638b5d4 fixed undefined behaviour when left shifting a negative number 2022-09-21 16:21:19 +02:00
Alex Voinea 329745368e Improve PAT9125 UI implementation 2022-09-16 10:20:32 +02:00
Alex Voinea 340bc87110 Checkpoint: jam detection 2022-09-16 10:20:32 +02:00
DRracer 0933fdb6fe
Merge pull request #3552 from wavexx/temp_model_check
Thermal Model protection
2022-08-24 19:16:48 +02:00
Yuri D'Elia 68c04ca2f6 Switch a few pointers that don't manipute strings to const 2022-08-06 23:08:03 +02:00
Yuri D'Elia 16b9acf8bc Decouple temperature ISR from ADC readings
Read from ADC as fast as possible using the ADC interrupt to get
more accurate instantaneous readings.

Decouple the temperature_isr from the adc reading interval, so that
the two can run independently for future use.
2022-07-25 17:30:21 +02:00
Alex Voinea f25bddce35 Simplify GETPC() 2022-02-02 21:06:58 +01:00
Guðni Már Gilbert 31c8e4bc4c * Remove redundant externs already included with temperature.h
* Add ifdefs in Dcodes.cpp when using extern variables
2021-07-20 09:12:14 +02:00
Yuri D'Elia 56e531d40a Improve/fix D23 for M2.5/S printers
- Move D23 into it's own function inside Dcodes
- Correctly include a break in the switch statement
- Show the dumper status (enabled/disabled) after toggling
- Allow to generate an immediate dump via g-code using D23 E for
  symmetry with D20 E
2021-06-25 08:46:55 +02:00
Yuri D'Elia 380e34d481 Include "Dcodes.h" after "Marlin.h" for configuration
This is needed in order to get the function prototypes right according
to the actual enabled configuration.
2021-06-25 08:46:55 +02:00
Yuri D'Elia 700825ff76 serial_dump: include hex prefix 2021-06-19 13:57:40 +02:00
Yuri D'Elia dd8c6c064c xfdump: simplify stack debugging (sample pc+sp)
Instead of having to guess the PC where the SP was sampled, always take
both. This allows "seamless" stack decoding for both serial and xflash
dumps, since we don't have to guess which function generated the dump.

Make the core functions (doing the sampling) be ``noinline`` as well,
so that they always have valid frame.
2021-06-17 01:29:25 +02:00
Yuri D'Elia a614268c94 serial_dump_and_reset: do not call manage_heater with interrupts disabled
Do not call manage_heater() in print_mem() if interrupts are already
disabled. This means we're running inside the crash handler.
2021-06-15 18:44:44 +02:00
Yuri D'Elia d193d0f7ac serial_dump: manipulate WDT just once 2021-06-15 16:21:56 +02:00
Yuri D'Elia 928c7211ad emergency handlers: always save SP _at_ the crash location
Save SP which is closest to the crash location, which simplifies
debugging. For serial_dump, write SP just before the dump.
For xfdump, save SP in the dump header.

This makes xfdump_dump and xfdump_full_dump_and_reset() equivalent for
stack debugging.
2021-06-15 11:47:27 +02:00
Yuri D'Elia 7db667ca86 serial_dump_and_reset: turn on print fan while dumping
To avoid scorching the sheet while dumping close to the bed.
2021-06-13 22:28:28 +02:00
Yuri D'Elia ea51d65137 serial_dump_and_reset: do not completely disable WDT
Set it to 8s which is long enough to complete the dump.
2021-06-12 15:39:37 +02:00
Yuri D'Elia bd57e00448 Implement an online crash dumper for MK2.5 boards
When XFLASH is not available, allow users to request _online_ crash
dumps by using D23 (since these require active user cooperation).

Once enabled, instead of just rebooting, dump memory directly to
the serial.

As similarly done with EMERGENCY_DUMP, we have two features that can be
enabled:

EMERGENCY_SERIAL_DUMP: enables dumping on crash after being requested
MENU_SERIAL_DUMP: allow triggering the same manually through the support
menu.
2021-06-12 13:37:20 +02:00
Yuri D'Elia f7dc8dcaef Fix usage of RAMEND
RAMEND is the last valid address, not one-past as I expected it to be...
2021-06-12 13:16:12 +02:00
Voinea Dragos 0a77f2c02d Dump header as well 2021-06-10 11:58:46 +03:00
Voinea Dragos 094c577e9d Fix XFLASH_DUMP print_mem 2021-06-09 14:10:20 +03:00
Voinea Dragos 8c3d76f85f Fix millis reference 2021-06-09 12:44:28 +03:00
Yuri D'Elia 378f239ff0 dcode_code: fix inverted define to print larger types 2021-06-08 18:57:16 +02:00
Yuri D'Elia c072fbbf02 Dcodes: fix daddr_t type when only XFLASH_DUMP is enabled 2021-06-08 18:14:49 +02:00
Yuri D'Elia c331c07b16 xfdump: reuse standard definitions for SRAM size/offset 2021-06-08 17:53:06 +02:00
Yuri D'Elia 30402e0404 Dcodes: add D20/D21/D22 to generate/read/clear dumps 2021-06-08 15:34:39 +02:00
Yuri D'Elia 6dfef76346 xfdump: implement dump-to-xflash functionality
Update xflash_layout to include information about the dump, which sits
at the end of xflash.
2021-06-08 15:28:02 +02:00
Yuri D'Elia 5ae8bad0ba Introduce "xflash_layout" to organize XFLASH's content
Update the language code to use the new LANG_OFFSET definition
and remove hard-coded flash sizes.
2021-06-08 15:22:37 +02:00
Yuri D'Elia af636c7f2a Move "xflash" include inside the conditional 2021-06-08 15:18:33 +02:00
Yuri D'Elia 0fcdada579 D6: add documentation 2021-06-07 19:58:18 +02:00
Yuri D'Elia ed9f52dd85 D6: also hide declaration behind conditional 2021-06-07 18:50:45 +02:00
Yuri D'Elia db096557d4 D[236]: remove "busy" messages while dumping, avoid WDT 2021-06-07 16:41:25 +02:00
Yuri D'Elia 12e124324f Remove PROGMEM handling from print_mem until D5 uses dcode_core
Handling PROGMEM also requires a 32bit address type.
2021-06-07 16:41:25 +02:00
Yuri D'Elia f9371146d0 Implement reading XFLASH with D6
This requires expanding the dcode_core address type to 32bit type,
thus enlarges the D2/D3 implementation as a result.

Still allow to save all the original space if D6 is disabled, for now.
2021-06-07 16:41:25 +02:00
Yuri D'Elia 915f5a7692 Unify D2 and D3 handling
Handle reading/writing memory using the same base functions
in order to save space.
2021-06-07 16:41:25 +02:00
Yuri D'Elia 2d25a5705f Fix D2 to read the entire SRAM content
Allow to read up to 0x21ff, which is the last byte of SRAM.  Set default
starting address to 0x200, which is the first true byte.

0x0-200 is mapped to register/io space and could cause issues when read
from bi-directional registers.
2021-06-07 16:37:34 +02:00
Yuri D'Elia 62f496e1d6 Allow D2 to be enabled selectively 2021-06-07 16:37:34 +02:00
Alex Voinea c951bea627
Remove unused/broken bootapp code 2021-03-03 16:31:30 +02:00
Voinea Dragos da21916473 Change printf_P without format arguments and NL to puts_P only 2021-01-22 18:56:05 +02:00
D.R.racer c710253cca Code cleanup and size reduction and RAM optimization
Replase single character strings with single characters when calling
lcd_print
2021-01-22 17:11:51 +01:00
Alex Voinea 8d9dc73d1b
Fix compile error
fix compile


Fix compile error
2020-08-12 17:25:49 +03:00
Alex Voinea 5530b99882
Reboot after factory reset 2020-08-12 12:46:35 +03:00
DRracer c8f67f2279
Merge pull request #2568 from 3d-gussner/MK3_Dcodes_move
D- codes move
2020-04-03 11:12:30 +02:00
3d-gussner a1b8ee67b3
Fix missing (hex) in D5 code (#2560)
* Fix missing (hex) in D5 code

* Make ALL D-codes available for DEBUG mode
until now D3 and D5 needed to be defined separately

* Forgot to modify Marlin_main
2020-04-02 14:56:19 +02:00