cancel
Showing results for 
Search instead for 
Did you mean: 

Simple programming (Arduino-like) on ARM Cortex-M3

ram2
Associate II
Posted on July 15, 2009 at 19:54

Simple programming (Arduino-like) on ARM Cortex-M3

1 REPLY 1
ram2
Associate II
Posted on May 17, 2011 at 13:17

I have started Xduino project at

http://www.xduino.com

which enables a simplified programming syntax to work on other non-ATMEGA/AVR mcu and so far I did manage to come out with set of platform libraries for ARM Cortex-M3. The simplified syntax is based on Arduino syntax from

http://www.arduino.cc

as it did which offers simple learning curve for users to get into programming a microcontroller systems.

Due to some limitation of today's Arduino hardware support for some of my projects I have decided to pick a more suitable solution and that's how I got into ARM and that's how Xduino came about.

You can check Xduino site out and also download the library for ARM Cortex-M3 and test it out.

Not all functions has been documented yet but you can have a good feel from the example below.

Please let me know if you have a chance to try it out.

The current Xduino release is v0.11.

Other mcu support will be added when I can get a hold of other hardware platform.

I have only tested this on ARM Cortex-M3 STM32F10ret6. I think it would just work on other STM32F10x boards as well (However, I can't confirm as I don't have other boards at the moment)

Note that C++ compiler is required (not standard C)

From http://www.xduino.com/arm-cortex-m3/

/* Xduino library initialization */

#include ''main.h''

int LedPin = PB7; // as labelled on your ARM Cortex-M3 board

int main(void)

{

doInit(); //Initialize

Serial1.begin(115200); //USART1

Serial1.println(''Starting Xduino example...'');

pinMode(LedPin,OUTPUT);

for(int i=1;i<=10;i++)

{

digitalWrite(LedPin,HIGH);

delay(200);

digitalWrite(LedPin,LOW);

delay(200);

}

if(digitalRead(LedPin))

{

Serial1.println(''On'');

} else {

Serial1.println(''Off'');

}

while(1)

{

if(Serial1.available())

{

Serial1.print(''Character ''); //print string

Serial1.print(Serial1.read()); //print single input character

Serial1.println(''...''); //print string with new line

}

}

}

[ This message was edited by: ram2 on 15-07-2009 23:29 ]

[ This message was edited by: ram2 on 16-07-2009 07:38 ]