For reasons discussed long ago and that have to do with how ld handles weak symbols, it was decided that it was preferable to link using an explicit list of object files, instead of adding object files to an archive first and then linking using this archive. This was applied for the CC2538, but not for CC13xx/CC26xx.
This pull applies this link logic to all CM3s. For this to work with the Contiki-NG build system, we need `.SECONDEXPANSION:`, so this pull moves that to the common CM3 Makefile.
This commit fixes two bugs related to the usage of MODULES for CC2538-based platforms:
* newlib is no longer under `lib/newlib` but under `os/lib/newlib`.
* There is no such thing as `sys` under `arm/common`, so this module is removed.
Some platforms provide this header file because some examples used to assume its presence. Now that the examples no longer make this assumption, those stub headers are no longer required.
Previously, the CC2538 port would compile USB-related files from their original location under the CC2531 CPU dir. We are now removing the latter, but we need to keep those files.