(output_file, device_properties: ConfigParser)
| 134 | output_file.write(f"CONFIG_TT_AUTO_START_APP_ID=\"{safe_auto_start_app_id}\"\n") |
| 135 | |
| 136 | def write_core_variables(output_file, device_properties: ConfigParser): |
| 137 | idf_target = get_property_or_exit(device_properties, "hardware", "target").lower() |
| 138 | output_file.write("# Target\n") |
| 139 | output_file.write(f"CONFIG_IDF_TARGET=\"{idf_target}\"\n") |
| 140 | output_file.write("# CPU\n") |
| 141 | output_file.write("CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y\n") |
| 142 | output_file.write("CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ=240\n") |
| 143 | output_file.write(f"CONFIG_{idf_target.upper()}_DEFAULT_CPU_FREQ_240=y\n") |
| 144 | output_file.write(f"CONFIG_{idf_target.upper()}_DEFAULT_CPU_FREQ_MHZ=240\n") |
| 145 | if idf_target != "esp32": # Not available on original ESP32 |
| 146 | output_file.write("# Enable usage of MALLOC_CAP_EXEC on IRAM:\n") |
| 147 | output_file.write("CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=n\n") |
| 148 | output_file.write("CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=n\n") |
| 149 | else: |
| 150 | # Original ESP32 has very limited IRAM (~328KB shared with Wi-Fi/BT). |
| 151 | # Disable Wi-Fi IRAM optimizations to free ~27KB; throughput impact is |
| 152 | # acceptable for these embedded devices. Also move heap/ringbuf ISR |
| 153 | # stubs to flash. |
| 154 | output_file.write("# Free IRAM on original ESP32\n") |
| 155 | output_file.write("CONFIG_ESP_WIFI_IRAM_OPT=n\n") |
| 156 | output_file.write("CONFIG_ESP_WIFI_RX_IRAM_OPT=n\n") |
| 157 | output_file.write("CONFIG_HEAP_PLACE_FUNCTION_INTO_FLASH=y\n") |
| 158 | output_file.write("CONFIG_RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH=y\n") |
| 159 | |
| 160 | def write_flash_variables(output_file, device_properties: ConfigParser): |
| 161 | flash_size = get_property_or_exit(device_properties, "hardware", "flashSize") |
no test coverage detected