cpu: efm32: generalize support for EFM32/EZR32/EFR32#8139
cpu: efm32: generalize support for EFM32/EZR32/EFR32#8139basilfx merged 3 commits intoRIOT-OS:masterfrom
Conversation
c731c9e to
c655382
Compare
|
Rebase + subtle reminder :-) |
kYc0o
left a comment
There was a problem hiding this comment.
The changes are good in general, although some are less in the scope of the PR, maybe it's just the title. I don't know if it was intentional to introduce changes to the files while moving them, but maybe they belong to another PR.
| #endif | ||
| #ifndef CMU_LFXOINIT | ||
| #define CMU_LFXOINIT CMU_LFXOINIT_DEFAULT | ||
| #endif |
There was a problem hiding this comment.
Is this change part of this PR?
There was a problem hiding this comment.
Yes and no :-)
I saw in @kaibeckmann his port repository that he deviated from the default values, so I generalized this to be part of periph_conf.h. It is true that the board he used isn't part of RIOT-OS (yet), but I thought it was a good addition to take into account.
There was a problem hiding this comment.
AFAIK you need to be able to override the defaults to setup the radio driver.
There was a problem hiding this comment.
Thus, all the introduced changes about the clocking and peripherals in general can be considered improvements? If so (and if it's not a pain to take them off this PR), I'd like to have another PR with them.
There was a problem hiding this comment.
OK, fair enough. I'll open another PR for these changes, then I'll update this PR after that's fixed :-)
There was a problem hiding this comment.
I think this PR will get in quite fast since the additions for new families and the relocation of some files doesn't change anything of the current working code. I will spend more time reviewing and testing the changes, which is better if they are separated. Thanks!
| #endif | ||
| #ifndef EMU_EM4INIT | ||
| #define EMU_EM4INIT EMU_EM4INIT_DEFAULT | ||
| #endif |
c655382 to
af7b888
Compare
|
Nice, changes look all valid to me. Don't have an EFM board available here right now, so will give this a test run tomorrow. pre-ACK :-) |
|
does this PR still need squashing? If yes, just re-set the label... |
|
It needs squashing. I'll squahs the cpu/efm32_common and cpu/efm32 into one, so you can see the renames. |
|
@haukepetersen Did you test it yesterday? Am I allowed to squash? |
|
Subtle ping :-) |
|
@haukepetersen @kYc0o can you take a look? I would like to continue with this :-) |
af7b888 to
533e3b0
Compare
|
Rebased. |
haukepetersen
left a comment
There was a problem hiding this comment.
Looks good to me. Except the code size increase introduced by the emlib, I actually think this CPU turned out quite nice! Can't wait for the radio support :-)
Tested on 'sltb001a` and works as expected -> ACK
|
@kYc0o: It seems to me like your issues are addressed, would you mind to dismiss them? Thx! |
emlib is a subset of gecko_sdk. gecko_sdk contains more.
533e3b0 to
d6f8cdf
Compare
In addition to the Kinetis and STM32 MCUs, this PR should summarize support for all EFM32/EZR32/EFR32 into a single folder.
I have taken a different route: in
cpu/efm32/families, one folder per family exists, with family-specific (vendor) files (example of a family is the EFR32MG1P). I have acpus.txtthat contains information that is used for conditionals in the Makefiles, the linker script etc. It is parsed by this script. Above approach is IMHO a good trade-off between maintainability and code duplication. I know thatcpus.txtcontains more CPUs than the number of vendor files included, but it is unlikely that this file changes as long as Silicon Labs doesn't add new CPUs to an existing family. Currently, adding support for a new CPU is just adding the vendor header tocpus/family/<family-name>/includes/vendor.The (generic) drivers in
cpu/efm32/periphare the same as in current master (ok, few changes to support more UARTs and I2Cs).The
emlibpackage has been replaced with the supersetgecko_sdk. We need the latter to support the radio library, which is a vendor-provided blob. Thanks to @kaibeckmann for initial work!There are a few changes to review, but the most important ones are 03d1e55 and 4ffc8e9 (the others are very similar or vendor files).