MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.34k stars 19.26k forks source link

[FR] ESP32-S2 support? #23507

Open alan-student opened 2 years ago

alan-student commented 2 years ago

Is your feature request related to a problem? Please describe.

No response

Are you looking for hardware support?

Does marlin support ESP-S2?

Describe the feature you want

Hello everyone. I'm developing a new board based on the ESP32. However ,original ESP32 has too few IOs. So I wonder if it possible to run on the ESP-S2, cause it has more IOs. How can I modified the firmware to make it run on the S2. Or if it can not be solved by simple modified, will the marlin support the S2?

Additional context

No response

ellensp commented 2 years ago

esp's traditionally use I2S IO EXPANDER's

ellensp commented 2 years ago

You would need to write a new HAL, or if it is close enough modify the existing one. Not a easy or simple task.

alan-student commented 2 years ago

Hello Ellenson. I know many boards use the i2s expanders. Anyway, the speed is limited to the expanded IOs. and the soft usart can not be used on the ESP32 now, it's tough to use the stepper driver based on the usart, like TMC2208 etc. I wonder if there is good way to solve the problem.

ellensp commented 2 years ago

You need a developer, someone who has done micro-controller development for at least a decade and who knows the esp chips.

simon-jouet commented 2 years ago

Hey @alan-student I have actually modified the ESP32 HAL I wrote to also support the ESP32-S2 some time ago. You should be able to see the code here https://github.com/simon-jouet/Marlin/commits/esp32s2

I haven't worked on it in a while but it does work fine (both my printers use it) with my ESP32Controller R3 (esp32-s2) board https://github.com/simon-jouet/ESP32Controller

But as @ellensp is saying the best approach with an esp32 (s2 and not s2) is to use I2S as a GPIO expander

alan-student commented 2 years ago

Thank you so much for you excellent work!@simon-jouet I will check if it can run on ESP32-S2 in the coming future. And add the condition to the issue.

MZZQ-BEN commented 2 years ago

![上传E01DC11D-87E0-43C4-B265-B8F104135A1A.jpeg...]() A boss has already done it.

ahakkoca07 commented 3 weeks ago

!上传E01DC11D-87E0-43C4-B265-B8F104135A1A.jpeg... A boss has already done it.

hi, the image you posted seems to be broken, if you still have the image, can you share it again please?