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

boards/kinetis-based: Model features in Kconfig #14421

Merged

Conversation

leandrolanzieri
Copy link
Contributor

Contribution description

This models the features provided by the kinetis CPUs and all the boards based on them:

  • frdm-k22f
  • frdm-k64f
  • frdm-kw41z
  • mulle
  • openlabs-kw41z-mini
  • openlabs-kw41z-mini-256kib
  • pba-d-01-kw2x
  • phynode-kw41z
  • teensy31
  • usb-kw41z

Also cleans up the Makefile.features of kinetis a bit.

Testing procedure

  • Check the symbol organization in kinetis. As some features depend on the series I used intermediate symbols CPU_SERIES_ to group this.
  • Features provided should not change for kinetis-based boards.
  • tests/kconfig_features should pass for all boards.

Issues/PRs references

Part of #14148

@leandrolanzieri leandrolanzieri added Type: new feature The issue requests / The PR implemements a new feature for RIOT Area: Kconfig Area: Kconfig integration labels Jul 2, 2020
@fjmolinas
Copy link
Contributor

@leandrolanzieri do we actually need this new CPU_SERIES_ symbol, it seems that CPU_FAMILY is only used for openocd, could we replace CPU_SERIES_ by CPU_FAM_ and get rid of the current CPU_FAMILY variable altogether? It seems like the different openocd config are ultimately simply based on the core. We could have in boards/common/frdm/Makefile.include

ifeq ($(CPU_CORE), cortex-m0plus)
  OPENOCD_KINETIS_FAMILY = klx
else
  OPENOCD_KINETIS_FAMILY = kx
endif

OPENOCD_CONFIG ?= $(RIOTBOARD)/common/frdm/dist/openocd-$(OPENOCD_KINETIS_FAMILY).cfg

@leandrolanzieri
Copy link
Contributor Author

I turned the CPU_SERIES_ symbols into CPU_FAM_. Now we are using the value of KINETIS_SERIES as CPU_FAM. Also renamed s9keaz128aclh because s9keaz128aclh48 does not exist apparently.

@leandrolanzieri
Copy link
Contributor Author

I had to move the core selection to the models as I can't find a proper family classification that allows to imply that.

@fjmolinas
Copy link
Contributor

I had to move the core selection to the models as I can't find a proper family classification that allows to imply that.

I looked into this as well, and kind find a matching category. The current one used in the makefiles is actually wrong, works by chance.

I turned the CPU_SERIES_ symbols into CPU_FAM_. Now we are using the value of KINETIS_SERIES as CPU_FAM. Also renamed s9keaz128aclh because s9keaz128aclh48 does not exist apparently.

How did you realize this?

1 similar comment
@fjmolinas
Copy link
Contributor

I had to move the core selection to the models as I can't find a proper family classification that allows to imply that.

I looked into this as well, and kind find a matching category. The current one used in the makefiles is actually wrong, works by chance.

I turned the CPU_SERIES_ symbols into CPU_FAM_. Now we are using the value of KINETIS_SERIES as CPU_FAM. Also renamed s9keaz128aclh because s9keaz128aclh48 does not exist apparently.

How did you realize this?

@leandrolanzieri
Copy link
Contributor Author

How did you realize this?

When I was looking model by model for the core I could not find s9keaz128aclh48, just https://www.nxp.com/part/S9KEAZ128ACLH

@fjmolinas
Copy link
Contributor

I flashed pba-d-01-kw2x and frdm-kw41z, both flashing correctly. That covers the openocd change.

2020-07-02 14:25:45,958 # Hello World!
2020-07-02 14:25:45,960 # You are running RIOT on a(n) frdm-kw41z board.
2020-07-02 14:25:45,961 # This board features a(n) kinetis MCU.
2020-07-02 14:25:06,582 # Hello World!
2020-07-02 14:25:06,586 # You are running RIOT on a(n) pba-d-01-kw2x board.
2020-07-02 14:25:06,589 # This board features a(n) kinetis MCU.

@fjmolinas
Copy link
Contributor

I'm good with the symbols now, please squash @leandrolanzieri and trigger murdock!

@leandrolanzieri leandrolanzieri force-pushed the pr/kconfig/kinetis_boards_symbols branch from f2b5f0a to 8385689 Compare July 2, 2020 12:44
@leandrolanzieri leandrolanzieri added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 2, 2020
@leandrolanzieri
Copy link
Contributor Author

All green @fjmolinas !

Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK!

@fjmolinas fjmolinas merged commit 05fba85 into RIOT-OS:master Jul 3, 2020
@leandrolanzieri leandrolanzieri deleted the pr/kconfig/kinetis_boards_symbols branch July 3, 2020 12:33
@leandrolanzieri
Copy link
Contributor Author

Thanks for the review and the suggestions!

@leandrolanzieri leandrolanzieri added this to the Release 2020.07 milestone Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Kconfig Area: Kconfig integration CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants