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 with side-effect: move CPU/CPU_MODEL definition to Makefile.features #12092

Merged
merged 9 commits into from
Sep 24, 2019

Conversation

cladmi
Copy link
Contributor

@cladmi cladmi commented Aug 26, 2019

Contribution description

This moves CPU and CPU_MODEL to Makefile.features for a selection of board that only cause harmless side-effects in the dependency parsing like

  • de-duplication
  • ordering change
  • ?= replaced by = and spacing

Review procedure

I would advise to look at each commit individually and the global output comparison.

This PR modifications are, like the first PR

  • moving CPU, CPU_MODEL to a different file
  • removing the include $(RIOTCPU)/cpu_name
  • Removing the export CPU and export CPU_MODEL as they are globally exported in
    export CPU # The CPU, set by the board's Makefile.features.
    export CPU_MODEL # The specific identifier of the used CPU, used for some CPU implementations to differentiate between different memory layouts. Set by the board's Makefile.features.
  • It removed the comment saying "we set the cpu" as it is quite obvious. If it is not it should be part of a board porting guide.

And also the "side-effects":

  • removing duplicate file inclusion that remove duplicates in the variables
  • files include order when moved to the global include location which change order in the variables
  • Some not needed ?= in esp
  • spacing changes

I can split in several PRs if wanted, it was just easier for me to run the validation once.

The dependency to #12004 is only for testing and could be merged without it.

Testing procedure

All the modified boards for this change are the following
# esp change to remove ?=
esp32-mh-et-live-minikit
esp32-olimex-evb
esp32-wemos-lolin-d32-pro
esp32-wroom-32
esp32-wrover-kit
esp8266-esp-12x
esp8266-olimex-mod
esp8266-sparkfun-thing
# nrf6310, de-duplication
nrf6310
# nrf52, order changes
# git grep -l -e common/nrf52 -e common/nrf52xxxdk -e common/particle-mesh '**' ':!boards/common'  | cut -f 2 -d/ | sort -u
acd52832
nrf52832-mdk
nrf52840dk
nrf52840-mdk
nrf52dk
particle-argon
particle-boron
particle-xenon
reel
ruuvitag
thingy52
# hifive* order changes
hifive1
hifive1b
# pic32*, space change
pic32-clicker
pic32-wifire
# ek-lm4f120xl, uppercase CPU
ek-lm4f120xl
# cc2538dk, keep the ?=
cc2538dk
# mulle, adapt to ?=
mulle

So to run the comparison, it is easier to first limit the testing to these boards.

export ALLBOARDS="esp32-mh-et-live-minikit esp32-olimex-evb esp32-wemos-lolin-d32-pro esp32-wroom-32 esp32-wrover-kit esp8266-esp-12x esp8266-olimex-mod esp8266-sparkfun-thing nrf6310 acd52832 nrf52832-mdk nrf52840dk nrf52840-mdk nrf52dk particle-argon particle-boron particle-xenon reel ruuvitag thingy52 hifive1 hifive1b pic32-clicker pic32-wifire ek-lm4f120xl cc2538dk mulle"

In the PR run

./dist/tools/buildsystem_sanity_check/save_all_dependencies_resolution_variables.sh  build/deps/cpu_model
...
# This takes 17 minutes on my machine

On the second commit: "squash! make: add targets to debug dependencies variables " run the same generation: (it is shown at last on github, but is not locally)

./dist/tools/buildsystem_sanity_check/save_all_dependencies_resolution_variables.sh  build/deps/ref

And generate the aggregated result

./generate_aggregated.sh build/deps/cpu_model
./generate_aggregated.sh build/deps/ref
generate_aggregated.sh
#! /bin/bash

set -ue

readonly DIRECTORY=$1

set -v
rm -f ${DIRECTORY}/tests/nordic_softdevice/info-global/dependencies_info-boards-supported_reel  # Remove as not generated by normal compilation
find "${DIRECTORY}" -type f -name 'dependencies_info_*' | sort | xargs cat > ${DIRECTORY}/deps_info
find "${DIRECTORY}" -type f -name 'dependencies_info-boards-supported_*' | sort | xargs cat > ${DIRECTORY}/deps_info-boards-supported

Difference between normal and "global" dependency parsing

Both dependency parsing now have the same values for `FEATURES_PROVIDED`, `CPU`, `CPU_MODEL` for these boards
diff -W 80 -y --suppress-common-lines build/deps/cpu_model/deps_info-boards-supported build/deps/cpu_model/deps_info -I USEMODULE -I FEATURES_USED -I FEATURES_REQUIRED -I FEATURES_OPTIONAL -I CPU_FAM
# empty diff

You can see that most differences have been fixed with this PR by checking the previous state with all CPU and CPU_MODEL that were not defined in info-boards-supported.

diff -W 80 -y --suppress-common-lines build/deps/ref/deps_info-boards-supported build/deps/ref/deps_info -I USEMODULE -I FEATURES_USED -I FEATURES_REQUIRED -I FEATURES_OPTIONAL -I CPU_FAM

There are still currently differences in some variables, so they are excluded, but this is out of this PR scope and was the case before too.

The difference between before and now for normal parsing

As the normal parsing already had CPU and CPU_MODEL, there are only difference in FEATURES_REQUIRED and FEATURES_PROVIDED but the actual value is unchanged as the value of the sorted ones is the same.

Looking in the difference in `examples/default`
diff -u -r '--exclude=dependencies_info-boards*' '--exclude=deps_info-boards-supported' build/deps/ref/examples/default/info/dependencies_info_esp32-mh-et-live-minikit build/deps/cpu_model/examples/default/info/dependencies_info_esp32-mh-et-live-minikit
--- build/deps/ref/examples/default/info/dependencies_info_esp32-mh-et-live-minikit	2019-08-26 19:20:04.214279364 +0200
+++ build/deps/cpu_model/examples/default/info/dependencies_info_esp32-mh-et-live-minikit	2019-08-26 19:20:09.238320779 +0200
@@ -2,7 +2,7 @@
 CPU = esp32
 CPU_MODEL = esp32
 CPU_FAM =
-FEATURES_PROVIDED = cpp periph_cpuid periph_hwrng periph_pm periph_rtc periph_timer periph_gpio periph_gpio_irq periph_uart periph_uart_modecfg esp_spiffs esp_wifi esp_now periph_adc periph_dac periph_i2c periph_pwm periph_spi arduino
+FEATURES_PROVIDED = periph_gpio periph_gpio_irq periph_uart periph_uart_modecfg esp_spiffs esp_wifi esp_now periph_adc periph_dac periph_i2c periph_pwm periph_spi arduino cpp periph_cpuid periph_hwrng periph_pm periph_rtc periph_timer
 _FEATURES_PROVIDED_SORTED = arduino cpp esp_now esp_spiffs esp_wifi periph_adc periph_cpuid periph_dac periph_gpio periph_gpio_irq periph_hwrng periph_i2c periph_pm periph_pwm periph_rtc periph_spi periph_timer periph_uart periph_uart_modecfg
 FEATURES_REQUIRED = periph_uart periph_timer periph_gpio periph_uart periph_timer periph_gpio
 _FEATURES_REQUIRED_SORTED = periph_gpio periph_timer periph_uart
diff -u -r '--exclude=dependencies_info-boards*' '--exclude=deps_info-boards-supported' build/deps/ref/examples/default/info/dependencies_info_esp32-olimex-evb build/deps/cpu_model/examples/default/info/dependencies_info_esp32-olimex-evb
--- build/deps/ref/examples/default/info/dependencies_info_esp32-olimex-evb	2019-08-26 19:20:04.262279760 +0200
+++ build/deps/cpu_model/examples/default/info/dependencies_info_esp32-olimex-evb	2019-08-26 19:20:09.278321110 +0200
@@ -2,7 +2,7 @@
 CPU = esp32
 CPU_MODEL = esp32
 CPU_FAM =
-FEATURES_PROVIDED = cpp periph_cpuid periph_hwrng periph_pm periph_rtc periph_timer periph_gpio periph_gpio_irq periph_uart periph_uart_modecfg esp_spiffs esp_wifi esp_now periph_i2c periph_pwm periph_spi periph_eth esp_can periph_ir arduino
+FEATURES_PROVIDED = periph_gpio periph_gpio_irq periph_uart periph_uart_modecfg esp_spiffs esp_wifi esp_now periph_i2c periph_pwm periph_spi periph_eth esp_can periph_ir arduino cpp periph_cpuid periph_hwrng periph_pm periph_rtc periph_timer
 _FEATURES_PROVIDED_SORTED = arduino cpp esp_can esp_now esp_spiffs esp_wifi periph_cpuid periph_eth periph_gpio periph_gpio_irq periph_hwrng periph_i2c periph_ir periph_pm periph_pwm periph_rtc periph_spi periph_timer periph_uart periph_uart_modecfg
 FEATURES_REQUIRED = periph_uart periph_timer periph_gpio periph_uart periph_timer periph_gpio
 _FEATURES_REQUIRED_SORTED = periph_gpio periph_timer periph_uart
diff -u -r '--exclude=dependencies_info-boards*' '--exclude=deps_info-boards-supported' build/deps/ref/examples/default/info/dependencies_info_esp32-wemos-lolin-d32-pro build/deps/cpu_model/examples/default/info/dependencies_info_esp32-wemos-lolin-d32-pro
--- build/deps/ref/examples/default/info/dependencies_info_esp32-wemos-lolin-d32-pro	2019-08-26 19:20:04.310280155 +0200
+++ build/deps/cpu_model/examples/default/info/dependencies_info_esp32-wemos-lolin-d32-pro	2019-08-26 19:20:09.322321472 +0200
@@ -2,7 +2,7 @@
 CPU = esp32
 CPU_MODEL = esp32
 CPU_FAM =
-FEATURES_PROVIDED = cpp periph_cpuid periph_hwrng periph_pm periph_rtc periph_timer periph_gpio periph_gpio_irq periph_uart periph_uart_modecfg esp_spiffs esp_wifi esp_now periph_adc periph_dac periph_i2c periph_pwm periph_spi esp_spi_ram arduino
+FEATURES_PROVIDED = periph_gpio periph_gpio_irq periph_uart periph_uart_modecfg esp_spiffs esp_wifi esp_now periph_adc periph_dac periph_i2c periph_pwm periph_spi esp_spi_ram arduino cpp periph_cpuid periph_hwrng periph_pm periph_rtc periph_timer
 _FEATURES_PROVIDED_SORTED = arduino cpp esp_now esp_spi_ram esp_spiffs esp_wifi periph_adc periph_cpuid periph_dac periph_gpio periph_gpio_irq periph_hwrng periph_i2c periph_pm periph_pwm periph_rtc periph_spi periph_timer periph_uart periph_uart_modecfg
 FEATURES_REQUIRED = periph_uart periph_timer periph_gpio periph_uart periph_timer periph_gpio
 _FEATURES_REQUIRED_SORTED = periph_gpio periph_timer periph_uart
diff -u -r '--exclude=dependencies_info-boards*' '--exclude=deps_info-boards-supported' build/deps/ref/examples/default/info/dependencies_info_esp32-wroom-32 build/deps/cpu_model/examples/default/info/dependencies_info_esp32-wroom-32
--- build/deps/ref/examples/default/info/dependencies_info_esp32-wroom-32	2019-08-26 19:20:04.354280518 +0200
+++ build/deps/cpu_model/examples/default/info/dependencies_info_esp32-wroom-32	2019-08-26 19:20:09.370321868 +0200
@@ -2,7 +2,7 @@
 CPU = esp32
 CPU_MODEL = esp32
 CPU_FAM =
-FEATURES_PROVIDED = cpp periph_cpuid periph_hwrng periph_pm periph_rtc periph_timer periph_gpio periph_gpio_irq periph_uart periph_uart_modecfg esp_spiffs esp_wifi esp_now periph_adc periph_dac periph_i2c periph_pwm periph_spi arduino
+FEATURES_PROVIDED = periph_gpio periph_gpio_irq periph_uart periph_uart_modecfg esp_spiffs esp_wifi esp_now periph_adc periph_dac periph_i2c periph_pwm periph_spi arduino cpp periph_cpuid periph_hwrng periph_pm periph_rtc periph_timer
 _FEATURES_PROVIDED_SORTED = arduino cpp esp_now esp_spiffs esp_wifi periph_adc periph_cpuid periph_dac periph_gpio periph_gpio_irq periph_hwrng periph_i2c periph_pm periph_pwm periph_rtc periph_spi periph_timer periph_uart periph_uart_modecfg
 FEATURES_REQUIRED = periph_uart periph_timer periph_gpio periph_uart periph_timer periph_gpio
 _FEATURES_REQUIRED_SORTED = periph_gpio periph_timer periph_uart
diff -u -r '--exclude=dependencies_info-boards*' '--exclude=deps_info-boards-supported' build/deps/ref/examples/default/info/dependencies_info_esp32-wrover-kit build/deps/cpu_model/examples/default/info/dependencies_info_esp32-wrover-kit
--- build/deps/ref/examples/default/info/dependencies_info_esp32-wrover-kit	2019-08-26 19:20:04.402280913 +0200
+++ build/deps/cpu_model/examples/default/info/dependencies_info_esp32-wrover-kit	2019-08-26 19:20:09.414322230 +0200
@@ -2,7 +2,7 @@
 CPU = esp32
 CPU_MODEL = esp32
 CPU_FAM =
-FEATURES_PROVIDED = cpp periph_cpuid periph_hwrng periph_pm periph_rtc periph_timer periph_gpio periph_gpio_irq periph_uart periph_uart_modecfg esp_spiffs esp_wifi esp_now periph_adc periph_i2c periph_pwm periph_spi sdcard_spi esp_spi_ram arduino
+FEATURES_PROVIDED = periph_gpio periph_gpio_irq periph_uart periph_uart_modecfg esp_spiffs esp_wifi esp_now periph_adc periph_i2c periph_pwm periph_spi sdcard_spi esp_spi_ram arduino cpp periph_cpuid periph_hwrng periph_pm periph_rtc periph_timer
 _FEATURES_PROVIDED_SORTED = arduino cpp esp_now esp_spi_ram esp_spiffs esp_wifi periph_adc periph_cpuid periph_gpio periph_gpio_irq periph_hwrng periph_i2c periph_pm periph_pwm periph_rtc periph_spi periph_timer periph_uart periph_uart_modecfg sdcard_spi
 FEATURES_REQUIRED = periph_uart periph_timer periph_gpio periph_uart periph_timer periph_gpio
 _FEATURES_REQUIRED_SORTED = periph_gpio periph_timer periph_uart
diff -u -r '--exclude=dependencies_info-boards*' '--exclude=deps_info-boards-supported' build/deps/ref/examples/default/info/dependencies_info_esp8266-esp-12x build/deps/cpu_model/examples/default/info/dependencies_info_esp8266-esp-12x
--- build/deps/ref/examples/default/info/dependencies_info_esp8266-esp-12x	2019-08-26 19:20:04.446281277 +0200
+++ build/deps/cpu_model/examples/default/info/dependencies_info_esp8266-esp-12x	2019-08-26 19:20:09.462322626 +0200
@@ -2,7 +2,7 @@
 CPU = esp8266
 CPU_MODEL = esp8266
 CPU_FAM =
-FEATURES_PROVIDED = periph_cpuid periph_hwrng periph_pm periph_timer periph_adc periph_gpio periph_gpio_irq periph_i2c periph_pwm periph_spi periph_uart
+FEATURES_PROVIDED = periph_adc periph_gpio periph_gpio_irq periph_i2c periph_pwm periph_spi periph_uart periph_cpuid periph_hwrng periph_pm periph_timer
 _FEATURES_PROVIDED_SORTED = periph_adc periph_cpuid periph_gpio periph_gpio_irq periph_hwrng periph_i2c periph_pm periph_pwm periph_spi periph_timer periph_uart
 FEATURES_REQUIRED = periph_uart periph_timer periph_gpio periph_uart periph_timer periph_gpio
 _FEATURES_REQUIRED_SORTED = periph_gpio periph_timer periph_uart
diff -u -r '--exclude=dependencies_info-boards*' '--exclude=deps_info-boards-supported' build/deps/ref/examples/default/info/dependencies_info_esp8266-olimex-mod build/deps/cpu_model/examples/default/info/dependencies_info_esp8266-olimex-mod
--- build/deps/ref/examples/default/info/dependencies_info_esp8266-olimex-mod	2019-08-26 19:20:04.490281639 +0200
+++ build/deps/cpu_model/examples/default/info/dependencies_info_esp8266-olimex-mod	2019-08-26 19:20:09.506322990 +0200
@@ -2,7 +2,7 @@
 CPU = esp8266
 CPU_MODEL = esp8266
 CPU_FAM =
-FEATURES_PROVIDED = periph_cpuid periph_hwrng periph_pm periph_timer periph_adc periph_gpio periph_gpio_irq periph_i2c periph_pwm periph_spi periph_uart
+FEATURES_PROVIDED = periph_adc periph_gpio periph_gpio_irq periph_i2c periph_pwm periph_spi periph_uart periph_cpuid periph_hwrng periph_pm periph_timer
 _FEATURES_PROVIDED_SORTED = periph_adc periph_cpuid periph_gpio periph_gpio_irq periph_hwrng periph_i2c periph_pm periph_pwm periph_spi periph_timer periph_uart
 FEATURES_REQUIRED = periph_uart periph_timer periph_gpio periph_uart periph_timer periph_gpio
 _FEATURES_REQUIRED_SORTED = periph_gpio periph_timer periph_uart
diff -u -r '--exclude=dependencies_info-boards*' '--exclude=deps_info-boards-supported' build/deps/ref/examples/default/info/dependencies_info_esp8266-sparkfun-thing build/deps/cpu_model/examples/default/info/dependencies_info_esp8266-sparkfun-thing
--- build/deps/ref/examples/default/info/dependencies_info_esp8266-sparkfun-thing	2019-08-26 19:20:04.534282002 +0200
+++ build/deps/cpu_model/examples/default/info/dependencies_info_esp8266-sparkfun-thing	2019-08-26 19:20:09.550323352 +0200
@@ -2,7 +2,7 @@
 CPU = esp8266
 CPU_MODEL = esp8266
 CPU_FAM =
-FEATURES_PROVIDED = periph_cpuid periph_hwrng periph_pm periph_timer periph_adc periph_gpio periph_gpio_irq periph_i2c periph_pwm periph_spi periph_uart
+FEATURES_PROVIDED = periph_adc periph_gpio periph_gpio_irq periph_i2c periph_pwm periph_spi periph_uart periph_cpuid periph_hwrng periph_pm periph_timer
 _FEATURES_PROVIDED_SORTED = periph_adc periph_cpuid periph_gpio periph_gpio_irq periph_hwrng periph_i2c periph_pm periph_pwm periph_spi periph_timer periph_uart
 FEATURES_REQUIRED = periph_uart periph_timer periph_gpio periph_uart periph_timer periph_gpio
 _FEATURES_REQUIRED_SORTED = periph_gpio periph_timer periph_uart
diff -u -r '--exclude=dependencies_info-boards*' '--exclude=deps_info-boards-supported' build/deps/ref/examples/default/info/dependencies_info_hifive1 build/deps/cpu_model/examples/default/info/dependencies_info_hifive1
--- build/deps/ref/examples/default/info/dependencies_info_hifive1	2019-08-26 19:20:06.154295356 +0200
+++ build/deps/cpu_model/examples/default/info/dependencies_info_hifive1	2019-08-26 19:20:11.178336772 +0200
@@ -4,7 +4,7 @@
 CPU_FAM =
 FEATURES_PROVIDED = periph_gpio periph_gpio_irq periph_rtc periph_rtt periph_timer periph_uart periph_cpuid periph_pm
 _FEATURES_PROVIDED_SORTED = periph_cpuid periph_gpio periph_gpio_irq periph_pm periph_rtc periph_rtt periph_timer periph_uart
-FEATURES_REQUIRED = periph_uart periph_rtt periph_rtt periph_uart periph_rtt periph_rtt periph_uart
+FEATURES_REQUIRED = periph_uart periph_rtt periph_uart periph_rtt periph_uart
 _FEATURES_REQUIRED_SORTED = periph_rtt periph_uart
 FEATURES_OPTIONAL = periph_rtc periph_gpio periph_pm periph_gpio periph_pm periph_gpio periph_pm
 FEATURES_USED = periph_gpio periph_pm periph_rtc periph_rtt periph_uart
diff -u -r '--exclude=dependencies_info-boards*' '--exclude=deps_info-boards-supported' build/deps/ref/examples/default/info/dependencies_info_hifive1b build/deps/cpu_model/examples/default/info/dependencies_info_hifive1b
--- build/deps/ref/examples/default/info/dependencies_info_hifive1b	2019-08-26 19:20:06.194295686 +0200
+++ build/deps/cpu_model/examples/default/info/dependencies_info_hifive1b	2019-08-26 19:20:11.230337201 +0200
@@ -4,7 +4,7 @@
 CPU_FAM =
 FEATURES_PROVIDED = periph_gpio periph_gpio_irq periph_rtc periph_rtt periph_timer periph_uart periph_cpuid periph_pm
 _FEATURES_PROVIDED_SORTED = periph_cpuid periph_gpio periph_gpio_irq periph_pm periph_rtc periph_rtt periph_timer periph_uart
-FEATURES_REQUIRED = periph_uart periph_rtt periph_rtt periph_uart periph_rtt periph_rtt periph_uart
+FEATURES_REQUIRED = periph_uart periph_rtt periph_uart periph_rtt periph_uart
 _FEATURES_REQUIRED_SORTED = periph_rtt periph_uart
 FEATURES_OPTIONAL = periph_rtc periph_gpio periph_pm periph_gpio periph_pm periph_gpio periph_pm
 FEATURES_USED = periph_gpio periph_pm periph_rtc periph_rtt periph_uart
diff -u -r '--exclude=dependencies_info-boards*' '--exclude=deps_info-boards-supported' build/deps/ref/examples/default/info/dependencies_info_nrf52840dk build/deps/cpu_model/examples/default/info/dependencies_info_nrf52840dk
--- build/deps/ref/examples/default/info/dependencies_info_nrf52840dk	2019-08-26 19:20:05.070286420 +0200
+++ build/deps/cpu_model/examples/default/info/dependencies_info_nrf52840dk	2019-08-26 19:20:10.074327672 +0200
@@ -2,9 +2,9 @@
 CPU = nrf52
 CPU_MODEL = nrf52840xxaa
 CPU_FAM = nrf52
-FEATURES_PROVIDED = periph_i2c periph_pwm periph_spi periph_uart periph_rtt periph_timer riotboot ble_nimble radio_nrfble periph_adc periph_cpuid periph_flashpage periph_flashpage_raw periph_gpio periph_gpio_irq periph_hwrng periph_temperature periph_uart_modecfg radio_nrfmin puf_sram periph_pm cpp cpu_check_address radio_nrf802154 periph_pwm periph_usbdev
+FEATURES_PROVIDED = periph_i2c periph_pwm periph_spi periph_uart periph_rtt periph_timer riotboot ble_nimble radio_nrfble radio_nrf802154 periph_pwm periph_usbdev periph_adc periph_cpuid periph_flashpage periph_flashpage_raw periph_gpio periph_gpio_irq periph_hwrng periph_temperature periph_uart_modecfg radio_nrfmin puf_sram periph_pm cpp cpu_check_address
 _FEATURES_PROVIDED_SORTED = ble_nimble cpp cpu_check_address periph_adc periph_cpuid periph_flashpage periph_flashpage_raw periph_gpio periph_gpio_irq periph_hwrng periph_i2c periph_pm periph_pwm periph_rtt periph_spi periph_temperature periph_timer periph_uart periph_uart_modecfg periph_usbdev puf_sram radio_nrf802154 radio_nrfble radio_nrfmin riotboot
-FEATURES_REQUIRED = periph_timer radio_nrf802154 periph_timer radio_nrf802154 periph_uart periph_gpio periph_temperature periph_timer radio_nrf802154 periph_timer radio_nrf802154 periph_uart periph_gpio periph_temperature
+FEATURES_REQUIRED = periph_timer radio_nrf802154 periph_uart periph_gpio periph_temperature periph_timer radio_nrf802154 periph_uart periph_gpio periph_temperature
 _FEATURES_REQUIRED_SORTED = periph_gpio periph_temperature periph_timer periph_uart radio_nrf802154
 FEATURES_OPTIONAL = periph_rtc periph_cpuid periph_hwrng periph_cpuid periph_gpio periph_pm periph_cpuid periph_hwrng periph_cpuid periph_gpio periph_pm
 FEATURES_USED = periph_cpuid periph_gpio periph_hwrng periph_pm periph_temperature periph_timer periph_uart radio_nrf802154
diff -u -r '--exclude=dependencies_info-boards*' '--exclude=deps_info-boards-supported' build/deps/ref/examples/default/info/dependencies_info_nrf52840-mdk build/deps/cpu_model/examples/default/info/dependencies_info_nrf52840-mdk
--- build/deps/ref/examples/default/info/dependencies_info_nrf52840-mdk	2019-08-26 19:20:05.202287509 +0200
+++ build/deps/cpu_model/examples/default/info/dependencies_info_nrf52840-mdk	2019-08-26 19:20:10.198328694 +0200
@@ -4,7 +4,7 @@
 CPU_FAM = nrf52
 FEATURES_PROVIDED = periph_i2c periph_spi periph_uart periph_usbdev radio_nrf802154 periph_rtt periph_timer riotboot ble_nimble radio_nrfble periph_adc periph_cpuid periph_flashpage periph_flashpage_raw periph_gpio periph_gpio_irq periph_hwrng periph_temperature periph_uart_modecfg radio_nrfmin puf_sram periph_pm cpp cpu_check_address
 _FEATURES_PROVIDED_SORTED = ble_nimble cpp cpu_check_address periph_adc periph_cpuid periph_flashpage periph_flashpage_raw periph_gpio periph_gpio_irq periph_hwrng periph_i2c periph_pm periph_rtt periph_spi periph_temperature periph_timer periph_uart periph_uart_modecfg periph_usbdev puf_sram radio_nrf802154 radio_nrfble radio_nrfmin riotboot
-FEATURES_REQUIRED = periph_timer radio_nrf802154 periph_timer radio_nrf802154 periph_timer radio_nrf802154 periph_uart periph_gpio periph_temperature periph_timer radio_nrf802154 periph_timer radio_nrf802154 periph_uart periph_gpio periph_temperature
+FEATURES_REQUIRED = periph_timer radio_nrf802154 periph_uart periph_gpio periph_temperature periph_timer radio_nrf802154 periph_uart periph_gpio periph_temperature
 _FEATURES_REQUIRED_SORTED = periph_gpio periph_temperature periph_timer periph_uart radio_nrf802154
 FEATURES_OPTIONAL = periph_rtc periph_cpuid periph_hwrng periph_cpuid periph_gpio periph_pm periph_cpuid periph_hwrng periph_cpuid periph_gpio periph_pm
 FEATURES_USED = periph_cpuid periph_gpio periph_hwrng periph_pm periph_temperature periph_timer periph_uart radio_nrf802154
diff -u -r '--exclude=dependencies_info-boards*' '--exclude=deps_info-boards-supported' build/deps/ref/examples/default/info/dependencies_info_nrf6310 build/deps/cpu_model/examples/default/info/dependencies_info_nrf6310
--- build/deps/ref/examples/default/info/dependencies_info_nrf6310	2019-08-26 19:20:04.662283057 +0200
+++ build/deps/cpu_model/examples/default/info/dependencies_info_nrf6310	2019-08-26 19:20:09.678324408 +0200
@@ -2,7 +2,7 @@
 CPU = nrf51
 CPU_MODEL = nrf51x22xxaa
 CPU_FAM = nrf51
-FEATURES_PROVIDED = periph_spi periph_uart periph_rtt periph_timer ble_nimble periph_cpuid periph_flashpage periph_flashpage_raw periph_gpio periph_gpio_irq periph_hwrng periph_temperature periph_uart_modecfg radio_nrfmin puf_sram periph_pm cpp cpu_check_address periph_cpuid periph_flashpage periph_flashpage_raw periph_gpio periph_gpio_irq periph_hwrng periph_temperature periph_uart_modecfg radio_nrfmin puf_sram periph_pm cpp cpu_check_address
+FEATURES_PROVIDED = periph_spi periph_uart periph_rtt periph_timer ble_nimble periph_cpuid periph_flashpage periph_flashpage_raw periph_gpio periph_gpio_irq periph_hwrng periph_temperature periph_uart_modecfg radio_nrfmin puf_sram periph_pm cpp cpu_check_address
 _FEATURES_PROVIDED_SORTED = ble_nimble cpp cpu_check_address periph_cpuid periph_flashpage periph_flashpage_raw periph_gpio periph_gpio_irq periph_hwrng periph_pm periph_rtt periph_spi periph_temperature periph_timer periph_uart periph_uart_modecfg puf_sram radio_nrfmin
 FEATURES_REQUIRED = radio_nrfmin periph_cpuid periph_uart periph_temperature radio_nrfmin periph_cpuid periph_uart periph_temperature
 _FEATURES_REQUIRED_SORTED = periph_cpuid periph_temperature periph_uart radio_nrfmin

And when excluding ^FEATURES_REQUIRED and ^FEATURES_PROVIDED , so keeping the sorted ones we have the same values after migration.

diff  -r build/deps/ref/ build/deps/cpu_model/ --exclude='dependencies_info-boards*' --exclude=deps_info-boards-supported -I '^FEATURES_PROVIDED ' -I '^FEATURES_REQUIRED '
# empty diff

Issues/PRs references

@jcarrano jcarrano added Area: boards Area: Board ports Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation labels Aug 27, 2019
@fjmolinas fjmolinas self-requested a review September 10, 2019 13:40
@fjmolinas
Copy link
Contributor

fjmolinas commented Sep 24, 2019

This takes 17 minutes on my machine

Your computer seems to be much better than mine, running for 1 hour now.. hahaha

@cladmi
Copy link
Contributor Author

cladmi commented Sep 24, 2019

@fjmolinas :D did you set the ALLBOARDS before ?

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.

Changes look good and commit changes make sense.

@fjmolinas
Copy link
Contributor

I get the expected no diff when running on the top commit:

diff -W 80 -y --suppress-common-lines build/deps/cpu_model/deps_info-boards-supported build/deps/cpu_model/deps_info -I USEMODULE -I FEATURES_USED -I FEATURES_REQUIRED -I FEATURES_OPTIONAL -I CPU_FAM
#empty diff

I can also see most differences where fixed when doing diff -W 80 -y --suppress-common-lines build/deps/ref/deps_info-boards-supported build/deps/ref/deps_info -I USEMODULE -I FEATURES_USED -I FEATURES_REQUIRED -I FEATURES_OPTIONAL -I CPU_FAM . (too much output to post)

I also get the same results when normal parsing.

@fjmolinas fjmolinas added the Reviewed: 3-testing The PR was tested according to the maintainer guidelines label Sep 24, 2019
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.

I tested the changes following the test procedure and got the expected results. Changes lookg good and are part of #11477. ACK, please remove unrelated commits and squash.

* CPU files should already have 'CPU' defined by the board.
* Do not conditionally define CPU as it is not needed.

This is part of cleanup prior to moving the CPU/CPU_MODEL to
Makefile.features.
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included

Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included

Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included

Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included

Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included

Add the missing space when defining 'CPU_MODEL'.

Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included

CPU_MODEL is currently kept uppercase. Making it lowercase is a future task.

Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included

Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included

The multiple boards handling has been changed to use 'CPU_MODEL ?='.

Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
@cladmi cladmi force-pushed the pr/cpu_model/minor_changes_included branch from f3675b6 to cdca4d8 Compare September 24, 2019 15:30
@cladmi
Copy link
Contributor Author

cladmi commented Sep 24, 2019

Thank you for testing. I removed the commits from #12004

@fjmolinas
Copy link
Contributor

Thank you for testing. I removed the commits from #12004

It took me much longer than I want to admit to get the testing procedure right hahahaha

@fjmolinas fjmolinas added Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines labels Sep 24, 2019
@cladmi
Copy link
Contributor Author

cladmi commented Sep 24, 2019

Thank you for testing. I removed the commits from #12004

It took me much longer than I want to admit to get the testing procedure right hahahaha

I can imagine.
It also took me hours to manage to have exploitable and concise enough results working around all the errors still there and weird diff behavior, and re-test many times that the entire test procedure works at once.

Running tests with 2 separate versions is also always hard to explain concisely :/

Any feedback on what I should put more clearly?

@benpicco benpicco merged commit 3833e42 into RIOT-OS:master Sep 24, 2019
@cladmi
Copy link
Contributor Author

cladmi commented Sep 25, 2019

Thank you for the review.

@cladmi cladmi deleted the pr/cpu_model/minor_changes_included branch September 25, 2019 10:07
@kb2ma kb2ma added this to the Release 2019.10 milestone Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants