{"id":194,"date":"2015-02-24T22:30:29","date_gmt":"2015-02-24T21:30:29","guid":{"rendered":"http:\/\/www.sevenwatt.com\/main\/?page_id=194"},"modified":"2016-01-10T14:09:45","modified_gmt":"2016-01-10T13:09:45","slug":"flashing-the-firmware-image","status":"publish","type":"page","link":"https:\/\/www.sevenwatt.com\/main\/picos-arm\/flashing-the-firmware-image\/","title":{"rendered":"Picos ARM &#8211; Flashing the firmware image (Windows)"},"content":{"rendered":"<p>Once the new LPC8xx firmware has been build, it can be programmed into the LPC8xx. The LPC8xx needs to be connected to the computer through a USB-serial adapter. A commonly used adapter is the USB-BUB available at\u00a0\u00a0<a href=\"http:\/\/moderndevice.com\/product\/usb-bub-ii\/\" target=\"_blank\">Modern Devices<\/a>\u00a0and\u00a0<a href=\"http:\/\/www.digitalsmarties.net\/products\/usb-bub\" target=\"_blank\">The Jeelabs Shop<\/a>. This adapter needs a minor modification with a soldering iron, as described on this <a href=\"http:\/\/jeelabs.org\/book\/1446d\/\" target=\"_blank\">Jeelabs blog<\/a>.<\/p>\n<p>To get things going we need to do the following:<\/p>\n<ol>\n<li>Installing a program to Flash the LPC8xx.<\/li>\n<li>Knowing the COM-port.<\/li>\n<li>Configuring the flash application.<\/li>\n<\/ol>\n<p>This article is following the article on installing the Eclipse IDE and assumes a firmware image has been build.<\/p>\n<h2>1. Installing FlashMagic<\/h2>\n<p>A very nice tool to program the LPC8xx is FlashMagic. A free non-commercial use version can be downloaded form the <a href=\"http:\/\/www.flashmagictool.com\" target=\"_blank\">FlashMagic.com<\/a> website:<\/p>\n<p><a href=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicDownload.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-256\" alt=\"FlashMagicDownload\" src=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicDownload.png\" width=\"1031\" height=\"540\" srcset=\"https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicDownload.png 1031w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicDownload-300x157.png 300w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicDownload-1024x536.png 1024w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicDownload-624x326.png 624w\" sizes=\"auto, (max-width: 1031px) 100vw, 1031px\" \/><\/a><\/p>\n<p>Select the indicated button to download the Windows version. Run the Windows installer (FlashMagic.exe), press\u00a0<strong>Next<\/strong>, accept the license, press\u00a0<strong>Next<\/strong>. Install in the default suggested location (do NOT modify) and press\u00a0<strong>Next<\/strong>\u00a0and <strong>Next<\/strong>\u00a0again. Now <strong>deselect<\/strong> the &#8220;<em>Install NXP LPC USB drivers<\/em>&#8220;:<\/p>\n<p><a href=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicInstall.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-257\" alt=\"FlashMagicInstall\" src=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicInstall.png\" width=\"513\" height=\"398\" srcset=\"https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicInstall.png 513w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicInstall-300x232.png 300w\" sizes=\"auto, (max-width: 513px) 100vw, 513px\" \/><\/a><\/p>\n<p>Press\u00a0<strong>Next<\/strong>\u00a0 and press\u00a0<strong>Install<\/strong>. After the files are installed, press\u00a0<strong>Finish<\/strong>. Close Notepad with the release notes once done. FlashMagic is now installed and can be found in the Start menu.<\/p>\n<h2>2. Finding the COM-port<\/h2>\n<p>When using the usb-serial device on a Windows computer it is always a surprise which COM port it gets assigned. Luckily, nowadays it is always the same COM number for a specific device.<\/p>\n<p>Connect the USB-serial device<\/p>\n<p><a href=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/USBBUBLPC810.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-265\" alt=\"USBBUBLPC810\" src=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/USBBUBLPC810.jpg\" width=\"604\" height=\"214\" srcset=\"https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/USBBUBLPC810.jpg 604w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/USBBUBLPC810-300x106.jpg 300w\" sizes=\"auto, (max-width: 604px) 100vw, 604px\" \/><\/a><\/p>\n<p>Open the device manager. For example through <strong>Windows-key+Pause<\/strong>, -&gt;\u00a0<strong>Device Manager<\/strong> (in the upper right corner of the dialogue). <strong>Expand<\/strong> \u00a0&#8220;<em>Ports (COM &amp; LPT)<\/em>&#8220;:<\/p>\n<p><a href=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/DevManCOM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-258\" alt=\"DevManCOM\" src=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/DevManCOM.png\" width=\"481\" height=\"488\" srcset=\"https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/DevManCOM.png 481w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/DevManCOM-295x300.png 295w\" sizes=\"auto, (max-width: 481px) 100vw, 481px\" \/><\/a><\/p>\n<p>Here you will find the USB-serial adapter, when it is connected. When you have multiple connected, disconnect the one you are looking for, and after a few seconds reconnect. Observe which one disappears and reappears. In this case, the adapter is <span style=\"text-decoration: underline;\">connected to\u00a0<em>COM5<\/em><\/span> as indicated in blue.<\/p>\n<h2>3. Configuring FlashMagic for the LPC810<\/h2>\n<p>Start FlashMagic form the Start-menu:<\/p>\n<p><a href=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-260\" alt=\"FlashMagicCfg1\" src=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg1.png\" width=\"493\" height=\"526\" srcset=\"https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg1.png 493w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg1-281x300.png 281w\" sizes=\"auto, (max-width: 493px) 100vw, 493px\" \/><\/a><\/p>\n<p>Press the\u00a0<strong>Select<\/strong> button in the upper right corner. Here we have to find the proper type of LPC that we want to program. In the list, scroll upwards (Make sure &#8220;<em>ARM Cortex<\/em>&#8221; is expanded):<\/p>\n<p><a href=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-259\" alt=\"FlashMagicCfg2\" src=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg2.png\" width=\"497\" height=\"356\" srcset=\"https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg2.png 497w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg2-300x214.png 300w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/a><\/p>\n<p>Now select &#8220;LPC810M021FN8&#8221; by double-clicking the entry. This is a type indication for the LPC8xx we are using in its exact package. For other LPC8xx projects the selection is less obvious as you have to know the package (number of pins, form factor). But for the LPC810 there is only the 8 pin DIP package. Further settings:<\/p>\n<p><strong>COM Port:<\/strong>\u00a0<em>COM5<\/em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 (fill in your specific COM-port)<br \/>\n<strong>Baud Rate:<\/strong>\u00a0<em>115200<\/em><br \/>\n<strong>Oscillator (MHz)<\/strong><strong>:<\/strong>\u00a0<em>12<\/em><br \/>\n<strong>Check<\/strong>\u00a0<em>&#8220;erase blocks used by Hex File&#8221;<\/em><strong><\/strong><br \/>\n<strong>Check<\/strong>\u00a0<em>&#8220;Verify after programming&#8221;<\/em><br \/>\nPress\u00a0<strong>Browse<\/strong> to select the firmware.hex file that we want to flash.<br \/>\nin the dialogue that opens select the folder\u00a0<strong>C:\\workspace\\HelloLPC\\build<\/strong>\u00a0and in there select\u00a0<strong>firmware.hex<\/strong> :<\/p>\n<p><a href=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-261\" alt=\"FlashMagicCfg3\" src=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg3.png\" width=\"571\" height=\"423\" srcset=\"https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg3.png 571w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg3-300x222.png 300w\" sizes=\"auto, (max-width: 571px) 100vw, 571px\" \/><\/a><\/p>\n<p>Press\u00a0<strong>Open<\/strong> and now the FlashMagic panel should look like this:<\/p>\n<p><a href=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-262\" alt=\"FlashMagicCfg4\" src=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg4.png\" width=\"493\" height=\"526\" srcset=\"https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg4.png 493w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg4-281x300.png 281w\" sizes=\"auto, (max-width: 493px) 100vw, 493px\" \/><\/a><\/p>\n<p>Make sure your LPC810 is connected to the USB-serial device (see for example this blog) and press\u00a0<strong>Start<\/strong> to flash the LPC810. After a few moments, the new program is stored in the LPC810 and has started executing. FlashMagic will report success on the bottom line by saying\u00a0<span style=\"color: #339966;\">Finished<span style=\"color: #000000;\">:<\/span><span style=\"color: #000000;\"><br \/>\n<\/span><\/span><\/p>\n<p><a href=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-263\" alt=\"FlashMagicCfg5\" src=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg5.png\" width=\"493\" height=\"526\" srcset=\"https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg5.png 493w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicCfg5-281x300.png 281w\" sizes=\"auto, (max-width: 493px) 100vw, 493px\" \/><\/a><\/p>\n<p>When to program produces serial output, In FlashMagic a terminal can be opened on the main menu\u00a0<strong>Tool -&gt; Terminal&#8230;<\/strong> Set &#8220;<em>COM Port<\/em>&#8221; to the usb-serial COM-port, and &#8220;B<em>aud Rate&#8221;<\/em> to 115200. Press\u00a0<strong>OK<\/strong> and a terminal windows opens. It is not the best or fastest, but helps for a quick check<\/p>\n<p><a href=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicTerm.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-264\" alt=\"FlashMagicTerm\" src=\"\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicTerm.png\" width=\"673\" height=\"197\" srcset=\"https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicTerm.png 673w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicTerm-300x87.png 300w, https:\/\/www.sevenwatt.com\/main\/wp-content\/uploads\/2015\/02\/FlashMagicTerm-624x182.png 624w\" sizes=\"auto, (max-width: 673px) 100vw, 673px\" \/><\/a><\/p>\n<p>This and the previous article has shown how to build and flash Jeelabs Embello programs on Windows PC with a true IDE. Further articles will be dedicated to debug options and more automation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Once the new LPC8xx firmware has been build, it can be programmed into the LPC8xx. The LPC8xx needs to be connected to the computer through a USB-serial adapter. A commonly used adapter is the USB-BUB available at\u00a0\u00a0Modern Devices\u00a0and\u00a0The Jeelabs Shop. This adapter needs a minor modification with a soldering iron, as described on this Jeelabs [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":186,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-194","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/pages\/194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/comments?post=194"}],"version-history":[{"count":7,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/pages\/194\/revisions"}],"predecessor-version":[{"id":579,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/pages\/194\/revisions\/579"}],"up":[{"embeddable":true,"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/pages\/186"}],"wp:attachment":[{"href":"https:\/\/www.sevenwatt.com\/main\/wp-json\/wp\/v2\/media?parent=194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}