nilrods

ZPUino board type in Design lab

5 posts in this topic

I am working on porting some existing arduino code to put on ZPUduino.

 

The code has many different board definition in defines to flex the code based on board it is being compiled on. What compiler symbol gets set in designlab for compilation, like say __AVR_ATmega328P__ or __AVR_ATmega644__, etc?

 

Thanks,

Chris

Share this post


Link to post
Share on other sites

You have several defines you can use.

 

On all boards, ZPU is defined.

On 2.0 boards, ZPU20 is also defined.

You can also check for specific boards. Foe example, __ZPUINO_PAPILIO_DUO__ is defined in Papilio DUO boards, and __ZPUINO_PAPILIO_PRO__ in Papilio Pro boards.

 

You can inspect platform.txt and boards.txt for ZPUino, as shipped in DesignLab, for more details:

 

https://github.com/GadgetFactory/DesignLab/blob/master/hardware/zpuino/zpu20/boards.txt

https://github.com/GadgetFactory/DesignLab/blob/master/hardware/zpuino/zpu20/platform.txt

 

Alvie

Share this post


Link to post
Share on other sites

Alvie,

Great!! Thanks that is exactly what I was looking for. I knew there were and could probably have located in the designlab source somewhere but figured I would ask the experts to see if someone knew off the top of their head as I wasn't sure where to start looking for it.

 

Also thanks for the locations of the files also, so if any additional boards come along the way I know where to look.

 

Chris

Share this post


Link to post
Share on other sites

Please note that I just updated the board define names a couple weeks ago to make them a little more targeted and I just noticed that I got the __ZPUINO_PAPILIO_ONE_HYPERION__ and __ZPUINO_PAPILIO_ONE_500K__ board types backwards... Look for a fix in the next DesignLab 1.0.5 release.

 

Jack.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now