iotz
Version:
a containerized cross compiler box for arduino, arm mbed, espressif, micro-python, raspberry pi and ... more
111 lines (88 loc) • 15.2 kB
Plain Text
# MXChip IoT platform.
# ------------------------------
#
# For more info:
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification
# changelog
#
# 15 Jun 2018 - oguz bastemur
#
# do not include debug info and compile size optimized (-Os)
#
name=MXChip IoT Developer Board
version=1.0.0
# STM compile variables
# ----------------------
compiler.libstm.c.flags="-I{build.system.path}/hal" "-I{build.system.path}/cmsis" "-I{build.system.path}" "-I{build.system.path}/cmsis/TOOLCHAIN_GCC" "-I{build.system.path}/drivers" "-I{build.system.path}/events" "-I{build.system.path}/events/equeue" "-I{build.system.path}/features" "-I{build.system.path}/features/filesystem" "-I{build.system.path}/features/filesystem/bd" "-I{build.system.path}/features/filesystem/fat" "-I{build.system.path}/features/filesystem/fat/ChaN" "-I{build.system.path}/features/frameworks" "-I{build.system.path}/features/frameworks/greentea-client" "-I{build.system.path}/features/frameworks/greentea-client/greentea-client" "-I{build.system.path}/features/frameworks/greentea-client/source" "-I{build.system.path}/features/frameworks/unity" "-I{build.system.path}/features/frameworks/unity/source" "-I{build.system.path}/features/frameworks/unity/unity" "-I{build.system.path}/features/frameworks/utest" "-I{build.system.path}/features/frameworks/utest/source" "-I{build.system.path}/features/frameworks/utest/utest" "-I{build.system.path}/features/mbedtls" "-I{build.system.path}/features/mbedtls/importer" "-I{build.system.path}/features/mbedtls/inc" "-I{build.system.path}/features/mbedtls/inc/mbedtls" "-I{build.system.path}/features/mbedtls/platform" "-I{build.system.path}/features/mbedtls/platform/inc" "-I{build.system.path}/features/mbedtls/platform/src" "-I{build.system.path}/features/mbedtls/src" "-I{build.system.path}/features/nanostack" "-I{build.system.path}/features/netsocket" "-I{build.system.path}/features/storage" "-I{build.system.path}/hal" "-I{build.system.path}/hal/storage_abstraction" "-I{build.system.path}/platform" "-I{build.system.path}/rtos" "-I{build.system.path}/rtos/rtx" "-I{build.system.path}/rtos/rtx/TARGET_CORTEX_M" "-I{build.system.path}/rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7" "-I{build.system.path}/rtos/rtx/TARGET_CORTEX_M/TARGET_RTOS_M4_M7/TOOLCHAIN_GCC" "-I{build.system.path}/targets" "-I{build.system.path}/targets/TARGET_MXCHIP" "-I{build.system.path}/targets/TARGET_MXCHIP/TARGET_AZ3166" "-I{build.system.path}/targets/TARGET_MXCHIP/TARGET_AZ3166/device" "-I{build.system.path}/targets/TARGET_MXCHIP/TARGET_AZ3166/device/TOOLCHAIN_GCC_ARM" "-I{build.system.path}/targets/TARGET_STM" "-I{build.system.path}/targets/TARGET_STM/TARGET_STM32F4" "-I{build.system.path}/targets/TARGET_STM/TARGET_STM32F4/device" "-I{build.system.path}/emw10xx-driver" "-I{build.system.path}/emw10xx-driver/TARGET_STM" "-I{build.system.path}/emw10xx-driver/TARGET_AZ3166" "-I{build.system.path}/emw10xx-driver/TARGET_STM/peripherals" "-I{build.system.path}/emw10xx-driver/TARGET_STM/wlan_bus_driver" "-I{build.system.path}/emw10xx-driver/libraries" "-I{build.system.path}/emw10xx-driver/libraries/drivers" "-I{build.system.path}/emw10xx-driver/libraries/drivers/gpio_btn" "-I{build.system.path}/emw10xx-driver/libraries/drivers/spi_flash" "-I{build.system.path}/emw10xx-driver/libraries/drivers/gpio_btn" "-I{build.system.path}/emw10xx-driver/libraries/drivers/display/VGM128064" "-I{build.system.path}/emw10xx-driver/libraries/utilities" "-I{build.system.path}/emw10xx-driver/libwlan" "-I{build.system.path}/emw10xx-driver/libwlan/TARGET_EMW1038" "-I{build.system.path}/emw10xx-driver/mico" "-I{build.system.path}/emw10xx-driver/mico/include" "-I{build.system.path}/emw10xx-driver/mico/include/mico_drivers" "-I{build.system.path}/emw10xx-driver/mico/net" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP/lwip-sys" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP/lwip-sys/arch" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/api" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/core" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/core/ipv4" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/core/snmp" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/ipv4" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/ipv4/lwip" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/ipv6" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/ipv6/lwip" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/lwip" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/include/netif" "-I{build.system.path}/emw10xx-driver/mico/net/LwIP/lwip-ver1.4.0.rc1/src/netif" "-I{build.system.path}/emw10xx-driver/mico/platform" "-I{build.system.path}/emw10xx-driver/mico/platform/EWARM" "-I{build.system.path}/emw10xx-driver/mico/platform/GCC" "-I{build.system.path}/emw10xx-driver/mico/platform/RVMDK" "-I{build.system.path}/emw10xx-driver/mico/platform/include" "-I{build.system.path}/emw10xx-driver/mico/platform/mbed" "-I{build.system.path}/emw10xx-driver/mico/platform/mbed/peripherals" "-I{build.system.path}/emw10xx-driver/mico/rtos" "-I{build.system.path}/emw10xx-driver/mico/system" "-I{build.system.path}/emw10xx-driver/mico/system/command_console" "-I{build.system.path}/emw10xx-driver/mico/system/easylink" "-I{build.core.path}/NTPClient" "-I{build.core.path}/cognitive/speech" "-I{build.core.path}/drivers" "-I{build.core.path}/cli" "-I{build.core.path}/drivers/I2S_Audio" "-I{build.core.path}/httpserver" "-I{build.core.path}/MQTT" "-I{build.core.path}/drivers/Sensors" "-I{build.core.path}/httpclient" "-I{build.core.path}/httpclient/http_parser" "-I{build.core.path}/system" "-I{build.core.path}/drivers/FileSystem" "-I{build.core.path}/azure-iot-sdk-c/" "-I{build.core.path}/azure-iot-sdk-c/iothub_client/inc" "-I{build.core.path}/azure-iot-sdk-c/iothub_client/inc/internal" "-I{build.core.path}/azure-iot-sdk-c/umqtt/inc" "-I{build.core.path}/azure-iot-sdk-c/c-utility/inc" "-I{build.core.path}/azure-iot-sdk-c/provisioning_client/deps/RIoT/Reference/RIoT" "-I{build.core.path}/azure-iot-sdk-c/provisioning_client/deps/RIoT/Reference/RIoT/Core/" "-I{build.core.path}/azure-iot-sdk-c/provisioning_client/deps/RIoT/Reference/RIoT/Core/RIoTCrypt" "-I{build.core.path}/azure-iot-sdk-c/provisioning_client/deps/RIoT/Reference/RIoT/Core/RIoTCrypt/include" "-I{build.core.path}/azure-iot-sdk-c/provisioning_client/deps/RIoT/Reference/DICE" "-I{build.core.path}/azure-iot-sdk-c/provisioning_client/inc" "-I{build.core.path}/azure-iot-sdk-c/provisioning_client/src" "-I{build.core.path}/azure-iot-sdk-c/provisioning_client/adapters" "-I{build.core.path}/azure-iot-sdk-c/c-utility/pal/mbed_os5" "-I{build.core.path}/Telemetry" "-I{build.core.path}/azure-iot-sdk-c/deps/" "-I{build.core.path}/azure-iot-sdk-c/deps/parson" "-I{build.core.path}/azure-iot-sdk-c/deps/uhttp/inc"
compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=-w
compiler.warning_flags.more=-Wall
compiler.warning_flags.all=-Wall -Wextra
compiler.path={runtime.tools.arm-none-eabi-gcc.path}/bin/
compiler.c.cmd=arm-none-eabi-gcc
compiler.c.flags=-c -Os {compiler.warning_flags} -std=gnu99 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -D__MBED__=1 -DLWIP_TIMEVAL_PRIVATE=0 -DDEVICE_I2CSLAVE=1 -DTARGET_LIKE_MBED -DDEVICE_PORTOUT=1 -DUSBHOST_OTHER -DDEVICE_PORTINOUT=1 -DTARGET_RTOS_M4_M7 -DDEVICE_LOWPOWERTIMER=1 -DDEVICE_RTC=1 -DTOOLCHAIN_object -DDEVICE_SERIAL_ASYNCH=1 -DTARGET_STM32F4 -D__CMSIS_RTOS -DTARGET_EMW1062 -DTOOLCHAIN_GCC -DDEVICE_CAN=1 -DTARGET_CORTEX_M -DTARGET_DEBUG -DDEVICE_I2C_ASYNCH=1 -DTARGET_LIKE_CORTEX_M4 -DTARGET_M4 -DTARGET_UVISOR_UNSUPPORTED -DDEVICE_QSPI=1 -DDEVICE_SPI_ASYNCH=1 -DMBED_BUILD_TIMESTAMP=1490085708.63 -DDEVICE_PWMOUT=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_I2C=1 -DTRANSACTION_QUEUE_SIZE_SPI=2 -D__CORTEX_M4 -DDEVICE_STDIO_MESSAGES=1 -DHSE_VALUE=((uint32_t)26000000) -DTARGET_FF_MORPHO -D__FPU_PRESENT=1 -DTARGET_FF_ARDUINO -DDEVICE_PORTIN=1 -DTARGET_STM -DDEVICE_SERIAL_FC=1 -DDEVICE_SDIO=1 -DDEVICE_TRNG=1 -D__MBED_CMSIS_RTOS_CM -DDEVICE_SLEEP=1 -DTOOLCHAIN_GCC_ARM -DTARGET_MXCHIP -DDEVICE_SPI=1 -DUSB_STM_HAL -DMXCHIP_LIBRARY -DDEVICE_SPISLAVE=1 -DDEVICE_ANALOGIN=1 -DDEVICE_SERIAL=1 -DDEVICE_ERROR_RED=1 -DTARGET_AZ3166 -DARM_MATH_CM4 -DLPS22HB_I2C_PORT=MICO_I2C_1 -DDONT_USE_UPLOADTOBLOB -DUSE_MBED_TLS -DUSE_MBED_TLS -DUSE_PROV_MODULE -DHSM_TYPE_X509 -DHSM_TYPE_SYMM_KEY -DMBED_HEAP_STATS_ENABLED=1 -DMBED_STACK_STATS_ENABLED=1 -include mbed_config.h -MMD {compiler.libstm.c.flags}
compiler.c.elf.cmd=arm-none-eabi-gcc
compiler.c.elf.flags=-Os -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align
compiler.S.cmd=arm-none-eabi-gcc
compiler.S.flags=-c -x assembler-with-cpp {compiler.libstm.c.flags} -DTRANSACTION_QUEUE_SIZE_SPI=2 -D__CORTEX_M4 -DUSB_STM_HAL -DARM_MATH_CM4 -D__FPU_PRESENT=1 -DUSBHOST_OTHER -D__MBED_CMSIS_RTOS_CM -D__CMSIS_RTOS
compiler.cpp.cmd=arm-none-eabi-g++
compiler.cpp.flags=-c -Os {compiler.warning_flags} -std=gnu++11 -Wno-unused-parameter -Wno-missing-field-initializers -fmessage-length=0 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -Wvla -D__MBED__=1 -DDEVICE_I2CSLAVE=1 -DTARGET_LIKE_MBED -DLWIP_TIMEVAL_PRIVATE=0 -DDEVICE_PORTOUT=1 -DUSBHOST_OTHER -DDEVICE_PORTINOUT=1 -DTARGET_RTOS_M4_M7 -DDEVICE_LOWPOWERTIMER=1 -DDEVICE_RTC=1 -DTOOLCHAIN_object -DDEVICE_SERIAL_ASYNCH=1 -DTARGET_STM32F4 -D__CMSIS_RTOS -DTARGET_EMW1062 -DTOOLCHAIN_GCC -DDEVICE_CAN=1 -DTARGET_CORTEX_M -DTARGET_DEBUG -DDEVICE_I2C_ASYNCH=1 -DTARGET_LIKE_CORTEX_M4 -DTARGET_M4 -DTARGET_UVISOR_UNSUPPORTED -DDEVICE_QSPI=1 -DDEVICE_SPI_ASYNCH=1 -DMBED_BUILD_TIMESTAMP=1490085708.63 -DDEVICE_PWMOUT=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_I2C=1 -DTRANSACTION_QUEUE_SIZE_SPI=2 -D__CORTEX_M4 -DDEVICE_STDIO_MESSAGES=1 -DHSE_VALUE=((uint32_t)26000000) -DTARGET_FF_MORPHO -D__FPU_PRESENT=1 -DTARGET_FF_ARDUINO -DDEVICE_PORTIN=1 -DTARGET_STM -DDEVICE_SERIAL_FC=1 -DDEVICE_SDIO=1 -DDEVICE_TRNG=1 -D__MBED_CMSIS_RTOS_CM -DDEVICE_SLEEP=1 -DTOOLCHAIN_GCC_ARM -DTARGET_MXCHIP -DDEVICE_SPI=1 -DUSB_STM_HAL -DMXCHIP_LIBRARY -DDEVICE_SPISLAVE=1 -DDEVICE_ANALOGIN=1 -DDEVICE_SERIAL=1 -DDEVICE_ERROR_RED=1 -DTARGET_AZ3166 -DARM_MATH_CM4 -DLPS22HB_I2C_PORT=MICO_I2C_1 -DDONT_USE_UPLOADTOBLOB -DUSE_MBED_TLS -DUSE_MBED_TLS -DUSE_PROV_MODULE -DHSM_TYPE_X509 -DDHSM_TYPE_SYMM_KEY -DMBED_HEAP_STATS_ENABLED=1 -DMBED_STACK_STATS_ENABLED=1 -include mbed_config.h -MMD {compiler.libstm.c.flags}
compiler.ar.cmd=arm-none-eabi-ar
compiler.ar.flags=rcs
compiler.objcopy.cmd=arm-none-eabi-objcopy
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
compiler.elf2hex.flags=-O binary
compiler.elf2hex.cmd=arm-none-eabi-objcopy
compiler.ldflags=
compiler.size.cmd=arm-none-eabi-size
compiler.define=-DARDUINO=
# this can be overridden in boards.txt
build.extra_flags=
# These can be overridden in platform.local.txt
compiler.c.extra_flags=
compiler.c.elf.extra_flags=
compiler.cpp.extra_flags=
compiler.S.extra_flags=
compiler.ar.extra_flags=
compiler.elf2hex.extra_flags=
# USB Flags
# ---------
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'
# Default usb manufacturer will be replaced at compile time using
# numeric vendor ID if available or by board's specific value.
build.usb_manufacturer="Unknown"
# compile patterns
# ---------------------
## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mcpu={build.mcu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mcpu={build.mcu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
## Compile S files
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -mcpu={build.mcu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
## Create archives
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" -mcpu={build.mcu} -mthumb {compiler.c.elf.flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" "-Wl,--gc-sections" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" "-L{build.system.path}/sdk/lib" "-L{build.system.path}/emw10xx-driver/libwlan/TARGET_EMW1062" -Wl,--wrap,_malloc_r -Wl,--wrap,_free_r -Wl,--wrap,_realloc_r -Wl,--wrap,_calloc_r -Wl,--start-group {object_files} -laz_iot "{build.path}/{archive_file}" -Wl,--end-group -lm -lwlan -lwifi -lstsafe -lmbed-os -lstdc++ -gcc --specs=nano.specs --specs=nosys.specs -u _printf_float
## Create output (.bin file)
recipe.objcopy.bin.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
## Save hex
recipe.output.tmp_file={build.project_name}.bin
recipe.output.save_file={build.project_name}.{build.variant}.bin
## Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=^(?:\.text|\.data|\.rodata)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.data|\.bss|\._user_heap_stack)\s+([0-9]+).*
recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*
# Uploader tool
# -------------------
#Upload to Nucleo via openocd
tools.openocd.path.windows={runtime.tools.openocd.path}
tools.openocd.path.macosx={runtime.tools.openocd.path}/macosx
tools.openocd.path.linux={runtime.tools.openocd.path}/linux
tools.openocd.cmd.macosx=bin/openocd
tools.openocd.cmd.linux=bin/openocd
tools.openocd.cmd.windows=bin/openocd.exe
tools.openocd.upload.params.verbose=-d2
tools.openocd.upload.params.quiet=-d0
tools.openocd.upload.pattern="{path}/{cmd}" -f "{path}/scripts/interface/stlink-v2-1.cfg" -c 'transport select hla_swd' -f "{path}/scripts/target/stm32f4x.cfg" -c "program {{{build.path}/{build.project_name}.bin}} verify reset 0x800C000; shutdown"