WeMos Lolin32: invalid memory address or nil pointer dereference

Hi @MianQi. you have the FQBN of your ESP32 board wrong in the -b flag of your arduino-cli compile command.

You can learn the correct FQBN of each of the boards you have installed by running this command:

arduino-cli board listall

You can also search for a specific board with the arduino-cli board search command.


Even though it is expected for the command to fail when you use an incorrect FQBN, it is not intended for Arduino CLI to output this cryptic stack dump. That user unfriendly output was caused by a bug, which was fixed last week:

There hasn't been a new release of Arduino CLI since that fix, so the ugly output still occurs when using Arduino CLI 0.20.2, but the fix will be in the next release.

But the bug is only cosmetic and you won't encounter it once you use the correct FQBN.