Skip to content

Commit b24f417

Browse files
author
botamochi6277
committed
Add native build env for debugging
1 parent f949ec8 commit b24f417

1 file changed

Lines changed: 37 additions & 4 deletions

File tree

platformio.ini

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,61 @@
1111
[platformio]
1212
default_envs = m5stack-core
1313

14-
[env]
15-
platform = espressif32
16-
framework = arduino
17-
monitor_speed = 115200
14+
; [env]
15+
; platform = espressif32
16+
; framework = arduino
17+
; monitor_speed = 115200
1818

1919
[env:m5stack-core]
2020
board = m5stack-core-esp32
21+
platform = espressif32
22+
framework = arduino
23+
monitor_speed = 115200
2124
lib_deps = m5stack/M5Unified
2225

2326
[env:m5stack-core-with-aquestalk]
2427
board = m5stack-core-esp32
28+
platform = espressif32
29+
framework = arduino
30+
monitor_speed = 115200
2531
lib_deps = m5stack/M5Unified
2632
build_flags =
2733
-laquestalk
2834
-Llib/aquestalk-esp32/src/esp32
2935

3036
[env:m5stack-fire]
3137
board = m5stack-fire
38+
platform = espressif32
39+
framework = arduino
40+
monitor_speed = 115200
3241
lib_deps =
3342
m5stack/M5Unified
3443

3544
[env:m5stack-core2]
3645
board = m5stack-core2
46+
platform = espressif32
47+
framework = arduino
48+
monitor_speed = 115200
3749
lib_deps =
3850
m5stack/M5Unified
51+
52+
[env:native]
53+
platform = native
54+
lib_deps = m5stack/M5Unified
55+
build_type = debug
56+
build_flags = -O0 -xc++ -std=c++14 -lSDL2
57+
-I"/usr/local/include/SDL2" ; for intel mac homebrew SDL2
58+
-L"/usr/local/lib" ; for intel mac homebrew SDL2
59+
-DM5GFX_SHOW_FRAME ; Display frame image.
60+
-DM5GFX_BACK_COLOR=0x222222u ; Color outside the frame image
61+
62+
[env:native_arm]
63+
platform = native
64+
build_type = debug
65+
lib_deps = m5stack/M5Unified
66+
build_flags = -O0 -xc++ -std=c++14 -lSDL2
67+
-arch arm64 ; for arm mac
68+
-I"${sysenv.HOMEBREW_PREFIX}/include/SDL2" ; for arm mac homebrew SDL2
69+
-L"${sysenv.HOMEBREW_PREFIX}/lib" ; for arm mac homebrew SDL2
70+
-DM5GFX_SHOW_FRAME ; Display frame image.
71+
-DM5GFX_BACK_COLOR=0x222222u ; Color outside the frame image

0 commit comments

Comments
 (0)