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

[WIP] Feature: component hosted #2093

Closed
wants to merge 10 commits into from

Conversation

slaff
Copy link
Contributor

@slaff slaff commented Jul 13, 2020

Sming's host emulator allows easier debugging and development of embedded applications. This component named "HostEd" extends the host emulator and facilitates testing functionality that only a real microcontroller can provide as for example digital I/O operations or SPI operations.

For example in order to run the Basic_Blink application under the host emulator and run the actual blinking of a LED on a microcontroller we can compile the application using the following directives:

    make SMING_ARCH=Host ENABLE_HOSTED=tcp HOSTED_SERVER_IP=192.168.4.1

SMING_ARCH=Host instructs the build system to build the application for the Host architecture.
ENABLE_HOSTED=tcp instructs the host emulator to communication with the real microcontroller using TCP
HOSTED_SERVER_IP=192.168.4.1 instructs the host emulator to connect to IP 192.168.4.1.

We need to compile and flash also a special application on the desired microcontroller. That application will execute the commands send from the host emulator. The compilation and flashing for ESP32, for example, can be done using the following commands:

    make hosted-app HOSTED_ARCH=Esp32 WIFI_SSID=YourSSID WIFI_PWD=YourPassword
    make hosted-flash

If you replace HOSTED_ARCH=Esp32 with HOSTED_ARCH=Esp8266 then the hosted application will be compiled and flashed on ESP8266 microcontroller.
Make sure to replace the values of  WIFI_SSID and WIFI_PWD with the actual name and password for the Access Point (AP).

Development

The communication between the host emulator and the hosted application is done via protocol buffer messages. The messages are described in the proto/hosted.proto file and can be extended further.

@slaff slaff requested a review from mikee47 July 13, 2020 11:21
@slaff slaff linked an issue Jul 13, 2020 that may be closed by this pull request
@slaff slaff force-pushed the feature/component-hosted branch 2 times, most recently from 39c24e5 to 0ab8d70 Compare February 19, 2021 15:00
@mikee47 mikee47 force-pushed the develop branch 2 times, most recently from 7b19c1b to 295a5f3 Compare February 22, 2021 15:50
@slaff slaff added this to the 4.3.0 milestone Mar 28, 2021
@slaff slaff removed this from the 4.3.0 milestone Mar 30, 2021
@slaff
Copy link
Contributor Author

slaff commented Apr 16, 2021

Superseded by #2305

@slaff slaff closed this Apr 16, 2021
@slaff slaff deleted the feature/component-hosted branch July 9, 2021 09:04
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.

Sming Device Emulation
3 participants