NMEA2000_esp32 icon indicating copy to clipboard operation
NMEA2000_esp32 copied to clipboard

add support for esp32s3

Open offspring opened this issue 1 year ago • 7 comments

Verified using esp32-s3-tiny esp32-s3-dev-kit-n8r8 sn65hvd230-can-board

Sorry Timo i have to recreate https://github.com/ttlappalainen/NMEA2000_esp32/pull/28 from fork / branch so it is easier to use from Platform io as https://github.com/offspring/NMEA2000_esp32.git#add-esp32s3 in lib deps section

offspring avatar Aug 26 '24 16:08 offspring

So, to try this out, all I have to do is edit the platformio.ini file, as you mention above? Thanks.

unxs0 avatar Aug 26 '24 21:08 unxs0

So, to try this out, all I have to do is edit the platformio.ini file, as you mention above? Thanks.

You may need a board definition platformio_boards

offspring avatar Aug 26 '24 21:08 offspring

and platform.ini


[env]
platform = espressif32
framework = arduino

lib_deps =
  ttlappalainen/NMEA2000-library
  https://github.com/offspring/NMEA2000_esp32.git#add-esp32s3

[env:esp32-s3-fh4r2]
board = esp32-s3-fh4r2

[env:esp32-s3-dev-kit-n8r8]
board = esp32-s3-dev-kit-n8r8

offspring avatar Aug 26 '24 21:08 offspring

This may be problematic: #if ARDUINO >= 100 #include <Arduino.h> #endif

If one does not use arduino environment, it will fail. Do you really need to include Arduino.h?

ttlappalainen avatar Aug 27 '24 03:08 ttlappalainen

#if ARDUINO >= 100 #include <Arduino.h> #endif

No Arduino no issue that is why you have a guard

#if ARDUINO >= 100
#include <Arduino.h>
#endif

And all changes are guarded by specific defines too. it will be possible to do similar defines for non Arduino systems

offspring avatar Aug 27 '24 11:08 offspring

Some newbies, like me, may find this quick note useful.

The following compiles clean using my custom dev board, from simple platformio/pio command line ubuntu dev env:

pio command

$ /usr/bin/pio run --environment base

platform.io file:

[env:base]
platform = espressif32
framework = arduino
board = esp32-s3-devkitc-1
monitor_speed = 115200
lib_deps =
  https://github.com/ttlappalainen/NMEA2000
  https://github.com/offspring/NMEA2000_esp32

Of course with valid src files. See pio project --help

TODO: Will connect esp32s3 to my known to work well n2k interface (ISO1050 w/filter and static protection diodes) and will get back with results.

unxs0 avatar Aug 31 '24 23:08 unxs0

IMG20240828232721

offspring avatar Sep 07 '24 13:09 offspring