Is Aduino Uno is supported? Topic is solved

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

Moderators: utzig, tfAteba

User avatar
tfAteba
Posts: 547
Joined: Fri Oct 16, 2015 11:03 pm
Location: Strasbourg, France
Has thanked: 91 times
Been thanked: 48 times

Re: Is Aduino Uno is supported?

Postby tfAteba » Wed Nov 11, 2015 4:54 pm

Hello,

Thanks Utzig, I prefer the second option because I don't have an externel programmer. So I'm happy to see that I can keep the bootloader and flash the MCU over the serial port.

I just tested directly with the command line and it work perfectly, thank you very much. So now I'm going to modify the make file to do the same.

Cheers,
Theo

User avatar
igor
Posts: 50
Joined: Sun Aug 16, 2015 7:24 pm
Location: Helsinki, Finland
Has thanked: 1 time

Re: Is Aduino Uno is supported?

Postby igor » Wed Nov 11, 2015 7:26 pm

To give some context: a simple USB Arduino ISP programmer is about 3€ on ebay, shipment included. It does just that: program the ATMega
An AVR Dragon is about $80 but supports also HW debugging via gdb. It also works as ISP programmer. I use it with ChibiOS

User avatar
tfAteba
Posts: 547
Joined: Fri Oct 16, 2015 11:03 pm
Location: Strasbourg, France
Has thanked: 91 times
Been thanked: 48 times

Re: Is Aduino Uno is supported?

Postby tfAteba » Thu Nov 12, 2015 10:00 pm

@Igor,

Cool, but I made the choice to use the serial port and the boot-loader to flash the Arduino board.

But I just want to know if I can use the debugger with this possibility?

Theo

User avatar
igor
Posts: 50
Joined: Sun Aug 16, 2015 7:24 pm
Location: Helsinki, Finland
Has thanked: 1 time

Re: Is Aduino Uno is supported?

Postby igor » Fri Nov 13, 2015 12:03 am

Theodore ATEBA wrote:Cool, but I made the choice to use the serial port and the boot-loader to flash the Arduino board.
But I just want to know if I can use the debugger with this possibility?


Which debugger are you referring to?
To do HW debugging you need either the AVR Dragon (cheaper option) or the AVR debugger (MKII iirc).
There are other so called SW debuggers which rely on data transfer on the serial port, meant to work with the default Arduino libraries.
AFAIK they require specific libraries and are of course far more limited in what you can so with them.
Also they might work only in a fully compliant Arduino setup. But I have never tried them.

And even if they work, they do not support stuff like breakpoints, step by step debugging, etc.

User avatar
tfAteba
Posts: 547
Joined: Fri Oct 16, 2015 11:03 pm
Location: Strasbourg, France
Has thanked: 91 times
Been thanked: 48 times

Re: Is Aduino Uno is supported?

Postby tfAteba » Fri Nov 13, 2015 5:25 pm

@Igor,

I didn’t refer to any particular debugger, I'm not really an AVR expert, so I want to know the possibilities that I have to make a debug if I keep the boot-loader on the aTmega328p.

I'm used to microchip tools and MCU, but I want to learn about other ;).

Cheers,
Theo.

User avatar
igor
Posts: 50
Joined: Sun Aug 16, 2015 7:24 pm
Location: Helsinki, Finland
Has thanked: 1 time

Re: Is Aduino Uno is supported?

Postby igor » Fri Nov 13, 2015 9:40 pm

Theodore ATEBA wrote:I didn’t refer to any particular debugger, I'm not really an AVR expert, so I want to know the possibilities that I have to make a debug if I keep the boot-loader on the aTmega328p.


Your question cannot be answered because it makes wrong assumptions.
The bootloader is unrelated to debugging: it is useful for uploading a binary without the need for additional HW.

If you use a simple ISP programmer, then you can use the little bit of FLASH that would be normally used by the bootloader for making your program a bit larger. But that's it.
However, in none of the cases listed so far, you can have access to real debugging, like you would do on a PC, or with a JTAG-based solution.
You are limited to printing/dumping some info over a serial port (AFAIK).

If you use the AVR Dragon or the AVR Debugger, they _also_ can be used for programming. Iow, why would you use the bootloader if you already have these tools attached to the board?
But their primary use is for doing real debugging with HW breakpoints, step by step tracing, etc. The bootloader has nothing to do with this.

User avatar
tfAteba
Posts: 547
Joined: Fri Oct 16, 2015 11:03 pm
Location: Strasbourg, France
Has thanked: 91 times
Been thanked: 48 times

Re: Is Aduino Uno is supported?

Postby tfAteba » Sat Nov 14, 2015 12:23 am

Hi Igor,

Thank you very much for your explanations. I don't have any avr programming tools. For my task, I think a debugging with gdb is enough. And I don't want to invest on any tools for the moment. First I will see if the software can help me to deal with.

Just a little remark, I'm currently test the GPIO on the Arduino, with the version of ChibiOS download from sourceforge svn reference 8464. I can drive GPIO from high to low. So I made a blink example but I have problems with chThdSleepMilliseconds also with chThdSleepSeconds.

chThdSleepMilliseconds ==> this one works, but when I want time greater than 2 seconds this still blink led so fast.
chThdSleepSeconds ==> This one don't even work, the led is never blink.

I will do more test on Sunday to see what happen.

Thanks

Theo

User avatar
igor
Posts: 50
Joined: Sun Aug 16, 2015 7:24 pm
Location: Helsinki, Finland
Has thanked: 1 time

Re: Is Aduino Uno is supported?

Postby igor » Sat Nov 14, 2015 10:30 am

Theodore ATEBA wrote:Thank you very much for your explanations. I don't have any avr programming tools. For my task, I think a debugging with gdb is enough. And I don't want to invest on any tools for the moment. First I will see if the software can help me to deal with.


This is what I'm trying to tell you that is not possible :-)

Debugging with gdb requires the extra HW. Without HW, you can only debug with prints or with toggling some gpio. Period.

Theodore ATEBA wrote:Just a little remark, I'm currently test the GPIO on the Arduino, with the version of ChibiOS download from sourceforge svn reference 8464. I can drive GPIO from high to low. So I made a blink example but I have problems with chThdSleepMilliseconds also with chThdSleepSeconds.

chThdSleepMilliseconds ==> this one works, but when I want time greater than 2 seconds this still blink led so fast.
chThdSleepSeconds ==> This one don't even work, the led is never blink.

I will do more test on Sunday to see what happen.


If you do not solve this, I suggest you create a new thread with a specific topic and post the code that doesn't work.

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

Re: Is Aduino Uno is supported?

Postby utzig » Sat Nov 14, 2015 11:18 am

Theodore ATEBA wrote:chThdSleepMilliseconds ==> this one works, but when I want time greater than 2 seconds this still blink led so fast.
chThdSleepSeconds ==> This one don't even work, the led is never blink.

I guess that is correct for the current tickless configuration. You need to change your demo to enable the tick by editing chconf.h and changing the following parameters:

Code: Select all

#define CH_CFG_ST_FREQUENCY                 1000
#define CH_CFG_ST_TIMEDELTA                 0
#define CH_CFG_TIME_QUANTUM                 20


Cheers,
Fabio Utzig

User avatar
tfAteba
Posts: 547
Joined: Fri Oct 16, 2015 11:03 pm
Location: Strasbourg, France
Has thanked: 91 times
Been thanked: 48 times

Re: Is Aduino Uno is supported?

Postby tfAteba » Mon Nov 16, 2015 9:27 pm

Hello Fabio,

Sorry for the delay of my answer, I was a bit occupied this last days.

Effectively I tried the config, and it worked fine. I'm going to do further tests now. Thank you very much

Theo


Return to “AVR Support”

Who is online

Users browsing this forum: No registered users and 4 guests