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 native platform target #812

Open
OttoWinter opened this issue Jul 16, 2020 · 3 comments
Open

Add native platform target #812

OttoWinter opened this issue Jul 16, 2020 · 3 comments
Labels

Comments

@OttoWinter
Copy link
Member

OttoWinter commented Jul 16, 2020

Describe the problem you have/What new integration you would like

A new native / host platform target to compile for.

Please describe your use case for this integration and alternatives you've tried:

Currently, the only way to test/debug ESPHome is to compile and upload it to an ESP. This incurs long wait times, makes debugging much harder etc.

If we could compile ESPHome to a native platform target (so directly for the host OS), then testing and debugging could become much easier. Have a bug? Just launch gdb or even visual debuggers and step through the program without buying/wiring up hw debugger.

Obviously this only helps for logic issues, and not timing/hardware related issues.

Additional context

PlatformIO already has support for it, so we even wouldn't need to write our own tool.

Of course this would be a significant effort because we need to mock all Arduino-framework functions, but that could be quite beneficial in the long term because it forces us to write better hardware abstraction layers.

Plus given that ESPHome is already quite modular, we can just manually disable support for all modules that cause issues (thinking everything network related until we get a better network abstraction layer)

(I have no intention of implementing this in the near future, just an idea I had)

@OttoWinter
Copy link
Member Author

Thinking further: This could easily extended to work with raspberry Pis.

I'm not 100% sure what the use case for that would be though except maybe to get ESPHome's YAML syntax to work.

@glmnet
Copy link
Member

glmnet commented Jul 16, 2020

This lines up for the people who is trying to add other micro controllers like the STM32 etc. #687

@bwims

This comment was marked as off-topic.

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

No branches or pull requests

5 participants
@glmnet @nagyrobi @OttoWinter @bwims and others