I used to work for Nokia Research during the mid 2000's. I remember how hard it was to get the source code for this back then as internal employees... One of my colleagues was working on a research prototype that needed tighter integration with the system than what you could achieve with a deployed app. So he needed the source code and the build environment for the OS.
And for that he needed quite a few people to agree and he had to sign an NDA (again, as an employee, not a subcontractor!). Then, of course the whole thing was pretty hard to make work on his machine.
Later on I did some work with the (public) SDK as well. The build system was based on the GNU toolchain. More precisely, a windows port of the GNU toolchain, so it would only work on windows. But even on windows it had a lot of warts (because these tools were build for unix in the first place, so e.g. drive letters and back slashes were problematic). As far as I can remember, a lot of the build tools were written in perl. There was some script to generate makefiles for your project and even that, as far as I can remember had a front end script. (I remember something called MAKMAKE.BAT, but I may be wrong.)
The whole thing was a pretty frustrating experience. And we haven't talked about the libraries, the OS (cooperative multi tasking, everything is a callback) or memory management ('descriptors' that made trivial string operations a pain). No wonder it couldn't keep up with android and ios. Now, to be fair, the OS was based on a core and concepts created in the mid 1990s to allow software development on devices with 64k of memory or something. But even with several megabytes of RAM (so the early 2000s), that programming model was obviously way too constraining.