Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8905235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:20:34+00:00 2026-06-15T02:20:34+00:00

When defining an embedded system architecture, there are two options when it comes to

  • 0

When defining an embedded system architecture, there are two options when it comes to defining the HAL –

  • Define the HAL above the driver layer (which means one’ll need to rewrite drivers for every platform you port to)
  • Define the HAL below the driver layer (which means one’ll need to rewrite the HAL for every platform you port to)

Which one is better and why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:20:35+00:00Added an answer on June 15, 2026 at 2:20 am

    Short answer: yes.

    Having a HAL ( or Stable driver ABI below drivers is nice, especially for driver writers)
    Having a HAL above drivers is nice for Application programmers.

    You can do both: look at Unix device drivers; fairly portable.[Endian-ness still bites though]

    Which is better depends on the embedded architecture’s product development roadmap.

    Lets try some examples.

    Lets’ say it’s a commercial product and your company doesn’t see a need to port across platforms. In this case you don’t care.

    If your company is using it in, for example a TV set, and it’s expected the platform will change but the devices will stay the same ( A TV is a TV is a TV, but the cheapest micro will change over time) Then you’d go with hal-below-driver, and keep your investment in drivers.

    If your company makes, for example smart-phones, the processor changes and so do the devices, as resolutions change, extra sensors get added… so in this case, you’d go with hal-above-driver, and keep the big part of the software load common.

    If you put in two HAL’s, for embedded, you run the risk of turning into an architecture astronaut. If the cost of the two HALs ( runtime and design time) exceeds the labor saved in porting across platforms then it’s a waste of time and money.

    How much effort goes into a HAL is equally a tradeoff. Too much abstractin in a tiny embedded system cannot be afforded.

    Again, this trade-off depends on a tiny platform being the right choice for your application, which ultimately depends on the relative importance of time-to-market and features vs cost-per-device. Much is said about needing to go cheap for volume markets; little scientific proof is provided. One of the most profitable embedded device manufacturers is Apple, not using a tiny platform. ( Heck, they’re not on the NASDAQ anymore because they distorted it so much)

    If you have no HAL, and you have to change platform, e.g. your processor goes end of life, you have a big hard rewrite.

    If you try applying the YAGNI rule (You Aren’t Going to Need It) without a tradeoff study you may cost the company a fortune later.

    Now, if you get blind-sided by technology taking a turn you didn’t expect, then your tradeoff studies will be wrong and your company will suffer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When defining fields in a django model, there are two ways to say that
While defining our application architecture (which contains both web UI and external web services)
Defining custom components in Facelets is easy and quick but there's one thing I
When defining parameter type that is e.g. in System.Data you have no intellisense and
Defining some Tables in SQL-Server which will be accessed via ODBC from MS-Access. I'm
When defining an ASyncTask and it associated methods in Android there are 3 dots
When defining an Ontology using OWL, is there a way to say that a
; defining stream-for-each (define (stream-for-each proc s) (if (stream-null? s) 'done (begin (proc (stream-car
I am new at embedded system programming. I am working on a device that
Possible Duplicate: C++ - defining static const integer members in class definition Note: There

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.