nanoqplus installation guide - for windows
TRANSCRIPT
Contents
§ Preparation- Hardware
• sensor nodes- Software
• nos2_toolpack_yyyymmdd.zip• nos-2.a.b-yyyymmdd.tar.gz
§ Installation & Setup- Compiler (WinAVR and/or MSPGCC) install- Cygwin install- Cygwin setup for NanoQplus
§ Run test applications- Compiling and fusing a test application- Hyper terminal setup- Check the application result
Supported Sensor Nodes
§ ATmega128 MCU
<MICAz> <ZigbeX II> <Nano24> <OCX-Z>§ MSP430 MCU§ MSP430 MCU
<UBee430> <Ubi-MSP430> <Ubi-Coin> <Hmote2420> <Tmote-SKY>§ Note:
- We also support ARM7, S12, 8051 (MANGO with KEIL, CC2430 with IAR) in non-public version of NanoQplus
Software
§ Download software from www.qplus.or.kr- NanoQplus
• nos-2.a.b-yyyymmdd.tar.gz
- NanoQplus Tool Package• nos2_toolpack_yyyymmdd.zip
§ Serial communicating program for a “com” port- Hyperterminal (on Windows) or others
§ Note - Software name might be little different because of version changes.
NanoQplus Tool Package Contents
- Compiler • WinAVR for Atmega128 (http://winavr.sourceforge.net)• MSPGCC for MSP430 (http://mspgcc.sourceforge.net)
- Development software• Cygwin (http://www.cygwin.com)
- Hardware Drivers- Hardware Drivers• USB to Serial driver (FTDI)• USBasp driver for Nano24 platform
- Fusing program• AVRDUDE for Atmega128 is included in WinAVR• MSP-bsl for MSP430 is included in NanoQplus source.
NanoQplus Installation Overview
- WinAVR for ATmega128
WinAVR(ATmega128)
MSPGCC(MSP430)
Cygwin HardwareDriver
HyperTerminalNanoQplus
- WinAVR for ATmega128• MICAz (crossbow)• Nano24 (octacomm)• ZigbeX (hanback)• OCX-Z (octacomm)
- MSPGCC for MSP430f1611• UBee430 (huins)• Ubi-MSP430, Ubi-Coin (hanback)• Hmote2420 (hybus)• Tmote-sky
WinAVR Installation (1/2)
§ Run WinAVR-20090306rc1-install.exe§ Select a language for installation
- Select any language.
7
WinAVR Installation (2/2)
§ Choose install location- Recommend to use the default setting
§ Choose components- MUST check all components
• WinAVR PATH must be added on Windows PATH
MSPGCC Installation
§ Run mspgcc-20081230.exe§ We do not recommend any changes.
- MSPGCC PATH must be added on Windows PATH
Cygwin Installation (1/4)
§ Run cygwin-20090312\setup.exe§ Choose a download source
- Choose “Install from local directory”• Recent version of some cygwin package may not be compatible with
NanoQplus
Cygwin Installation (2/4)
§ Select root install directory- Use the default setting if you are not an expert on linux.
• C:\cygwin
- Do not use blank in the middle of “Root Directory” path.• C:\Program Files\cygwin (X)
Cygwin Installation (3/4)
§ Select local package directory- Leave it as a default setting- or Select cygwin-20090312 folder in nos2_toolpack_20090312
Cygwin Installation (4/4)
§ Cygwin installation will be finished in 5minutes
§ Run cygwin- Cygwin will set up user configuration automatically at first execution- Close cygwin
Cygwin Setup for a beginner (1/4)
§ Configuration for NanoQplus- Copy .bash_profile and .vimrc in cygwin-20090312\config into
c:\cygwin\home\[windows_user_name]- In this example [windws_user_name] is haekim
Cygwin Setup for a beginner (2/4)
§ Copy NanoQplus source- Copy nos-2.4.0-20090312.tar.gz into
c:\cygwin\home
§ Run cygwin again§ Run cygwin again- # cd ..
• current location: ~ • ~ means home directory• in this example,
c:\cygwin\home\haekim or/home/haekim
- # tar xzvf nos-2.4.0-20090312.tar.gz • current location: /home
Cygwin Setup for a beginner (3/4)
§ Check extracted folder name- # ls- In this example, nos-2.4.0
§ Make a soft-link of NanoQplus source- # ln –s nos-2.4.0 nos
Cygwin Setup for a beginner (4/4)
§ Close cygwin§ Run cygwin again
- You will see the following screen
§ If you want to use another version of NanoQplus- Delete C:\cygwin\home\nos
• It is a soft-link of a directory- Back to the page 15
Cygwin Setup for an expert
§ 1. Extract NanoQplus source anywhere§ 2. Export $CYGWIN_HOME in your profile
- Example : bash shell, cygwin is installed on c:\cygwin• Add the following line in .bash_profile
¢ export $CYGWIN_HOME=/cygdrive/c/cygwin
§ 3-1. Export $NOS_HOME for NanoQplus source directory in your profileprofile
- Example: bash shell, nos source is in d:\nanoqplus\nos-2.4.0• Add the following line in .bash_profile
¢ export $NOS_HOME=/cygdrive/d/nanoqplus/nos-2.4.0
§ 3-2. Export $NOS_HOME as a fixed soft-link, and then link real source directory to it
- Example: bash shell, nos source is in d:\nanoqplus\nos-2.4.0• Add the following line in .bash_profile
¢ export $NOS_HOME=/cygdrive/d/nanoqplus/nos• Make soft-link on cygwin
¢ $ ln –s /cygdrive/d/nanoqplus/nos-2.4.0 /cygdrive/d/nanoqplus/nos
Connect Sensor Node
§ Connect sensor node to your computer- Through USB- Through USB and parallel port(old Nano24)- Through parallel and serial port (ZigbeX and very old Nano24)- Through serial port only (old MICAz [MIB510 interface])
§ Windows may request a driver for a sensor node if you connect it through USB
- Drivers are included in nos2_toolpack_20090312.zip
USBasp Driver (only for Nano24)
§ Nano24 needs for a USBasp driver- drivers\USBasp_Win32-0.1.12.1
USB to Serial Driver (1/2)
§ Every sensor node connected through USB needs for a driver
§ USB <-> Serial driver- drivers\FTDI(USB2Serial)\CDM 2.04.16 WHQL Certified-20090225
USB to Serial Driver (2/2)
§ USB Serial Port driver- drivers\FTDI(USB2Serial)\ CDM 2.04.16 WHQL Certified-20090225
Check Parallel Port for Fusing
§ Only for old ZigbeX, old Nano24 sensor nodes § My Computer (right click) à Properties à Hardware à
Device Manager- In this example, lpt1 is the parallel port for fusing- In case of some of laptop, parallel port is lpt3 even if it is shown as lpt1
on Device Manager.on Device Manager.
Check Serial Port for UART Comm. and/or Fusing
§ My Computer (right click) à Properties à Hardware àDevice Manager
- In this example, com4 is the serial port for UART comm
Run Test Application (1/6)
§ Run cygwin
§ Change directory to test-apps/arch-test/1_uart_put/
- # cd test-apps/arch-test/1_uart_put/
§ If there is no Makefile in application directory or Makefile is broken, link it (again) with $NOS_HOME/Makefile.kconf
- # rm Makefile (if an error is reported.)- # ln –s $NOS_HOME/Makefile.kconf Makefile
§ Run NanoQplus kernel configuration- # make menuconfig
Run Test Application (2/6)
§ You may see the following error if the cygwin window is too small
- Enlarge cygwin window using your mouse.
Run Test Application (3/6)
§ Select your platform§ Set Baudrate for UART module
- In this test application, we will use 115200
§ Select modules that you want to use- In this test application, Basic Functionsà LED module and UART - In this test application, Basic Functionsà LED module and UART
module
§ Save your kernel configuration
Run Test Application (4/6)
§ Compile your application- # make
§ Fusing your application- # make burn port=[fusing port]
• Generalcom1, com2, com3, …¢ com1, com2, com3, …
• For Nano24 interface2.0¢ usbasp
• For Nano24 interface1.x or old ZigbeX¢ lpt1, lpt3
§ Check UART comm port- Refer page 24.- You can run “# make motelist” also,
but we do not recommend.28
Run Test Application (5/6)
§ If you use com port for fusing, you may see an error.
- “avrdude” software does not recognize com port over 9.- “avrdude” software does not recognize com port over 9.- You need to change the com port number into 1~9- My Computer (right click) à Properties à Hardware à Device Manager à
“right click on the device” à Properties
Run Test Application (6/6)
§ If you use lpt port for fusing, you may see an error.
- To fix this problem, install “giveio” driver on your windows
• # install_giveio.bat• # status_giveio.bat (ß for checking)• # status_giveio.bat (ß for checking)
- If you see an error again, change the port number
• lpt1 à lpt3 (refer page 23.)
- or, you need to check Parallel mode of your computer
• Reboot your computer• Go setup (normally, press ‘Delete’ key)• Change Parallel mode into ECP mode• Save and exit
Hyperterminal Configuration for UART Communication (1/2)
§ For UART module, terminal program for serial port is needed
§ In Windows, hyperterminal program is included.- Start à Run à hypertrm
Hyperterminal Configuration for UART Communication (2/2)
Type anything for a local number
Baudrate in kernel configurationUART comm port
1_uart_put test applicationresult
§ You will see the following screen if you reset the sensor node.
You must disconnect before fusing through com port