Browse Source

🧑‍💻 Update Mac Sim directions

Scott Lahteine 2 years ago
parent
commit
3c3c9f1a8e
2 changed files with 31 additions and 15 deletions
  1. 6
    6
      buildroot/share/PlatformIO/debugging/launch.json
  2. 25
    9
      ini/native.ini

+ 6
- 6
buildroot/share/PlatformIO/debugging/launch.json View File

29
             "request": "launch",
29
             "request": "launch",
30
             "type": "cppdbg",
30
             "type": "cppdbg",
31
             "cwd": "${workspaceRoot}",
31
             "cwd": "${workspaceRoot}",
32
-            "program": ".pio/build/simulator_macos_debug/debug/MarlinSimulator",
33
-            //"program": ".pio/build/simulator_linux_debug/MarlinSimulator",
34
-            //"program": ".pio/build/simulator_windows/MarlinSimulator",
32
+            "program": "${workspaceRoot}/.pio/build/simulator_macos_debug/debug/MarlinSimulator",
33
+            //"program": "${workspaceRoot}/.pio/build/simulator_linux_debug/MarlinSimulator",
34
+            //"program": "${workspaceRoot}/.pio/build/simulator_windows/MarlinSimulator",
35
             "miDebuggerPath": "/opt/local/bin/ggdb",
35
             "miDebuggerPath": "/opt/local/bin/ggdb",
36
             "MIMode": "gdb"
36
             "MIMode": "gdb"
37
         },
37
         },
40
             "request": "launch",
40
             "request": "launch",
41
             "type": "cppdbg",
41
             "type": "cppdbg",
42
             "cwd": "${workspaceRoot}",
42
             "cwd": "${workspaceRoot}",
43
-            "program": ".pio/build/simulator_macos_debug/debug/MarlinSimulator",
44
-            //"program": ".pio/build/simulator_linux_debug/MarlinSimulator",
45
-            //"program": ".pio/build/simulator_windows/MarlinSimulator",
43
+            "program": "${workspaceRoot}/.pio/build/simulator_macos_debug/debug/MarlinSimulator",
44
+            //"program": "${workspaceRoot}/.pio/build/simulator_linux_debug/MarlinSimulator",
45
+            //"program": "${workspaceRoot}/.pio/build/simulator_windows/MarlinSimulator",
46
             //"targetArchitecture": "arm64",
46
             //"targetArchitecture": "arm64",
47
             "MIMode": "lldb"
47
             "MIMode": "lldb"
48
         }
48
         }

+ 25
- 9
ini/native.ini View File

63
 #
63
 #
64
 # Simulator for macOS (MacPorts)
64
 # Simulator for macOS (MacPorts)
65
 #
65
 #
66
-#  sudo port install gcc11 gdb glm libsdl2 libsdl2_net freetype
67
-#  sudo port install ld64 @3_3 +ld64_xcode
66
+
67
+#
68
+# MacPorts:
69
+#  sudo port install gcc11 glm libsdl2 libsdl2_net
68
 #
70
 #
69
 #  cd /opt/local/bin
71
 #  cd /opt/local/bin
70
 #  sudo rm -f gcc g++ cc
72
 #  sudo rm -f gcc g++ cc
71
 #  sudo ln -s gcc-mp-11 gcc ; sudo ln -s g++-mp-11 g++ ; sudo ln -s g++ cc
73
 #  sudo ln -s gcc-mp-11 gcc ; sudo ln -s g++-mp-11 g++ ; sudo ln -s g++ cc
72
-# This step may be obsolete:
73
-#  sudo port uninstall ld64 ld64-latest
74
-#
75
-# cd -
74
+#  cd -
75
+#  rehash
76
 #
76
 #
77
 # Use 'sudo port install mesa' to get a <GL/gl.h> if no Xcode is installed.
77
 # Use 'sudo port install mesa' to get a <GL/gl.h> if no Xcode is installed.
78
 # If Xcode is installed be sure to run `xcode-select --install` first.
78
 # If Xcode is installed be sure to run `xcode-select --install` first.
79
 #
79
 #
80
+#==================================================================================
81
+#
82
+# Homebrew:
83
+#  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
84
+#
85
+#  brew install gcc@12 glm sdl2 sdl2_net
86
+#
87
+#  cd /opt/homebrew/bin
88
+#  sudo rm -f gcc g++ cc
89
+#  sudo ln -s gcc-12 gcc ; sudo ln -s g++-12 g++ ; sudo ln -s g++ cc
90
+#  cd -
91
+#
92
+# Use 'brew install mesa' to get a <GL/gl.h> if no Xcode is installed.
93
+# If Xcode is installed be sure to run `xcode-select --install` first.
94
+#
95
+
80
 [simulator_macos]
96
 [simulator_macos]
81
 build_unflags     = -lGL -fstack-protector-strong
97
 build_unflags     = -lGL -fstack-protector-strong
82
 build_flags       =
98
 build_flags       =
110
 #  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
126
 #  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
111
 #
127
 #
112
 [env:simulator_windows]
128
 [env:simulator_windows]
113
-extends     = simulator_common
129
+extends         = simulator_common
114
 build_src_flags = ${simulator_common.build_src_flags} -fpermissive
130
 build_src_flags = ${simulator_common.build_src_flags} -fpermissive
115
-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
116
-build_type = debug
131
+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
132
+build_type      = debug

Loading…
Cancel
Save