ARMduino - a generic implementation of Arduino on ARM Cortex-M chips

Cores are the underlying magic that make the Arduino API possible
User avatar
Rick Kimball
Posts: 1058
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: ARMduino - a generic implementation of Arduino on ARM Cortex-M chips

Post by Rick Kimball » Mon May 29, 2017 1:42 pm

I spent some time trying out the pic24f chips when I was getting started with MCUs about 7 years ago. I would have spent more time with the pic24 series if it had a C++ compiler. I might have even spent more time if the free 'C' compiler wasn't crippled by the way they disabled the higher level optimization features. This approach to software seemed rather backwards thinking. Why penalize people who want to use your chip? When I noticed your posting here I thought, hmm maybe they have come around since they bought ATMEL. I now see nothing has changed. It's too bad I was hoping that eventually they would see the light.
-rick

dannyf
Posts: 167
Joined: Wed May 11, 2016 4:29 pm

Re: ARMduino - a generic implementation of Arduino on ARM Cortex-M chips

Post by dannyf » Tue May 30, 2017 11:05 am

The whole pic24f family is my favorite, for its vectors interrupts, remarkable pins and peripheral consistency. They offer great speed for numerical calculations. Both c30 and xc16 generate good quality code. It is my goto chip for microchip.

I don't mind having to pay for a quality compiler. You get more than your moneys worth in one project.

What matters to me is that the vendor offers quality products and services. On that front, microchip does a good job here. I do hope that they can invest more in marketing the pic24f however.

dannyf
Posts: 167
Joined: Wed May 11, 2016 4:29 pm

Re: ARMduino - a generic implementation of Arduino on ARM Cortex-M chips

Post by dannyf » Wed May 31, 2017 10:16 pm

Spent more time on this and implemented analogRead(), analogWrite() and DACnWrite().

analogWrite() offers up to 16 bit of resolution and is available on 16 separate pins.

DACnWrite() utilizes the 12 bit dac channels to produce analog output.

Next is exti and serial comms.

danieleff
Posts: 336
Joined: Thu Sep 01, 2016 8:52 pm
Location: Hungary
Contact:

Re: ARMduino - a generic implementation of Arduino on ARM Cortex-M chips

Post by danieleff » Thu Jun 01, 2017 3:56 am

Do you seriously publish your code in wordpress pages? And where is that analogread/write implementation?

User avatar
Kenjutsu
Posts: 134
Joined: Fri May 29, 2015 8:26 am

Re: ARMduino - a generic implementation of Arduino on ARM Cortex-M chips

Post by Kenjutsu » Thu Jun 01, 2017 6:43 am

I started playing with your STM8S project, and was wondering if you will also be updating it, and if you would consider hosting it on GitHub? ;)
Pieter

OSX: 10.12.6
Arduino IDE: 1.6.12
Blue pill STM32F103C8T6 Dev Board
Maple Mini Clones

dannyf
Posts: 167
Joined: Wed May 11, 2016 4:29 pm

Re: ARMduino - a generic implementation of Arduino on ARM Cortex-M chips

Post by dannyf » Thu Jun 01, 2017 10:18 am

if you will also be updating it,
yes. my code is not v0.11a, added pulseIn(), tone()/noTone(), analogWrite(), analogRead(), attachInterrupt() and detachInterrupt() - ugly implementation and I'm thinking of revamping it soon.

I wanted to get it to a critical state and then push it out, but can publish an intermediate version if you want to try it.
if you would consider hosting it on GitHub?
don't know about that. don't want to create an account when I don't have to, :)

User avatar
Kenjutsu
Posts: 134
Joined: Fri May 29, 2015 8:26 am

Re: ARMduino - a generic implementation of Arduino on ARM Cortex-M chips

Post by Kenjutsu » Tue Jun 13, 2017 9:31 am

Regarding STM8, have you seen this project: https://tenbaht.github.io/sduino?
Pieter

OSX: 10.12.6
Arduino IDE: 1.6.12
Blue pill STM32F103C8T6 Dev Board
Maple Mini Clones

User avatar
RogerClark
Posts: 7485
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: ARMduino - a generic implementation of Arduino on ARM Cortex-M chips

Post by RogerClark » Tue Jun 13, 2017 9:42 am

Kenjutsu wrote:Regarding STM8, have you seen this project: https://tenbaht.github.io/sduino?
Cool...

But I cant quite see why it needs mingw etc or all the unix utilities to compile

dannyf
Posts: 167
Joined: Wed May 11, 2016 4:29 pm

Re: ARMduino - a generic implementation of Arduino on ARM Cortex-M chips

Post by dannyf » Wed Jun 14, 2017 5:54 pm

Kenjutsu wrote:Regarding STM8, have you seen this project: https://tenbaht.github.io/sduino?
I did but only briefly.

His implementation was much more to the letter of the arduino, and mine is more to the spirit of arduino. Aka functional equivalency. As a result his implementation will have better compatibility but mine with better speed.

His implenentataction uses spl and mine is at register level. So his has the convenice of spl but also its complexity. Mine will be more difficult to expand to new devices. Or to add more functionality.

I like mine with more stringent type checks but it can be more challenging to a typical Arduino user.

I would say that he did a great job porting it over. Mine isn't as forgiving to newbies from coding perspective. Mine is easier to set up and get going however.

Pros and cons. Like everything in life.

dannyf
Posts: 167
Joined: Wed May 11, 2016 4:29 pm

Re: ARMduino - a generic implementation of Arduino on ARM Cortex-M chips

Post by dannyf » Wed Jun 14, 2017 5:58 pm

Stm8 is really under appreciated. I hope all the ports hopefully will get more people into it, given where the avr family is.

Post Reply