Having worked through my core installation issues on my Mac, I'm now apparently able to compile, link, and upload my sketch to my ESP8266/NodeMCU. I know the code works because I've compiled and uploaded the exact same code from the IDE. This blink sketch succeeds with the IDE.
Moving to adruino-cli, I'm able to compile, link and upload without error. Indeed, the process says "compressed...", "wrote...", and "Hash of data verified." But the NodeMCU does nothing. The LED doesn't blink as it does with the same sketch uploaded from the IDE.
I tried an experiment. I ran both IDE and CLI in verbose/debug modes. I extracted from the CLI log the upload line. I ran from the mac terminal the upload.py script on the elf file left behind by the IDE. That worked. I then tried using the same upload command on the elf file produced by 'arduino-cli compile'. The messages produced are almost the same except for:
Warning: Image file at 0x0 doesn't look like an image file, so not changing any flash settings.
Upon further inspection, the elf file produced by the IDE is 1,423,104 byes. The elf file produced by the CLI is 1,423,252 bytes. A small difference but a clear sign the the compile and link steps between the IDE and CLI are producing different binaries. But unfortunately those steps are to complex for me to understand.
How can I further try and identify whatever is going wrong with the CLI's compile process?