Open rockman256 opened 6 years ago
@rockman256 Ramps fd V1 does not have built-in EEPROM. Ramps-FD external EEPROM https://www.thingiverse.com/thing:1691247
I know that ramps fdv1 have not chip eeprom. I need to save eeprom data on SD card.
At this time the EEPROM functions for DUE write to an EEPROM, and do not support writing the data to SD. In fact, none of the platforms support using an external SD card for this purpose. The ARM platforms all use the onboard SD card that contains the FIRMWARE.CUR
.
Bad for me, mk4duo have this function..
We'll just call this a feature request, then!
But, on Arduino Due I did implement EEPROM emulation using the internal Flash... So, there is a way to save configuration... ;)
Here's the DUE EEPROM emulation requirements:
#if ENABLED(EEPROM_SETTINGS) && DISABLED(I2C_EEPROM) && DISABLED(SPI_EEPROM)
These boards all define I2C_EEPROM
by default:
Is it correct that they all do this?
Perhaps we should make it possible to override I2C_EEPROM
from configurations, as in:
#define I2C_EEPROM false
Then in the aforementioned pins files…
#ifndef I2C_EEPROM
#define I2C_EEPROM
#endif
I can verify the first three have on-board EEPROMs, I have not found any schematics for the RURAMPS4D.
schematics for the RURAMPS4D RURAMPS_pinout.pdf
U2 looks like it could be an EEPROM. We'd need the schematic to be sure.
U2 looks like it could be an EEPROM. We'd need the schematic to be sure.
Can we use the I^2C chain to ask what is there? It would seem an EEPROM chip should be willing to identify itself.
MK4Duo have this function and work really fine, also with some 8 bit boards. A myriad of parameters can be configured in the eeprom, it is hardly necessary to recompile to change something. This is the eeprom map with MK4duo version 4.3.7ß of my Kossel MAX detected with Repetier Server (with the Host is the same), there is almost everything, and the eeprom on my RuRamps V1.3 is saved in the SD inserted in the LCD display without any issue. Especially in calibration and tuning it's great to be able to change many things without recompiling each time. If I want to change any parameter just that I do and click "save", everything is automatically stored on SD. I hope that in the future with Marlin we can do the same.
Here's our current EEPROM map for comparison.
typedef struct SettingsDataStruct {
char version[4]; // Vnn\0
uint16_t crc; // Data Checksum
//
// DISTINCT_E_FACTORS
//
uint8_t esteppers; // XYZE_N - XYZ
planner_settings_t planner_settings;
float planner_max_jerk[XYZE], // M205 XYZE planner.max_jerk[XYZE]
planner_junction_deviation_mm; // M205 J planner.junction_deviation_mm
float home_offset[XYZ]; // M206 XYZ / M665 TPZ
#if HAS_HOTEND_OFFSET
float hotend_offset[XYZ][HOTENDS - 1]; // M218 XYZ
#endif
//
// ENABLE_LEVELING_FADE_HEIGHT
//
float planner_z_fade_height; // M420 Zn planner.z_fade_height
//
// MESH_BED_LEVELING
//
float mbl_z_offset; // mbl.z_offset
uint8_t mesh_num_x, mesh_num_y; // GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y
#if ENABLED(MESH_BED_LEVELING)
float mbl_z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; // mbl.z_values
#else
float mbl_z_values[3][3];
#endif
//
// HAS_BED_PROBE
//
float zprobe_zoffset;
//
// ABL_PLANAR
//
matrix_3x3 planner_bed_level_matrix; // planner.bed_level_matrix
//
// AUTO_BED_LEVELING_BILINEAR
//
uint8_t grid_max_x, grid_max_y; // GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y
int bilinear_grid_spacing[2],
bilinear_start[2]; // G29 L F
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
float z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; // G29
#else
float z_values[3][3];
#endif
//
// AUTO_BED_LEVELING_UBL
//
bool planner_leveling_active; // M420 S planner.leveling_active
int8_t ubl_storage_slot; // ubl.storage_slot
//
// SERVO_ANGLES
//
uint16_t servo_angles[NUM_SERVOS][2]; // M281 P L U
//
// DELTA / [XYZ]_DUAL_ENDSTOPS
//
#if ENABLED(DELTA)
float delta_height, // M666 H
delta_endstop_adj[ABC], // M666 XYZ
delta_radius, // M665 R
delta_diagonal_rod, // M665 L
delta_segments_per_second, // M665 S
delta_calibration_radius, // M665 B
delta_tower_angle_trim[ABC]; // M665 XYZ
#elif ENABLED(X_DUAL_ENDSTOPS) || ENABLED(Y_DUAL_ENDSTOPS) || Z_MULTI_ENDSTOPS
float x2_endstop_adj, // M666 X
y2_endstop_adj, // M666 Y
z2_endstop_adj, // M666 Z (S2)
z3_endstop_adj; // M666 Z (S3)
#endif
//
// ULTIPANEL
//
int16_t lcd_preheat_hotend_temp[2], // M145 S0 H
lcd_preheat_bed_temp[2]; // M145 S0 B
uint8_t lcd_preheat_fan_speed[2]; // M145 S0 F
//
// PIDTEMP
//
PIDC_t hotendPID[HOTENDS]; // M301 En PIDC / M303 En U
int16_t lpq_len; // M301 L
//
// PIDTEMPBED
//
PID_t bedPID; // M304 PID / M303 E-1 U
//
// HAS_LCD_CONTRAST
//
int16_t lcd_contrast; // M250 C
//
// FWRETRACT
//
fwretract_settings_t fwretract_settings; // M207 S F Z W, M208 S F W R
bool autoretract_enabled; // M209 S
//
// !NO_VOLUMETRIC
//
bool parser_volumetric_enabled; // M200 D parser.volumetric_enabled
float planner_filament_size[EXTRUDERS]; // M200 T D planner.filament_size[]
//
// HAS_TRINAMIC
//
tmc_stepper_current_t tmc_stepper_current; // M906 X Y Z X2 Y2 Z2 Z3 E0 E1 E2 E3 E4 E5
tmc_hybrid_threshold_t tmc_hybrid_threshold; // M913 X Y Z X2 Y2 Z2 Z3 E0 E1 E2 E3 E4 E5
tmc_sgt_t tmc_sgt; // M914 X Y Z
//
// LIN_ADVANCE
//
float planner_extruder_advance_K[EXTRUDERS]; // M900 K planner.extruder_advance_K
//
// HAS_MOTOR_CURRENT_PWM
//
uint32_t motor_current_setting[3]; // M907 X Z E
//
// CNC_COORDINATE_SYSTEMS
//
float coordinate_system[MAX_COORDINATE_SYSTEMS][XYZ]; // G54-G59.3
//
// SKEW_CORRECTION
//
skew_factor_t planner_skew_factor; // M852 I J K planner.skew_factor
//
// ADVANCED_PAUSE_FEATURE
//
fil_change_settings_t fc_settings[EXTRUDERS]; // M603 T U L
//
// SINGLENOZZLE toolchange values
//
#if EXTRUDERS > 1
toolchange_settings_t toolchange_settings; // M217 S P R
#endif
} SettingsData;
I'm considering an overhaul to the EEPROM to make it easier to re-use old data. Namely, storing all settings in IFF format. But that will have to wait for some other tasks higher on my list.
@rockman256 is this still relavant?
It looks like there is some support for SD as EEPROM in the HAL folders... but I couldn't get it to work. Also interested in a status update.
SD as settings storage location (EEPROM emulation) should be working now on STM32F1 (#13475).
Hellow! I have arduino due + ramps fd V1. I can compile marlin 2.0 and all works fine. SD card work. But I cant save eeprom on sd card. Helm me please. My config:
My pins:
```cpp /** * 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