Anita S Patil
Anita S Patil

Reputation: 1

what is the meaning of base code in TinyOS

The footprint of TinyOS is less than 400 bytes, what does this mean? Because tinyos-release-tinyos-2_1_2 I have downloaded from github repository is 56.3 MB. Which part of this is is the core or base code of tinyOS that occupies less than 400 bytes?

Upvotes: 0

Views: 49

Answers (1)

KillaKem
KillaKem

Reputation: 1025

Yes the distribution is over 50MB but that is the total size of both the operating system source code along with probably over a hundred full working TinyOS applications. This is pretty much similar to any Embedded C application where the source code is usually a lot bigger that any compiled application that will be eventually uploaded to the microcontroller.

When you write a TinyOS application and then compile it into C code, the actual code base will be a lot smaller. The compiled code code will be a mixture of i) the application logic that you wrote, ii) TinyOS code for interfacing with the radio and with various other components and iii) core TinyOS logic for handling core OS operations such as task scheduling.

The vast majority of the core TinyOS system components are in the 'tos/system' directory. The folder has the TinyOS system's scheduler and also has the system's main file, which is called RealMainP and is the first point of entry of the TinyOS application. This main file is usually never edited though, your application will usually listen for the Boot.Booted() event and start there.

The first resource you should read in my opinion when starting off with TinyOS is the TinyOS programming book found in the '/doc/pdf/' directory of the TinyOS distribution.

Upvotes: 0

Related Questions