Is Aduino Uno is supported? Topic is solved

ChibiOS public support forum for topics related to the Atmel AVR family of micro-controllers.

Moderator: tfAteba

User avatar
tfAteba
Posts: 551
Joined: Fri Oct 16, 2015 11:03 pm
Has thanked: 91 times
Been thanked: 50 times

Is Aduino Uno is supported?

Post by tfAteba »

Hello to all!

I read a bit about Arduino Uno on this furum section.

But I can't know if this board with the 328p microcontroler is realy supported by ChibiOS.

There is no the board folder on ChibiOS_3.0.2/os/hal/boards/ such as Arduino Mega for example.

If this board is not supported, is there a particular reason? I want to use ChibiOS on this board for a small self-balancing robot ;)

Thanks in advance for your kind responses.

Theo.
User avatar
igor
Posts: 50
Joined: Sun Aug 16, 2015 7:24 pm
Has thanked: 1 time

Re: Is Aduino Uno is supported?

Post by igor »

It is supported. Kinda.
Not all the IP blocks are, though. For example I'm trying to merge a patch to enable GPIO interrupts. PWM is also in need of a refresh.
So ymmv depending on which specific functionality you need to use.
User avatar
tfAteba
Posts: 551
Joined: Fri Oct 16, 2015 11:03 pm
Has thanked: 91 times
Been thanked: 50 times

Re: Is Aduino Uno is supported?

Post by tfAteba »

Hi Igor,

I need to use pwm, interruption, i2c and uart.

Are you using the NIL or the RT with arduino uno?

Do I need to patch the Aduino mega folder to use the arduino uno? Because there is not the arduino folder, so for me it is not supported.
utzig
Posts: 359
Joined: Sat Jan 07, 2012 6:22 pm
Has thanked: 1 time
Been thanked: 20 times

Re: Is Aduino Uno is supported?

Post by utzig »

Arduino Uno demos for both RT/NIL are available on SVN.
User avatar
tfAteba
Posts: 551
Joined: Fri Oct 16, 2015 11:03 pm
Has thanked: 91 times
Been thanked: 50 times

Re: Is Aduino Uno is supported?

Post by tfAteba »

Hi,

thank you utzig, i'm going to takea look :)
User avatar
tfAteba
Posts: 551
Joined: Fri Oct 16, 2015 11:03 pm
Has thanked: 91 times
Been thanked: 50 times

Re: Is Aduino Uno is supported?

Post by tfAteba »

Hi,

During my test, i saw that, the readme file under the RT-ARDUINOUNO folder is written for the atmega1280.

In the main.c file, line 20, the old function to declare the working area is used.

I wonder if it would be better to use the new function instead?

So I join a small patch to improve this remarks if necessary.

Theo.
Attachments
ArduinoUno.patch.zip
(718 Bytes) Downloaded 641 times
User avatar
igor
Posts: 50
Joined: Sun Aug 16, 2015 7:24 pm
Has thanked: 1 time

Re: Is Aduino Uno is supported?

Post by igor »

I found out the same issue for the testhal programs.
I created https://sourceforge.net/p/chibios/bugs/666/
No, I didn't do it just for the bug number, I noticed it only later :-)

I also proposed a patch to make the tests ATMega2560 only. If they actually can work also on ATMega328, then the readmes need fixing as well.
User avatar
igor
Posts: 50
Joined: Sun Aug 16, 2015 7:24 pm
Has thanked: 1 time

Re: Is Aduino Uno is supported?

Post by igor »

@Theodore: in case you need interrupts support for EXT/PC,
I have a pending Pr here https://github.com/ChibiOS/ChibiOS/pull/16
User avatar
tfAteba
Posts: 551
Joined: Fri Oct 16, 2015 11:03 pm
Has thanked: 91 times
Been thanked: 50 times

Re: Is Aduino Uno is supported?

Post by tfAteba »

Hi Igor,

Thanks, it will be very helpful later for me, but for now, i'm dealing with the pprogramming process of the board.
I'm trying to understand how to remove the bootloader before flashing the board.

After that, I willl make a test ;).

Theo
utzig
Posts: 359
Joined: Sat Jan 07, 2012 6:22 pm
Has thanked: 1 time
Been thanked: 20 times

Re: Is Aduino Uno is supported?

Post by utzig »

Theodore ATEBA wrote:I'm trying to understand how to remove the bootloader before flashing the board.

You don't need to remove the bootloader. You either program the image directly to flash using an external programmer which will overwrite the bootloader, or write using the Arduino USB port (via bootloader) which can be used on any standard Arduino without modifying the firmware. You only need to configure the correct parameters for avrdude on the Makefile. To write using the bootloader you would need to run like this:

Code: Select all

avrdude -p atmega328p -P <your-com-port> -b 57600 -c arduino -U flash:w:ch.hex


Cheers,
Fabio Utzig
Post Reply