Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TTGO T8 V1.7 ESP32 board lacks PSRAM management #9762

Open
robertoseno opened this issue Oct 27, 2024 · 9 comments
Open

TTGO T8 V1.7 ESP32 board lacks PSRAM management #9762

robertoseno opened this issue Oct 27, 2024 · 9 comments
Milestone

Comments

@robertoseno
Copy link

Circuitpython releases 9.1.4 and 9.2.0 manage apparently correctly the 4MB Flash but both lack PSRAM management.
You can find in circuitpython-main/ports/espressif/boards/ttgo_t8_v1_7/mpconfigboard.mk that there is no PSRAM declaration:

CIRCUITPY_CREATOR_ID = 0x000C303A
CIRCUITPY_CREATION_ID = 0x00320005

IDF_TARGET = esp32

CIRCUITPY_ESP_FLASH_MODE = qio
CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_FLASH_SIZE = 4MB

CIRCUITPY_ESPCAMERA = 0

Looking at Adafruit FeatherS2 for example you can see:
USB_VID = 0x239A
USB_PID = 0x80EC
USB_PRODUCT = "Adafruit Feather ESP32S2"
USB_MANUFACTURER = "Adafruit"

IDF_TARGET = esp32s2

CIRCUITPY_ESP_FLASH_MODE = qio
CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_FLASH_SIZE = 4MB

CIRCUITPY_ESP_PSRAM_SIZE = 2MB
CIRCUITPY_ESP_PSRAM_MODE = qio
CIRCUITPY_ESP_PSRAM_FREQ = 80m

Please can you add PSRAM management for TTGO T8 V1.7 ESP32 board too?
Thanks

Roberto

@dhalbert dhalbert transferred this issue from adafruit/circuitpython-org Oct 27, 2024
@dhalbert dhalbert added this to the 9.x.x milestone Oct 27, 2024
@dhalbert
Copy link
Collaborator

Do you feel like you could submit a PR? Most of us don't have this board available to test.

@aguaviva
Copy link

aguaviva commented Nov 11, 2024

I added support for this board, but I am not sure how to add support for that. Any idea?
Edit 1: On another note, are you sure you mentioned the right file? It actually looks like this: https://github.com/adafruit/circuitpython/blob/main/ports/espressif/boards/ttgo_t8_v1_7/mpconfigboard.mk

CIRCUITPY_CREATOR_ID =  0x000C303A
CIRCUITPY_CREATION_ID = 0x00320005

IDF_TARGET = esp32

CIRCUITPY_ESP_FLASH_MODE = qio
CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_FLASH_SIZE = 4MB

CIRCUITPY_ESPCAMERA = 0

Edit 2: It looks like the config you posted is meant to be the fixed mk file? Anyway it has some references to Adafruit Feather ESP32S2, if you could fix that and add send a PR (As I originally did :P) it would help a lot.

@aguaviva
Copy link

I tried adding the following 3 lines:

CIRCUITPY_CREATOR_ID =  0x000C303A
CIRCUITPY_CREATION_ID = 0x00320005

IDF_TARGET = esp32

CIRCUITPY_ESP_FLASH_MODE = qio
CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_FLASH_SIZE = 4MB

CIRCUITPY_ESP_PSRAM_SIZE = 4MB   <--------------------------
CIRCUITPY_ESP_PSRAM_MODE = qio   <--------------------------
CIRCUITPY_ESP_PSRAM_FREQ = 80m   <--------------------------

CIRCUITPY_ESPCAMERA = 0

but I get the following warnings:

-- Project sdkconfig file /home/raul/repos/circuitpython/circuitpython/ports/espressif/build-ttgo_t8_v1_7/esp-idf/sdkconfig
Loading defaults file /home/raul/repos/circuitpython/circuitpython/ports/espressif/esp-idf-config/sdkconfig-ble.defaults...
Loading defaults file /home/raul/repos/circuitpython/circuitpython/ports/espressif/esp-idf-config/sdkconfig.defaults...
Loading defaults file /home/raul/repos/circuitpython/circuitpython/ports/espressif/esp-idf-config/sdkconfig-opt.defaults...
Loading defaults file /home/raul/repos/circuitpython/circuitpython/ports/espressif/esp-idf-config/sdkconfig-flash-4MB-no-ota-no-uf2.defaults...
Loading defaults file /home/raul/repos/circuitpython/circuitpython/ports/espressif/esp-idf-config/sdkconfig-flash-qio.defaults...
Loading defaults file /home/raul/repos/circuitpython/circuitpython/ports/espressif/esp-idf-config/sdkconfig-flash-80m.defaults...
Loading defaults file /home/raul/repos/circuitpython/circuitpython/ports/espressif/esp-idf-config/sdkconfig-psram.defaults...
Loading defaults file /home/raul/repos/circuitpython/circuitpython/ports/espressif/esp-idf-config/sdkconfig-psram-4MB.defaults...
Loading defaults file /home/raul/repos/circuitpython/circuitpython/ports/espressif/esp-idf-config/sdkconfig-psram-qio.defaults...
warning: unknown kconfig symbol 'SPIRAM_MODE_OCT' assigned to 'n' in /home/raul/repos/circuitpython/circuitpython/ports/espressif/esp-idf-config/sdkconfig-psram-qio.defaults
Loading defaults file /home/raul/repos/circuitpython/circuitpython/ports/espressif/esp-idf-config/sdkconfig-psram-80m.defaults...
warning: unknown kconfig symbol 'SPIRAM_MODE_OCT' assigned to 'n' in /home/raul/repos/circuitpython/circuitpython/ports/espressif/esp-idf-config/sdkconfig-psram-80m.defaults
warning: unknown kconfig symbol 'SPIRAM_SPEED_120M' assigned to 'n' in /home/raul/repos/circuitpython/circuitpython/ports/espressif/esp-idf-config/sdkconfig-psram-80m.defaults
Loading defaults file /home/raul/repos/circuitpython/circuitpython/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults...
warning: unknown kconfig symbol 'SPIRAM_MODE_OCT' assigned to 'n' in /home/raul/repos/circuitpython/circuitpython/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults
warning: unknown kconfig symbol 'SPIRAM_SPEED_120M' assigned to 'n' in /home/raul/repos/circuitpython/circuitpython/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults
Loading defaults file /home/raul/repos/circuitpython/circuitpython/ports/espressif/boards/ttgo_t8_v1_7/sdkconfig...
warning: unknown kconfig symbol 'SPIRAM_MODE_OCT' assigned to 'n' in /home/raul/repos/circuitpython/circuitpython/ports/espressif/boards/ttgo_t8_v1_7/sdkconfig
warning: unknown kconfig symbol 'SPIRAM_SPEED_120M' assigned to 'n' in /home/raul/repos/circuitpython/circuitpython/ports/espressif/boards/ttgo_t8_v1_7/sdkconfig

Any idea why?

@robertoseno
Copy link
Author

robertoseno commented Nov 23, 2024 via email

@dhalbert
Copy link
Collaborator

Did you do make clean BOARD=ttgo_t8_v1_7 before redoing the build, after adding those lines? It looks like the sdkconfig is inconsistent with other settings.

Or, the esp-idf submodule is out of date. Try updating the usbmodules. I use this alias:

alias gitsubupdate='git submodule sync --quiet --recursive && git submodule update --init --filter=blob:none'

@aguaviva
Copy link

After a few unsuccessful attempts I deleted everything and started from scratch and same thing. BTW It would help if the sequence of commands to compile the espressif modules where one after the other, otherwise one needs to go fishing around

@dhalbert
Copy link
Collaborator

dhalbert commented Nov 23, 2024

I just tried this on a clone of adafruit/circuitpython, on the tip of main, in Ubuntu 24.04. It builds for me both without and without the three PSRAM lines in mpconfigboard.mk, doing a make clean in between.

I'm not sure what to suggest trying next. If you are working on your fork, maybe there is something out of date about it. Try building in a clone of adafruit/circuitpython rather than your fork.

I revised the instructions in https://learn.adafruit.com/building-circuitpython/espressif-build slightly yesterday, to update them about python venv's.

@robertoseno
Copy link
Author

robertoseno commented Nov 23, 2024 via email

@aguaviva
Copy link

aguaviva commented Nov 24, 2024

Nice comment about the venv I think it is safe to assume people are using venvs these days as it helps keep a clean installation.
Also, I was working on a clone of adafruit/circuitpython, not on main but on the 9.2.1 branch, in Ubuntu 24.04.

Another one is that there are two pages that explain how to build the firmware:

An finally, if all compiled fine for you (it worked for me despite of the warnings) please consider merging #9824

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants