platform.txt 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # Arduino AVR Core and platform.
  2. # ------------------------------
  3. # For more info:
  4. # https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
  5. name=Marlin AVR Boards
  6. version=1.5.6
  7. # AVR compile variables
  8. # ---------------------
  9. # Default "compiler.path" is correct, change only if you want to overidde the initial value
  10. compiler.path={runtime.ide.path}/hardware/tools/avr/bin/
  11. compiler.c.cmd=avr-gcc
  12. compiler.c.flags=-c -g -Os -w -ffunction-sections -fdata-sections -MMD
  13. # -w flag added to avoid printing a wrong warning http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59396
  14. # This is fixed in gcc 4.8.3 and will be removed as soon as we update the toolchain
  15. compiler.c.elf.flags=-w -Os -Wl,--gc-sections
  16. compiler.c.elf.cmd=avr-gcc
  17. compiler.S.flags=-c -g -x assembler-with-cpp
  18. compiler.cpp.cmd=avr-g++
  19. compiler.cpp.flags=-c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD
  20. compiler.ar.cmd=avr-ar
  21. compiler.ar.flags=rcs
  22. compiler.objcopy.cmd=avr-objcopy
  23. compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
  24. compiler.elf2hex.flags=-O ihex -R .eeprom
  25. compiler.elf2hex.cmd=avr-objcopy
  26. compiler.ldflags=
  27. compiler.size.cmd=avr-size
  28. # This can be overriden in boards.txt
  29. build.extra_flags=
  30. # These can be overridden in platform.local.txt
  31. compiler.c.extra_flags=
  32. compiler.c.elf.extra_flags=
  33. compiler.S.extra_flags=
  34. compiler.cpp.extra_flags=
  35. compiler.ar.extra_flags=
  36. compiler.objcopy.eep.extra_flags=
  37. compiler.elf2hex.extra_flags=
  38. # AVR compile patterns
  39. # --------------------
  40. ## Compile c files
  41. recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
  42. ## Compile c++ files
  43. recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {compiler.cpp.extra_flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
  44. ## Compile S files
  45. recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.S.flags} -mmcu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
  46. ## Create archives
  47. recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}"
  48. ## Combine gc-sections, archives, and objects
  49. recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mmcu={build.mcu} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" {object_files} "{build.path}/{archive_file}" "-L{build.path}" -lm
  50. ## Create eeprom
  51. recipe.objcopy.eep.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.objcopy.eep.flags} {compiler.objcopy.eep.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.eep"
  52. ## Create hex
  53. recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
  54. ## Compute size
  55. recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
  56. recipe.size.regex=^(?:\.text|\.data|\.bootloader)\s+([0-9]+).*
  57. recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
  58. recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*
  59. # AVR Uploader/Programmers tools
  60. # ------------------------------
  61. tools.avrdude.cmd.path={runtime.ide.path}/hardware/tools/avr/bin/avrdude
  62. tools.avrdude.config.path={runtime.ide.path}/hardware/tools/avr/etc/avrdude.conf
  63. tools.avrdude.upload.params.verbose=-v
  64. tools.avrdude.upload.params.quiet=-q -q
  65. tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i"
  66. tools.avrdude.program.params.verbose=-v
  67. tools.avrdude.program.params.quiet=-q -q
  68. tools.avrdude.program.pattern="{cmd.path}" "-C{config.path}" {program.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{build.path}/{build.project_name}.hex:i"
  69. tools.avrdude.erase.params.verbose=-v
  70. tools.avrdude.erase.params.quiet=-q -q
  71. tools.avrdude.erase.pattern="{cmd.path}" "-C{config.path}" {erase.verbose} -p{build.mcu} -c{protocol} {program.extra_params} -e -Ulock:w:{bootloader.unlock_bits}:m -Uefuse:w:{bootloader.extended_fuses}:m -Uhfuse:w:{bootloader.high_fuses}:m -Ulfuse:w:{bootloader.low_fuses}:m
  72. tools.avrdude.bootloader.params.verbose=-v
  73. tools.avrdude.bootloader.params.quiet=-q -q
  74. tools.avrdude.bootloader.pattern="{cmd.path}" "-C{config.path}" {bootloader.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{runtime.platform.path}/bootloaders/{bootloader.path}/{bootloader.file}:i" -Ulock:w:{bootloader.lock_bits}:m
  75. tools.hidloader.cmd.path=/usr/local/bin/HIDUploader
  76. tools.hidloader.upload.params.verbose=-v
  77. tools.hidloader.upload.params.quiet=
  78. tools.hidloader.upload.pattern="{cmd.path}" --upload -mmcu={build.mcu} {upload.verbose} -w "{build.path}/{build.project_name}.hex"
  79. tools.nativehid.program.params.verbose=-v
  80. tools.nativehid.program.params.quiet=-q -q
  81. tools.hidloader.program.params.verbose=-v
  82. tools.hidloader.program.params.quiet=-q -q
  83. tools.hidloader.program.pattern="{cmd.path}" -mmcu={build.mcu} {upload.verbose} -w "{build.path}/{build.project_name}.hex"
  84. tools.hidloader.erase.params.verbose=-v
  85. tools.hidloader.erase.params.quiet=-q -q
  86. tools.hidloader.erase.pattern="{cmd.path}" --erase "-C{config.path}" {erase.verbose} -p{build.mcu} -c{protocol} {program.extra_params} -e -Ulock:w:{bootloader.unlock_bits}:m -Uefuse:w:{bootloader.extended_fuses}:m -Uhfuse:w:{bootloader.high_fuses}:m -Ulfuse:w:{bootloader.low_fuses}:m
  87. # USB Default Flags
  88. # Default blank usb manufacturer will be filled it at compile time
  89. # - from numeric vendor ID, set to Unknown otherwise
  90. build.usb_manufacturer=
  91. build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'