Process: Establish the Cygwin platform under Windows, and build the Tinyos compilation environment, then compile the Tinyos-based application into a hex file, and download it to the CC2430 chip through the emulator to run.
Raw materials: hardware (wxl
=
CC2430 is the ideal hardware platform now. In China, most people still use IAR combined with z-stack protocol stack (or its variant xx Dragon version) for development. z-stack protocol stack development is relatively simple and suitable for novices. But if you are doing academic research and need to study networking and related algorithm development in depth, then UC Berkely's TinyOS is the best choice. (I believe that smart people will not wade into the muddy water of z-stack's OSAL...)
Many people have successfully ported TinyOS to CC2430. However, there seems to be no article with detailed operation steps on the Internet. So let me give you some popular science :)
—-
introduce:
First, we need to port TinyOS 2.x to CC2430. If you are good at English, please go to http://tinyos8051wg.sourceforge.net/ to view the relevant information.
TinyOS2.x for 8051 currently supports three compilers - Keil, IAR, sdcc. The compiler we use is Keil - everyone is familiar with it. TinyOS 2.x must work under the Linux platform, and Keil is a software under Windows, so we must first install a software that simulates Linux under Windows - Cygwin.
Before transplantation, we need to prepare the following:
Hardware: CC2430 node, emulator
Software: Cygwin, Keil, TinyOS 2.x, some related environment setting packages, SmartRF04 Flash Programmer
The hardware is the CC2430 development hardware that can be used normally under IAR (whether it is Wireless Dragon, Huafan, or Weigu)
I need to say something about the software:
TinyOS 2.x: Please go to http://tinyos8051wg.sourceforge.net/download to download the latest version (this article is based on the TinyOS8051wg-0.1pre4.tgz 26 Oct 2008)
Keil: Please install it, remember to install the version without 2K limit.
1. Install Keil (Keil
http://www.picavr.com/upload/2009_07/Keil C51 V8.09 Chinese cracked version.rar
(2) Directly click on the installation under "Keil
(3) Note that after completion, there should be the following files in the C:KeilC51BIN directory: C51.exe,
2. Install Java
I started using 1.6, but it didn't work. I don't know if this is the reason. It's best to use version 1.5.
Download address of jdk1.5.0:
http://java.sun.com/j2se/1.5.0/download.jsp
After the installation is complete, in the command line: java
3. Install Cygwin
This address seems to be available for download: http://cone.informatik.uni-freiburg.de/people/aslam/cygwin-files.zip
(2) When installing, first unzip the downloaded cygwin and click setup.exe. It will be installed in the C drive by default. Basically, you don’t need to change the options, all of which are default options: "install
(3) Start the Cygwin shortcut icon on the desktop. The first time Cygwin is run, it will set up some things and create a home directory, in which a user is created with the username of the windows system.
[page]
4. Download the installation packages of the compilation tools required for Tinyos development (4 in total)
NesC compilation tool: nesc-1.3.0-1.cygwin.i386.rpm
TinyOS related tools:
tinyos-deputy-1.1-1.cygwin.i386.rpm
tinyos-tools-1.3.0-1.cygwin.i386.rpm
tinyos-2.1.0-2.cygwin.noarch.rpm
These things can be found here (haha): http://www.tinyos.net/dist-2.1.0/tinyos/windows/
5. Install the above rpm package
(1) In the /home directory is your home directory, mine is Administrator. Copy the four rpm packages to homejohn (i.e. C:cygwinhomeAdministrator), enter the directory: cd
(2) Install the rpm package
rpm
rpm
rpm
rpm
Just press Enter each time you enter something.
6. Install Tinyos
(1) Put the downloaded Tinyos file "TinyOS8051wg-0.1pre4.tgz" into the /opt directory.
(Download address: http://tinyos8051wg.sourceforge.net/download )
Pay attention to check that there should be a directory called "tinyos-2.x" in this directory at this time. If there is no problem with the previous work, the subsequent operations will almost certainly go wrong.
PS: Some compilation rule files are placed in this folder, such as: opt inyos-2.xsupportmakeMakerules file.
(2) Unzip the "TinyOS8051wg-0.1pre4.tgz" file
tar
(3) Set up the compilation environment
cd
ls
source
Note: There is an env configuration file under the diku folder. We load it through the source command so that the compiler will know what configuration we want to use to compile later.
Note: Every time you restart cygwin, if you want to compile, you need to run this command (source
(4) Compile the project file (taking BlinkNoTimerTask as an example)
cd
make
The following errors may occur:
cd
/bin/sh:
It means that the permissions are insufficient, and I don't know how to log in as a super user in cygwin (the Internet says to use the login command, but I tried it and it didn't work). My solution is: enter the cc2430em directory,
[page]
My final result screenshot is as follows:
Finally, the app.hex file is generated under cc2430em, as shown in the figure:
7. Burning
(1) Download and install the SmartRF04
(2) Connect the computer USB to the emulator. After the emulator is connected to the chip, you will be prompted to install the driver. After the driver is automatically installed, it can be used.
Note: Use System-on-Chip
At this point, it’s done, haha!
Uninstall part
If it's useful, don't uninstall it.
1.
2.
3.
Previous article:TinyOS porting of CC2430 microcontroller (windows platform)
Next article:STM32 ADC generates random numbers
Recommended ReadingLatest update time:2024-11-16 16:37
- Popular Resources
- Popular amplifiers
- Network Operating System (Edited by Li Zhixi)
- Microgrid Stability Analysis and Control Microgrid Modeling Stability Analysis and Control to Improve Power Distribution and Power Flow Control (
- Analysis and Implementation of MAC Protocol for Wireless Sensor Networks (by Yang Zhijun, Xie Xianjie, and Ding Hongwei)
- MATLAB and FPGA implementation of wireless communication
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [GD32E503 Review] Part 3: Screen Code Analysis
- How capacitive isolation solves key challenges in AC motor drives
- NTC/PTC temperature acquisition application
- How to minimize input power protection for smart speakers and smart displays
- SPI Master Mode of TI BLE CC2541
- 【Silicon Labs Development Kit Review】+ Understanding the Temperature and Humidity Sensor Hardware
- "Playing with the board" + Zhou Hangci's book Chapter 7, Example 4
- A brief summary of the use of MAX9611/9612 current detection chips
- If you have a third child, the government will give you a house. Would you give birth to a third child?
- EEWORLD University - Raspberry Pi 4 unboxing and assembly