User Tools

Site Tools


nblocksstudio:installation_for_nblocksstudio1.0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
nblocksstudio:installation_for_nblocksstudio1.0 [2018/09/13 04:23]
engineer [Use n-Blocks Studio]
nblocksstudio:installation_for_nblocksstudio1.0 [2020/08/22 04:11] (current)
engineer ↷ Page name changed from nblocksstudio:installation to nblocksstudio:installation_for_nblocksstudio1.0
Line 1: Line 1:
-======nBlocksStudio installation====== +<WRAP classes width :​language>​ 
-**nBlocksStudio** is using mbed-cli infrastructure including GCC compiler, for the microprocessor code compilation.\\+ 
 +</​WRAP>​ 
 + 
 +======nBlocksStudio1.0 Installation====== 
 + 
 +**nBlocksStudio1.0** is using mbed-cli infrastructure including GCC compiler, for the microprocessor code compilation.\\
 The Graphical interface is written in Python and is accessing the n-Blocks.net server when it starts, to get the definition of the Nodes\\ The Graphical interface is written in Python and is accessing the n-Blocks.net server when it starts, to get the definition of the Nodes\\
    
Line 11: Line 16:
  
   * Download 32 bit windows installer for Python 2.7 (dont use 64bit Python installer, issues with pip)   * Download 32 bit windows installer for Python 2.7 (dont use 64bit Python installer, issues with pip)
-  * Configure installer for adding Python path to system path and complete Python 2.7 installation+  ​* **Configure installer for adding Python path to system path** and complete Python 2.7 installation
   * Restart Windows (otherwise pip fails)   * Restart Windows (otherwise pip fails)
   * Test Python ​ and pip from command line: <​code>​Python --version ​   * Test Python ​ and pip from command line: <​code>​Python --version ​
Line 17: Line 22:
 </​code>​ </​code>​
 Both should work from any directory\\  ​ Both should work from any directory\\  ​
-If pip version is later than 9.0.3 mbed-cli might not work (( [[https://​github.com/​ARMmbed/​mbed-os/​issues/​6763]] )), so change to 9.0.3: <​code>​Python ​pip install -U pip==9.0.3 </​code>​+If pip version is later than 9.0.3 mbed-cli might not work (( [[https://​github.com/​ARMmbed/​mbed-os/​issues/​6763]] )), so change to 9.0.3: <​code>​ pip install -U pip==9.0.3 </​code>​
  
  
Line 47: Line 52:
   * Install mbed cli from command prompt: <​code>​ pip install mbed-cli </​code> ​   * Install mbed cli from command prompt: <​code>​ pip install mbed-cli </​code> ​
   * Verify mbed installation:​ <​code>​ mbed --version </​code>​   * Verify mbed installation:​ <​code>​ mbed --version </​code>​
 +  * 07-March-2020,​ install Microsoft Visual C++ Compiler for Python 2.7:  (([[ http://​aka.ms/​vcpython27]]))
 \\ \\
 \\ \\
Line 68: Line 74:
 ===How to create new mbed-cli project for OS2 or OS5=== ​ ===How to create new mbed-cli project for OS2 or OS5=== ​
 References: (([[https://​github.com/​ARMmbed/​mbed-cli#​creating-and-importing-programs|mbed-cli:​ creating and importing programs]] )) References: (([[https://​github.com/​ARMmbed/​mbed-cli#​creating-and-importing-programs|mbed-cli:​ creating and importing programs]] ))
-  *new OS2 project:<​code>​ mbed new project1 </​code>​  +  *new OS5 project:<​code>​ mbed new project1 </​code>​  
-  *new OS5 project:<​code>​ mbed new project2 --mbedlib </​code>​+  *new OS2 project:<​code>​ mbed new project2 --mbedlib </​code>​
   *new OS5 project at current directory:<​code>​ mbed new . </​code>​   *new OS5 project at current directory:<​code>​ mbed new . </​code>​
 +
 +
 +===Alternative method to import OS2 program from mbed online compiler=== ​
 +I had issues with the import method described above. This Alternative method works.Tested for Target LPC11U35_401 [20 May 2020] 
 +  * From mbed online compiler right-click on a **Program** in the **Program Workspace**:​ Export Program using <​code>​ Export</​code>​ Toolchain <​code>​ZIP archive (with repositories)</​code>​
 +  * Extract the ZIP file to a Temporary folder.
 +  * Create a new folder as new mbed OS2 project. This folder will be the project working folder: <​code>​ mbed new project_name --mbedlib </​code>​
 +  * **From Inside** the Temporary folder copy all files and folders.
 +  * Paste the copied files and folders, to **project_name** folder created from  **mbed new project_name --mbedlib**
 +      * Just overwrite existing files when Windows asks
 +  * From Command line Compile: <​code>​mbed compile -t GCC_ARM -m LPC11U35_401</​code>​
 +
  
  
Line 97: Line 115:
 pip install pyuserinput pip install pyuserinput
 </​code>​ </​code>​
-  + 
-  * Download the studio from [[https://​bitbucket.org/​nimbus_it/​prj_nblocksstudio |bitbucket]],​ using command line: <​code>​ hg clone https://​bitbucket.org/​nimbus_it/​prj_nblocksstudio </​code> ​+  * Download the studio from [[https://nimbus_it@bitbucket.org/​nblocksstudio/​prj_nblocksstudio |bitbucket]],​ using command line: <​code>​ hg clone https://nimbus_it@bitbucket.org/​nblocksstudio/​prj_nblocksstudio</​code> ​
   * Or update an existing nBlocksStudio directory using command line, but from inside the directory <​code>​ hg update </​code> ​   * Or update an existing nBlocksStudio directory using command line, but from inside the directory <​code>​ hg update </​code> ​
   * Copy **mbed_code** outside the version controlled directory, so it will not be affected by future updates of the studio   * Copy **mbed_code** outside the version controlled directory, so it will not be affected by future updates of the studio
   * Go to  **the new mbed_code** folder with command line   * Go to  **the new mbed_code** folder with command line
-  * Create new mbed OS2 project inside the new folder: <​code>​ ...\mbed_code>​ mbed new . --mbedlib </​code> ​+  * Create new mbed **OS2** project inside the new folder: ​(preferable for now, OS5 is not tested well yet with nStudio) ​<​code>​ ...\mbed_code>​ mbed new . --mbedlib </​code>​ 
 +  * Or  a  new mbed **OS5** project inside the new folder: <​code>​ ...\mbed_code>​ mbed new .   </​code>​  
 + 
   * Add any missing libraries: <​code>​ ...\mbed_code>​ mbed deploy </​code>​   * Add any missing libraries: <​code>​ ...\mbed_code>​ mbed deploy </​code>​
 \\ \\
Line 110: Line 130:
  
 ====Use n-Blocks Studio==== ====Use n-Blocks Studio====
-  * Login to your nBlocksStudio (([[http://​www.n-blocks.net |nBlocksStudio page]])) account and add **nodes** to your account {{:​nblocks:​nblocksstudio-03.jpg?​1000|}}+  * Login to your nBlocksStudio (([[https://​www.n-blocks.net/studio|nBlocksStudio page]])) account and add **nodes** to your account {{:​nblocks:​nblocksstudio-03.jpg?​1000|}}
 \\ \\
   * Start nBlocksStudio,​ from **Studio** folder with command line:   * Start nBlocksStudio,​ from **Studio** folder with command line:
  
   ....\Studio\Launch.cmd   ....\Studio\Launch.cmd
 +
 +
 +  * On 07.02.2019 I had to edit nworkbench.py,​ to change[t]kinter to [T]kinter\\ ​
 +  * On 05.03.2020 this does not seem to be needed any more...\\ ​
 + <​code>​ from tkinter import TclError</​code>​ to <​code>​from Tkinter import TclError </​code>​
 +  * ...and to install missing python modules:​\\ ​
 + <​code>​ pip install enum </​code> ​
 + <​code>​ pip install pywinusb</​code> ​
 +  * ...one more March 2020:​\\ ​
 + <​code>​ pip install requests</​code>  ​
    
 When exporting, save into the file **main.cpp** inside folder **mbed_code**,​ and build with: When exporting, save into the file **main.cpp** inside folder **mbed_code**,​ and build with:
  
   C:​....\mbed_code>​ mbed compile -t GCC_ARM -m LPC1768   C:​....\mbed_code>​ mbed compile -t GCC_ARM -m LPC1768
-To create the .bin file. (at ...\mbed_code\BUILD\LPC1768\GCC_ARM)\\ +Above creates a [.binfile. (at ...\mbed_code\BUILD\LPC1768\GCC_ARM)\\ 
-Or use a batch file like LPC17687.cmdLPC11u35.cmdL432KC.cmdL152RE,\\ +To automate the build process and use a different target n-Block/​processor,​ call one of the **[tested]** ​batch files 
-To automate the build process.\\+  * LPC1768.cmd (n-Bed) 
 +  * LPC11u35.cmd ​(n-DAP) 
 +  * L432KC.cmd ​  (n-LP) 
 +  * L152RE.cmd   ​(n-L15n-CPU48) 
 +\\ 
 +\\ 
 +\\
  
  
 +====4 bit binary counter example with n-Blocks Studio====
 {{:​nblocks:​nblocksstudio-02.jpg?​1000|}}\\ {{:​nblocks:​nblocksstudio-02.jpg?​1000|}}\\
  This example diagram (a 4 bit binary counter) creates the main.cpp below:  This example diagram (a 4 bit binary counter) creates the main.cpp below:
nblocksstudio/installation_for_nblocksstudio1.0.1536827022.txt.gz · Last modified: 2018/09/13 09:23 (external edit)