Tool selection is a multi facetted question, and general language is only one factor, e.g.
- licensing, as you said
- The usual language differences, like you said in most other options
- Extensions to the language for embedded, both general and target specific, how more embedded the target, the more important this is
- library support, including per target headers
- cross compilation
- IDE integration
- Debugger support
Marco, can you expand on examples where fpc/Lazarus falls short compared to other options? It may help in improving the situation eventually.
For example fpc does not support handling of variables placed in sections for AVR target. I have proposed something to support this, but it isn't making progress. On the other hand a patch to place code in various sections, and dropping RTL initialization, has been accepted (also AVR specific).
There is a very long list of controller headers available in fpc, however it is not exhaustive. Often these headers can be generated automatically, so adding them is mostly a matter of knowing what is missing. This is not coordinated AFAIK, so contributions trickle in when an interested party investigates a particular new target.
A serious shortcoming I think is standard hardware support libraries for example I2C, USART, LCD etc.
Pascal specific debugger support for embedded is slowly growing via fpdebug. At this point only AVR is reasonably tested, with ESP32 support at an experimental level.
If we make the embedded specific needs better known, there is a chance of improving the status quo.