Infineon / platformio-infineonxmc

Scripts and examples for developing XMC Microcontroller Boards using Platform IO
11 stars 13 forks source link

Fix linux build #1

Closed PabloPL closed 6 years ago

PabloPL commented 6 years ago

First commit fixes following issue (observed on ubuntu)

In file included from /home/pablo/.platformio/packages/framework-arduinoxmc/cores/xmc_lib/XMCLib/inc/xmc_device.h:1582:0, from /home/pablo/.platformio/packages/framework-arduinoxmc/cores/xmc_lib/XMCLib/inc/xmc_common.h:76, from /home/pablo/.platformio/packages/framework-arduinoxmc/cores/Arduino.h:42, from /home/pablo/.platformio/packages/framework-arduinoxmc/cores/HardwareSerial.h:36, from /home/pablo/.platformio/packages/framework-arduinoxmc/cores/HardwareSerial.cpp:22: /home/pablo/.platformio/packages/framework-arduinoxmc/variants/XMC1100/XMC1100.h:106:130: fatal error: core_cm0.h: No such file or directory

Second commit fixes following build error

include

^ compilation terminated. *** [.pioenvs/xmc1100_xmc2go/FrameworkArduino/HardwareSerial.cpp.o] Error 1 In file included from /home/pablo/.platformio/packages/framework-arduinoxmc/cores/IPAddress.cpp:22:0: /home/pablo/.platformio/packages/framework-arduinoxmc/cores/Arduino.h:248:26: fatal error: pins_arduino.h: No such file or directory

sherylll commented 6 years ago

Hi,

with regards to this error:

include

^ compilation terminated. *** [.pioenvs/xmc1100_xmc2go/FrameworkArduino/HardwareSerial.cpp.o] Error 1 In file included from /home/pablo/.platformio/packages/framework-arduinoxmc/cores/IPAddress.cpp:22:0: /home/pablo/.platformio/packages/framework-arduinoxmc/cores/Arduino.h:248:26: fatal error: pins_arduino.h: No such file or directory

board_variant shouldn't be turned upper case, as it is defined here: https://github.com/Infineon/platformio-infineonxmc/blob/a5be9d5ceefac332b8a799494bae353b94c8f526/boards/xmc1100_boot_kit.json#L8

However does this change fix the errors you had under ubuntu?

PabloPL commented 6 years ago

Yes, with those two commits I was able to build and flash my xmc2go board with sample blink sketch.

Processing xmc1100_xmc2go (platform: infineonxmc; board: xmc1100_xmc2go; framework: arduino)
Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Infineon XMC > XMC1100 XMC2Go
SYSTEM: 32MHz 64KB RAM (64KB Flash)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 8 compatible libraries
Scanning dependencies...
No dependencies
`.pioenvs/xmc1100_xmc2go/firmware.hex' is up to date.
Checking size .pioenvs/xmc1100_xmc2go/program.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [          ]   2.6% (used 1696 bytes from 65536 bytes)
PROGRAM: [=         ]   7.8% (used 5116 bytes from 65536 bytes)
PabloPL commented 6 years ago

Ok, so to fix this we should rename variants/XMC1100/config/XMC1100_XMC2GO/ to variants/XMC1100/config/XMC1100_XMC2Go/ or change board_variant to "board_variant":"XMC1100_XMC2GO"

Edit 1: Tested change of board_variant and it also works fine.

Edit 2: All other boards are fine, beside XMC4200_Distance2Go - There is no config directory for it in framework-arduinoxmc/variants/XMC4700/config.

PabloPL commented 6 years ago

@sherylll I've reverted second patch and made different fix. Can You look at this?

sherylll commented 6 years ago

Thanks for the fix. Unfortunately XMC4200_Distance2Go is not supported yet (might be in the future).