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

add m5stamp-c3 board #725

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jcgruenhage
Copy link

fixes #670

I have never done this before, so if I'm doing this very wrong, please tell me. I have not found any documentation on how to do this though.

I've based this on the esp32-c3-devkitm-1.json board, most stuff is unchanged.

@jcgruenhage
Copy link
Author

After some help on the ESPHome Discord, I've gotten this to work. The now updated version of this PR successfully boots into ESPHome using the following config:

esphome:
  name: m5stamp-c3

esp32:
  board: m5stamp-c3
  variant: esp32c3
  framework:
    type: esp-idf
    platform_version: https://github.com/jcgruenhage/platform-espressif32#m5stamp-c3

logger:
  level: DEBUG

@pho3nixf1re
Copy link

Is there a way to manually include this until it is merged and released?

@pho3nixf1re
Copy link

I managed to figure this out (I think, not fully tested) by following the instructions here on creating custom boards. Hopefully it works. Would be really great if this could be merged officially.

Comment on lines 20 to 23
"frameworks": [
"espidf"
],

Choose a reason for hiding this comment

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

Is it possible for this to support Arduino? This board supposedly does.

Copy link
Author

Choose a reason for hiding this comment

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

I'll play around with that, we'll see.

Copy link
Author

Choose a reason for hiding this comment

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

jcgruenhage@34858df works, but it's not based on develop, but on feature/arduino-upstream, (which seems not to have been merged since I started working on this back in February).

Choose a reason for hiding this comment

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

Hm, thanks for checking on this. I may just stick with the esp framework then.

@arrowcircle
Copy link

any updates on merging this pull request?

"core": "esp32",
"f_cpu": "160000000L",
"f_flash": "40000000L",
"flash_mode": "dio",
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use mode qio Board does support

Copy link
Author

Choose a reason for hiding this comment

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

iirc I changed it to dio after qio didn't work, but I can still change it back and test it when back in reach of one of these boards

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, dio was needed for core < 2.0.4. Was a bug in bootloader generation.

Copy link
Author

Choose a reason for hiding this comment

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

I have pushed that, although I wasn't able to validate it yet because I'm using the commit based on the feature/arduino-upstream branch, which doesn't seem to have been worked on recently? Arduino support is quite important to me..

@jcgruenhage jcgruenhage force-pushed the m5stamp-c3 branch 2 times, most recently from 660f6c9 to e59cec7 Compare October 1, 2022 20:29
@martin31821
Copy link

Hi, any progress on this? I'm trying to use this PR with arduino framework.

@jcgruenhage
Copy link
Author

I've rebased this and this is working for me, including arduino support:

esphome:
  name: ${device_host}
  platformio_options:
    platform_packages:
      - framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.14
    platform:
      - https://github.com/jcgruenhage/platform-espressif32.git#m5stamp-c3
  on_boot:
    then:
      - light.turn_on:
          id: "${device_id}_led"
          red: 80%
          green: 0%
          blue: 100%

esp32:
  board: m5stamp-c3
  variant: esp32c3
  framework:
    type: arduino

binary_sensor:
  - platform: gpio
    pin: 3
    name: "${device_name} Button"
    id: "${device_id}_button"
    on_click:
      then:
        - light.toggle:
            id: "${device_id}_led"

light:
  - platform: neopixelbus
    id: "${device_id}_led"
    type: GRB
    variant: SK6812
    method: ESP32_RMT_1
    num_leds: 1
    pin: 2
    name: "${device_name} Led"

Can we finally get this merged? It's been nearly two years now.

@Jason2866
Copy link
Contributor

@valeros
Copy link
Member

valeros commented Feb 8, 2024

@Jason2866 This variant is not available in the latest stable 2.0.14. Furthermore, it seems that the m5stick_c variant was renamed to m5stack_stamp_c3, but these are two different boards, aren't they?

@Jason2866
Copy link
Contributor

Jason2866 commented Feb 8, 2024

Ahh, yes board m5stack_stamp_c3 is added in Arduino master. The board m5stick_c was renamed to m5stack_stickc.
Oh my this boards mess, who ever thought it is a good idea to set boards specific settings via a boards name....

Is there work done or planned to add a boards settings generator? Not just for espressif boards, a general solution?

Most issues here and for users is this boards mess...

@lboue
Copy link

lboue commented May 17, 2024

Could you validate this request?

@jcgruenhage
Copy link
Author

@valeros Board is supported in Arduino espressif32 espressif/arduino-esp32@master/variants/m5stack_stamp_c3/pins_arduino.h

I just checked the arduino-esp32 repo again, and it's still not in any release yet. There are release candidates for 3.0.0 though, which do contain the board.

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

Successfully merging this pull request may close these issues.

Add Support for M5STAMP-C3
7 participants