MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / write_flash_variables

Function write_flash_variables

device.py:160–171  ·  view source on GitHub ↗
(output_file, device_properties: ConfigParser)

Source from the content-addressed store, hash-verified

158 output_file.write("CONFIG_RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH=y\n")
159
160def write_flash_variables(output_file, device_properties: ConfigParser):
161 flash_size = get_property_or_exit(device_properties, "hardware", "flashSize")
162 if not flash_size.endswith("MB"):
163 exit_with_error("Flash size should be written as xMB or xxMB (e.g. 4MB, 16MB)")
164 output_file.write("# Flash\n")
165 flash_size_number = flash_size[:-2]
166 output_file.write(f"CONFIG_ESPTOOLPY_FLASHSIZE_{flash_size_number}MB=y\n")
167 flash_mode = get_property_or_default(device_properties, "hardware", "flashMode", 'QIO')
168 output_file.write(f"CONFIG_FLASHMODE_{flash_mode}=y\n")
169 esptool_flash_freq = get_property_or_none(device_properties, "hardware", "esptoolFlashFreq")
170 if esptool_flash_freq is not None:
171 output_file.write(f"CONFIG_ESPTOOLPY_FLASHFREQ_{esptool_flash_freq}=y\n")
172
173def write_spiram_variables(output_file, device_properties: ConfigParser):
174 idf_target = get_property_or_exit(device_properties, "hardware", "target").lower()

Callers 1

write_propertiesFunction · 0.85

Calls 5

get_property_or_defaultFunction · 0.85
get_property_or_exitFunction · 0.70
exit_with_errorFunction · 0.70
get_property_or_noneFunction · 0.70
writeMethod · 0.45

Tested by

no test coverage detected