chipKIT® Development Platform

Inspired by Arduino™

Add -DMPIDE=23 Pre-Processor Option for gcc and g++?

Created Thu, 31 May 2012 16:36:06 +0000 by avenue33


avenue33

Thu, 31 May 2012 16:36:06 +0000

Compiling a sketch on MPIDE with verbose report shows

/Applications/Mpide.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++    
-c  -g  -Os  -w  
-fno-exceptions  -ffunction-sections  -fdata-sections  
-mmcu=atmega328p  -DF_CPU=16000000L  
-DARDUINO=23  -DARDUINO=     
-I/var/tmp/sketch_may31a   
-I/Applications/Mpide.app/Contents/Resources/Java/hardware/arduino/cores/arduino    
/var/tmp/sketch_may31a.cpp  
-o  /var/tmp/sketch_may31a.cpp.o

What about • Replacing -DARDUINO=23 by -DMPIDE=23 or • Adding -DMPIDE=23 along -DARDUINO=23 for gcc and g++ :?:

I've opened issue :arrow: #227 Add -DMPIDE=23 Pre-Processor Option for gcc and g++?.

Thanks!


avenue33

Fri, 01 Jun 2012 10:48:14 +0000

See :arrow: Partial Fix for #227 Add -DMPIDE=23 Pre-Processor Option for gcc and g++

Editing boards.txt and changing

uno_pic32.compiler.define=-Danything_you_want::-Danything=1

for

uno_pic32.compiler.define=-DMPIDE=23

don't seem enough :( , as new compiling trace still shows -DARDUINO=23 as in

/Applications/mpide.app/Contents/Resources/Java/hardware/pic32/compiler/pic32-tools/bin/pic32-g++  
-O2  -c  -mno-smart-io  -w  -fno-exceptions  -ffunction-sections  -fdata-sections  -G1024  -g  -mdebugger  
-Wcast-align  -mprocessor=32MX320F128H  -DF_CPU=80000000L  
-DARDUINO=23  -D_BOARD_UNO_  -DMPIDE=23
-I/Applications/Mpide.app/Contents/Resources/Java/examples/1.Basics/Blink   
-I/Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/cores/pic32   
-I/Applications/Mpide.app/Contents/Resources/Java/hardware/pic32/variants/Uno32    
/var/tmp/Blink.cpp  -o  /var/folders/95/

Where does the -DARDUINO=23 come from?