Skip to content

boards/slwstk6000b-*: cleanup#13180

Merged
aabadie merged 5 commits intoRIOT-OS:masterfrom
fjmolinas:pr_slwstk6000b_cleanup
Mar 3, 2020
Merged

boards/slwstk6000b-*: cleanup#13180
aabadie merged 5 commits intoRIOT-OS:masterfrom
fjmolinas:pr_slwstk6000b_cleanup

Conversation

@fjmolinas
Copy link
Contributor

@fjmolinas fjmolinas commented Jan 21, 2020

Contribution description

slwstk6000b-* uses shell calls to resolve some variables like the JLINK_DEVICE and the CPU_MODEL, this can be done more efficiently with MAKE builtins.

This PR also takes care of addressing the missing TODO move CPU_MODEL here based on the daughter board

Some exports are removed as well as some MODULES moved.

Testing procedure

master

BOARD=slwstk6000b-slwrb4150a strace -ff -e trace=execve make --no-print-directory -C examples/hello-world/ info-debug-variable-QUIET 2>&1 | grep 'execve' | wc -l
4912

pr

BOARD=slwstk6000b-slwrb4150a strace -ff -e trace=execve make --no-print-directory -C examples/hello-world/ info-debug-variable-QUIET 2>&1 | grep 'execve' | wc -l
4882
  • everything should still works as before so try a couple of applications.

  • murdock will check build stuff

Issues/PRs references

Relates to #10850
Also relates to #9913
This is a first cleanup step, when #12407 is merged and agreed I will move towards a folder based approach.

@fjmolinas fjmolinas added the Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation label Jan 21, 2020
@fjmolinas fjmolinas requested a review from basilfx January 21, 2020 22:09
@fjmolinas fjmolinas changed the title slwstk6000b-*: cleanup boards/slwstk6000b-*: cleanup Jan 21, 2020
@fjmolinas fjmolinas added the Area: boards Area: Board ports label Jan 21, 2020
@aabadie
Copy link
Contributor

aabadie commented Jan 31, 2020

This PR fails on some efm32 boards. For example on sltb001a:

Details
make BOARD=sltb001a -C examples/hello-world
make: Entering directory '/work/riot/RIOT/examples/hello-world'
Building application "hello-world" for "sltb001a" with MCU "efm32".

[INFO] cloning gecko_sdk
Cloning into '/work/riot/RIOT/examples/hello-world/bin/pkg/sltb001a/gecko_sdk'...
remote: Enumerating objects: 655, done.
remote: Counting objects: 100% (655/655), done.
remote: Compressing objects: 100% (225/225), done.
remote: Total 1288 (delta 464), reused 506 (delta 417), pack-reused 633
Receiving objects: 100% (1288/1288), 8.44 MiB | 927.00 KiB/s, done.
Resolving deltas: 100% (864/864), done.
HEAD is now at ec942b9 Regenerated files.
[INFO] updating gecko_sdk /work/riot/RIOT/examples/hello-world/bin/pkg/sltb001a/gecko_sdk/.pkg-state.git-downloaded
echo ec942b9f430193b5b3ddaf4cf2a85fc29e44696a > /work/riot/RIOT/examples/hello-world/bin/pkg/sltb001a/gecko_sdk/.pkg-state.git-downloaded
[INFO] patch gecko_sdk
"make" -C /work/riot/RIOT/pkg/gecko_sdk
"make" -C /work/riot/RIOT/examples/hello-world/bin/pkg/sltb001a/gecko_sdk/dist
"make" -C /work/riot/RIOT/examples/hello-world/bin/pkg/sltb001a/gecko_sdk/dist/emlib-extra/src
arm-none-eabi-gcc: error: missing argument to '-mcpu='
make[3]: *** [/work/riot/RIOT/Makefile.base:109: /work/riot/RIOT/examples/hello-world/bin/sltb001a/gecko_sdk_emlib_extra/em_usart_utils.o] Error 1
make[2]: *** [/work/riot/RIOT/Makefile.base:29: ALL--/work/riot/RIOT/examples/hello-world/bin/pkg/sltb001a/gecko_sdk/dist/emlib-extra/src] Error 2
make[1]: *** [Makefile:17: all] Error 2
make: *** [/work/riot/RIOT/examples/hello-world/../../Makefile.include:638: pkg-build-gecko_sdk] Error 2
make: Leaving directory '/work/riot/RIOT/examples/hello-world'

@fjmolinas
Copy link
Contributor Author

I can't reproduce and this PR does not touch that board.

BUILD_IN_DOCKER=1 make BOARD=sltb001a -C examples/hello-world clean all

make: Entering directory '/home/francisco/workspace/RIOT/examples/hello-world'
Launching build container using image "riot/riotbuild:latest".
docker run --rm -t -u "$(id -u)" \
    -v '/usr/share/zoneinfo/Europe/Paris:/etc/localtime:ro' -v '/home/francisco/workspace/RIOT:/data/riotbuild/riotbase:delegated' -e 'RIOTBASE=/data/riotbuild/riotbase' -e 'CCACHE_BASEDIR=/data/riotbuild/riotbase' -e 'BUILD_DIR=/data/riotbuild/riotbase/build' -e 'RIOTPROJECT=/data/riotbuild/riotbase' -e 'RIOTCPU=/data/riotbuild/riotbase/cpu' -e 'RIOTBOARD=/data/riotbuild/riotbase/boards' -e 'RIOTMAKE=/data/riotbuild/riotbase/makefiles'      \
    -e 'BOARD=sltb001a' \
    -w '/data/riotbuild/riotbase/examples/hello-world/' \
    'riot/riotbuild:latest' make all 'BOARD=sltb001a'  
Building application "hello-world" for "sltb001a" with MCU "efm32".

[INFO] updating gecko_sdk /data/riotbuild/riotbase/examples/hello-world/bin/pkg/sltb001a/gecko_sdk/.pkg-state.git-downloaded
echo ec942b9f430193b5b3ddaf4cf2a85fc29e44696a > /data/riotbuild/riotbase/examples/hello-world/bin/pkg/sltb001a/gecko_sdk/.pkg-state.git-downloaded
[INFO] patch gecko_sdk
"make" -C /data/riotbuild/riotbase/pkg/gecko_sdk
"make" -C /data/riotbuild/riotbase/examples/hello-world/bin/pkg/sltb001a/gecko_sdk/dist
"make" -C /data/riotbuild/riotbase/examples/hello-world/bin/pkg/sltb001a/gecko_sdk/dist/emlib-extra/src
"make" -C /data/riotbuild/riotbase/examples/hello-world/bin/pkg/sltb001a/gecko_sdk/dist/emlib/src
"make" -C /data/riotbuild/riotbase/boards/sltb001a
"make" -C /data/riotbuild/riotbase/boards/common/silabs
"make" -C /data/riotbuild/riotbase/boards/common/silabs/drivers/pic
"make" -C /data/riotbuild/riotbase/core
"make" -C /data/riotbuild/riotbase/cpu/efm32
"make" -C /data/riotbuild/riotbase/cpu/cortexm_common
"make" -C /data/riotbuild/riotbase/cpu/cortexm_common/periph
"make" -C /data/riotbuild/riotbase/cpu/efm32/families/efr32mg1p
"make" -C /data/riotbuild/riotbase/cpu/efm32/periph
"make" -C /data/riotbuild/riotbase/drivers
"make" -C /data/riotbuild/riotbase/drivers/periph_common
"make" -C /data/riotbuild/riotbase/sys
"make" -C /data/riotbuild/riotbase/sys/auto_init
"make" -C /data/riotbuild/riotbase/sys/newlib_syscalls_default
"make" -C /data/riotbuild/riotbase/sys/pm_layered
"make" -C /data/riotbuild/riotbase/sys/stdio_uart
   text    data     bss     dec     hex filename
  15076     140    2596   17812    4594 /data/riotbuild/riotbase/examples/hello-world/bin/sltb001a/hello-world.elf
make: Leaving directory '/home/francisco/workspace/RIOT/examples/hello-world'

@fjmolinas
Copy link
Contributor Author

This PR fails on some efm32 boards. For example on sltb001a:

I think your comment was tested on #13174, addressed there. This PR should be independent of #13174 though.

@fjmolinas fjmolinas added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Feb 1, 2020
@aabadie
Copy link
Contributor

aabadie commented Feb 2, 2020

I think your comment was tested on #13174, addressed there

Ah yes, sorry :)

@fjmolinas
Copy link
Contributor Author

@basilfx this one goes in the same direction of #13174, I changed some variable names but I can reset them if you prefer.

@aabadie aabadie self-assigned this Mar 3, 2020
@aabadie
Copy link
Contributor

aabadie commented Mar 3, 2020

Please rebase

@fjmolinas fjmolinas force-pushed the pr_slwstk6000b_cleanup branch from 8f2f62c to f5ace89 Compare March 3, 2020 10:21
@fjmolinas
Copy link
Contributor Author

@aabadie I rebased as well as removing a commit that was doing already merged changes. I also changed some variable namse MAINBOARD instead of MOTHERBOARD since that is the name silabs use, and kept the old BOARD_MODULE name.

@fjmolinas fjmolinas force-pushed the pr_slwstk6000b_cleanup branch from f5ace89 to 76d2fe1 Compare March 3, 2020 10:23
@fjmolinas fjmolinas force-pushed the pr_slwstk6000b_cleanup branch from 76d2fe1 to 86ed76f Compare March 3, 2020 10:24
Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

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

Code is cleaner, no functional change.

ACK

@aabadie
Copy link
Contributor

aabadie commented Mar 3, 2020

All green, go!

@aabadie aabadie merged commit 481f3bc into RIOT-OS:master Mar 3, 2020
@fjmolinas fjmolinas deleted the pr_slwstk6000b_cleanup branch March 3, 2020 12:21
@leandrolanzieri leandrolanzieri added this to the Release 2020.04 milestone Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: boards Area: Board ports 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants