I use platform.io all the time. Usually the platformio.ini file which gets generated is ok, it would look like this:
[env:teensy41]
platform = teensy
board = teensy41
framework = arduino
Sample code? 24/25 are not the standard i2c pins (which are 18/19) so i think you would need to do Wire.setSDA/setSCL to use that pins.
Multiple I2C devices are possible, pullup resistors (2k2 / 4k7) are recommended.
I think i have proof, that it is Huzzah related.
As i mostly use Adafruit Feathers it is very easy to swap boards around, as the pinout is the same.
So i took the non working huzzah code and changed the board type in platformio.ini to FeatherM4 and swapped the huzzah physically with a...
On the Adafruit product page it is mentioned, that they use bit banging for i2c on that board. On the thread Kurt posted are people which mention that the 80Mhz of the huzzah might be too slow for slave mode. If it works with swapped roles the setup is likely ok.
I also just tried with a Teensy...
The code from the first post compiles fine here for teensy and platformio (latest).
What might cause the issue is some old globally installed library. My experience shows that using 3rd party libs globally installed likely causes issues. If you need a lib you can always use lib_deps = in...
Try to put the code without the serial setup stuff in some testfn. Call testfn from setup. Compile and objdump -D firmware.elf, look at testfn.
Here it is like this:
0000008c <_Z6testfnv>:
8c: b508 push {r3, lr}
8e: 2205 movs r2, #5...
If the other programs don't use the AMA driver they will not crash if there is a race condition or bug in this driver. If you google for kernel oops cdc_ama you find some issues, so upgrading to a kernel > 4.15 might help if it is not a big issue for you.
My opinion is, a user level program...
If you ask me, looking at the kernel oops, this might be a bug in the cdc_acm driver, any chance that you update the kernel and try again?
There might be a 5.x kernel available on 18.04, i think