Online link to the LEGO NXT firmware (v1.31) source code or IAR ARM LEGO development tools? I am looking for the source code to latest NXT firmware (v1.31).  I found the binary image is on LEGO site:
https://www.lego.com/en-us/themes/mindstorms/downloads, but no links to firmware source code that I could find (just the EV3, not the NXT).

Meanwhile, I found copies of LEGO NXT firmware v1.29 and v1.05 at: 
https://github.com/dlech/nxt-firmware/releases

I thought it might be based on (or included in):
http://mindboards.svn.sourceforge.net/svnroot/mindboards/lms_nbcnxc/branches/version_131/, but that link is apparently offline now, and I didn't see equivalent on mindboards' github:
https://github.com/mindboards

Finally, I also found a copy of modified firmware at:
http://nxt-firmware.ni.fr.eu.org/, but I was hoping for LEGO's stock firmware (v1.31) to evaluate as a baseline.

Bonus: does anyone have EWARM-LEGO (the free "LEGO Edition" of IAR's ARM compiler) archived?

Here's an archived view of the product:
https://web.archive.org/web/20110815231532/http://www.iar.com/website1/1.0.1.0/1483/1/

And a press release:
https://www.embedded.com/news-iar-systems-announces-free-development-environment-for-lego-mindstorms/

apparently this is no longer available or supported from the IAR site.

Thank you!
What you are asking for doesn't exist at this time.  The links you provide to github are not official LEGO products, but the work of an open source project as described on their home page that has chosen to correspond to the versions released by LEGO itself:


  This is NXT Improved Firmware, an open source community driven work based on
  the original LEGO Mindstorms NXT firmware.
  
  Online resources are accessible on the NXT Improved Firmware web page,
  including documentation, building guides, and more:
  
  http://nxt-firmware.ni.fr.eu.org/
  
  NXT Improved Firmware combines code covered by the LEGO Open Source License
  with code covered by various other open source licenses.  Any file not covered
  by the LEGO Open Source License includes a notice in its header.  All other
  source files are covered by the LEGO Open Source License.  Please see the
  enclosed "LEGO Open Source License" file for more precision on this license
  conditions.


You could file an issue on github and request that they update their project to track the upstream release, but there's no reason to assume they currently have the time and resources to do so.  You could offer to help, or look into what it would take to make the update you're asking for yourself.  Some github projects appreciate new contributions more than others, so I'd definitely open an issue to discuss it before doing a pull request or coding much myself.