nilrods Posted March 19, 2015 Report Share Posted March 19, 2015 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 Quote Link to comment Share on other sites More sharing options...
alvieboy Posted March 20, 2015 Report Share Posted March 20, 2015 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.txthttps://github.com/GadgetFactory/DesignLab/blob/master/hardware/zpuino/zpu20/platform.txt Alvie 1 Quote Link to comment Share on other sites More sharing options...
nilrods Posted March 20, 2015 Author Report Share Posted March 20, 2015 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 Quote Link to comment Share on other sites More sharing options...
Jack Gassett Posted March 20, 2015 Report Share Posted March 20, 2015 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. Quote Link to comment Share on other sites More sharing options...
nilrods Posted March 20, 2015 Author Report Share Posted March 20, 2015 Oh nice. I like the more detailed. Will keep an eye out for the fix coming later. Thanks,Chris Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.