Fix compilation bug for Micro Pro Topic is solved

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

Moderators: utzig, tfAteba

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

Fix compilation bug for Micro Pro

Postby igor » Thu Oct 27, 2016 6:02 am

The Micro Pro is based on 328p, which doesn't have an EICRB register.
Trying to use the board file results in a compilation error on EICRB as undefined symbol.

The patch attached removes it.
Attachments
bogus-register.zip
(719 Bytes) Downloaded 211 times

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: Fix compilation bug for Micro Pro

Postby Giovanni » Thu Oct 27, 2016 6:35 am

Hi,

Maybe this is related to this (old) bug:

https://sourceforge.net/p/chibios/bugs/758/

There are also those others that should be looked into:

https://sourceforge.net/p/chibios/bugs/666/
https://sourceforge.net/p/chibios/bugs/438/
viewtopic.php?f=21&t=3431

Giovanni

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

Re: Fix compilation bug for Micro Pro

Postby igor » Thu Oct 27, 2016 10:09 am



In general it looks like some code needs to be moved into macro/functions inside platform/board files: the AVR is a large family and there is significant variation, even within the subset that can be found on Arduino boards.

IMHO supporting the 2 or 3 most popular AVRs that can be found on Arduinos would go a long way.

That means (on top of my head) the 328p and 2560. But there might be some other very popular application that I'm not aware of.
I'm just a big fan of the Mini Pro.

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

Re: Fix compilation bug for Micro Pro

Postby igor » Thu Oct 27, 2016 11:15 am

On a side note: I suppose ChibiOS has some sort of CI system (from a quick search on the SF page i couldn't find more details).
Without going as far as deploying binaries on real HW, would it be possible to add AVR to the build targets?

On a 6 y.o. laptop I can build from scratch the entire OS and my application in about 10s, so it shouldn't be a resource hog.
Or maybe AVR is present, but only 2560?

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: Fix compilation bug for Micro Pro

Postby Giovanni » Thu Oct 27, 2016 11:25 am

We don't have a continuous integration system, the number of active developers is not that great. I would love to reach that at some point.

Giovanni

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

Re: Fix compilation bug for Micro Pro

Postby utzig » Thu Oct 27, 2016 12:07 pm

Since it's quite easy to integrate github with travis, adding support for travis in SVN should automatically enable the github mirror to trigger the builds/tests. I know of people who do this for cortex-m targets, never really seen for AVR. Would be a nice addition. I'm very short on time for the next days but can give it a try in the weekend.

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

Re: Fix compilation bug for Micro Pro

Postby igor » Thu Oct 27, 2016 12:53 pm

utzig wrote:Since it's quite easy to integrate github with travis, adding support for travis in SVN should automatically enable the github mirror to trigger the builds/tests. I know of people who do this for cortex-m targets, never really seen for AVR. Would be a nice addition. I'm very short on time for the next days but can give it a try in the weekend.


Definitely!
I had the same idea: I waited (too long?) for submitting patches because I didn't feel like learning svn, then eventually I decided to bite the bullet, but luckily I found out about git-svn, so I can use git and ignore the svn backend. I already had in mind to learn Travis, this could be a good exercise. So maybe I can do it sooner. I found out this: https://www.willglynn.com/2014/02/20/av ... travis-ci/


Btw, while talking about git-based automation, Coverity provides free scans for OSS hosted on github and they also support integration with Travis.
I already tried it on my ChibiOS-based projcet and it works nicely. I am still missing the Travis part, though.

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

Re: Fix compilation bug for Micro Pro

Postby utzig » Thu Oct 27, 2016 5:20 pm

I'm not sure what board you actually have but there is some "naming" issue going on. The PRO MICROs actually have an ATmega32u4 which does have EICRB! The two available at SparkFun:

https://www.sparkfun.com/products/12587
https://www.sparkfun.com/products/12640

I have the 3.3V one and used it to test/integrate the contributed USB driver, which means, I created the demo/board and tested it! :)

Maybe what you have the PRO MINI?

https://www.sparkfun.com/products/11114

That one has a 328p. Or there is another one that is really called Micro Pro instead of Pro Micro?

Fabio Utzig

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

Re: Fix compilation bug for Micro Pro

Postby utzig » Thu Oct 27, 2016 5:29 pm

Igor,

Regarding travis you probably can test the yaml on your own fork to get it to a working stage (ok, I'm stating the obvious!). When you get something already working please submit a patch and I'll apply to SVN.

Also I need to talk to barthess about automating the mirror synching because it seems to still be done manually and I have some spare VPSs which I could let running a cron job for doing it. Not ideal because we'll still have to wait like 10 or 15 minutes to get the build results but way better than not having this at all. Also since git it out of question, I think, that is the best way to go for now.

Btw, someone that is already building for arm cortex-m on github/travis:

https://github.com/gt-quadcopter/crazyf ... travis.yml

Cheers,
Fabio Utzig

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

Re: Fix compilation bug for Micro Pro

Postby igor » Thu Oct 27, 2016 6:19 pm

utzig wrote:I'm not sure what board you actually have but there is some "naming" issue going on. The PRO MICROs actually have an ATmega32u4 which does have EICRB! The two available at SparkFun:

https://www.sparkfun.com/products/12587
https://www.sparkfun.com/products/12640

I have the 3.3V one and used it to test/integrate the contributed USB driver, which means, I created the demo/board and tested it! :)

Maybe what you have the PRO MINI?

https://www.sparkfun.com/products/11114

That one has a 328p. Or there is another one that is really called Micro Pro instead of Pro Micro?

Fabio Utzig


Yes, you are right. I do not use the ones from sparkfun, but rather the cheap $2-a-pop clones from ebay, where the terms Mini/Micro are often used interchangeably and I ended up doing the same :oops: .
Some have actually better pin layout, imho.

See picture attached: I can have all the pins at the bottom, plus additional I2C and flashing headers.
Attachments
minipro.png


Return to “AVR Support”

Who is online

Users browsing this forum: No registered users and 15 guests