ZPUino board type in Design lab


nilrods

Recommended Posts

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

Link to comment
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

Link to comment
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

Link to comment
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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.