You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Justin Mclean <ju...@classsoftware.com> on 2015/10/25 09:56:10 UTC

Cortex Mx support

Hi,

Just curious what versions of Cortex MX the project currently supports? From what I’ve seen in the documentation Cortex M4 seems the minimum, is there any reason for this? And if so what would it take to support say Cortex M0? For example what would it take to support running on something like the new Ardruino Zero board? [1]

Thanks,
Justin

1. http://store-usa.arduino.cc/products/abx00003

Re: Cortex Mx support

Posted by Greg Stein <gs...@gmail.com>.
On Mon, Oct 26, 2015 at 12:52 PM, marko kiiskila <ma...@runtime.io> wrote:
>...

> Maybe sharing emacs c-mode settings for MyNewt could be a viable
> replacement of an IDE?
>

Oh, there is certainly room for checking this kind of thing into the repo.
Along with Vim settings, or whatever else people wanna use. Some kind of
tools/ subdir or something, to share. We've been doing that in the
Subversion project since nearly the beginning.

Cheers,
-g

Re: Cortex Mx support

Posted by marko kiiskila <ma...@runtime.io>.
> On Oct 26, 2015, at 2:22 AM, Greg Stein <gs...@gmail.com> wrote:
> 
> On Mon, Oct 26, 2015 at 4:05 AM, Justin Mclean <ju...@classsoftware.com>
> wrote:
> 
>> Hi,
>> 
>>> Pah. Still an IDE rather than Emacs, Makefile, and cmdline. Call me old
>>> school ;-)
>> 
>> :-) I remember being taught cursive writing and my school desk had a place
>> for the ink well.
>> 
>> I assume you’re aware of this; "The Arduino IDE is useful for beginners,
>> but Emacs is better.” [1]
>> 
> 
> LOL!
> 
> Right about this month, I'm celebrating 30 years of using Emacs. ... Kinda
> scary :-P
> 

My emacs tenure is just past 24 years, so you have me beat.

Maybe sharing emacs c-mode settings for MyNewt could be a viable
replacement of an IDE?


Re: Cortex Mx support

Posted by Greg Stein <gs...@gmail.com>.
On Mon, Oct 26, 2015 at 4:05 AM, Justin Mclean <ju...@classsoftware.com>
wrote:

> Hi,
>
> > Pah. Still an IDE rather than Emacs, Makefile, and cmdline. Call me old
> > school ;-)
>
> :-) I remember being taught cursive writing and my school desk had a place
> for the ink well.
>
> I assume you’re aware of this; "The Arduino IDE is useful for beginners,
> but Emacs is better.” [1]
>

LOL!

Right about this month, I'm celebrating 30 years of using Emacs. ... Kinda
scary :-P

Cheers,
-g

Re: Cortex Mx support

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> Pah. Still an IDE rather than Emacs, Makefile, and cmdline. Call me old
> school ;-)

:-) I remember being taught cursive writing and my school desk had a place for the ink well.

I assume you’re aware of this; "The Arduino IDE is useful for beginners, but Emacs is better.” [1]

Thanks,
Justin

1. http://emacswiki.org/emacs/ArduinoSupport

Re: Cortex Mx support

Posted by Greg Stein <gs...@gmail.com>.
Pah. Still an IDE rather than Emacs, Makefile, and cmdline. Call me old
school ;-)

(thx for the pointers, hadn't heard of any of them)

On Mon, Oct 26, 2015 at 12:42 AM, Justin Mclean <ju...@me.com> wrote:

> Hi,
>
> > The Arduino community is still all about "sketches" and that IDE.
>
> There  few other IDEs about, Arduino Studio [1], Code Bender [2],  Arduino
> Create [3] (coming soon) and you can use Eclipse [4] if you really want.
>
> Code Bender in particular has a large community behind it.
>
> Also Fritzing [5] is really nice and they added a code tab in recent
> versions.
>
> Thanks,
> Justin
>
> 1. http://labs.arduino.org/Arduino+Studio
> 2. https://codebender.cc
> 3. https://blog.arduino.cc/2015/05/05/sneak-peak-arduino-create/
> 4. http://playground.arduino.cc/Code/Eclipse
> 5. http://fritzing.org/home/

Re: Cortex Mx support

Posted by Justin Mclean <ju...@me.com>.
Hi,

> The Arduino community is still all about "sketches" and that IDE. 

There  few other IDEs about, Arduino Studio [1], Code Bender [2],  Arduino Create [3] (coming soon) and you can use Eclipse [4] if you really want.

Code Bender in particular has a large community behind it.

Also Fritzing [5] is really nice and they added a code tab in recent versions.

Thanks,
Justin

1. http://labs.arduino.org/Arduino+Studio
2. https://codebender.cc
3. https://blog.arduino.cc/2015/05/05/sneak-peak-arduino-create/
4. http://playground.arduino.cc/Code/Eclipse
5. http://fritzing.org/home/

Re: Cortex Mx support

Posted by Greg Stein <gs...@gmail.com>.
On Thu, Oct 29, 2015 at 1:49 PM, P. Taylor Goetz <pt...@gmail.com> wrote:

>
> On Oct 25, 2015, at 7:10 PM, Greg Stein <gs...@gmail.com> wrote:
>
> For me, I wanted a devboard with an Ethernet port. Two years ago, there
> weren't many out there at a reasonable price. I needed something to act as
> a proxy between my ethernet network, and the dozens of microcontrollers in
> my house.
>
>
> Hah… I’m in the same boat. Lately i’ve been using a lot of esp8266[1]
> boards since they are dirt cheap (< $5), support WiFi, and have a lot of
> power for the price.
>

Yeah, no doubt. That chip is a paradigm shift. Wifi dropped from $40/unit
to $5/unit (or less in quantity) in just two years. That change in price
opens tons of new possibilities.

I've got one sitting around that I'll experiment with, but gots lots of
work to do on my wired solutions first...

Cheers,
-g

Re: Cortex Mx support

Posted by "P. Taylor Goetz" <pt...@gmail.com>.
> On Oct 25, 2015, at 7:10 PM, Greg Stein <gs...@gmail.com> wrote:
> 
> For me, I wanted a devboard with an Ethernet port. Two years ago, there
> weren't many out there at a reasonable price. I needed something to act as
> a proxy between my ethernet network, and the dozens of microcontrollers in
> my house.

Hah… I’m in the same boat. Lately i’ve been using a lot of esp8266[1] boards since they are dirt cheap (< $5), support WiFi, and have a lot of power for the price.

And re: Arduino IDE… getting away from that thing was one of the best things I ever did. I will say the multiple board/architecture/toolchain support in the newer versions is nice.

-Taylor

Re: Cortex Mx support

Posted by Greg Stein <gs...@gmail.com>.
On Sun, Oct 25, 2015 at 1:14 PM, Sterling Hughes <st...@apache.org>
wrote:
>...

> I'd love your thoughts on something, as it seems like you've played
> with Arduino a bunch.  Is it the hardware platform, or the wiring
> interface that you see most appealing?
>

For me, I wanted a devboard with an Ethernet port. Two years ago, there
weren't many out there at a reasonable price. I needed something to act as
a proxy between my ethernet network, and the dozens of microcontrollers in
my house.

So for my case, "hardware".


>
> I've gone back and forth with this in my head more times than is likely
> sane.
>
> One the one hand, I really admire the fact that Arduino has created a
> simple interface that has let a ton of hobbyists develop prototypes.
> Wiring seems to me to be well adopted, and that's usually a sign that
> its practical and sane.
>
> On the other hand, if I had the expertise to use a RTOS for
> programming, I'm not sure I would need to wiring interface vs a
> straight C implementation.  As I'm sure you're aware, the wiring
>

Right. I stripped out the fancy Arduino IDE and use a set of makefiles to
do all the gunk the IDE would normally do (I want my Emacs, not its crappy
editor), and the cmdline doesn't scare me.

Similarly, I'd go with an RTOS if I could. The Arduino's busy loop and
delay() calls makes me die a little inside, every day. The clock rate
should be fast enough to use interrupts/timers and still maintain external
responsiveness (I have problems with my 8Mhz PICs, so *they* have to
busy-loop).


> interfaces are somewhat limited for more complex functions that you
> might want to perform (i.e. responding quickly to a change in state on
> multiple GPIO.)
>
> Do you think that providing a matching interface (or a port of wiring
> to our RTOS) will likely bring a lot of people in?  Or is having the
> equivalent as a C implemented HAL that's a bit more advanced
> sufficient?
>

Something that looks like Wiring, which can be used within the Arduino IDE.

The Arduino community is still all about "sketches" and that IDE. If you
want them to try mynewt, then it needs to fit within there, somehow. I
think it has the capability to select different "Wiring" libraries, in
addition to different boards.

IMO, Arduino grew to power by using Wiring to simplify *software* for
*hardware hackers*. People who tinker with hardware know little about how
to write software within an RTOS. Arduino/Wiring made it approachable.

Cheers,
-g

Re: Cortex Mx support

Posted by Justin Mclean <ju...@me.com>.
Hi,

> I'd love your thoughts on something, as it seems like you've played
> with Arduino a bunch.

Just a bit of 7 years or so. One conference I went to they made a wanted poster of me with the caption “Playing with toys when he should be working" :-)

>  Is it the hardware platform, or the wiring interface that you see most appealing?

There are a few things that appeal:
1. The community
2. The availability of hardware and cheap prototyping shields/boards
3. Easy to upload programs via the IDE (via USB)
4. Build in libraries for most common tasks 
5. Large amount of existing code out there
6. The simplicity of the language / framework and IDE

Al of that makes for a good prototyping platform, and given smaller form factor boards you can quickly turn a breadboard prototype into usable working prototype often without having to make your own boards.

Also a lot of people coming to it the platform have little C (or in some cases modern IDE) experience so they see more complex stuff as very difficult so it works for them.

That being said it’s certainly not a a solution that fits everything. As soon as you want to do anything more complex particularly involving scheduling or multiple tasks at once it can become very difficult quit quickly.

>  As I'm sure you're aware, the wiring
> interfaces are somewhat limited for more complex functions that you
> might want to perform (i.e. responding quickly to a change in state on
> multiple GPIO.)

I’ve not actually run into this issue, it generally fast enough for bit banging, controlling displays and the like but there are probably a few situations where's it is too slow.

> Do you think that providing a matching interface (or a port of wiring
> to our RTOS) will likely bring a lot of people in?

Not sure what would be best here, but:
1. Porting Mynewt to common arduino hardware would mean there’s more cheap hardware out there that people are familiar with.
2. Being able to use the many arduino libraries inside Mynewt would be advantage. I can’t see that as being too difficult for most of them as they tend to be C and there’s a simple HAL i.e. you tell it what pins to use and it calls a few simple functions to use GPIOs and analog inputs.

Thanks,
Justin


Re: Cortex Mx support

Posted by Sterling Hughes <st...@apache.org>.
That looks like a great board to get running!

Justin,

I'd love your thoughts on something, as it seems like you've played
with Arduino a bunch.  Is it the hardware platform, or the wiring
interface that you see most appealing?

I've gone back and forth with this in my head more times than is likely sane.

One the one hand, I really admire the fact that Arduino has created a
simple interface that has let a ton of hobbyists develop prototypes.
Wiring seems to me to be well adopted, and that's usually a sign that
its practical and sane.

On the other hand, if I had the expertise to use a RTOS for
programming, I'm not sure I would need to wiring interface vs a
straight C implementation.  As I'm sure you're aware, the wiring
interfaces are somewhat limited for more complex functions that you
might want to perform (i.e. responding quickly to a change in state on
multiple GPIO.)

Do you think that providing a matching interface (or a port of wiring
to our RTOS) will likely bring a lot of people in?  Or is having the
equivalent as a C implemented HAL that's a bit more advanced
sufficient?

Sterling

PS: No judgement here on Wiring's interface - I'm genuinely curious: I
spent a lot of time on PHP.  Purists told us for years what was wrong
about our language, all while we grew to power the majority of the web
cause it turned out great engineers aren't always the ones with ideas
for great websites.



On Sun, Oct 25, 2015 at 1:56 AM, Justin Mclean <ju...@classsoftware.com> wrote:
> Hi,
>
> Just curious what versions of Cortex MX the project currently supports? From what I’ve seen in the documentation Cortex M4 seems the minimum, is there any reason for this? And if so what would it take to support say Cortex M0? For example what would it take to support running on something like the new Ardruino Zero board? [1]
>
> Thanks,
> Justin
>
> 1. http://store-usa.arduino.cc/products/abx00003

Re: Cortex Mx support

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> Supporting the M0 will be quite easy, we just not have added it to the project yet. We were trying to find a decent development board for porting so maybe we could start with the Arduino you mentioned (as it has the M0+ on it).

Great certainly sounds possible then. They board is;;t out just yet but seems quite nice for what it is (bluetooth LE + 6 axis accelerometer) - esp the price

Not that for this board there actually 2 cores:
The module contains two tiny cores, an x86 (Quark) and an ARC, both clocked at 32Mhz. The Quark core runs ViperOS RTOS and helps the Arduino core to accomplish the most demanding tasks.

Given that there now 2 Arduino companies we’re likely to see some competition in boards they put out. Although it’s going to make the IDE version numbers very confusing, two forks of the same project with the same name and similar version numbers.

Here’s some other cortex boards by the “other” arduino company.
http://www.arduino.org/products/boards/4-arduino-boards/arduino-tian
http://www.arduino.org/products/boards/4-arduino-boards/arduino-m0
http://www.arduino.org/products/boards/4-arduino-boards/arduino-m0-pro

There is also another Arduino IDE built on Adobe Brackets (MIT Licensed) which I’ve had a bit of a play with, that may be interesting to explore.
http://labs.arduino.org/Arduino+Studio

Thanks,
Justin

Re: Cortex Mx support

Posted by will sanfilippo <wi...@runtime.io>.
Hello Justin:

Yes, currently the project only supports the M4. Well, it supports the M3 as well as the M4 as the M3 is very similar to the M4 but we have not built anything with the M3.

Supporting the M0 will be quite easy, we just not have added it to the project yet. We were trying to find a decent development board for porting so maybe we could start with the Arduino you mentioned (as it has the M0+ on it).

Off the top of my head, there is not much that would need to be done other than modifying the context switch assembly code as we use instructions that the M0 does not support. Probably would not take more than an hour or so to port… there might some other minor glitches but the port should be simple...

Will

> On Oct 25, 2015, at 1:56 AM, Justin Mclean <ju...@classsoftware.com> wrote:
> 
> Hi,
> 
> Just curious what versions of Cortex MX the project currently supports? From what I’ve seen in the documentation Cortex M4 seems the minimum, is there any reason for this? And if so what would it take to support say Cortex M0? For example what would it take to support running on something like the new Ardruino Zero board? [1]
> 
> Thanks,
> Justin
> 
> 1. http://store-usa.arduino.cc/products/abx00003