Answers.Body: <p>I have been looking around a bit for the same files. I plan to contact Lego/IAR myself to try to find the official source code and development software, and will update this answer when I do. However, I did find some stuff that might help out.</p>
  <ul>
  <li>I was able to find a BitBucket repository that appears to have the
  source code to firmware 1.29. It can be found here:
  <a href="https://bitbucket.student.fiw.fhws.de:8443/projects/IN/repos/hackathon_nxt/browse" rel="nofollow noreferrer">https://bitbucket.student.fiw.fhws.de:8443/projects/IN/repos/hackathon_nxt/browse</a>.
  Look in the LEGO_Sources directory.</li>
  <li>The MinbBoards SVN repository appears to still be available, but at a slightly different URL (it appears that Sourceforge changed something on their back end). The URL is here: <a href="https://sourceforge.net/p/mindboards/code/HEAD/tree/" rel="nofollow noreferrer">https://sourceforge.net/p/mindboards/code/HEAD/tree/</a></li>
  </ul>
  <p>Between these two, it might be possible to figure out what changes were made in Firmware 1.31.</p>
  <p>As for compiling, IAR workbench for ARM has an evaulation tier now that is free, but with a code size restriction of 32kB. There are other options out there though. <a href="https://www.segger.com/products/development-tools/embedded-studio/" rel="nofollow noreferrer">Segger's Embedded Studio</a> is free without size restrictions as long as you do not use it commercially. Additionally, it appears that the <a href="http://nxtgcc.sourceforge.net/" rel="nofollow noreferrer">NXTGCC project</a> is a system that allows compiling firmware for the NXT using GCC instead of IAR.</p>
  <p>EDIT1: If you are more of a fan of Git than Subversion, I have ported the MindBoards SVN project to GitHub. You can find it here: <a href="https://github.com/Marsfan/NXT-Enhanced" rel="nofollow noreferrer">https://github.com/Marsfan/NXT-Enhanced</a>.</p>
  <p>I have a second repository with the 1.07 code, but that will likely go away as I work to merge that in as a separate branch to the above linked repository.</p>
  <p>EDIT2:</p>
  <p>So I realized that I never updated this after contacting IAR. I got a response saying that the Lego Mindstorms NXT IAR tool set was a combination of their other products</p>
  <ol>
  <li>IAR EWARM (Embedded Workbench for ARM)</li>
  <li>IAR EWAVR (Embedded Workbench for AVR)</li>
  <li>IAR EWVS (Visual State)</li>
  </ol>
  <p>When I contacted them, they provided me with a link to download VisualState, and they said that the free tiers of Embedded Workbench should work for development. The free tier's main limitation is on code size, so I don't know if it is possible to compile the full set of software.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-18T16:27:28.863Z
Answers.Text: Have you been able to get the NXT source for 1.31? I wrote Lego but they refuse to give the source code because the product was discontinued many years ago. I'm really unsure at that point if I just wasn't able to overcome the first level support or if they really lost the code or didn't want to publish it
Answers.UserDisplayName: Andy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-16T00:31:58.330Z
Answers.LastActivityDate: 2022-06-10T05:55:04.403Z
Answers.LastEditDate: 2022-06-10T05:55:04.403Z
Answers.UserDisplayName: BarrowWight
Answers.Body: <p>For people looking for older versions of the LEGO MINDSTORMS NXT Firmware Open Source you might be interested to know that IAR Systems, suppliers of the IAR Embedded Workbench used by LEGO, hosted a link to v1.04* from 2009 onwards:</p>
  <ul>
  <li>Via <a href="https://web.archive.org/web/20090416064958/http://www.iar.com:80/website1/1.0.1.0/1483/1/" rel="nofollow noreferrer">the Internet Archive's Wayback Machine</a></li>
  <li>Which referenced <a href="ftp://ftp.iar.se/WWWfiles/code_examples/LEGO_MINDSTORMS_NXT_Firmware_Open_Source.zip" rel="nofollow noreferrer">LEGO_MINDSTORMS_NXT_Firmware_Open_Source.zip</a> on their FTP server.</li>
  </ul>
  <p>The IAR Systems FTP service isn't operating any more, but as of today you can still change the method from ftp:// to http:// so to download the 1.6MiB .zip file.</p>
  <p>* based on <code>#define   FIRMWAREVERSION               0x0104 //1.04</code> in the <code>c_loader.iom</code> file.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-26T13:51:56.807Z
Answers.LastActivityDate: 2022-01-26T13:51:56.807Z
Answers.UserDisplayName: AlwaysLearning
Answers.Body: <p>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 <a href="https://github.com/dlech/nxt-firmware" rel="nofollow noreferrer">described on their home page</a> that has chosen to correspond to the versions released by LEGO itself:</p>
  
  <blockquote>
    <p>This is NXT Improved Firmware, an open source community driven work based on
    the original LEGO Mindstorms NXT firmware.</p>
    
    <p>Online resources are accessible on the NXT Improved Firmware web page,
    including documentation, building guides, and more:</p>
    
    <p><a href="http://nxt-firmware.ni.fr.eu.org/" rel="nofollow noreferrer">http://nxt-firmware.ni.fr.eu.org/</a></p>
    
    <p>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.</p>
  </blockquote>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-17T15:34:43.920Z
Answers.Text: Hi -- thank you for the reply.  My hope is that the v1.31 firmware used to be available, and someone has a copy or knows of another open source project that archived the original as part of their modded project (like the nxt-firmware github site apparently archived v1.29 and 1.05 separately).
Answers.UserDisplayName: bitbob
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-16T15:05:22.450Z
Answers.LastActivityDate: 2020-05-16T15:05:22.450Z
Answers.UserDisplayName: chicks
Body: <p>I am looking for the source code to latest NXT firmware (v1.31).  I found the binary image is on LEGO site:
  <a href="https://www.lego.com/en-us/themes/mindstorms/downloads" rel="noreferrer">https://www.lego.com/en-us/themes/mindstorms/downloads</a>, but no links to firmware source code that I could find (just the EV3, not the NXT).</p>
  
  <p>Meanwhile, I found copies of LEGO NXT firmware v1.29 and v1.05 at: 
  <a href="https://github.com/dlech/nxt-firmware/releases" rel="noreferrer">https://github.com/dlech/nxt-firmware/releases</a></p>
  
  <p>I thought it might be based on (or included in):
  <a href="http://mindboards.svn.sourceforge.net/svnroot/mindboards/lms_nbcnxc/branches/version_131/" rel="noreferrer">http://mindboards.svn.sourceforge.net/svnroot/mindboards/lms_nbcnxc/branches/version_131/</a>, but that link is apparently offline now, and I didn't see equivalent on mindboards' github:
  <a href="https://github.com/mindboards" rel="noreferrer">https://github.com/mindboards</a></p>
  
  <p>Finally, I also found a copy of modified firmware at:
  <a href="http://nxt-firmware.ni.fr.eu.org/" rel="noreferrer">http://nxt-firmware.ni.fr.eu.org/</a>, but I was hoping for LEGO's stock firmware (v1.31) to evaluate as a baseline.</p>
  
  <p>Bonus: does anyone have EWARM-LEGO (the free "LEGO Edition" of IAR's ARM compiler) archived?</p>
  
  <p>Here's an archived view of the product:
  <a href="https://web.archive.org/web/20110815231532/http://www.iar.com/website1/1.0.1.0/1483/1/" rel="noreferrer">https://web.archive.org/web/20110815231532/http://www.iar.com/website1/1.0.1.0/1483/1/</a></p>
  
  <p>And a press release:
  <a href="https://www.embedded.com/news-iar-systems-announces-free-development-environment-for-lego-mindstorms/" rel="noreferrer">https://www.embedded.com/news-iar-systems-announces-free-development-environment-for-lego-mindstorms/</a></p>
  
  <p>apparently this is no longer available or supported from the IAR site.</p>
  
  <p>Thank you!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-16T16:24:18.477Z
Comments.Text: Wdym "binary image"? Can you send the specific link to that, or are you unable to embed it (which means that we have to find it ourselves)?
Comments.UserDisplayName: mindstormsboi
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-17T15:31:20.243Z
Comments.Text: Sorry, I didn't copy the direct firmware link: https://www.lego.com/cdn/cs/set/assets/blt3502cca1438605b8/Firmware131_Download1.zip  ... as I was afraid LEGO might change the link (it is at the "downloads" page above,  labeled "NXT Firmware Download").  The "binary image" meaning the ZIP download only has LEGO MINDSTORMS NXT Firmware V1.31.rfw and no source code like LEGO has for EV3.
Comments.UserDisplayName: bitbob
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-14T00:39:19.410Z
Comments.Text: @mindstormsboi "Binary Image" or often just "Binary" is a fairly common term to refer the compiled output of a computer program (i.e. the `.lib`, `.dll` or `.exe` files), as opposed to the source code, which is typically text based.
Comments.UserDisplayName: Zhaph - Ben Duguid
Tags: <nxt><programming>
Title: Online link to the LEGO NXT firmware (v1.31) source code or IAR ARM LEGO development tools?
UserDisplayName: bitbob
ThreadText: # Online link to the LEGO NXT firmware (v1.31) source code or IAR ARM LEGO development tools?
  
  (Asked by: username_0 on 2020-05-15)
  
  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!
  
  **Tags:** nxt, programming
  
  > **Comments:**
  > **username_1**: Wdym "binary image"? Can you send the specific link to that, or are you unable to embed it (which means that we have to find it ourselves)?  
  > **username_0**: Sorry, I didn't copy the direct firmware link: https://www.lego.com/cdn/cs/set/assets/blt3502cca1438605b8/Firmware131_Download1.zip  ... as I was afraid LEGO might change the link (it is at the "downloads" page above,  labeled "NXT Firmware Download").  The "binary image" meaning the ZIP download only has LEGO MINDSTORMS NXT Firmware V1.31.rfw and no source code like LEGO has for EV3.  
  > **username_2**: @username_1 "Binary Image" or often just "Binary" is a fairly common term to refer the compiled output of a computer program (i.e. the `.lib`, `.dll` or `.exe` files), as opposed to the source code, which is typically text based.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_3 on 2021-01-16. Score: 6
  
  I have been looking around a bit for the same files. I plan to contact Lego/IAR myself to try to find the official source code and development software, and will update this answer when I do. However, I did find some stuff that might help out.
  
  * I was able to find a BitBucket repository that appears to have the
    source code to firmware 1.29. It can be found here:
    <https://bitbucket.student.fiw.fhws.de:8443/projects/IN/repos/hackathon_nxt/browse>.
    Look in the LEGO\_Sources directory.
  * The MinbBoards SVN repository appears to still be available, but at a slightly different URL (it appears that Sourceforge changed something on their back end). The URL is here: <https://sourceforge.net/p/mindboards/code/HEAD/tree/>
  
  Between these two, it might be possible to figure out what changes were made in Firmware 1.31.
  
  As for compiling, IAR workbench for ARM has an evaulation tier now that is free, but with a code size restriction of 32kB. There are other options out there though. [Segger's Embedded Studio](https://www.segger.com/products/development-tools/embedded-studio/) is free without size restrictions as long as you do not use it commercially. Additionally, it appears that the [NXTGCC project](http://nxtgcc.sourceforge.net/) is a system that allows compiling firmware for the NXT using GCC instead of IAR.
  
  EDIT1: If you are more of a fan of Git than Subversion, I have ported the MindBoards SVN project to GitHub. You can find it here: <https://github.com/Marsfan/NXT-Enhanced>.
  
  I have a second repository with the 1.07 code, but that will likely go away as I work to merge that in as a separate branch to the above linked repository.
  
  EDIT2:
  
  So I realized that I never updated this after contacting IAR. I got a response saying that the Lego Mindstorms NXT IAR tool set was a combination of their other products
  
  1. IAR EWARM (Embedded Workbench for ARM)
  2. IAR EWAVR (Embedded Workbench for AVR)
  3. IAR EWVS (Visual State)
  
  When I contacted them, they provided me with a link to download VisualState, and they said that the free tiers of Embedded Workbench should work for development. The free tier's main limitation is on code size, so I don't know if it is possible to compile the full set of software.
  
  > **Comments:**
  > **username_4**: Have you been able to get the NXT source for 1.31? I wrote Lego but they refuse to give the source code because the product was discontinued many years ago. I'm really unsure at that point if I just wasn't able to overcome the first level support or if they really lost the code or didn't want to publish it  
  
  ---
  
  ### Answer by username_5 on 2022-01-26. Score: 3
  
  For people looking for older versions of the LEGO MINDSTORMS NXT Firmware Open Source you might be interested to know that IAR Systems, suppliers of the IAR Embedded Workbench used by LEGO, hosted a link to v1.04\* from 2009 onwards:
  
  * Via [the Internet Archive's Wayback Machine](https://web.archive.org/web/20090416064958/http://www.iar.com:80/website1/1.0.1.0/1483/1/)
  * Which referenced [LEGO\_MINDSTORMS\_NXT\_Firmware\_Open\_Source.zip](ftp://ftp.iar.se/WWWfiles/code_examples/LEGO_MINDSTORMS_NXT_Firmware_Open_Source.zip) on their FTP server.
  
  The IAR Systems FTP service isn't operating any more, but as of today you can still change the method from ftp:// to http:// so to download the 1.6MiB .zip file.
  
  \* based on `#define FIRMWAREVERSION 0x0104 //1.04` in the `c_loader.iom` file.
  
  
  ---
  
  ### Answer by username_6 on 2020-05-16. Score: 3
  
  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](https://github.com/dlech/nxt-firmware) 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.
  
  > **Comments:**
  > **username_0**: Hi -- thank you for the reply.  My hope is that the v1.31 firmware used to be available, and someone has a copy or knows of another open source project that archived the original as part of their modded project (like the nxt-firmware github site apparently archived v1.29 and 1.05 separately).  
  
  ---
  
  