1. What to do
It is fairly easy to use XMC4700Relax kit in arduino, but with XMC4200 Platform2GO. One can not help trying to use it in arduino as well. The official board packages skip XMC4200 Platform2GO, only XMC4400 Platform2GO is available. That is what I am going to do .
It takes 3 weeks to go with slow progress , it works and not so difficult.
2. How to do
2.1 First, check the datasheet of XMC4400 and XMC4200, only two different. More PWM function and Ethernet Porting added. The SRAM2 is included. The memory map shall be revised.
2.2 Then change the board.txt with added XMC4200 platform2Go
#################################################### menu.UART=Serial Output Selection menu.LIB=Additional Libraries #################################################### XMC1100_Boot_Kit.name=XMC1100 Boot Kit XMC1100_Boot_Kit.upload.tool=xmcprog XMC1100_Boot_Kit.upload.speed=115200 XMC1100_Boot_Kit.upload.resetmethod=ck XMC1100_Boot_Kit.upload.maximum_size=65536 XMC1100_Boot_Kit.upload.wait_for_upload_port=true XMC1100_Boot_Kit.communication=usb XMC1100_Boot_Kit.protocol=dragon_isp XMC1100_Boot_Kit.program.protocol=dragon_isp XMC1100_Boot_Kit.program.tool=xmcprog XMC1100_Boot_Kit.program.extra_params=-Pusb XMC1100_Boot_Kit.serial.disableDTR=true XMC1100_Boot_Kit.serial.disableRTS=true XMC1100_Boot_Kit.build.mcu=cortex-m0 XMC1100_Boot_Kit.build.f_cpu=32000000L XMC1100_Boot_Kit.build.board=ARM_XMC XMC1100_Boot_Kit.build.board.version=1100 XMC1100_Boot_Kit.build.board.type=T038x0064 XMC1100_Boot_Kit.build.board.v=0064 XMC1100_Boot_Kit.build.core=./ XMC1100_Boot_Kit.build.variant=XMC1100 XMC1100_Boot_Kit.build.board_variant=XMC1100_Boot_Kit XMC1100_Boot_Kit.build.flash_size=64K XMC1100_Boot_Kit.build.flash_ld=linker_script.ld XMC1100_Boot_Kit.build.extra_flags=-DARM_MATH_CM0 -DXMC1_SERIES XMC1100_Boot_Kit.menu.UART.debug=PC XMC1100_Boot_Kit.menu.UART.debug.uart.selected=-DSERIAL_HOSTPC XMC1100_Boot_Kit.menu.UART.onBoard=On Board XMC1100_Boot_Kit.menu.UART.onBoard.uart.selected=-DSERIAL_ONBOARD XMC1100_Boot_Kit.menu.LIB.NONE=None XMC1100_Boot_Kit.menu.LIB.NONE.library.selected= XMC1100_Boot_Kit.menu.LIB.NN=ARM NN Framework XMC1100_Boot_Kit.menu.LIB.NN.library.selected=-DARM_LIB_CMSIS_NN XMC1100_Boot_Kit.menu.LIB.DSP=ARM DSP XMC1100_Boot_Kit.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP XMC1100_Boot_Kit.menu.LIB.DSPNN=ARM DSP / ARM NN Framework XMC1100_Boot_Kit.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN #################################################### XMC1100_XMC2GO.name=XMC1100 XMC2Go XMC1100_XMC2GO.upload.tool=xmcprog XMC1100_XMC2GO.upload.speed=115200 XMC1100_XMC2GO.upload.resetmethod=ck XMC1100_XMC2GO.upload.maximum_size=65536 XMC1100_XMC2GO.upload.wait_for_upload_port=true XMC1100_XMC2GO.communication=usb XMC1100_XMC2GO.protocol=dragon_isp XMC1100_XMC2GO.program.protocol=dragon_isp XMC1100_XMC2GO.program.tool=xmcprog XMC1100_XMC2GO.program.extra_params=-Pusb XMC1100_XMC2GO.serial.disableDTR=true XMC1100_XMC2GO.serial.disableRTS=true XMC1100_XMC2GO.build.mcu=cortex-m0 XMC1100_XMC2GO.build.f_cpu=32000000L XMC1100_XMC2GO.build.board=ARM_XMC XMC1100_XMC2GO.build.board.version=1100 XMC1100_XMC2GO.build.board.type=T038x0064 XMC1100_XMC2GO.build.board.v=0064 XMC1100_XMC2GO.build.core=./ XMC1100_XMC2GO.build.variant=XMC1100 XMC1100_XMC2GO.build.board_variant=XMC1100_XMC2GO XMC1100_XMC2GO.build.flash_size=64K XMC1100_XMC2GO.build.flash_ld=linker_script.ld XMC1100_XMC2GO.build.extra_flags=-DARM_MATH_CM0 -DXMC1_SERIES XMC1100_XMC2GO.menu.UART.debug=PC XMC1100_XMC2GO.menu.UART.debug.uart.selected=-DSERIAL_HOSTPC XMC1100_XMC2GO.menu.UART.onBoard=On Board XMC1100_XMC2GO.menu.UART.onBoard.uart.selected=-DSERIAL_ONBOARD XMC1100_XMC2GO.menu.LIB.NONE=None XMC1100_XMC2GO.menu.LIB.NONE.library.selected= XMC1100_XMC2GO.menu.LIB.NN=ARM NN Framework XMC1100_XMC2GO.menu.LIB.NN.library.selected=-DARM_LIB_CMSIS_NN XMC1100_XMC2GO.menu.LIB.DSP=ARM DSP XMC1100_XMC2GO.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP XMC1100_XMC2GO.menu.LIB.DSPNN=ARM DSP / ARM NN Framework XMC1100_XMC2GO.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN #################################################### XMC1100_H_BRIDGE2GO.name=XMC1100 H-Bridge 2Go XMC1100_H_BRIDGE2GO.upload.tool=xmcprog XMC1100_H_BRIDGE2GO.upload.speed=115200 XMC1100_H_BRIDGE2GO.upload.resetmethod=ck XMC1100_H_BRIDGE2GO.upload.maximum_size=65536 XMC1100_H_BRIDGE2GO.upload.wait_for_upload_port=true XMC1100_H_BRIDGE2GO.communication=usb XMC1100_H_BRIDGE2GO.protocol=dragon_isp XMC1100_H_BRIDGE2GO.program.protocol=dragon_isp XMC1100_H_BRIDGE2GO.program.tool=xmcprog XMC1100_H_BRIDGE2GO.program.extra_params=-Pusb XMC1100_H_BRIDGE2GO.serial.disableDTR=true XMC1100_H_BRIDGE2GO.serial.disableRTS=true XMC1100_H_BRIDGE2GO.build.mcu=cortex-m0 XMC1100_H_BRIDGE2GO.build.f_cpu=32000000L XMC1100_H_BRIDGE2GO.build.board=ARM_XMC XMC1100_H_BRIDGE2GO.build.board.version=1100 XMC1100_H_BRIDGE2GO.build.board.type=T038x0064 XMC1100_H_BRIDGE2GO.build.board.v=0064 XMC1100_H_BRIDGE2GO.build.core=./ XMC1100_H_BRIDGE2GO.build.variant=XMC1100 XMC1100_H_BRIDGE2GO.build.board_variant=XMC1100_H_BRIDGE2GO XMC1100_H_BRIDGE2GO.build.flash_size=64K XMC1100_H_BRIDGE2GO.build.flash_ld=linker_script.ld XMC1100_H_BRIDGE2GO.build.extra_flags=-DARM_MATH_CM0 -DXMC1_SERIES XMC1100_H_BRIDGE2GO.menu.UART.debug=PC XMC1100_H_BRIDGE2GO.menu.UART.debug.uart.selected=-DSERIAL_ONBOARD XMC1100_H_BRIDGE2GO.menu.UART.onBoard=On Board XMC1100_H_BRIDGE2GO.menu.UART.onBoard.uart.selected=-DSERIAL_ONBOARD XMC1100_H_BRIDGE2GO.menu.LIB.NONE=None XMC1100_H_BRIDGE2GO.menu.LIB.NONE.library.selected= XMC1100_H_BRIDGE2GO.menu.LIB.NN=ARM NN Framework XMC1100_H_BRIDGE2GO.menu.LIB.NN.library.selected=-DARM_LIB_CMSIS_NN XMC1100_H_BRIDGE2GO.menu.LIB.DSP=ARM DSP XMC1100_H_BRIDGE2GO.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP XMC1100_H_BRIDGE2GO.menu.LIB.DSPNN=ARM DSP / ARM NN Framework XMC1100_H_BRIDGE2GO.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN #################################################### XMC1300_Boot_Kit.name=XMC1300 Boot Kit XMC1300_Boot_Kit.upload.tool=xmcprog XMC1300_Boot_Kit.upload.speed=115200 XMC1300_Boot_Kit.upload.resetmethod=ck XMC1300_Boot_Kit.upload.maximum_size=65536 XMC1300_Boot_Kit.upload.wait_for_upload_port=true XMC1300_Boot_Kit.communication=usb XMC1300_Boot_Kit.protocol=dragon_isp XMC1300_Boot_Kit.program.protocol=dragon_isp XMC1300_Boot_Kit.program.tool=xmcprog XMC1300_Boot_Kit.program.extra_params=-Pusb XMC1300_Boot_Kit.serial.disableDTR=true XMC1300_Boot_Kit.serial.disableRTS=true XMC1300_Boot_Kit.build.mcu=cortex-m0 XMC1300_Boot_Kit.build.f_cpu=32000000L XMC1300_Boot_Kit.build.board=ARM_XMC XMC1300_Boot_Kit.build.board.version=1302 XMC1300_Boot_Kit.build.board.type=T038x0200 XMC1300_Boot_Kit.build.board.v=0200 XMC1300_Boot_Kit.build.core=./ XMC1300_Boot_Kit.build.variant=XMC1300 XMC1300_Boot_Kit.build.board_variant=XMC1300_Boot_Kit XMC1300_Boot_Kit.build.flash_size=64K XMC1300_Boot_Kit.build.flash_ld=linker_script.ld XMC1300_Boot_Kit.build.extra_flags=-DARM_MATH_CM0 -DXMC1_SERIES XMC1300_Boot_Kit.menu.UART.debug=PC XMC1300_Boot_Kit.menu.UART.debug.uart.selected=-DSERIAL_HOSTPC XMC1300_Boot_Kit.menu.UART.onBoard=On Board XMC1300_Boot_Kit.menu.UART.onBoard.uart.selected=-DSERIAL_ONBOARD XMC1300_Boot_Kit.menu.LIB.NONE=None XMC1300_Boot_Kit.menu.LIB.NONE.library.selected= XMC1300_Boot_Kit.menu.LIB.NN=ARM NN Framework XMC1300_Boot_Kit.menu.LIB.NN.library.selected=-DARM_LIB_CMSIS_NN XMC1300_Boot_Kit.menu.LIB.DSP=ARM DSP XMC1300_Boot_Kit.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP XMC1300_Boot_Kit.menu.LIB.DSPNN=ARM DSP / ARM NN Framework XMC1300_Boot_Kit.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN ################################################### XMC1300_Sense2GoL.name=XMC1300 Sense2GoL XMC1300_Sense2GoL.upload.tool=xmcprog XMC1300_Sense2GoL.upload.speed=115200 XMC1300_Sense2GoL.upload.resetmethod=ck XMC1300_Sense2GoL.upload.maximum_size=125160 XMC1300_Sense2GoL.upload.wait_for_upload_port=true XMC1300_Sense2GoL.communication=usb XMC1300_Sense2GoL.protocol=dragon_isp XMC1300_Sense2GoL.program.protocol=dragon_isp XMC1300_Sense2GoL.program.tool=xmcprog XMC1300_Sense2GoL.program.extra_params=-Pusb XMC1300_Sense2GoL.serial.disableDTR=true XMC1300_Sense2GoL.serial.disableRTS=true XMC1300_Sense2GoL.build.mcu=cortex-m0 XMC1300_Sense2GoL.build.f_cpu=32000000L XMC1300_Sense2GoL.build.board=ARM_XMC XMC1300_Sense2GoL.build.board.version=1302 XMC1300_Sense2GoL.build.board.type=T038x0064 XMC1300_Sense2GoL.build.board.v=0032 XMC1300_Sense2GoL.build.core=./ XMC1300_Sense2GoL.build.variant=XMC1300 XMC1300_Sense2GoL.build.board_variant=XMC1300_Sense2GoL XMC1300_Sense2GoL.build.flash_size=64K XMC1300_Sense2GoL.build.flash_ld=linker_script.ld XMC1300_Sense2GoL.build.extra_flags=-DARM_MATH_CM0 -DXMC1_SERIES XMC1300_Sense2GoL.menu.LIB.DSPNN=ARM DSP / ARM NN Framework XMC1300_Sense2GoL.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN XMC1300_Sense2GoL.menu.LIB.NONE=None XMC1300_Sense2GoL.menu.LIB.NONE.library.selected= XMC1300_Sense2GoL.menu.LIB.NN=ARM NN Framework XMC1300_Sense2GoL.menu.LIB.NN.library.selected=-DARM_LIB_CMSIS_NN XMC1300_Sense2GoL.menu.LIB.DSP=ARM DSP XMC1300_Sense2GoL.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP #################################################### #XMC1400_Boot_Kit.name=XMC1400 Boot Kit #XMC1400_Boot_Kit.upload.tool=xmcprog #XMC1400_Boot_Kit.upload.speed=115200 #XMC1400_Boot_Kit.upload.resetmethod=ck #XMC1400_Boot_Kit.upload.maximum_size=2048000 #XMC1400_Boot_Kit.upload.wait_for_upload_port=true #XMC1400_Boot_Kit.communication=usb #XMC1400_Boot_Kit.protocol=dragon_isp #XMC1400_Boot_Kit.program.protocol=dragon_isp #XMC1400_Boot_Kit.program.tool=xmcprog #XMC1400_Boot_Kit.program.extra_params=-Pusb #XMC1400_Boot_Kit.serial.disableDTR=true #XMC1400_Boot_Kit.serial.disableRTS=true #XMC1400_Boot_Kit.build.mcu=cortex-m0 #XMC1400_Boot_Kit.build.f_cpu=48000000L #XMC1400_Boot_Kit.build.board=ARM_XMC #XMC1400_Boot_Kit.build.board.version=1404 #XMC1400_Boot_Kit.build.board.type=Q064x0200 #XMC1400_Boot_Kit.build.board.v=0200 #XMC1400_Boot_Kit.build.core=./ #XMC1400_Boot_Kit.build.variant=XMC1400 #XMC1400_Boot_Kit.build.board_variant=XMC1400_Boot_Kit #XMC1400_Boot_Kit.build.flash_size=200K #XMC1400_Boot_Kit.build.flash_ld=linker_script.ld #XMC1400_Boot_Kit.build.extra_flags=-DARM_MATH_CM0 -DXMC1_SERIES #XMC1400_Boot_Kit.menu.UART.debug=PC #XMC1400_Boot_Kit.menu.UART.debug.uart.selected=-DSERIAL_HOSTPC #XMC1400_Boot_Kit.menu.UART.onBoard=On Board #XMC1400_Boot_Kit.menu.UART.onBoard.uart.selected=-DSERIAL_ONBOARD #XMC1400_Boot_Kit.menu.LIB.NONE=None #XMC1400_Boot_Kit.menu.LIB.NONE.library.selected= #XMC1400_Boot_Kit.menu.LIB.NN=ARM NN Framework #XMC1400_Boot_Kit.menu.LIB.NN.library.selected=-DARM_LIB_CMSIS_NN #XMC1400_Boot_Kit.menu.LIB.DSP=ARM DSP #XMC1400_Boot_Kit.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP #XMC1400_Boot_Kit.menu.LIB.DSPNN=ARM DSP / ARM NN Framework #XMC1400_Boot_Kit.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN #################################################### XMC4200_Platform2GO.name=XMC4200 Platform 2GO XMC4200_Platform2GO.upload.tool=xmcprog XMC4200_Platform2GO.upload.speed=115200 XMC4200_Platform2GO.upload.resetmethod=ck XMC4200_Platform2GO.upload.maximum_size=256000 XMC4200_Platform2GO.upload.wait_for_upload_port=true XMC4200_Platform2GO.communication=usb XMC4200_Platform2GO.protocol=dragon_isp XMC4200_Platform2GO.program.protocol=dragon_isp XMC4200_Platform2GO.program.tool=xmcprog XMC4200_Platform2GO.program.extra_params=-Pusb XMC4200_Platform2GO.serial.disableDTR=true XMC4200_Platform2GO.serial.disableRTS=true XMC4200_Platform2GO.build.mcu=cortex-m4 XMC4200_Platform2GO.build.f_cpu=80000000L XMC4200_Platform2GO.build.board=ARM_XMC XMC4200_Platform2GO.build.board.version=4200 XMC4200_Platform2GO.build.board.type=F64x256 XMC4200_Platform2GO.build.board.v=256 XMC4200_Platform2GO.build.core=./ XMC4200_Platform2GO.build.variant=XMC4200 XMC4200_Platform2GO.build.board_variant=XMC4200_Platform2GO XMC4200_Platform2GO.build.flash_size=250K XMC4200_Platform2GO.build.flash_ld=linker_script.ld XMC4200_Platform2GO.build.extra_flags=-DARM_MATH_CM4 -DARM_MATH_DSP #-DUSB0 XMC4200_Platform2GO.menu.UART.debug=PC XMC4200_Platform2GO.menu.UART.debug.uart.selected=-DSERIAL_HOSTPC XMC4200_Platform2GO.menu.UART.onBoard=On Board XMC4200_Platform2GO.menu.UART.onBoard.uart.selected=-DSERIAL_ONBOARD XMC4200_Platform2GO.menu.LIB.NONE=None XMC4200_Platform2GO.menu.LIB.NONE.library.selected= XMC4200_Platform2GO.menu.LIB.DSPNN=ARM DSP / ARM NN Framework XMC4200_Platform2GO.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN XMC4200_Platform2GO.menu.LIB.NN=ARM NN Framework XMC4200_Platform2GO.menu.LIB.NN.library.selected=-DARM_LIB_CMSIS_NN XMC4200_Platform2GO.menu.LIB.DSP=ARM DSP XMC4200_Platform2GO.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP #################################################### XMC4400_Platform2GO.name=XMC4400 Platform 2GO XMC4400_Platform2GO.upload.tool=xmcprog XMC4400_Platform2GO.upload.speed=115200 XMC4400_Platform2GO.upload.resetmethod=ck XMC4400_Platform2GO.upload.maximum_size=512000 XMC4400_Platform2GO.upload.wait_for_upload_port=true XMC4400_Platform2GO.communication=usb XMC4400_Platform2GO.protocol=dragon_isp XMC4400_Platform2GO.program.protocol=dragon_isp XMC4400_Platform2GO.program.tool=xmcprog XMC4400_Platform2GO.program.extra_params=-Pusb XMC4400_Platform2GO.serial.disableDTR=true XMC4400_Platform2GO.serial.disableRTS=true XMC4400_Platform2GO.build.mcu=cortex-m4 XMC4400_Platform2GO.build.f_cpu=144000000L XMC4400_Platform2GO.build.board=ARM_XMC XMC4400_Platform2GO.build.board.version=4400 XMC4400_Platform2GO.build.board.type=F100x512 XMC4400_Platform2GO.build.board.v=512 XMC4400_Platform2GO.build.core=./ XMC4400_Platform2GO.build.variant=XMC4400 XMC4400_Platform2GO.build.board_variant=XMC4400_Platform2GO XMC4400_Platform2GO.build.flash_size=500K XMC4400_Platform2GO.build.flash_ld=linker_script.ld XMC4400_Platform2GO.build.extra_flags=-DARM_MATH_CM4 -DARM_MATH_DSP #-DUSB0 XMC4400_Platform2GO.menu.UART.debug=PC XMC4400_Platform2GO.menu.UART.debug.uart.selected=-DSERIAL_HOSTPC XMC4400_Platform2GO.menu.UART.onBoard=On Board XMC4400_Platform2GO.menu.UART.onBoard.uart.selected=-DSERIAL_ONBOARD XMC4400_Platform2GO.menu.LIB.NONE=None XMC4400_Platform2GO.menu.LIB.NONE.library.selected= XMC4400_Platform2GO.menu.LIB.DSPNN=ARM DSP / ARM NN Framework XMC4400_Platform2GO.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN XMC4400_Platform2GO.menu.LIB.NN=ARM NN Framework XMC4400_Platform2GO.menu.LIB.NN.library.selected=-DARM_LIB_CMSIS_NN XMC4400_Platform2GO.menu.LIB.DSP=ARM DSP XMC4400_Platform2GO.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP #################################################### XMC4700_Radar_Baseboard.name=DEMO Radar BB XMC4700 XMC4700_Radar_Baseboard.upload.tool=xmcprog XMC4700_Radar_Baseboard.upload.speed=115200 XMC4700_Radar_Baseboard.upload.resetmethod=ck XMC4700_Radar_Baseboard.upload.maximum_size=2048000 XMC4700_Radar_Baseboard.upload.wait_for_upload_port=true XMC4700_Radar_Baseboard.communication=usb XMC4700_Radar_Baseboard.protocol=dragon_isp XMC4700_Radar_Baseboard.program.protocol=dragon_isp XMC4700_Radar_Baseboard.program.tool=xmcprog XMC4700_Radar_Baseboard.program.extra_params=-Pusb XMC4700_Radar_Baseboard.serial.disableDTR=true XMC4700_Radar_Baseboard.serial.disableRTS=true XMC4700_Radar_Baseboard.build.mcu=cortex-m4 XMC4700_Radar_Baseboard.build.f_cpu=144000000L XMC4700_Radar_Baseboard.build.board=ARM_XMC XMC4700_Radar_Baseboard.build.board.version=4700 XMC4700_Radar_Baseboard.build.board.type=E196x2048 XMC4700_Radar_Baseboard.build.board.v=2048 XMC4700_Radar_Baseboard.build.core=./ XMC4700_Radar_Baseboard.build.variant=XMC4700 XMC4700_Radar_Baseboard.build.board_variant=XMC4700_Radar_Baseboard XMC4700_Radar_Baseboard.build.flash_size=2000K XMC4700_Radar_Baseboard.build.flash_ld=linker_script.ld XMC4700_Radar_Baseboard.build.extra_flags=-DARM_MATH_CM4 -DINTERRUPT_USE_ERU -DSERIAL_USE_U1C1 -DXMC4_SERIES XMC4700_Radar_Baseboard.menu.LIB.DSPNN=ARM DSP / ARM NN Framework XMC4700_Radar_Baseboard.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN XMC4700_Radar_Baseboard.menu.LIB.NONE=None XMC4700_Radar_Baseboard.menu.LIB.NONE.library.selected= XMC4700_Radar_Baseboard.menu.LIB.NN=ARM NN Framework XMC4700_Radar_Baseboard.menu.LIB.NN.library.selected=-DARM_LIB_CMSIS_NN XMC4700_Radar_Baseboard.menu.LIB.DSP=ARM DSP XMC4700_Radar_Baseboard.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP #################################################### XMC4700_Relax_Kit.name=XMC4700 Relax Kit XMC4700_Relax_Kit.upload.tool=xmcprog XMC4700_Relax_Kit.upload.speed=115200 XMC4700_Relax_Kit.upload.resetmethod=ck XMC4700_Relax_Kit.upload.maximum_size=2048000 XMC4700_Relax_Kit.upload.wait_for_upload_port=true XMC4700_Relax_Kit.communication=usb XMC4700_Relax_Kit.protocol=dragon_isp XMC4700_Relax_Kit.program.protocol=dragon_isp XMC4700_Relax_Kit.program.tool=xmcprog XMC4700_Relax_Kit.program.extra_params=-Pusb XMC4700_Relax_Kit.serial.disableDTR=true XMC4700_Relax_Kit.serial.disableRTS=true XMC4700_Relax_Kit.build.mcu=cortex-m4 XMC4700_Relax_Kit.build.f_cpu=144000000L XMC4700_Relax_Kit.build.board=ARM_XMC XMC4700_Relax_Kit.build.board.version=4700 XMC4700_Relax_Kit.build.board.type=F144x2048 XMC4700_Relax_Kit.build.board.v=2048 XMC4700_Relax_Kit.build.core=./ XMC4700_Relax_Kit.build.variant=XMC4700 XMC4700_Relax_Kit.build.board_variant=XMC4700_Relax_Kit XMC4700_Relax_Kit.build.flash_size=2000K XMC4700_Relax_Kit.build.flash_ld=linker_script.ld XMC4700_Relax_Kit.build.extra_flags=-DARM_MATH_CM4 -DXMC4_SERIES XMC4700_Relax_Kit.menu.LIB.DSPNN=ARM DSP / ARM NN Framework XMC4700_Relax_Kit.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN XMC4700_Relax_Kit.menu.LIB.NONE=None XMC4700_Relax_Kit.menu.LIB.NONE.library.selected= XMC4700_Relax_Kit.menu.LIB.NN=ARM NN Framework XMC4700_Relax_Kit.menu.LIB.NN.library.selected=-DARM_LIB_CMSIS_NN XMC4700_Relax_Kit.menu.LIB.DSP=ARM DSP XMC4700_Relax_Kit.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP #################################################### # Not up to date #XMC4800_Relax_Kit.name=XMC4800 Relax Kit #XMC4800_Relax_Kit.upload.tool=xmcprog #XMC4800_Relax_Kit.upload.speed=115200 #XMC4800_Relax_Kit.upload.resetmethod=ck #XMC4800_Relax_Kit.upload.maximum_size=2000000 #XMC4800_Relax_Kit.upload.maximum_data_size=352000 #XMC4800_Relax_Kit.upload.wait_for_upload_port=true # #XMC4800_Relax_Kit.communication=usb #XMC4800_Relax_Kit.protocol=dragon_isp #XMC4800_Relax_Kit.program.protocol=dragon_isp #XMC4800_Relax_Kit.program.tool=xmcprog #XMC4800_Relax_Kit.program.extra_params=-Pusb # #XMC4800_Relax_Kit.serial.disableDTR=true #XMC4800_Relax_Kit.serial.disableRTS=true # #XMC4800_Relax_Kit.build.mcu=cortex-m4 #XMC4800_Relax_Kit.build.f_cpu=144000000L #XMC4800_Relax_Kit.build.board=ARM_XMC #XMC4800_Relax_Kit.build.board.version=4800 #XMC4800_Relax_Kit.build.board.type=F144x2048 #XMC4800_Relax_Kit.build.board.v=2048 #XMC4800_Relax_Kit.build.core=./ #XMC4800_Relax_Kit.build.variant=XMC4800 #XMC4800_Relax_Kit.build.board_variant=XMC4800_Relax_Kit #XMC4800_Relax_Kit.build.flash_size=2000K #XMC4800_Relax_Kit.build.flash_ld=linker_script.ld #XMC4800_Relax_Kit.build.extra_flags=-DARM_MATH_CM4 -DXMC4_SERIES #XMC4800_Relax_Kit.menu.LIB.DSPNN=ARM DSP / ARM NN Framework #XMC4800_Relax_Kit.menu.LIB.DSPNN.library.selected=-DARM_LIB_CMSIS_DSP -DARM_LIB_CMSIS_NN #XMC4800_Relax_Kit.menu.LIB.NONE=None #XMC4800_Relax_Kit.menu.LIB.NONE.library.selected= #XMC4800_Relax_Kit.menu.LIB.NN=ARM NN Framework #XMC4800_Relax_Kit.menu.LIB.NN.library.selected=-DARM_LIB_CMSIS_NN #XMC4800_Relax_Kit.menu.LIB.DSP=ARM DSP #XMC4800_Relax_Kit.menu.LIB.DSP.library.selected=-DARM_LIB_CMSIS_DSP
Now , you have the board available.
2.2 Then copy the directory of \XMC4400 and rename into \XMC4200. Revise the file name and include code accordingly. Following the error report from arduino IDE when build one empty sketch file is enough.
2.3 Revise the file pins_arduino.h as follows,
/* pins_arduino.h - Pin definition functions for Arduino Part of Arduino - http://www.arduino.cc/ Copyright (c) 2007 David A. Mellis This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright (c) 2019 Infineon Technologies AG This file has been modified for the XMC microcontroller series. */ #ifndef PINS_ARDUINO_H_ #define PINS_ARDUINO_H_ //**************************************************************************** // @Project Includes //**************************************************************************** #include <XMC4200.h> //**************************************************************************** // @Defines //**************************************************************************** #define XMC_BOARD XMC 4200 Platform 2GO /* On board LED is ON when digital output is 0, LOW, False, OFF */ #define XMC_LED_ON 0 #define NUM_ANALOG_INPUTS 6 #define NUM_PWM 6 #define NUM_INTERRUPT 2 #define NUM_SERIAL 1 #define NUM_TONE_PINS 16 #define NUM_TASKS_VARIANT 32 // Indicate unit has RTC/Alarm #define HAS_RTC 1 //Serial ports #define PWM4_TIMER_PERIOD (0x11EF) //Generate 490Hz @fCCU=144MHz #define PWM8_TIMER_PERIOD (0x11EF) // Generate 490Hz @fCCU=144MHz #define PCLK 64000000u #define PIN_SPI_SS 10 #define PIN_SPI_MOSI 11 #define PIN_SPI_MISO 12 #define PIN_SPI_SCK 13 extern uint8_t SS; extern uint8_t MOSI; extern uint8_t MISO; extern uint8_t SCK; #define A0 0 //ADC G0CH0 P14.0 #define A1 1 //ADC G0CH1 P14.1 #define A2 2 //ADC G0CH2 P14.2 #define A3 3 //ADC G0CH3 P14.3 #define A4 4 //ADC G0CH4 P14.4 #define A5 5 //ADC G0CH5 P14.5 //Additional ADC ports starting here #define LED_BUILTIN 71 //Standard Arduino LED: Used LED1 #define LED1 71 //Additional LED1 #define BUTTON1 52 //Additional BUTTON1 #define GND 94 //GND #define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : NOT_AN_INTERRUPT)) #ifdef ARDUINO_MAIN /* Mapping of Arduino Pins to PWM4 channels as pin and PWM4 channel last entry 255 for both parts. Putting both parts in array means if a PWM4 channel gets reassigned for another function later a gap in channel numbers will not mess things up */ const uint8_t mapping_pin_PWM4[][ 2 ] = { { 3, 0 }, { 5, 1 }, { 6, 2 }, { 11, 3 }, { 27, 4 }, { 28, 5 }, { 57, 6 }, { 58, 7 }, { 255, 255 } }; const uint8_t mapping_pin_PWM8[][ 2 ] = { { 9, 0 }, { 10, 1 }, { 26, 2 }, { 29, 3 }, { 30, 4 }, { 54, 5 }, { 55, 6 }, { 59, 7 }, { 86, 8 }, { 255, 255 } }; const uint8_t mapping_pin_DAC[][ 2 ] = { { 61, 0 }, { 94, 1 }, { 255, 255 } }; const XMC_PORT_PIN_t mapping_port_pin[]= { /* 0 */ {XMC_GPIO_PORT2 , 15}, //RX P2.15 /* 1 */ {XMC_GPIO_PORT2 , 14}, //TX P2.14 /* 2 */ {XMC_GPIO_PORT1 , 0}, // GPIO / External INT 0 P1.0 /* 3 */ {XMC_GPIO_PORT2 , 2}, // PWM42-0 / External INT 1 P3.6 /* 4 */ {XMC_GPIO_PORT2 , 9}, // GPIO P1.6 /* 5 */ {XMC_GPIO_PORT2 , 3}, // PWM42-3 output P3.3 /* 6 */ {XMC_GPIO_PORT2 , 4}, // PWM42-2 output P3.4 /* 7 */ {XMC_GPIO_PORT2 , 8}, // GPIO P1.14 /* 8 */ {XMC_GPIO_PORT2 , 6}, // GPIO P4.1 /* 9 */ {XMC_GPIO_PORT0 , 11}, // PWM80-31 output P0.11 /* 10 */ {XMC_GPIO_PORT1 , 7}, // SPI-SS / PWM80-01 output P0.2 /* 11 */ {XMC_GPIO_PORT1 , 9}, // SPI-MOSI / PWM41-2 output P1.9 /* 12 */ {XMC_GPIO_PORT0 , 0}, // SPI-MISO P0.0 /* 13 */ {XMC_GPIO_PORT1 , 8}, // SPI-SCK P1.8 /* 14 */ {XMC_GPIO_PORT2 , 3}, // AREF TODO: P2.3 /* 15 */ {XMC_GPIO_PORT2 , 5}, // I2C Data / Address SDA P2.5 /* 16 */ {XMC_GPIO_PORT3 , 0}, // I2C Clock SCL P3.0 /* 17 */ {XMC_GPIO_PORT14 , 0}, // A0 / ADC Input P14.0 (INPUT ONLY) /* 18 */ {XMC_GPIO_PORT14 , 1}, // A1 / ADC Input P14.1 (INPUT ONLY) /* 19 */ {XMC_GPIO_PORT14 , 2}, // A2 / ADC Input P14.2 (INPUT ONLY) /* 20 */ {XMC_GPIO_PORT14 , 3}, // A3 / ADC Input P14.3 (INPUT ONLY) /* 21 */ {XMC_GPIO_PORT14 , 4}, // A4 / ADC Input P14.4 (INPUT ONLY) /* 22 */ {XMC_GPIO_PORT14 , 5}, // A5 / ADC Input P14.5 (INPUT ONLY) /* 23 */ {XMC_GPIO_PORT1 , 15}, // USB Debug RX P1.15 /* 24 */ {XMC_GPIO_PORT0 , 5}, // USB Debug TX P0.5 //Additional pins for port X1 starting here /* 25 */ {XMC_GPIO_PORT2 , 10}, /* 26 */ {XMC_GPIO_PORT2 , 8}, /* 27 */ {XMC_GPIO_PORT2 , 4}, /* 28 */ {XMC_GPIO_PORT2 , 2}, /* 29 */ {XMC_GPIO_PORT2 , 0}, /* 30 */ {XMC_GPIO_PORT2 , 6}, /* 31 */ {XMC_GPIO_PORT2 , 6}, /* 32 */ {XMC_GPIO_PORT2 , 6}, /* 33 */ {XMC_GPIO_PORT1 , 14}, /* 34 */ {XMC_GPIO_PORT1 , 12}, /* 35 */ {XMC_GPIO_PORT1 , 10}, /* 36 */ {XMC_GPIO_PORT1 , 4}, /* 37 */ {XMC_GPIO_PORT1 , 2}, /* 38 */ {XMC_GPIO_PORT1 , 0}, /* 39 */ {XMC_GPIO_PORT1 , 8}, /* 40 */ {XMC_GPIO_PORT1 , 6}, /* 41 */ {XMC_GPIO_PORT1 , 6}, /* 42 */ {XMC_GPIO_PORT2 , 14}, /* 43 */ {XMC_GPIO_PORT2 , 15}, /* 44 */ {XMC_GPIO_PORT2 , 15}, /* 45 */ {XMC_GPIO_PORT1 , 7}, /* 46 */ {XMC_GPIO_PORT1 , 9}, /* 47 */ {XMC_GPIO_PORT1 , 1}, /* 48 */ {XMC_GPIO_PORT1 , 3}, /* 49 */ {XMC_GPIO_PORT1 , 5}, /* 50 */ {XMC_GPIO_PORT1 , 11}, /* 51 */ {XMC_GPIO_PORT1 , 13}, /* 52 */ {XMC_GPIO_PORT1 , 15}, /* 53 */ {XMC_GPIO_PORT1 , 15}, /* 54 */ {XMC_GPIO_PORT1 , 15}, /* 55 */ {XMC_GPIO_PORT2 , 7}, /* 56 */ {XMC_GPIO_PORT2 , 1}, /* 57 */ {XMC_GPIO_PORT2 , 3}, /* 58 */ {XMC_GPIO_PORT2 , 5}, /* 59 */ {XMC_GPIO_PORT2 , 9}, /* 60 */ {XMC_GPIO_PORT2 , 8}, //Additional pins for port X2 starting here /* 61 */ {XMC_GPIO_PORT14 , 8}, /* 62 */ {XMC_GPIO_PORT14 , 8}, /* 63 */ {XMC_GPIO_PORT14 , 15}, /* 64 */ {XMC_GPIO_PORT14 , 15}, /* 65 */ {XMC_GPIO_PORT14 , 6}, /* 66 */ {XMC_GPIO_PORT14 , 12}, /* 67 */ {XMC_GPIO_PORT14 , 14}, /* 68 */ {XMC_GPIO_PORT3 , 0}, /* 69 */ {XMC_GPIO_PORT3 , 2}, /* 70 */ {XMC_GPIO_PORT0 , 10}, /* 71 */ {XMC_GPIO_PORT0 , 1}, /* 72 */ {XMC_GPIO_PORT0 , 3}, /* 73 */ {XMC_GPIO_PORT0 , 5}, /* 74 */ {XMC_GPIO_PORT0 , 11}, /* 75 */ {XMC_GPIO_PORT3 , 3}, /* 76 */ {XMC_GPIO_PORT3 , 5}, /* 77 */ {XMC_GPIO_PORT0 , 7}, /* 78 */ {XMC_GPIO_PORT0 , 8}, /* 79 */ {XMC_GPIO_PORT3 , 6}, /* 80 */ {XMC_GPIO_PORT3 , 4}, /* 81 */ {XMC_GPIO_PORT0 , 12}, /* 82 */ {XMC_GPIO_PORT0 , 6}, /* 83 */ {XMC_GPIO_PORT0 , 4}, /* 84 */ {XMC_GPIO_PORT0 , 2}, /* 85 */ {XMC_GPIO_PORT0 , 0}, /* 86 */ {XMC_GPIO_PORT0 , 9}, /* 87 */ {XMC_GPIO_PORT3 , 1}, /* 88 */ {XMC_GPIO_PORT14 , 4}, /* 89 */ {XMC_GPIO_PORT14 , 13}, /* 90 */ {XMC_GPIO_PORT14 , 7}, /* 91 */ {XMC_GPIO_PORT14 , 5}, /* 92 */ {XMC_GPIO_PORT14 , 3}, /* 93 */ {XMC_GPIO_PORT14 , 3}, /* 94 */ {XMC_GPIO_PORT14 , 9} // //Define extra pins for Slot 1 & Slot 2 here // /* 95 */ {XMC_GPIO_PORT3 , 5}, // Chip Select - Slot 1 P3.5 // /* 96 */ {XMC_GPIO_PORT1 , 7}, // Chip Select - Slot 2 P1.7 }; const XMC_PIN_INTERRUPT_t mapping_interrupt[] = { /* 0 */ {CCU40, CCU40_CC43, 3, 0, CCU40_IN3_P1_0}, }; XMC_PWM4_t mapping_pwm4[] = { //additional pwm outputs starting here {CCU41, CCU41_CC41, 1, mapping_port_pin[27] , P2_4_AF_CCU41_OUT1, XMC_CCU4_SLICE_PRESCALER_64, PWM4_TIMER_PERIOD, DISABLED}, // PWM disabled 27 P2.4 {CCU41, CCU41_CC43, 3, mapping_port_pin[28] , P2_2_AF_CCU41_OUT3, XMC_CCU4_SLICE_PRESCALER_64, PWM4_TIMER_PERIOD, DISABLED}, // PWM disabled 28 P2.2 {CCU41, CCU41_CC42, 2, mapping_port_pin[57] , P2_3_AF_CCU41_OUT2, XMC_CCU4_SLICE_PRESCALER_64, PWM4_TIMER_PERIOD, DISABLED}, // PWM disabled 57 P2.3 {CCU41, CCU41_CC41, 0, mapping_port_pin[58] , P2_5_AF_CCU41_OUT0 , XMC_CCU4_SLICE_PRESCALER_64, PWM4_TIMER_PERIOD, DISABLED}, // PWM disabled 58 P2.5 }; XMC_PWM8_t mapping_pwm8[] = { {CCU80, CCU80_CC83, 3, XMC_CCU8_SLICE_COMPARE_CHANNEL_2, mapping_port_pin[9], P0_11_AF_CCU80_OUT31, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 9 P0.11 {CCU80, CCU80_CC80, 0, XMC_CCU8_SLICE_COMPARE_CHANNEL_2, mapping_port_pin[10], P0_2_AF_CCU80_OUT01, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 10 P0.2 //additional pwm outputs starting here {CCU80, CCU80_CC80, 0, XMC_CCU8_SLICE_COMPARE_CHANNEL_1, mapping_port_pin[55], P2_7_AF_CCU80_OUT03, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 55 P2.7 {CCU80, CCU80_CC81, 1, XMC_CCU8_SLICE_COMPARE_CHANNEL_1, mapping_port_pin[86], P0_9_AF_CCU80_OUT12, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 86 P0.9 {CCU80, CCU80_CC81, 1, XMC_CCU8_SLICE_COMPARE_CHANNEL_2, mapping_port_pin[30], P2_6_AF_CCU80_OUT13, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 30 P2.6 {CCU80, CCU80_CC82, 2, XMC_CCU8_SLICE_COMPARE_CHANNEL_1, mapping_port_pin[59], P2_9_AF_CCU80_OUT22, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 59 P2.9 {CCU80, CCU80_CC83, 3, XMC_CCU8_SLICE_COMPARE_CHANNEL_1, mapping_port_pin[26], P2_8_AF_CCU80_OUT32, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 26 P2.8 /* {CCU81, CCU81_CC80, 0, XMC_CCU8_SLICE_COMPARE_CHANNEL_1, mapping_port_pin[54], P5_7_AF_CCU81_OUT02, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 54 P5.7 {CCU81, CCU81_CC82, 1, XMC_CCU8_SLICE_COMPARE_CHANNEL_2, mapping_port_pin[29], P2_0_AF_CCU81_OUT21, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED} // PWM disabled 29 P2.0 {CCU81, CCU81_CC81, 1, XMC_CCU8_SLICE_COMPARE_CHANNEL_2, mapping_port_pin[82], P5_5_AF_CCU81_OUT12, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED}, // PWM disabled 82 P5.5 {CCU81, CCU81_CC82, 2, XMC_CCU8_SLICE_COMPARE_CHANNEL_2, mapping_port_pin[81], P5_3_AF_CCU81_OUT22, XMC_CCU8_SLICE_PRESCALER_64, PWM8_TIMER_PERIOD, DISABLED} // PWM disabled 81 P5.3*/ }; XMC_ARD_DAC_t mapping_dac[] = { {XMC_DAC0, 1, 12}, {XMC_DAC0, 0, 12} }; XMC_ADC_t mapping_adc[] = { //Result reg numbers are now equal to channel numbers {VADC, 0, VADC_G0, 0, 0, DISABLED}, {VADC, 1, VADC_G0, 0, 1, DISABLED}, {VADC, 2, VADC_G1, 1, 2, DISABLED}, {VADC, 3, VADC_G1, 1, 3, DISABLED}, //Additional ADC channels starting here }; /* * UART objects * * Serial 0 is Debug port * Serial 1 is on-board port */ RingBuffer rx_buffer_0; RingBuffer tx_buffer_0; RingBuffer rx_buffer_1; RingBuffer tx_buffer_1; #ifdef SERIAL_HOSTPC XMC_UART_t XMC_UART_0 = { .channel = XMC_UART1_CH0, .rx = { .port = (XMC_GPIO_PORT_t*)PORT0_BASE, .pin = (uint8_t)5 }, .rx_config = { .mode = XMC_GPIO_MODE_INPUT_TRISTATE, .output_level = XMC_GPIO_OUTPUT_LEVEL_HIGH, .output_strength = XMC_GPIO_OUTPUT_STRENGTH_STRONG_SOFT_EDGE }, .tx = { .port = (XMC_GPIO_PORT_t*)PORT1_BASE, .pin = (uint8_t)15 }, .tx_config = { .mode = (XMC_GPIO_MODE_t) XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT4, .output_level = XMC_GPIO_OUTPUT_LEVEL_HIGH, .output_strength = XMC_GPIO_OUTPUT_STRENGTH_STRONG_SOFT_EDGE }, .input_source_dx0 = (XMC_USIC_INPUT_t)USIC1_C0_DX0_P0_5, .input_source_dx1 = XMC_INPUT_INVALID, .input_source_dx2 = XMC_INPUT_INVALID, .input_source_dx3 = XMC_INPUT_INVALID, .irq_num = USIC1_0_IRQn, .irq_service_request = 0 }; // Debug port HardwareSerial Serial( &XMC_UART_0, &rx_buffer_0, &tx_buffer_0 ); #elif SERIAL_ONBOARD XMC_UART_t XMC_UART_0 = { .channel = XMC_UART1_CH0, .rx = { .port = (XMC_GPIO_PORT_t*)PORT2_BASE, .pin = (uint8_t)15 }, .rx_config = { .mode = XMC_GPIO_MODE_INPUT_TRISTATE, .output_level = XMC_GPIO_OUTPUT_LEVEL_HIGH, .output_strength = XMC_GPIO_OUTPUT_STRENGTH_STRONG_SOFT_EDGE }, .tx = { .port = (XMC_GPIO_PORT_t*)PORT2_BASE, .pin = (uint8_t)14 }, .tx_config = { .mode = (XMC_GPIO_MODE_t) XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT2, .output_level = XMC_GPIO_OUTPUT_LEVEL_HIGH, .output_strength = XMC_GPIO_OUTPUT_STRENGTH_STRONG_SOFT_EDGE }, .input_source_dx0 = (XMC_USIC_INPUT_t)USIC1_C0_DX0_P2_15, .input_source_dx1 = XMC_INPUT_INVALID, .input_source_dx2 = XMC_INPUT_INVALID, .input_source_dx3 = XMC_INPUT_INVALID, .irq_num = USIC0_5_IRQn, .irq_service_request = 0 }; // Debug port HardwareSerial Serial( &XMC_UART_0, &rx_buffer_0, &tx_buffer_0 ); #endif // Debug port //HardwareSerial Serial( &XMC_UART_0, &rx_buffer_0, &tx_buffer_0 ); // On-board port //HardwareSerial Serial1( &XMC_UART_1, &rx_buffer_1, &tx_buffer_1 ); // Serial Interrupt and event handling #ifdef __cplusplus extern "C" { #endif void serialEventRun( ); void serialEvent( ) __attribute__((weak)); void serialEvent1( ) __attribute__((weak)); void serialEventRun( ) { if( serialEvent ) { if( Serial.available( ) ) serialEvent( ); } #if (NUM_SERIAL > 1) if( serialEvent1 ) { if( Serial1.available( ) ) serialEvent1( ); } #endif } void USIC1_0_IRQHandler( ) { Serial.IrqHandler( ); } //void USIC1_0_IRQHandler( ) //{ //Serial1.IrqHandler( ); //} #if (NUM_SERIAL > 1) void USIC0_5_IRQHandler( void ) { Serial1.IrqHandler(); } #endif #ifdef __cplusplus } #endif #endif /* ARDUINO_MAIN*/ #ifdef __cplusplus extern HardwareSerial Serial; extern HardwareSerial Serial1; #endif /* cplusplus */ #endif
Then the frame is OK.
3. Demo
Build and download the sketch blink.ino,
/* Blink Turns an LED on for one second, then off for one second, repeatedly. Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to the correct LED pin independent of which board is used. If you want to know what pin the on-board LED is connected to on your Arduino model, check the Technical Specs of your board at: https://www.arduino.cc/en/Main/Products modified 8 May 2014 by Scott Fitzgerald modified 2 Sep 2016 by Arturo Guadalupi modified 8 Sep 2016 by Colby Newman This example code is in the public domain. http://www.arduino.cc/en/Tutorial/Blink */ // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin LED_BUILTIN as an output. pinMode(LED_BUILTIN, OUTPUT); } // the loop function runs over and over again forever void loop() { digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }
The normal blink runs well.
But the serial output for UART is not OK. That shall be next move.
4. Next to do
In general, the pin map shall be verified carefully. Some of the Pins is not set properly in above file. But it runs now. Revise step by step. That is fun.