Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

hal: scalability of targets, peripheral code reuse #213

Closed
0xc0170 opened this issue Nov 1, 2014 · 3 comments
Closed

hal: scalability of targets, peripheral code reuse #213

0xc0170 opened this issue Nov 1, 2014 · 3 comments

Comments

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 1, 2014

How is it with scalability and peripheral code reuse? Has there been any discussion (or any design document) this two topics?

Why am I asking:

  1. Scalability - support for MCU families
  2. Peripheral implementation reuse - different MCUs but contain the same peripheral. Like in mbed there's KLXX target https://github.com/mbedmicro/mbed/tree/master/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX (most of peripherals are identical, besides spi and uart).

I have the board FRDM-K20D50M (the only one with K20 chip, but there's K20DX128) which I would like to use and possibly add a support to zinc.

The current folder is named K20, some files are target specific (as noted in the layout probably for MK20DX32) like isr.rs and layout.ld. The peripheral code could be reused - watchdog, uart and others (eventhough I see definitions of how many uarts peripherals is available there which would need to change).

Regards,
0xc0170

@0xc0170
Copy link
Contributor Author

0xc0170 commented Nov 1, 2014

I just noticed pull request #204 which targets the mcu family support, namely for K20. I'll look at it in more detail.

@farcaller
Copy link
Member

The hal layer is expected to target mcu families as broad as possible (i.e. by targeting the most feature-full mcu in the family). There is a a plan to narrow the available set down at PT level, so that it is impossible to address any peripheral not physically present in targeted mcu; there's also an idea to go down to exact mcu naming to further limit the available pins and verify memory usage.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Nov 14, 2014

I'll close this, if any further related questions, I'll create a discussion on the mailing list.

@0xc0170 0xc0170 closed this as completed Nov 14, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants