2. 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
2
haekim@etri.re.kr
3. Supported Sensor Nodes
§ ATmega128 MCU
<MICAz> <ZigbeX II> <Nano24> <OCX-Z>
§ 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
3
haekim@etri.re.kr
4. 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.
4
haekim@etri.re.kr
5. 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
• 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.
5
haekim@etri.re.kr
7. WinAVR Installation (1/2)
§ Run WinAVR-20090306rc1-install.exe
§ Select a language for installation
- Select any language.
7
haekim@etri.re.kr
8. 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
8
haekim@etri.re.kr
9. MSPGCC Installation
§ Run mspgcc-20081230.exe
§ We do not recommend any changes.
- MSPGCC PATH must be added on Windows PATH
9
haekim@etri.re.kr
10. Cygwin Installation (1/4)
§ Run cygwin-20090312setup.exe
§ Choose a download source
- Choose “Install from local directory”
• Recent version of some cygwin package may not be compatible with
NanoQplus
10
haekim@etri.re.kr
11. 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 Filescygwin (X)
11
haekim@etri.re.kr
12. Cygwin Installation (3/4)
§ Select local package directory
- Leave it as a default setting
- or Select cygwin-20090312 folder in nos2_toolpack_20090312
12
haekim@etri.re.kr
13. 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
13
haekim@etri.re.kr
14. Cygwin Setup for a beginner (1/4)
§ Configuration for NanoQplus
- Copy .bash_profile and .vimrc in cygwin-20090312config into
c:cygwinhome[windows_user_name]
- In this example [windws_user_name] is haekim
14
haekim@etri.re.kr
15. Cygwin Setup for a beginner (2/4)
§ Copy NanoQplus source
- Copy nos-2.4.0-20090312.tar.gz into
c:cygwinhome
§ Run cygwin again
- # cd ..
• current location: ~
• ~ means home directory
• in this example,
c:cygwinhomehaekim or
/home/haekim
- # tar xzvf nos-2.4.0-20090312.tar.gz
• current location: /home
15
haekim@etri.re.kr
16. 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
16
haekim@etri.re.kr
17. 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:cygwinhomenos
• It is a soft-link of a directory
- Back to the page 15
17
haekim@etri.re.kr
18. 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
profile
- Example: bash shell, nos source is in d:nanoqplusnos-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:nanoqplusnos-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
18
haekim@etri.re.kr
19. 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
19
haekim@etri.re.kr
20. USBasp Driver (only for Nano24)
§ Nano24 needs for a USBasp driver
- driversUSBasp_Win32-0.1.12.1
20
haekim@etri.re.kr
21. USB to Serial Driver (1/2)
§ Every sensor node connected through USB needs for a
driver
§ USB <-> Serial driver
- driversFTDI(USB2Serial)CDM 2.04.16 WHQL Certified-20090225
21
haekim@etri.re.kr
22. USB to Serial Driver (2/2)
§ USB Serial Port driver
- driversFTDI(USB2Serial) CDM 2.04.16 WHQL Certified-20090225
22
haekim@etri.re.kr
23. 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.
23
haekim@etri.re.kr
24. 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
24
haekim@etri.re.kr
25. 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
25
haekim@etri.re.kr
26. Run Test Application (2/6)
§ You may see the following error if the cygwin window is too
small
- Enlarge cygwin window using your mouse.
26
haekim@etri.re.kr
27. 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
module
§ Save your kernel configuration
27
haekim@etri.re.kr
28. Run Test Application (4/6)
§ Compile your application
- # make
§ Fusing your application
- # make burn port=[fusing port]
• General
¢ 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
haekim@etri.re.kr
29. 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.
- 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
29
haekim@etri.re.kr
30. 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)
- 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
30
haekim@etri.re.kr
31. 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
31
haekim@etri.re.kr
32. Hyperterminal Configuration for
UART Communication (2/2)
Type anything for a local number
Baudrate in kernel configuration
UART comm port
32
haekim@etri.re.kr
33. 1_uart_put test application
result
§ You will see the following screen if you reset the sensor
node.
You must disconnect before
fusing through com port
33
haekim@etri.re.kr