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

Board files for LOLIN S3 MINI #8010

Closed
wants to merge 14 commits into from
Closed

Board files for LOLIN S3 MINI #8010

wants to merge 14 commits into from

Conversation

tkroo
Copy link

@tkroo tkroo commented May 21, 2023

My first time creating a new board definition, hopefully everything is ok.

@tannewt tannewt requested a review from dhalbert May 22, 2023 20:07
@dhalbert
Copy link
Collaborator

@tkroo Does the latest batch of changes boot? If so I can approve. @bill88t How is it for you?

Copy link

@bill88t bill88t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhalbert I do not have the board.
I just try to review stuff I am comfortable with.

The optimisation flag is what concerns me most with this definition.

If you want me to stop reviewing stuff, just tell me.

#
# SPI RAM config
#
# CONFIG_SPIRAM_MODE_QUAD=y
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have been more specific, sorry.
It's CONFIG_SPIRAM_TYPE_AUTO that is unwanted.
You want CONFIG_SPIRAM_MODE_QUAD or CONFIG_SPIRAM_MODE_OCT enabled.

You can just try out if oct works if you are too lazy to check the schematic.
If oct doesn't boot, quad.

@dhalbert
Copy link
Collaborator

@bill88t No problem, keep reviewing. THe optimization change may be needed to make it fit. -O2 is the default for the xtensa boards; -Os is needed for the RISC-V boards. (See the Makefile). You probably know this already. I don't see any other boards setting optimization per board in ports/espressif, though.

@bill88t
Copy link

bill88t commented May 22, 2023

Isn't it the policy to just disable unused modules in favor of keeping optimisation as is?

It's a 4mb S3 board.
Looking at the adafruit_feather_esp32s3_tft definition, instead of disabling optimisation, CIRCUITPY_ESPCAMERA = 0 is set instead.

That should be added in the .mk.

@dhalbert
Copy link
Collaborator

Normally we would turn ESPCAMERA off. We don't necessarily preserve optimization in favor of turning of general-purposes functionality. O2 is a lot bigger than Os. That is certainly true on various SAMD boards, for instance. We use Os to have all the useful modules.

@tkroo
Copy link
Author

tkroo commented May 23, 2023

@tkroo Does the latest batch of changes boot? If so I can approve. @bill88t How is it for you?

Yes, my board boots with latest changes. I also just did a build without the OPTIMIZATION_FLAG = -0s and it also boots. Should I remove that flag? I don't know what is preferred.

@bill88t
Copy link

bill88t commented May 23, 2023

If OPTIMIZATION_FLAG isn't needed, it should absolutely be removed.

bill88t
bill88t previously approved these changes May 23, 2023
@tkroo
Copy link
Author

tkroo commented May 23, 2023

If OPTIMIZATION_FLAG isn't needed, it should absolutely be removed.

Thanks! Removed. I had thought the optimization flag was brought over from the existing Lolin S3 board files, but it was me who accidentally pasted it from somewhere else. Sorry about the confusion.

@skieast
Copy link

skieast commented May 23, 2023

Although may not be relevant I would remove all the extraneous pin definitions for those not broken out on the board. I would include a definition for the onboard WS2812 which I believe is on IO47. I can't be more specific on my phone lol
Thanks

@dhalbert
Copy link
Collaborator

dhalbert commented May 23, 2023

@ktroo I don't understand why there are now merge conflicts noted, since you are just adding files.

Do you see @skieast's suggestion of removing pins that are not accessible?

@tkroo
Copy link
Author

tkroo commented May 23, 2023

@ktroo I don't understand why there are now merge conflicts noted, since you are just adding files.

Do you see @skieast's suggestion of removing pins that are not accessible?

I don't understand the merge conflicts either. Strange. But I am new to this whole process, so maybe I did something accidentally.
I did see @skieast's suggestions. On board neopixel is already defined:

{ MP_ROM_QSTR(MP_QSTR_IO47), MP_ROM_PTR(&pin_GPIO47) },
{ MP_ROM_QSTR(MP_QSTR_D47), MP_ROM_PTR(&pin_GPIO47) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO47) },

#define MICROPY_HW_NEOPIXEL (&pin_GPIO47)

re: extraneous pins. I checked pins.c and don't see any pins defined that are not also exposed on the board.

@dhalbert
Copy link
Collaborator

I don't understand the merge conflicts either. Strange. But I am new to this whole process, so maybe I did something accidentally.

I think the easiest way to fix this would be to make a new branch, copy the new files into it, and make a new PR. We can close this one assuming the new one works.

@skieast
Copy link

skieast commented May 23, 2023

@ktroo I don't understand why there are now merge conflicts noted, since you are just adding files.
Do you see @skieast's suggestion of removing pins that are not accessible?

I don't understand the merge conflicts either. Strange. But I am new to this whole process, so maybe I did something accidentally. I did see @skieast's suggestions. On board neopixel is already defined:

{ MP_ROM_QSTR(MP_QSTR_IO47), MP_ROM_PTR(&pin_GPIO47) },
{ MP_ROM_QSTR(MP_QSTR_D47), MP_ROM_PTR(&pin_GPIO47) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO47) },

#define MICROPY_HW_NEOPIXEL (&pin_GPIO47)

re: extraneous pins. I checked pins.c and don't see any pins defined that are not also exposed on the board.

Quite true. I was looking at it on my phone. I can blame my old eyes, better than blaming myself. Thanks again.

@tkroo
Copy link
Author

tkroo commented May 23, 2023

I don't understand the merge conflicts either. Strange. But I am new to this whole process, so maybe I did something accidentally.

I think the easiest way to fix this would be to make a new branch, copy the new files into it, and make a new PR. We can close this one assuming the new one works.

Ok. I will create a new branch and PR. Thanks for all your help!

@tkroo
Copy link
Author

tkroo commented May 23, 2023

re: extraneous pins. I checked pins.c and don't see any pins defined that are not also exposed on the board.

Quite true. I was looking at it on my phone. I can blame my old eyes, better than blaming myself. Thanks again.
No worries! I am new to this and appreciate as many eyes on this as possible. Thank you!

@tkroo tkroo closed this by deleting the head repository May 23, 2023
@dhalbert
Copy link
Collaborator

@tkroo you don't need to delete your fork. Just deleting the branch would be ifne.

@tkroo
Copy link
Author

tkroo commented May 23, 2023

@tkroo you don't need to delete your fork. Just deleting the branch would be ifne.

Oh well, I've already deleted it. I think what caused the merge conflict was that I had merged my branch into my fork's main. Anyway, I'll create a new fork, branch, and PR.
Sorry about the chaos

@dhalbert
Copy link
Collaborator

had merged my branch into my fork's main.

Yes, try to keep your main the same as upstream's main. Basically, never work in main. Always work in a branch.

@tkroo
Copy link
Author

tkroo commented May 23, 2023

new PR: #8023

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

Successfully merging this pull request may close these issues.

4 participants