File tree Expand file tree Collapse file tree 4 files changed +57
-3
lines changed Expand file tree Collapse file tree 4 files changed +57
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ framework = arduino
2424board = mkrvidor4000
2525debug_tool = atmel-ice
2626
27-
2827; Debugger (gdb) support
2928; https://docs.arduino.cc/tutorials/mkr-wifi-1010/mkr-jlink-setup
3029; https://gojimmypi.blogspot.com/2018/12/swd-debugging-arduino-mkr-wifi-1010.html
@@ -38,3 +37,27 @@ build_flags =
3837 -DDEBUG # Comment out to disable debugging.
3938; debug_build_flags = -O0 -g2 -ggdb2
4039debug_build_flags = -O0 -ggdb3 -g3
40+
41+ [env:esp32] .
42+ framework = arduino
43+ platform = espressif32
44+ ; change for your board : https://registry.platformio.org/platforms/platformio/espressif32/boards
45+ board = esp32doit-devkit-v1
46+ ; board_build.f_cpu = 240000000L
47+ lib_extra_dirs = ../../..
48+ ; lib_deps = epsilonrt/Modbus-Serial@^2.0.3
49+ ; upload_port = COM9
50+
51+ [env:esp32-debug] .
52+ ; https://dzone.com/articles/eclipse-jtag-debugging-the-esp32-with-a-segger-j-l
53+ ; https://docs.platformio.org/en/latest/tutorials/espressif32/arduino_debugging_unit_testing.html
54+ ; https://community.platformio.org/t/esp32-and-segger-jlink-tip-for-interface-setup-configuration/25964
55+ framework = arduino
56+ platform = espressif32
57+ ; change for your board : https://registry.platformio.org/platforms/platformio/espressif32/boards
58+ board = esp32doit-devkit-v1
59+ ; board_build.f_cpu = 240000000L
60+ lib_extra_dirs = ../../..
61+ ; lib_deps = epsilonrt/Modbus-Serial@^2.0.3
62+ upload_port = COM1
63+ debug_tool = jlink
Original file line number Diff line number Diff line change @@ -8,8 +8,12 @@ const uint16_t FirstIsts = 197;
88const uint32_t IstsValues = 0xB5DBAC ;
99
1010void setup () {
11-
11+
12+ #ifdef ESP32
13+ Serial.begin (38400 , SERIAL_8E1);
14+ #else
1215 Serial.begin (38400 );
16+ #endif
1317 mb.config (38400 );
1418
1519 for (uint8_t i = 0 ; i < NbOfIsts; i++) {
Original file line number Diff line number Diff line change @@ -38,3 +38,27 @@ build_flags =
3838 -DDEBUG # Comment out to disable debugging.
3939; debug_build_flags = -O0 -g2 -ggdb2
4040debug_build_flags = -O0 -ggdb3 -g3
41+
42+ [env:esp32] .
43+ framework = arduino
44+ platform = espressif32
45+ ; change for your board : https://registry.platformio.org/platforms/platformio/espressif32/boards
46+ board = esp32doit-devkit-v1
47+ ; board_build.f_cpu = 240000000L
48+ lib_extra_dirs = ../../..
49+ ; lib_deps = epsilonrt/Modbus-Serial@^2.0.3
50+ ; upload_port = COM9
51+
52+ [env:esp32-debug] .
53+ ; https://dzone.com/articles/eclipse-jtag-debugging-the-esp32-with-a-segger-j-l
54+ ; https://docs.platformio.org/en/latest/tutorials/espressif32/arduino_debugging_unit_testing.html
55+ ; https://community.platformio.org/t/esp32-and-segger-jlink-tip-for-interface-setup-configuration/25964
56+ framework = arduino
57+ platform = espressif32
58+ ; change for your board : https://registry.platformio.org/platforms/platformio/espressif32/boards
59+ board = esp32doit-devkit-v1
60+ ; board_build.f_cpu = 240000000L
61+ lib_extra_dirs = ../../..
62+ ; lib_deps = epsilonrt/Modbus-Serial@^2.0.3
63+ upload_port = COM1
64+ debug_tool = jlink
Original file line number Diff line number Diff line change @@ -8,8 +8,11 @@ const uint16_t FirstCoil = 20;
88const uint32_t CoilValues = 0x056BCD ;
99
1010void setup () {
11-
11+ #ifdef ESP32
12+ Serial.begin (38400 , SERIAL_8E1);
13+ #else
1214 Serial.begin (38400 );
15+ #endif
1316 mb.config (38400 );
1417
1518 for (uint8_t i = 0 ; i < NbOfCoil; i++) {
You can’t perform that action at this time.
0 commit comments