Go Down

Topic: Arduino portable to (almost) any microcontroller (Read 1 time) previous topic - next topic

nidalpres

I've posted something about this a year ago I think but can't find the post so here is the new one:

Anyone interested running Arduino (generic) code, or using Arduino libraries (like Adafruit) on some other microcontrollers, check this out: http://zeeduino.com/lpc1347-videos

That is a quickstart for LPC1347 and it serves just as an illustration how arduino-xc can be used, once HAL is implemented for your chosen controller.

Very usable LPc1347 port (UART, SPI, I2C, half a dozen of Adafruit libraries: ADXL345, BMP085, GFX/LCD, ST7735, TCS34725, LSM303) but still under heavy development.

Source code here: https://github.com/zeeduino
"Everybody needs a hobby" - Tony Stark

Graynomad

#1
Jul 23, 2016, 12:04 am Last Edit: Jul 23, 2016, 12:14 am by Graynomad
I did a port to the LPC1227 a few years ago

http://lard.robgray.com/

Never really finished it but I'm currently designing a SAMG55 board and might move it all to that.

I love the LPC chips and the LPCXpresso IDE is much better than AS7, but the SAMG55 eats the LPC chips for breakfast IMO so I've moved back to Atmel.
Rob Gray aka the GRAYnomad www.robgray.com

nidalpres

I love the LPC chips and the LPCXpresso IDE is much better than AS7, but the SAMG55 eats the LPC chips for breakfast IMO so I've moved back to Atmel.
Wow! SAMG55 packs a lot of hardware on the chip and for a really nice price!

I started long time ago with Microchip PIC controllers and decided to move to LPC family. Two main reasons: painful experiences with development tools and LPC had ARM core.

With so many chips on the market it is fairly easy to find the one to match the task at hand and at the end, for me, it boils down to development support and environment (compiler, IDE, debugger etc.).

While looking at the SAMG55 specs on Atmel site I almost jumped to buy SAM G55 Xplained Pro dev kit and build a quick port of arduino-xc for it. What stopped me is that AS7 runs only on Windows. LPC Xpresso runs on Linux (my preferred environment), Windows and OSX and, while there's a lot to be desired when it comes to comparing LPC chips to SAM family, dev support and ease of directly working with boards on all three operating systems is a big plus for me (my projects usually have accompanying application on PC/Mac).

That ease of setting up a board and starting with development was what initially drew my attention to Arduino. What a fantastic project! And that is the reason why I spent couple of weeks working on arduino-xc: to be able to have on LPC (or other micro) all the benefits Arduino brings to selected AVR and SAM chips.

I wish AS7 could run on Linux, I would be coding on SAMG55 as soon as Xplained Pro arrived at my door.
But since it is not likely to be the case any time soon I can only wish you best with your board Graynomad! :)

P.S.
Graynomad, if you think that the board you are designing could benefit from arduino-xc having port that runs on it, let me know and I'll be glad to help with porting.
"Everybody needs a hobby" - Tony Stark

Graynomad

The G55 has so many features it's not funny.

Yes I'm interested in Arduino-XC, I'll PM you.
Rob Gray aka the GRAYnomad www.robgray.com

nidalpres

Here is a short video of LPCXpresso 1347 board running code from Arduino IDE.

Compiler and uploader are from LPCXpresso IDE installed on the same workstation. This is proof of concept which uses libraries that come with Arduino-XC (SPI, Serial, Wire, some Adafruit libs etc.).

Serial Monitor seems to have some issues with FTDI USB serial dongle I'm using, so I just used minicom to display serial data coming from the board.
"Everybody needs a hobby" - Tony Stark

Paul Stoffregen

#5
Aug 07, 2016, 01:31 am Last Edit: Aug 07, 2016, 12:17 pm by Paul Stoffregen
FWIW, I'm developing a new Teensy board using the NXP/Freescale K66 chip.  It's packed with powerful features: 180 MHz Cortex-M4, FPU, 1M flash, 256K RAM, 4K EEPROM, two USB ports (one 480 Mbit/sec), ethernet mac, native SD, I2S, 6 serial, 3 SPI, 4 I2C, 20 PWM, 2 DAC, 20-some analog with 2 parallel ADCs, RTC, touch sensing.

Graynomad

Jeez that K66 chip packs a wallop. I might just put my SAMG55 design away :)
Rob Gray aka the GRAYnomad www.robgray.com

Paul Stoffregen

#7
Aug 09, 2016, 03:51 pm Last Edit: Aug 09, 2016, 03:51 pm by Paul Stoffregen
Feel very roomy...

fjrg76

@nidalpres You cannot compare a M0 core with a M4 one. In order to be fair you should check the NXP M4 family:

http://www.mouser.mx/Search/Refine.aspx?Keyword=nxp+lpc+m4


When I saw that the SAMG55 had good reputation I took a look at it, but the fact that the programming tools are not available in Linux, makes me to keep showing my love for NXP's products.

I'll take a look also to the zeeduino platform. I started to write mine (with compatibility with Arduino's API) but soon I quit the task. The Arduino's API is awful and inconsistent, so it's not worthy the effort to write code base in an API not well engineered. However, no matter how horrible the API is, it's being used for millions, so everything that wants to receive a little attention of the masses needs to be compatible with Arduino.

Paul Stoffregen

#9
Feb 14, 2017, 09:50 pm Last Edit: Feb 14, 2017, 09:54 pm by Paul Stoffregen
I regularly hear this sort of "Arduino's API is ... not well engineered" sentiment.

But then when I look at the systems which supposedly are good, they're typically very thin APIs that basically just expose you to most of the hardware details.  They're not engineered much at all.  They put all that responsibility onto you.  I suppose that's great if you like that sort of thing, and I have personally used such approaches in the past, but then you can also dig into those details on Arduino too if you really need such control.

The situation is sorta like PHP and Wordpress for developing websites.  Purists complain about the design of these systems, but the reality is 25% of *all* websites are built on Wordpress, and far more use PHP, including this forum.  Developers using these systems get more done in less time, which makes them far more commercially competitive.  Sure, Google & Facebook hire huge teams of dedicated engineers who really dig into all the low level stuff, but for the vast majority of applications with modest requirements and without huge budgets, even the most talented engineers using low-level techniques can't compete with folks who can get something up and running quickly by leveraging existing components.

This situation isn't quite the same for product development, especially high volume mass market products sold to consumers with warranty coverage and strict liability for personal injury.  For those high stakes designs, of course you want extreme engineering effort.  But for so many other applications, and especially just building one-off projects or rapid prototypes, Arduino and its massive ecosystem of libraries makes good sense.

Go Up