-
-
Notifications
You must be signed in to change notification settings - Fork 637
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
Add support for ESP32-H2 and ESP32-C2 #1347
Open
luar123
wants to merge
3
commits into
platformio:develop
Choose a base branch
from
luar123:v6.6
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+81
−12
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"build": { | ||
"core": "esp32", | ||
"f_cpu": "120000000L", | ||
"f_flash": "60000000L", | ||
"flash_mode": "qio", | ||
"mcu": "esp32c2", | ||
"variant": "esp32c2" | ||
}, | ||
"connectivity": [ | ||
"wifi" | ||
], | ||
"debug": { | ||
"openocd_target": "esp32c2.cfg" | ||
}, | ||
"frameworks": [ | ||
"arduino", | ||
"espidf" | ||
], | ||
"name": "Espressif ESP32-C2-DevKitM-1", | ||
"upload": { | ||
"flash_size": "4MB", | ||
"maximum_ram_size": 278528, | ||
"maximum_size": 4194304, | ||
"require_upload_port": true, | ||
"speed": 460800 | ||
}, | ||
"url": "https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp8684/esp8684-devkitm-1/user_guide.html", | ||
"vendor": "Espressif" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"build": { | ||
"core": "esp32", | ||
"f_cpu": "96000000L", | ||
"f_flash": "64000000L", | ||
"f_image": "48000000L", | ||
"flash_mode": "qio", | ||
"mcu": "esp32h2", | ||
"variant": "esp32h2", | ||
"hwids": [ | ||
[ | ||
"0x303A", | ||
"0x1001" | ||
] | ||
] | ||
}, | ||
"connectivity": [ | ||
"wifi" | ||
], | ||
"debug": { | ||
"openocd_target": "esp32h2.cfg" | ||
}, | ||
"frameworks": [ | ||
"arduino", | ||
"espidf" | ||
], | ||
"name": "Espressif ESP32-H2-DevKit", | ||
"upload": { | ||
"flash_size": "4MB", | ||
"maximum_ram_size": 327680, | ||
"maximum_size": 4194304, | ||
"require_upload_port": true, | ||
"speed": 460800 | ||
}, | ||
"url": "https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32h2/esp32-h2-devkitm-1/index.html", | ||
"vendor": "Espressif" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not much of a python guy, but I program(med) a lot.
Espressif has said that all new devices will have RISC-V cores. Should code like this reflect that? Could this code set a global (I know, globals are bad. But we have mcu...) for "mcu_is_riscv" using approximately this test and then use "mcu_is_riscv" (I don't care how it's spelled) in all the places that are making this exact test, such as setting the GDB name? Otherwise, when something like p4 gets added, there's going to be the same bulky hunt-and-destroy exercise to add a model name to a test that's essentially an eternally growing list of post-2020 models?
Here we set
if mcu in ("esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32p4", ...):
mcu_family_riscv = true; // whatever
Then the special cases for GDB and ULP and esp-builtin and the dozen others changed here can be
"tool-riscv32-esp-elf-gdb"
if mcu_family_riscv
else "tool-xtensa-esp-elf-gdb"
...and importantly, those dozen hunks don't have to change when p4 and p5 and esp32z3 and whatever else gets added.
Otherwise, the bulk of this CL gets repeated for every new incoming model.
Just a review fly-by...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that easy. There are checks not only based on the MCU architecture. As example ULP check...
So the whole code needs always checked when a new MCU is added. I knew this a bit, added the P4 and LP core support ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as you've looked at it, minimized the amount of work to do, and concluded this is as good as it gets, my work here is done. 😀. I'll take my not quite common subexpression optimization and crawl back under my rock. I was just trying to help make future revs not need the entire catalog added in a bunch of places.
Thanx for being awesome.