Skip to content

Commit 9408ec9

Browse files
committed
Updated PORTING.md to be clearer about sdkconfig requirements
1 parent 9e53e09 commit 9408ec9

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

PORTING.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,20 +84,23 @@ You can combine any of them by defining the appropriate `RG_GAMEPAD_*_MAP` in yo
8484
This file is used by ESP-IDF to build the code for the ESP32 itself.
8585

8686
Retro-Go, for the most part, doesn't care about the sdkconfig and its content will depend entirely the chip/board used. But there are things that you should keep in mind:
87-
- The main task stack size has to be at least 8KB for retro-go
88-
- The CPU frequency should be set to the maximum possible and power management be disabled
89-
- SPIRAM should be enabled and configured correctly for your device
87+
- The main task stack size has to be at least 8KB for retro-go ([CONFIG_ESP_MAIN_TASK_STACK_SIZE](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/kconfig-reference.html#config-esp-main-task-stack-size))
88+
- The CPU frequency should be set to the maximum possible and power management be disabled ([CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/kconfig-reference.html#config-esp-default-cpu-freq-mhz), [CONFIG_PM_ENABLE](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/kconfig-reference.html#config-pm-enable))
89+
- SPIRAM should be enabled and configured correctly for your device ([CONFIG_SPIRAM_\*](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/kconfig-reference.html#esp-psram))
90+
- Flash and SPIRAM speed should be set to the maximum supported by your device ([CONFIG_ESPTOOLPY_FLASHFREQ](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/kconfig-reference.html#config-esptoolpy-flashfreq), [CONFIG_SPIRAM_SPEED](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/kconfig-reference.html#config-spiram-speed))
91+
- Long filenames support should be enabled in FATFS ([CONFIG_FATFS_LFN_HEAP](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/kconfig-reference.html#config-fatfs-long-filenames))
92+
- UTF-8 support should be enabled in FATFS ([CONFIG_FATFS_API_ENCODING_UTF_8](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/kconfig-reference.html#config-fatfs-api-encoding))
9093

91-
ESP-IDF provides a tool to edit it, namely `menuconfig`, but to use it in retro-go you must follow the following steps:
94+
ESP-IDF provides a tool to edit it, namely `idf.py menuconfig`, but to use it in retro-go you must follow the following steps:
9295

9396
1. Build the launcher for your target (this will make sure you have the correct ESP32 board selected and generate a default sdkconfig)
9497
- `./rg_tool.py clean`
95-
- `./rg_tool.py --target my-target build launcher`
98+
- `./rg_tool.py --target=my-target build launcher`
9699
2. Enter the launcher directory: `cd launcher`
97100
3. Run `idf.py menuconfig` and make the changes that you need. Make sure to save the changes and exit.
98101
4. Optionally test the app with the new config (but do NOT run `rg_tool.py clean` at this point, your new config will be deleted)
99102
- `cd ..`
100-
- `./rg_tool.py --target my-target run launcher`
103+
- `./rg_tool.py --target=my-target run launcher`
101104
5. When you're satisfied, copy the `sdkconfig` file from the launcher to the target folder, so that it's used by all apps
102105
- `cd ..`
103106
- `mv -f launcher/sdkconfig components/retro-go/targets/my-target/sdkconfig`

rg_tool.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ def flash_app(app, port, baudrate=1152000):
177177
app_bin = os.path.join(app, "build", app + ".bin")
178178
print(f"Flashing '{app_bin}' to port {port}")
179179
run([PARTTOOL_PY, "--partition-table-file", "partitions.bin", "write_partition", "--partition-name", app, "--input", app_bin])
180+
print("Done.\n")
180181

181182

182183
def flash_image(image_file, port, baudrate=1152000):
@@ -185,6 +186,7 @@ def flash_image(image_file, port, baudrate=1152000):
185186
os.putenv("ESPTOOL_PORT", port)
186187
print(f"Flashing image file '{image_file}' to {port}")
187188
run([ESPTOOL_PY, "write_flash", "--flash_size", "detect", "0x0", image_file])
189+
print("Done.\n")
188190

189191

190192
def monitor_app(app, port, baudrate=115200):

0 commit comments

Comments
 (0)