Skip to content

M5CoreS3 board and partitions update #8276

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

Merged
merged 4 commits into from
Sep 15, 2023
Merged

Conversation

tobozo
Copy link
Contributor

@tobozo tobozo commented May 31, 2023

followup to #8161 #8274

  • adjusted default build values
    1. cdc default enabled
    2. 16MB flash + partition scheme copied from Core2 default selected
  • added missing sections
  • added two custom partitions schemes to the variant folder (see them in use)

the new custom partitions layout is open for discussions.

@Tinyu-Zhao
Copy link
Contributor

Hi @tobozo ,CoreS3 PSRAM is best set to on by default, otherwise it will affect the normal work of the camera.
image

@me-no-dev
Copy link
Member

Hi @tobozo ,CoreS3 PSRAM is best set to on by default, otherwise it will affect the normal work of the camera.
image

AMF you do not need that menu at all. Board comes with 32MB Flash and 8MB QSPI PSRAM. Clocks should be set to 80MHz and configuration options for those items should not exist.

@tobozo
Copy link
Contributor Author

tobozo commented Jun 5, 2023

@Tinyu-Zhao thanks for your input I'll remove the PSRAM block as suggested.

locks should be set to 80MHz and configuration options for those items should not exist.

@me-no-dev Should I also remove the FlashMode block, or maybe just the Flashmode.*.flash_freq lines?

@Tinyu-Zhao
Copy link
Contributor

@tobozo I think the default setting for theUSB CDC On Boot: Disabled is a better choice, otherwise many examples and the kernel is used are USBSerial, there will be convenient not through the case.
image

@tobozo
Copy link
Contributor Author

tobozo commented Jun 21, 2023

@Tinyu-Zhao I understand it affects the example sketch, however changing the default option value in the boards.txt will not prevent users from changing it in the menu, and the error can happen anyway.

Moreover, using Serial everywhere is much more intuitive, e.g when re-using sketches from other ESP32 products that do not handle USBCDC, or when the sketch is using a different library (M5Unified, LovyanGFX, TFT_eSPI, Arduino_GFX).

The official USBSerial example suggests using a safeguard to properly assign objects in a transparent fashion.

image

Some context: many ESP32-S3 board profiles enable CDC at boot: enabling this option solves many problems that occur in default situation e.g. debug logs not visible, late init, and no tty visible from the PC when in a crash loop.

In practice, enabling USB-CDC at boot aliases Serial instead of USBSerial.
Since Serial and USBSerial are both hardware CDC, using Serial.begin() with USB-CDC is the same as using USBSerial.begin() without USB-CDC.

Please let me know what the M5 team decides and I'll comply.

@P-R-O-C-H-Y
Copy link
Member

@tobozo @Tinyu-Zhao Is this PR ready for reviewing / merging? :) 2.0.10 release is close. Thanks

@Tinyu-Zhao
Copy link
Contributor

@tobozo It is recommended to keep USBSerial as the serial port, as many users will not be able to compile after the update if the new release is not properly adapted.

@tobozo
Copy link
Contributor Author

tobozo commented Jul 21, 2023

@Tinyu-Zhao I've updated the branch accordingly, however I have some afterthoughts:

whatever choice is made, users will have troubles:

  • without CDC on boot users may experience problems to flash CoreS3 when not using <M5CoreS3.h> library
  • with CDC on boot user have to manually alias the USBSerial when using M5CoreS3 library

I think it is safe to assume the problem is isolated to M5CoreS3 library and could be adressed by patching M5CoreS3.h with the conditional aliasing, so that USBSerial is available in both situations.

@me-no-dev
Copy link
Member

I have modified the M5CoreS3 library locally to not use USBSerial, but a combination of Serial + log_x, in order to get best compatibility. CDC_ON_BOOT is ON. IMHO M5CoreS3 lib should be adjusted. @Tinyu-Zhao some of the drivers are missing there as well. Could those be added? Publishing the source of the FactoryTest default firmware could also be helpful!

@P-R-O-C-H-Y P-R-O-C-H-Y added the Resolution: Awaiting response Waiting for response of author label Aug 23, 2023
@VojtechBartoska VojtechBartoska added this to the 2.0.12 milestone Aug 28, 2023
@VojtechBartoska
Copy link
Contributor

any updates on this?

@VojtechBartoska VojtechBartoska requested review from VojtechBartoska and removed request for P-R-O-C-H-Y August 28, 2023 12:12
@me-no-dev me-no-dev removed this from the 2.0.12 milestone Aug 30, 2023
tobozo added a commit to tobozo/M5CoreS3 that referenced this pull request Sep 11, 2023
@tobozo tobozo closed this Sep 11, 2023
@tobozo tobozo reopened this Sep 11, 2023
@tobozo
Copy link
Contributor Author

tobozo commented Sep 12, 2023

sorry guys, PR was automatically closed when I synced the branch, so I re-opened it

CDC_ON_BOOT is now on by default as suggested by @me-no-dev

I have modified the M5CoreS3 library locally to not use USBSerial, but a combination of Serial + log_x, in order to get best compatibility. CDC_ON_BOOT is ON.

@Tinyu-Zhao if renaming USBSerial to Serial in M5CoreS3 library&examples is not satisfying, I have submitted an alternate solution to handle any combination of USB_MODE and CDC_ON_BOOT menu options.

@me-no-dev
Copy link
Member

@tobozo I agree with the changes. Let's hope that @Tinyu-Zhao will also agree

@tobozo
Copy link
Contributor Author

tobozo commented Sep 13, 2023

@me-no-dev the CoreS3 User Demo project (the FactoryTest default firmware) can be found here

@tobozo
Copy link
Contributor Author

tobozo commented Sep 13, 2023

all checks have passed but git complains, I'm not sure what to do with this, should I merge or rebase?

image

@Tinyu-Zhao
Copy link
Contributor

I'll try it later.

@Tinyu-Zhao
Copy link
Contributor

M5cores3 works great, thank you all for your help.

@Tinyu-Zhao
Copy link
Contributor

all checks have passed but git complains, I'm not sure what to do with this, should I merge or rebase?

image

I think "Update with merge commit" might be good.

@me-no-dev
Copy link
Member

What do we do with this PR now? We are about to release the last 2.x, so if we miss this, it will go for 3.0.0, where many things are different.

@me-no-dev me-no-dev added this to the 2.0.13 milestone Sep 15, 2023
@Tinyu-Zhao
Copy link
Contributor

What do we do with this PR now? We are about to release the last 2.x, so if we miss this, it will go for 3.0.0, where many things are different.

Is it too late to merge? It's been checked and it's fine.

@me-no-dev
Copy link
Member

Not too late!

@me-no-dev me-no-dev merged commit a6a287f into espressif:master Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

5 participants