Author Topic: Abstraction layer for DA1469x  (Read 1720 times)

0 Members and 1 Guest are viewing this topic.

Offline TerenceTopic starter

  • Newbie
  • Posts: 4
  • Country: nl
Abstraction layer for DA1469x
« on: September 10, 2021, 01:40:28 pm »
Hi everyone,

I am looking to choose an existing HAL and make a DA1469x port for it. The goal of the port is to be able to re-use drivers and other available software examples made by the open source community. MicroPython and Arduino caught my interest due to the available examples and drivers.

What are your thoughts on Arduino and MicroPython as abstraction layer?
Are there better options?

Thanks for any feedback,

Terence
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Abstraction layer for DA1469x
« Reply #1 on: September 12, 2021, 01:23:16 am »
Quote
What are your thoughts on Arduino as abstraction layer?
Arduino has some VERY BASIC abstractions that have proven to be pretty useful for doing a lot of things, but it isn't particularly "powerful" or "complete" WRT supporting all the features of a chip/CPU.
Networking stack support in Arduino has always seemed a bit kludgey; the Arduino SW sort-of assumes full blocking access to the chip hardware, and handling the timing tasks typical of a network can be "fun."  It's been done; ESP8266 and ESP32 manage, Nordic and RPi rp2040 run the Arduino "on top of" MBed, etc.   It's just something you'll need to watch out for, particularly on chips with some fixed networking stack in ROM.

A partial port of Arduino can be very educational :-)   Trying to fit it on top of a vendor SDK on top of ROM functions is likely to be a very different experience that trying to fit it on top of bare metal hardware.   The RPi rp2040 probably provides pretty good examples of how this might be done (there's one port of Arduino/SDK/hardware, and one that does Arduino/MBed/SDK/hardware.  But no concurrent networking stack...)  (OTOH, I guess the da1469x has a separate CPU for running the timing critical network stuff.  That might make it easier.   Or tougher.)
I don't know of any Arduino ports to ARMv8m architecture; perhaps that can be mostly ignored, or perhaps that will be an additional challenge.

Quote
Are there better options?
I... don't really know.  Who is your target audience?  I'd say MBedOS or FreeRTOS might be good targets, but they're not really aimed at "new users" the way that Arduino (or Micropython) is.  So there are far fewer users working in a more complex development environment.  Arduino starts off with "well, you want to blink some LEDs, right?" whereas the more OS-like targets are more like "create your main task with an appropriate priority after configuring the per-task stack and heap sizes" (?)

It's pretty painful to consider that Arduino might be one of the best cross-vendor abstraction layers out there.   But it might be true.
 

Offline TerenceTopic starter

  • Newbie
  • Posts: 4
  • Country: nl
Re: Abstraction layer for DA1469x
« Reply #2 on: September 13, 2021, 07:12:39 am »
Thank you very much for your reply!

I do not have much experience in the area of creating a port of this kind, so I bet that I will learn a lot. I am grateful that you have given me possible problems I might face 😊. 

My target audiences are small companies and hobbyists. I would like to make the DA1469x more attractive to them. As you described, OS-like solutions require more experience. Therefore, MicroPython and Arduino seem better fit than the OS-like options.

You seem to favor Arduino over MicroPython, could you explain to me why?

Again, I am very thankful for your reply, it helps me a lot 😊
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14447
  • Country: fr
Re: Abstraction layer for DA1469x
« Reply #3 on: September 13, 2021, 05:15:35 pm »
One thing to consider is that the Arduino framework is really a combination of a subset of C++ and a number of libraries. In the end, it gets you the benefits of compiled code, including speed.

Micropython (/Circuitpython) is based on Python and is interpreted code. You'll never get the same kind of performance. May or may not matter depending on the user's goals.

Also, even though Micropython has gained momentum, the Arduino community is still much larger.
 

Offline TerenceTopic starter

  • Newbie
  • Posts: 4
  • Country: nl
Re: Abstraction layer for DA1469x
« Reply #4 on: September 14, 2021, 07:03:55 am »
Thank you for your reply!

I have done a search on GitHub and found ~40 times more repositories with Arduino mentioned than MicroPython. Although google search volume of Arduino has been declining over the years, it is still significantly higher than the search volume of MicroPython. I wonder if MicroPython will keep rising in popularity and one day will be a serious competitor for Arduino.

I have done a couple of projects with Arduino, but I am unexperienced in MicroPython. So, I think it is a good idea to get some experience with MicroPython before deciding what to choose.

Regarding the performance of MicroPython, I saw that it is possible to build C code and call it from your MicroPython application. If you do this, will it still be much worse, speed wise, compared to C?

Thank you for your insight, I highly appreciate it 😊
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf