Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Assignment_0_question_9_solution
Describe the organization of the repo (why are the directories setup that way and what do their names signify).
It's currently organized into four folders:
API's - Application programming interface which will be exposed to the users. It takes the inputs from the users and call's the underlying layers (Common) based on the inputs and returns the results to the user.
Common - Where all common functionalities with respect to all targets resides (Eg: Ethernet,FilePath). Common talks to the HAL API's.
HAL - Contains Hardware abstraction layers API's which talks to the target specific code based on the inputs.
Target - Target folder contains the actual target specific code. Based on the target input passed through the API's. Corresponding target specific code will be invoked,
Describe the relationship and differences between the C and C++ code bases.
All the code bases that can be abstracted are written mostly in C++ since it supports OOPS.
- API's
- Common
- HAL
Target Specific code is written in C since there is not much abstraction there.
Describe one benefit of the way the MBED code base is abstracted (ie. multiple levels exist within the software architecture of the code, what is a benefit of that)?
Code redundancy avoided because of abstraction. Abstraction of the actual hardware implementation from the user (User does not need to understand what's happening at the lower layer because of the abstraction ). Easily extensible for more targets.