Marlin 2.0 for Flying Bear 4S/5
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
4.9 KiB

#
# Marlin Firmware
# PlatformIO Configuration File
#
#################################
# #
# Native / Simulation #
# #
#################################
#
# No supported Arduino libraries, base Marlin only
#
[env:linux_native]
platform = native
framework =
build_flags = -D__PLAT_LINUX__ -std=gnu++17 -ggdb -g -lrt -lpthread -D__MARLIN_FIRMWARE__ -Wno-expansion-to-defined
src_build_flags = -Wall -IMarlin/src/HAL/LINUX/include
build_unflags = -Wall
lib_ldf_mode = off
lib_deps =
src_filter = ${common.default_src_filter} +<src/HAL/LINUX>
#
# Native Simulation
# Builds with a small subset of available features
# Required system libraries: SDL2, SDL2-net, OpenGL, GLM
#
# 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]
#
# Debugging with gdb in vscode is as easy as adding the launch task as usual, but platformio
# will randomly remove your task when it recreates its tasks from a template. Add your gdb
# launch task to '~/.platformio/penv/lib/python{PYTHON_VERSION}/site-packages/platformio/ide/tpls/vscode/.vscode'
# to avoid this until platformio updates.
#
[simulator_common]
platform = native
framework =
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
src_build_flags = -Wall -Wno-expansion-to-defined -Wcast-align
release_flags = -g0 -O3 -flto
debug_build_flags = -fstack-protector-strong -g -g3 -ggdb
lib_compat_mode = off
src_filter = ${common.default_src_filter} +<src/HAL/NATIVE_SIM>
lib_deps = ${common.lib_deps}
MarlinSimUI=https://github.com/p3p/MarlinSimUI/archive/master.zip
Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/marlin_sim_native.zip
LiquidCrystal=https://github.com/p3p/LiquidCrystal/archive/master.zip
extra_scripts = ${common.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/simulator.py
[simulator_linux]
extends = simulator_common
build_flags = ${simulator_common.build_flags} -ldl -lpthread -lSDL2 -lSDL2_net -lGL
[env:simulator_linux_debug]
platform = ${simulator_linux.platform}
extends = simulator_linux
build_type = debug
[env:simulator_linux_release]
platform = ${simulator_linux.platform}
extends = simulator_linux
build_type = release
build_flags = ${simulator_linux.build_flags} ${simulator_linux.release_flags}
#
# Simulator for macOS (MacPorts)
#
Squashed commit of the following: commit b18aa933d14f9761d74b19be79db64e21356c563 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed Oct 13 14:28:45 2021 +1300 🐛 Fix G33 homing current (#22909) commit 0f519ebf854cdb0fd3d00828ca7a4b4d09c8d610 Author: mks-viva <1224833100@qq.com> Date: Tue Oct 12 20:01:18 2021 -0500 ✨ MKS Eagle (STM32F407VET6) board (#22897) commit 031f17b4f3dfca4a66384d40ce48b7d33315c75a Author: Minims <github@minims.fr> Date: Sun Oct 10 01:10:21 2021 +0200 🩹 Adjust GTR 1.0 ST7920 display delay (#22904) commit 036f763eaaff571f07c7829e0f5a61b645e86269 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Thu Oct 7 09:42:59 2021 +1300 🎨 Define Octopus allocated endstop pins (#22882) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> commit d137f307ebea8c8832ecbef239ed08e188c5369b Author: Scott Lahteine <github@thinkyhead.com> Date: Mon Oct 4 22:19:05 2021 -0500 🎨 Tweak FORCE_INLINE commit 66048a5f27aa3ad9ecb2b407ada13fb87e86ebe9 Author: Mark <niujl123@sina.com> Date: Tue Oct 5 12:23:02 2021 +0800 ✨ ESP32 Panda_ZHU and Panda_M4 (#22644) commit b8c32e24d86fff280621ab3f274511dd30669b93 Author: Scott Lahteine <github@thinkyhead.com> Date: Sat Oct 2 02:33:14 2021 -0500 🎨 Rename MarlinUI::zoffset_overlay commit 99d51af90facd02365d0ae91091303d7879f304d Author: Scott Lahteine <github@thinkyhead.com> Date: Tue Oct 5 21:35:31 2021 -0500 🔨 Port libsdl2_net required for macOS simulator commit f47ece0725d93cde7fde52b66d14b5ec551c46c2 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 19:06:39 2021 -0700 🐛 Fix MKS Robin Pro 1.0 LCD reset pin (#22937) commit 975089a954460b10279bdbf60f08c9604c4f7d08 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 19:05:37 2021 -0700 🔧 Remove obsolete G34 sanity check (#22929) commit 995230f5971995e41b97d14273f2dd3693ead6be Author: George Fu <nailao_5918@163.com> Date: Wed Oct 13 09:32:54 2021 +0800 🐛 Fix FYSETC Cheetah v2.0 build (#22926) commit adf7072fa846312d473a993ffc62ec3082b37c46 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 18:26:42 2021 -0700 🐛 Fix SKR Mini E3 V2 I2C-based EEPROM (#22919) Followup to #20609
3 years ago
# sudo port install gcc10 gdb glm libsdl2 libsdl2_net freetype
# sudo port install ld64 @3_3 +ld64_xcode
Squashed commit of the following: commit b18aa933d14f9761d74b19be79db64e21356c563 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed Oct 13 14:28:45 2021 +1300 🐛 Fix G33 homing current (#22909) commit 0f519ebf854cdb0fd3d00828ca7a4b4d09c8d610 Author: mks-viva <1224833100@qq.com> Date: Tue Oct 12 20:01:18 2021 -0500 ✨ MKS Eagle (STM32F407VET6) board (#22897) commit 031f17b4f3dfca4a66384d40ce48b7d33315c75a Author: Minims <github@minims.fr> Date: Sun Oct 10 01:10:21 2021 +0200 🩹 Adjust GTR 1.0 ST7920 display delay (#22904) commit 036f763eaaff571f07c7829e0f5a61b645e86269 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Thu Oct 7 09:42:59 2021 +1300 🎨 Define Octopus allocated endstop pins (#22882) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> commit d137f307ebea8c8832ecbef239ed08e188c5369b Author: Scott Lahteine <github@thinkyhead.com> Date: Mon Oct 4 22:19:05 2021 -0500 🎨 Tweak FORCE_INLINE commit 66048a5f27aa3ad9ecb2b407ada13fb87e86ebe9 Author: Mark <niujl123@sina.com> Date: Tue Oct 5 12:23:02 2021 +0800 ✨ ESP32 Panda_ZHU and Panda_M4 (#22644) commit b8c32e24d86fff280621ab3f274511dd30669b93 Author: Scott Lahteine <github@thinkyhead.com> Date: Sat Oct 2 02:33:14 2021 -0500 🎨 Rename MarlinUI::zoffset_overlay commit 99d51af90facd02365d0ae91091303d7879f304d Author: Scott Lahteine <github@thinkyhead.com> Date: Tue Oct 5 21:35:31 2021 -0500 🔨 Port libsdl2_net required for macOS simulator commit f47ece0725d93cde7fde52b66d14b5ec551c46c2 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 19:06:39 2021 -0700 🐛 Fix MKS Robin Pro 1.0 LCD reset pin (#22937) commit 975089a954460b10279bdbf60f08c9604c4f7d08 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 19:05:37 2021 -0700 🔧 Remove obsolete G34 sanity check (#22929) commit 995230f5971995e41b97d14273f2dd3693ead6be Author: George Fu <nailao_5918@163.com> Date: Wed Oct 13 09:32:54 2021 +0800 🐛 Fix FYSETC Cheetah v2.0 build (#22926) commit adf7072fa846312d473a993ffc62ec3082b37c46 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 18:26:42 2021 -0700 🐛 Fix SKR Mini E3 V2 I2C-based EEPROM (#22919) Followup to #20609
3 years ago
#
# cd /opt/local/bin
# sudo rm -f gcc g++ cc
Squashed commit of the following: commit b18aa933d14f9761d74b19be79db64e21356c563 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed Oct 13 14:28:45 2021 +1300 🐛 Fix G33 homing current (#22909) commit 0f519ebf854cdb0fd3d00828ca7a4b4d09c8d610 Author: mks-viva <1224833100@qq.com> Date: Tue Oct 12 20:01:18 2021 -0500 ✨ MKS Eagle (STM32F407VET6) board (#22897) commit 031f17b4f3dfca4a66384d40ce48b7d33315c75a Author: Minims <github@minims.fr> Date: Sun Oct 10 01:10:21 2021 +0200 🩹 Adjust GTR 1.0 ST7920 display delay (#22904) commit 036f763eaaff571f07c7829e0f5a61b645e86269 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Thu Oct 7 09:42:59 2021 +1300 🎨 Define Octopus allocated endstop pins (#22882) Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> commit d137f307ebea8c8832ecbef239ed08e188c5369b Author: Scott Lahteine <github@thinkyhead.com> Date: Mon Oct 4 22:19:05 2021 -0500 🎨 Tweak FORCE_INLINE commit 66048a5f27aa3ad9ecb2b407ada13fb87e86ebe9 Author: Mark <niujl123@sina.com> Date: Tue Oct 5 12:23:02 2021 +0800 ✨ ESP32 Panda_ZHU and Panda_M4 (#22644) commit b8c32e24d86fff280621ab3f274511dd30669b93 Author: Scott Lahteine <github@thinkyhead.com> Date: Sat Oct 2 02:33:14 2021 -0500 🎨 Rename MarlinUI::zoffset_overlay commit 99d51af90facd02365d0ae91091303d7879f304d Author: Scott Lahteine <github@thinkyhead.com> Date: Tue Oct 5 21:35:31 2021 -0500 🔨 Port libsdl2_net required for macOS simulator commit f47ece0725d93cde7fde52b66d14b5ec551c46c2 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 19:06:39 2021 -0700 🐛 Fix MKS Robin Pro 1.0 LCD reset pin (#22937) commit 975089a954460b10279bdbf60f08c9604c4f7d08 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 19:05:37 2021 -0700 🔧 Remove obsolete G34 sanity check (#22929) commit 995230f5971995e41b97d14273f2dd3693ead6be Author: George Fu <nailao_5918@163.com> Date: Wed Oct 13 09:32:54 2021 +0800 🐛 Fix FYSETC Cheetah v2.0 build (#22926) commit adf7072fa846312d473a993ffc62ec3082b37c46 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 18:26:42 2021 -0700 🐛 Fix SKR Mini E3 V2 I2C-based EEPROM (#22919) Followup to #20609
3 years ago
# sudo ln -s gcc-mp-10 gcc ; sudo ln -s g++-mp-10 g++ ; sudo ln -s g++ cc
# This step may be obsolete:
# sudo port uninstall ld64 ld64-latest
#
# cd -
#
# Use 'sudo port install mesa' to get a <GL/gl.h> if no Xcode is installed.
# If Xcode is installed be sure to run `xcode-select --install` first.
#
# For VSCode debugging paste the block below near the top of launch.json.
# NOTE: The PlatformIO VSCode extension will remove it when regenerating launch.json.
#
# { "name": "Debug Sim",
# "type": "cppdbg",
# "request": "launch",
# "program": "${workspaceFolder}/.pio/build/simulator_macos/MarlinSimulator",
# "miDebuggerPath": "/opt/local/bin/ggdb",
# "MIMode": "gdb",
# "cwd": "${workspaceFolder}/.pio/build/simulator_macos" },
#
[simulator_macos]
build_unflags = -lGL
custom_verbose = 0
build_flags =
-I/opt/local/include
-I/opt/local/include/freetype2
-I/opt/local/include/SDL2/
-L/opt/local/lib
-Wl,-framework,OpenGl
-Wl,-framework,CoreFoundation
-lSDL2
[env:simulator_macos_debug]
platform = ${env:simulator_linux_release.platform}
extends = env:simulator_linux_debug
build_flags = ${env:simulator_linux_debug.build_flags} ${simulator_macos.build_flags} -ggdb -Og -D_THREAD_SAFE
build_unflags = ${simulator_macos.build_unflags}
[env:simulator_macos_release]
platform = ${env:simulator_linux_release.platform}
extends = env:simulator_linux_release
build_flags = ${env:simulator_linux_release.build_flags} ${simulator_macos.build_flags}
build_unflags = ${simulator_macos.build_unflags}
#
# Simulator for Windows 10
#
# MSYS2 mingw-w64-x86_64 with these packages:
# 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 mingw-w64-x86_64-dlfcn
#
[env:simulator_windows]
platform = ${simulator_common.platform}
extends = simulator_common
src_build_flags = ${simulator_common.src_build_flags} -fpermissive
build_flags = ${simulator_common.build_flags} ${simulator_common.debug_build_flags} -IC:\\msys64\\mingw64\\include\\SDL2 -fno-stack-protector -Wl,-subsystem,windows -ldl -lmingw32 -lSDL2main -lSDL2 -lSDL2_net -lopengl32 -lssp
build_type = debug