Skip to content
This repository has been archived by the owner on Nov 19, 2022. It is now read-only.

Project status? #2

Closed
beriberikix opened this issue Jan 14, 2020 · 12 comments
Closed

Project status? #2

beriberikix opened this issue Jan 14, 2020 · 12 comments

Comments

@beriberikix
Copy link

Hello! Do you have any plans to continue work on this project?

It's a great idea :)

@soburi
Copy link
Owner

soburi commented Jan 15, 2020

Hello! @beriberikix

I'm forcusing on https:/soburi/openthread_nrf52_arduino now.
I'm suspend this project now, because of my resource are too short to proceed this project.

One of a reason of suspend this project,
ZephyrRTOS has well complete 'make config' system for build and configuration.
I think that is not so suitable for put into arduino build system, because that has different principal.
(Arduino is prefer configuration embedding into initialize code, but ZephyrOS is externalizing to 'make config' system.)
I think that is good implements arduino subsystem library for ZephryRTOS, rather than build from arduino ide. (and it will be good to build IDE that make easy to configure and build on VSCode, such as PlatformIO, I think.)

@beriberikix
Copy link
Author

beriberikix commented Jan 17, 2020

The openthread project is super cool - I use to work on OpenThread and I'm glad to see your Arduino support.

Agree a Zephyr subsystem approach would be very nice. I'm not very familiar with how Zephyr's library system works, have you looked into it?

Agree that bundling make and west would be non-standard but I know plenty communities who do it. I'd love to see some CI/CD pipeline that auto-generates the configs and folders based on the latest devices supported in Zephyr. Hopefully someone else might be interested in collaborating or if you find more time :)

@soburi
Copy link
Owner

soburi commented Jan 21, 2020

Hi! @beriberikix.

Agree a Zephyr subsystem approach would be very nice. I'm not very familiar with how Zephyr's library system works, have you looked into it?

I just created trial codes.
https:/soburi/zephyr/tree/arduino-api

It is deriverd from v2.1.0

  • Add 'subsys/arduino-api'
  • Add 'samples/arduino-blinky'

Zephyr's subsystem is just a library, in my understanding.

Creating Zephyr's library is simple. It require only copy from 'arduino-on-zephyr' project into subsys/arduino-api and add Kconfig and CMakeLists.txt.
CMakeLists.txt can select sources to compile from board configuration.
But only compiling sources that required by the sample now. (It is proof of concept!)

'arduino-on-zephyr' has complex build system. It became hard to maintain.
This trial code implements Arduino-API as library, not contains (tricky) build scripts, has good affinity with Zephyr system.

Subsystem is just a library, it can also contain main() function.
It can implements arduino's loop which calls setup() and loop() function.
This implements makes user program can be written with arduino manner.
(see samples/arduino_blinky, I'm test with nrf52840_pca10056)

Result of this modification, we get two benefit.

  1. We can use Arduino-style API and setup()/loop() structure in Zephyr RTOS environment.
  2. It is completely fit wit Zephyr's CMake system.
    Easy to run CI/CD with west or other tools, I think.

(I think, Arduino designing that easiness with API and IDE (and Board).
API is just one of a part. I also want an easy-to-use IDE for ZephyrRTOS, that like a PlatformIO)

(And there is one serious problem.
Arduint-API is GPL codes, this code can not push into mainstream! (Zephyr is licenced with Apache license!))

Regards.

@leojrfs
Copy link

leojrfs commented Jan 22, 2020

Zephyr is now supported on PlatformIO, so having arduino api with it sounds amazing!
https://community.platformio.org/t/official-support-for-zephyr-project/11268

regarding mainstreaming, could we maybe create a separate repo GPL licensed as a module or something rather?

https://docs.zephyrproject.org/latest/guides/modules.html

@soburi
Copy link
Owner

soburi commented Jan 24, 2020

HI, @leojrfs

Zephyr is now supported on PlatformIO, so having arduino api with it sounds amazing!

That's good news! 👍

https://docs.zephyrproject.org/latest/guides/modules.html

OK, I'll considering to make this module as external.

@beriberikix
Copy link
Author

beriberikix commented Jan 24, 2020

Are you on the Slack channel? It would be good to share this idea with the community and see if there is any feedback!

Personally, I think having both Arduino IDE support and PlatformIO support would be ideal (and maybe even different implementations.) With the Arduino IDE you open up Zephyr to a lot more users and making things like access to OpenThread more generally available. PlatformIO is a much more powerful tool and is preferred by any with more experience developing embedded systems.

Besides modules, is it worth considering external libraries? I was looking here, which might make it easier to hook into the Arduino IDE's build system.

@soburi
Copy link
Owner

soburi commented Jan 26, 2020

@beriberikix,

Are you on the Slack channel?

I joined the channel as @soburi now.

Personally, I think having ...

I agree Arduino IDE and PlatformIO has different focus and users.
I believe there is different value than PlatformIO to provide zephyr package (this repository).
And I love Arduino!

Both PlatformIO and my Arduino package are just a wrapper for zephyr build system.
It's means following zephyr build rule, will make both system works well.

Here is trial code to make as a module.

https:/soburi/arduino-on-zephyr/tree/modulize (provide module)
https:/soburi/zephyr/tree/external_module (using module)

Only adding few configuration files to work as module to work.
And it seem not break original Arduino integration.

I think external library is seem good for importing already exists code that is not following zephyr build rule. For example, OpenThread is use configure & make not cmake, OpenThread is build with external library method in zephyr sources.

In this case, build as a module is more prefer way rather than external library in zephyr system, I think.

Thus, remaining problem is packaging and distribute module and Arduino package from this repository.
module is download directly from github by west comannd. No need to special things for distributing, just push a code.
Arduino package is bit more complex. But only some file was added to make module. It maybe able to ignore, I think. I need to maintain a package because it suspended for a while, but it maybe not hard.

@beriberikix
Copy link
Author

@soburi hello! Do you plan on maintaining this project any further? If so, great! But if not, I was wondering if you'd consider updating the README and point people to https:/zephyrproject-rtos/gsoc-2022-arduino-core (we just cut the first release) and optionally making this repo read-only. We'd love to build a community around this new Zephyr-sponsored repo!

@soburi
Copy link
Owner

soburi commented Sep 24, 2022

Hi, @beriberikix

I ported the function that the implementation has been completed in this project, but not yet implemented in gsoc-2022-arduino-core.

zephyrproject-rtos/gsoc-2022-arduino-core#56
zephyrproject-rtos/gsoc-2022-arduino-core#54
zephyrproject-rtos/gsoc-2022-arduino-core#51

Once these features are ported, this project can finish its historic role.
I will archive this project once these features (or alternative implementation) are implemented in gsoc2022.

@beriberikix
Copy link
Author

Amazing! Can you also join the Zephyr Discord to discuss? There's a dedicated arduino channel.

@soburi
Copy link
Owner

soburi commented Sep 24, 2022

Amazing! Can you also join the Zephyr Discord to discuss? There's a dedicated arduino channel.

OK. I can response in discord channel.

@soburi
Copy link
Owner

soburi commented Nov 19, 2022

All features porting is done. This project will archived.

@soburi soburi closed this as completed Nov 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants