Network and Systems Laboratory nslab.ee.ntu.edu.tw.

15
Network and Systems Laboratory nslab.ee.ntu.edu.tw

Transcript of Network and Systems Laboratory nslab.ee.ntu.edu.tw.

Page 1: Network and Systems Laboratory nslab.ee.ntu.edu.tw.

Network and Systems Laboratorynslab.ee.ntu.edu.tw

Page 2: Network and Systems Laboratory nslab.ee.ntu.edu.tw.

Network and Systems Laboratorynslab.ee.ntu.edu.tw

ObjectiveWrite program in IARCompile to Intel-extended formatLoad program to TAROKO via USB

interface Use MSP430 bootstrap loader on TinyOS

Page 3: Network and Systems Laboratory nslab.ee.ntu.edu.tw.

Network and Systems Laboratorynslab.ee.ntu.edu.tw

Bootstrap Loaderprovides a method to program the flash

memoryvia the UART protocol

BSL code is stored in a secure memory locationROM or specially protected flash

Any BSL command that directly or indirectly allows data reading is password protected

To invoke the bootstrap loadera BSL entry sequence must be applied

Page 4: Network and Systems Laboratory nslab.ee.ntu.edu.tw.

Network and Systems Laboratorynslab.ee.ntu.edu.tw

Invoke BSL1. Apply BSL entry sequence

2. Send a synchronization character 3. Send a specific command

TinyOS installation includes a MSP430 bsl program

Page 5: Network and Systems Laboratory nslab.ee.ntu.edu.tw.

Network and Systems Laboratorynslab.ee.ntu.edu.tw

Compile To Intel-Extended

Open OptionsOpen Options

Page 6: Network and Systems Laboratory nslab.ee.ntu.edu.tw.

Network and Systems Laboratorynslab.ee.ntu.edu.tw

Compile To Intel-Extended

Select LinkerSelect Linkertype filenametype filename

Choose intel-extendedChoose intel-extended

Page 7: Network and Systems Laboratory nslab.ee.ntu.edu.tw.

Network and Systems Laboratorynslab.ee.ntu.edu.tw

Compile To Intel-Extended

Rebuild AllRebuild All

Page 8: Network and Systems Laboratory nslab.ee.ntu.edu.tw.

Network and Systems Laboratorynslab.ee.ntu.edu.tw

Find And Copy Source

• Go to program directory• Locate file in Debug/Exe• Copy the generated file

• Go to program directory• Locate file in Debug/Exe• Copy the generated file

Page 9: Network and Systems Laboratory nslab.ee.ntu.edu.tw.

Network and Systems Laboratorynslab.ee.ntu.edu.tw

Find And Copy Source

Go to cygwin home dirC:\Program Files\UCB\cygwin\home\”username”Create a new dir

Go to cygwin home dirC:\Program Files\UCB\cygwin\home\”username”Create a new dir

Page 10: Network and Systems Laboratory nslab.ee.ntu.edu.tw.

Network and Systems Laboratorynslab.ee.ntu.edu.tw

Find And Copy Source

Copy the source file into the created dir

Copy the source file into the created dir

Page 11: Network and Systems Laboratory nslab.ee.ntu.edu.tw.

Network and Systems Laboratorynslab.ee.ntu.edu.tw

Load By BSL

Open cygwinOpen cygwin

Page 12: Network and Systems Laboratory nslab.ee.ntu.edu.tw.

Network and Systems Laboratorynslab.ee.ntu.edu.tw

Load By BSL

Change dir to the created dirChange dir to the created dir

Page 13: Network and Systems Laboratory nslab.ee.ntu.edu.tw.

Network and Systems Laboratorynslab.ee.ntu.edu.tw

Load By BSL

Plug Taroko to USB portCheck the com port

Plug Taroko to USB portCheck the com port

Page 14: Network and Systems Laboratory nslab.ee.ntu.edu.tw.

Network and Systems Laboratorynslab.ee.ntu.edu.tw

Load By BSL

Execute the following command:$ msp430-bsl --telosb -c “comport – 1” -r -e -I -p “source file name”

Execute the following command:$ msp430-bsl --telosb -c “comport – 1” -r -e -I -p “source file name”

Page 15: Network and Systems Laboratory nslab.ee.ntu.edu.tw.

Network and Systems Laboratorynslab.ee.ntu.edu.tw

Load By BSL

Load program to TarokoLoad program to Taroko