Skip to content

Commit f1fbaca

Browse files
committed
sim compile fixes
update config.ini and tweak configuration.py added ini cfg for ET4000+ added ini cfg fo simulation run
1 parent 2486487 commit f1fbaca

File tree

5 files changed

+269
-12
lines changed

5 files changed

+269
-12
lines changed

Marlin/config.ini

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
# Produce a flattened set of Configuration.h and Configuration_adv.h files with only the enabled
4242
# #defines and no comments. A clean look, but context-free.
4343
#
44-
ini_use_config = none
44+
ini_use_config = basic +host +debug @../config/examples/simulation/config.ini
45+
;ini_use_config = none
4546

4647
# Load all config: sections in this file
4748
;ini_use_config = all

buildroot/share/PlatformIO/scripts/configuration.py

+15-10
Original file line numberDiff line numberDiff line change
@@ -183,25 +183,30 @@ def apply_all_sections(cp):
183183
# Apply certain config sections from a parsed file
184184
def apply_sections(cp, ckey='all'):
185185
blab(f"Apply section key: {ckey}")
186-
if ckey == 'all':
186+
if ckey.strip() == 'all':
187187
apply_all_sections(cp)
188188
else:
189-
# Apply the base/root config.ini settings after external files are done
190-
if ckey in ('base', 'root'):
191-
apply_ini_by_name(cp, 'config:base')
189+
sections = map(str.strip, ckey.split('+'))
190+
for ckey in sections:
191+
# Apply the base/root config.ini settings after external files are done
192+
if ckey in ('base', 'root'):
193+
apply_ini_by_name(cp, 'config:base')
192194

193-
# Apply historically 'Configuration.h' settings everywhere
194-
if ckey == 'basic':
195-
apply_ini_by_name(cp, 'config:basic')
195+
# Apply historically 'Configuration.h' settings everywhere
196+
if ckey == 'basic':
197+
apply_ini_by_name(cp, 'config:basic')
196198

197199
# Apply historically Configuration_adv.h settings everywhere
198200
# (Some of which rely on defines in 'Conditionals-2-LCD.h')
199201
elif ckey in ('adv', 'advanced'):
200202
apply_ini_by_name(cp, 'config:advanced')
201203

202-
# Apply a specific config:<name> section directly
203-
elif ckey.startswith('config:'):
204-
apply_ini_by_name(cp, ckey)
204+
# Apply a specific config:<name> section directly
205+
elif ckey.startswith('config:'):
206+
apply_ini_by_name(cp, ckey)
207+
208+
else:
209+
apply_ini_by_name(cp, 'config:'+ckey)
205210

206211
# Apply settings from a top level config.ini
207212
def apply_config_ini(cp):
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
2+
[config:base]
3+
; Copy ini_use_config value to Marlin/config.ini to use
4+
;ini_use_config = basic
5+
; +easythreed_ui
6+
; +linear_advance
7+
; +backlash
8+
; +host
9+
; @../config/examples/EasyThreeD/ET4000PLUS/config.ini
10+
ini_config_version = 02010300
11+
string_config_h_author = "qw3rtrun"
12+
config_examples_dir = "config/examples/EasyThreeD/ET4000PLUS"
13+
14+
[config:basic]
15+
# MOTHERBOARD and MCU capabilities
16+
motherboard = BOARD_MKS_ROBIN_LITE
17+
serial_port = 1
18+
baudrate = 115200
19+
serial_port_2 = 2
20+
baudrate_2 = 250000
21+
sdsupport = on
22+
eeprom_settings = on
23+
eeprom_auto_init = on
24+
disable_M503 = off
25+
26+
# MACHINE MECHANICS and STEPPERS
27+
x_bed_size = 100
28+
y_bed_size = 100
29+
z_max_pos = 100
30+
x_min_pos = 0
31+
x_max_pos = X_BED_SIZE
32+
y_min_pos = 0
33+
y_max_pos = Y_BED_SIZE
34+
z_min_pos = 0
35+
36+
default_nominal_filament_dia = 1.75
37+
default_axis_steps_per_unit = { 606, 606, 1167, 1140 }
38+
default_max_acceleration = { 3000, 3000, 100, 10000 }
39+
default_max_feedrate = { 60, 60, 30, 70 }
40+
homing_feedrate_mm_m = { (60*60), (60*60), (30*60) }
41+
classic_jerk = on
42+
default_ejerk = 2.0
43+
44+
x_driver_type = A4988
45+
invert_x_dir = true
46+
y_driver_type = A4988
47+
invert_y_dir = false
48+
z_driver_type = A4988
49+
invert_z_dir = true
50+
e0_driver_type = A4988
51+
invert_e0_dir = true
52+
53+
endstoppullups = on
54+
x_max_endstop_hit_state = LOW
55+
x_min_endstop_hit_state = LOW
56+
y_max_endstop_hit_state = LOW
57+
y_min_endstop_hit_state = LOW
58+
z_max_endstop_hit_state = LOW
59+
z_min_endstop_hit_state = LOW
60+
61+
#SOWFTWARE ENDSTOPS
62+
max_software_endstops = on
63+
max_software_endstop_x = on
64+
max_software_endstop_y = on
65+
max_software_endstop_z = on
66+
min_software_endstops = on
67+
min_software_endstop_x = on
68+
min_software_endstop_y = on
69+
min_software_endstop_z = on
70+
71+
# HOMING
72+
x_home_dir = -1
73+
z_home_dir = -1
74+
y_home_dir = -1
75+
z_after_homing = 0
76+
z_clearance_for_homing = 4
77+
z_min_probe_endstop_hit_state = Z_MIN_ENDSTOP_HIT_STATE
78+
homing_bump_mm = { 5, 5, 5 }
79+
80+
# FANS
81+
e0_auto_fan_pin = -1
82+
extruder_auto_fan_speed = 255
83+
extruder_auto_fan_temperature = 50
84+
85+
# EXTRUDERS and TEMPERATURE CONTROL
86+
extruders = 1
87+
temp_sensor_0 = 1
88+
thermal_protection_hotends = on
89+
heater_0_mintemp = 5
90+
heater_0_maxtemp = 275
91+
extrude_mintemp = 170
92+
prevent_cold_extrusion = on
93+
max_heater_0_power = 255
94+
bang_max = MAX_HEATER_0_POWER
95+
96+
pidtemp = on
97+
pid_k1 = 0.95
98+
pid_max = MAX_HEATER_0_POWER
99+
default_kd = 114.00
100+
default_ki = 1.08
101+
default_kp = 22.20
102+
103+
# BED HEATING
104+
temp_sensor_bed = 1
105+
thermal_protection_bed = on
106+
bed_mintemp = 5
107+
bed_maxtemp = 100
108+
max_bed_power = 255
109+
pidtempbed = off
110+
default_bedKd = 10.00
111+
default_bedKi = .023
112+
default_bedKp = 305.4
113+
114+
# PREHEATS
115+
preheat_1_label = "PLA"
116+
preheat_1_temp_bed = 70
117+
preheat_1_temp_hotend = 180
118+
preheat_2_label = "ABS"
119+
preheat_2_temp_bed = 110
120+
preheat_2_temp_hotend = 240
121+
122+
[config:easythreed_ui]
123+
lcd_language = en
124+
easythreed_et4000plus = on
125+
easythreed_ui = on
126+
custom_user_buttons = on
127+
button1_desc = "Homing"
128+
button1_gcode = "G28"
129+
button1_hit_state = LOW
130+
button1_pin = PC3
131+
button1_when_printing = false
132+
133+
[config:host]
134+
host_action_commands = on
135+
emergency_parser = on
136+
faster_gcode_parser = on
137+
gcode_case_insensitive = on
138+
advanced_ok = on
139+
host_keepalive_feature = on
140+
default_keepalive_interval = 2
141+
serial_overrun_protection = on
142+
auto_report_position = on
143+
auto_report_temperatures = on
144+
extended_capabilities_report = on
145+
bufsize = 4
146+
tx_buffer_size = 128
147+
block_buffer_size = 16
148+
max_cmd_size = 96
149+
150+
[config:linear]
151+
lin_advance = on
152+
advance_k = 0
153+
distinct_e_factors = off
154+
allow_low_ejerk = on
155+
volumetric_extruder_limit = off
156+
157+
[config:backlash]
158+
backlash_compensation = on
159+
backlash_correction = 0.0
160+
backlash_distance_mm = { 0, 0, 0 }
161+
backlash_gcode = on
162+
backlash_smoothing_mm = 0

config/examples/simulation/config.ini

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
[config:base]
2+
; Copy ini_use_config value to Marlin/config.ini to use
3+
;ini_use_config = basic +host +debug @../config/examples/simulation/config.ini
4+
ini_config_version = 02010300
5+
string_config_h_author = "qw3rtrun"
6+
config_examples_dir = "config/examples/simulation"
7+
8+
[config:basic]
9+
MACHINE_UUID = "00000000-0000-0000-0000-000000000000"
10+
CUSTOM_MACHINE_NAME = "MarlinSim"
11+
motherboard = BOARD_SIMULATED
12+
serial_port = 0
13+
baudrate = 250000
14+
serial_port_2 = 3
15+
baudrate_2 = 250000
16+
17+
sdsupport = on
18+
eeprom_settings = on
19+
20+
x_bed_size = 200
21+
x_driver_type = A4988
22+
x_enable_on = 0
23+
x_home_dir = -1
24+
x_max_endstop_hit_state = HIGH
25+
x_max_pos = X_BED_SIZE
26+
x_min_endstop_hit_state = HIGH
27+
x_min_pos = 0
28+
y_bed_size = 200
29+
y_driver_type = A4988
30+
y_enable_on = 0
31+
y_home_dir = -1
32+
y_max_endstop_hit_state = HIGH
33+
y_max_pos = Y_BED_SIZE
34+
y_min_endstop_hit_state = HIGH
35+
y_min_pos = 0
36+
z_driver_type = A4988
37+
z_enable_on = 0
38+
z_home_dir = -1
39+
z_max_endstop_hit_state = HIGH
40+
z_max_pos = 200
41+
z_min_endstop_hit_state = HIGH
42+
z_min_pos = 0
43+
z_min_probe_endstop_hit_state = HIGH
44+
45+
reprap_discount_full_graphic_smart_controller = on
46+
lcd_language = en
47+
reverse_menu_direction = on
48+
boot_marlin_logo_animated = on
49+
boot_marlin_logo_small = on
50+
show_bootscreen = on
51+
startup_commands = "M118 Sim Startup!"
52+
use_big_edit_font = on
53+
xyz_hollow_frame = on
54+
55+
[config:host]
56+
bufsize = 4
57+
max_cmd_size = 96
58+
block_buffer_size = 16
59+
tx_buffer_size = 128
60+
serial_overrun_protection = on
61+
host_keepalive_feature = on
62+
NO_TIMEOUTS = off
63+
64+
#REPORTS and COMMUNICATION capabilities
65+
advanced_ok = on
66+
extended_capabilities_report = on
67+
auto_report_temperatures = on
68+
faster_gcode_parser = on
69+
gcode_case_insensitive = on
70+
host_action_commands = on
71+
host_prompt_support = on
72+
HOST_STATUS_NOTIFICATIONS = on
73+
HOST_PAUSE_M76 = on
74+
HOST_START_MENU_ITEM = on
75+
HOST_SHUTDOWN_MENU_ITEM = on
76+
eeprom_chitchat = off
77+
m114_detail = on
78+
EMERGENCY_PARSER = on
79+
REALTIME_REPORTING_COMMANDS = off
80+
FULL_REPORT_TO_HOST_FEATURE = on
81+
82+
[config:debug]
83+
eeprom_boot_silent = on
84+
pins_debugging = on
85+
MARLIN_TEST_BUILD = off
86+
MARLIN_DEV_MODE = off
87+
BUFFER_MONITORING = off

ini/native.ini

+3-1
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ custom_gcc = g++
152152
extends = simulator_common
153153
build_src_flags = ${simulator_common.build_src_flags} -fpermissive
154154
build_flags = ${simulator_common.build_flags} ${simulator_common.debug_build_flags}
155-
-IC:\\msys64\\mingw64\\include\\SDL2 -fno-stack-protector -Wl,-subsystem,windows
155+
-IC:\\dev\\custom\\devkitPro\\msys2\\mingw64\\include\\SDL2
156+
-fno-stack-protector -Wl,-subsystem,windows
156157
-ldl -lmingw32 -lSDL2main -lSDL2 -lSDL2_net -lopengl32 -lssp
158+
-mno-ms-bitfields
157159
build_type = debug

0 commit comments

Comments
 (0)