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

Page Proposal: "mOS Startup sequence" and "mongoose-os programming model" #55

Open
DrBomb opened this issue Dec 14, 2021 · 1 comment
Open

Comments

@DrBomb
Copy link

DrBomb commented Dec 14, 2021

Leaving this here as a proposal. I might come around to start doing it but I think starting this conversation is good to have a good final result.

I've been working with mOS for at least 3 years now! And I'm now guiding other people using it. But coming from other platforms, like arduino, will be difficult for new users.

My proposal is to have two new doc pages regarding mongoose basics.

The mongoose-os startup sequence:

  • Explain what goes on on startup
  • Describe how the system starts up, then starts calling lib init methods one by one
  • Also include the app init method
  • Tie into how libs are written and what is the required signature for their init function.
  • Show the app init method signature and the return value needed to finish the init process

This would help arduino people to understand how libraries can add functionality to their apps without explicitly calling them afterwards. And to avoid calling the lib init methods manually.

The mongoose-os programming model

  • Describe how mongoose-os runs. Mention the single thread and the event loop that handles timers and network functions.
  • Describe how different it is from arduino. Explain why using delays is not recommended on mongoose-os
  • Describe how it affects operations compared to arduino. Specifically UART as it is the most difficult one. Perhaps a bonus UART page is needed.
  • Mention how SPI and I2C are handled (synchronously)

Making a clear statement on how mongoose-os differs from arduino is crucial. I've seen programmers just adding in delays to an uart operation (I did the same when I started).

I hope this all makes sense, let me know if you have anything else to add, cheers!

@rojer
Copy link
Collaborator

rojer commented Dec 15, 2021

thanks for putting this together. this looks reasonable.
having any part of this done would make be excellent!

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

No branches or pull requests

2 participants