My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

native.ini 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #
  2. # Marlin Firmware
  3. # PlatformIO Configuration File
  4. #
  5. #################################
  6. # #
  7. # Native / Simulation #
  8. # #
  9. #################################
  10. #
  11. # No supported Arduino libraries, base Marlin only
  12. #
  13. [env:linux_native]
  14. platform = native
  15. framework =
  16. build_flags = -D__PLAT_LINUX__ -std=gnu++17 -ggdb -g -lrt -lpthread -D__MARLIN_FIRMWARE__ -Wno-expansion-to-defined
  17. src_build_flags = -Wall -IMarlin/src/HAL/LINUX/include
  18. build_unflags = -Wall
  19. lib_ldf_mode = off
  20. lib_deps =
  21. src_filter = ${common.default_src_filter} +<src/HAL/LINUX>
  22. #
  23. # Native Simulation
  24. # Builds with a small subset of available features
  25. # Required system libraries: SDL2, SDL2-net, OpenGL, GLM
  26. #
  27. # Tested with Linux (Mint 20) : gcc [9.3.0, 10.2.0]: libsdl2-dev[2.0.10], libsdl2-net-dev[2.0.1], libglm-dev[0.9.9.7, 0.9.9.8]
  28. #
  29. # Debugging with gdb in vscode is as easy as adding the launch task as usual, but platformio
  30. # will randomly remove your task when it recreates its tasks from a template. Add your gdb
  31. # launch task to '~/.platformio/penv/lib/python{PYTHON_VERSION}/site-packages/platformio/ide/tpls/vscode/.vscode'
  32. # to avoid this until platformio updates.
  33. #
  34. [simulator_common]
  35. platform = native
  36. framework =
  37. build_flags = ${common.build_flags} -std=gnu++17 -D__PLAT_NATIVE_SIM__ -DU8G_HAL_LINKS -I/usr/include/SDL2 -IMarlin -IMarlin/src/HAL/NATIVE_SIM/include -IMarlin/src/HAL/NATIVE_SIM/u8g
  38. src_build_flags = -Wall -Wno-expansion-to-defined -Wcast-align
  39. release_flags = -g0 -O3 -flto
  40. debug_build_flags = -fstack-protector-strong -g -g3 -ggdb
  41. lib_compat_mode = off
  42. src_filter = ${common.default_src_filter} +<src/HAL/NATIVE_SIM>
  43. lib_deps = ${common.lib_deps}
  44. MarlinSimUI=https://github.com/p3p/MarlinSimUI.git
  45. Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/marlin_sim_native.zip
  46. LiquidCrystal=https://github.com/p3p/LiquidCrystal/archive/master.zip
  47. extra_scripts = ${common.extra_scripts}
  48. pre:buildroot/share/PlatformIO/scripts/simulator.py
  49. [simulator_linux]
  50. extends = simulator_common
  51. build_flags = ${simulator_common.build_flags} -ldl -lpthread -lSDL2 -lSDL2_net -lGL
  52. [env:simulator_linux_debug]
  53. platform = ${simulator_linux.platform}
  54. extends = simulator_linux
  55. build_type = debug
  56. [env:simulator_linux_release]
  57. platform = ${simulator_linux.platform}
  58. extends = simulator_linux
  59. build_type = release
  60. build_flags = ${simulator_linux.build_flags} ${simulator_linux.release_flags}
  61. #
  62. # Simulator for macOS (MacPorts)
  63. #
  64. # sudo port install gcc10 gdb glm libsdl2 freetype
  65. # sudo port install ld64 @3_3 +ld64_xcode
  66. # sudo port uninstall ld64 ld64-latest
  67. # cd /opt/local/bin
  68. # sudo rm -f gcc g++ cc
  69. # sudo ln gcc-mp-10 gcc ; sudo ln g++-mp-10 g++ ; sudo ln g++ cc
  70. # cd -
  71. #
  72. # Use 'sudo port install mesa' to get a <GL/gl.h> if no Xcode is installed.
  73. # If Xcode is installed be sure to run `xcode-select --install` first.
  74. #
  75. # For VSCode debugging paste the block below near the top of launch.json.
  76. # NOTE: The PlatformIO VSCode extension will remove it when regenerating launch.json.
  77. #
  78. # { "name": "Debug Sim",
  79. # "type": "cppdbg",
  80. # "request": "launch",
  81. # "program": "${workspaceFolder}/.pio/build/simulator_macos/MarlinSimulator",
  82. # "miDebuggerPath": "/opt/local/bin/ggdb",
  83. # "MIMode": "gdb",
  84. # "cwd": "${workspaceFolder}/.pio/build/simulator_macos" },
  85. #
  86. [simulator_macos]
  87. build_unflags = -lGL
  88. custom_verbose = 0
  89. build_flags =
  90. -I/opt/local/include
  91. -I/opt/local/include/freetype2
  92. -I/opt/local/include/SDL2/
  93. -L/opt/local/lib
  94. -Wl,-framework,OpenGl
  95. -Wl,-framework,CoreFoundation
  96. -lSDL2
  97. [env:simulator_macos_debug]
  98. platform = ${env:simulator_linux_release.platform}
  99. extends = env:simulator_linux_debug
  100. build_flags = ${env:simulator_linux_debug.build_flags} ${simulator_macos.build_flags} -ggdb -Og -D_THREAD_SAFE
  101. build_unflags = ${simulator_macos.build_unflags}
  102. [env:simulator_macos_release]
  103. platform = ${env:simulator_linux_release.platform}
  104. extends = env:simulator_linux_release
  105. build_flags = ${env:simulator_linux_release.build_flags} ${simulator_macos.build_flags}
  106. build_unflags = ${simulator_macos.build_unflags}
  107. #
  108. # Simulator for Windows 10
  109. #
  110. # MSYS2 mingw-w64-x86_64 with these packages:
  111. # pacman -S --needed base-devel mingw-w64-x86_64-toolchain mingw64/mingw-w64-x86_64-glm mingw64/mingw-w64-x86_64-SDL2 mingw64/mingw-w64-x86_64-SDL2_net
  112. #
  113. [env:simulator_windows]
  114. platform = ${simulator_common.platform}
  115. extends = simulator_common
  116. src_build_flags = ${simulator_common.src_build_flags} -fpermissive
  117. build_flags = ${simulator_common.build_flags} ${simulator_common.debug_build_flags} -fno-stack-protector -Wl,-subsystem,windows -ldl -lmingw32 -lSDL2main -lSDL2 -lSDL2_net -lopengl32 -lssp
  118. build_type = debug