Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardware abstraction layer (HAL) implementation #115

Open
2 of 4 tasks
andre-stefanov opened this issue Jun 11, 2021 · 2 comments
Open
2 of 4 tasks

Hardware abstraction layer (HAL) implementation #115

andre-stefanov opened this issue Jun 11, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@andre-stefanov
Copy link
Member

andre-stefanov commented Jun 11, 2021

In order to greatly improve maintainability and expandability of Firmware code, a hardware abstraction layer (HAL) should be implemented in context of a big refactoring. The new architecture will then form the base of firmware version 2.x.x

Multiple components have to be extracted out of the current code (mainly from Mount.cpp and init files) and placed into well designed and encapsulated units. These units should follow single-responsibility principle (e.g. a stepper driver should only be responsible for the actual driver hardware and not care about higher level hardware or software like the board it is attached to or the interrupt routine used for step triggering).

The strict encapsulation will allow proper automated unit testing later and increase stability of the whole firmware after code or configuration changes. It will also provide an easy way for further hardware support implementations.

  • stepper abstraction
  • driver abstraction
  • platform abstraction
  • board abstraction
@andre-stefanov andre-stefanov self-assigned this Jun 11, 2021
@andre-stefanov andre-stefanov added the enhancement New feature or request label Jun 11, 2021
@davidfobar
Copy link

I plan on taking a look at this, I also want to have the code build for a STM32L4. Platformio should still be applicable. I would be happy to hear some of your ideas if you have put some thought into this task since first posting this.

@ClutchplateDude
Copy link
Member

No work has taken place on this, the primary developer needed to take a break and hasn't returned (yet). There is a branch that was started to help with porting to STM32 platforms, it's called stm32-debug. I'm not sure what state it is in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants