#4773 assigned task

Can't build ATSAM BSP

Reported by: Kyle Williams Owned by: Chris Johns
Priority: normal Milestone:
Component: bsps Version: 6
Severity: normal Keywords: atsam, bsps, quick start
Cc: Blocked By:
Blocking:

Description

I have been trying to build the BSP for the ATSAM architecture following the Quick Start Guide and the RSB BSP Build. However, the build keeps failing.

RSB seems to be set up properly:

$ ../source-builder/sb-check
RTEMS Source Builder - Check, 6 (65f83cf973d6)
Environment is ok

And I can see the bset:

$ ../source-builder/sb-set-builder --list-bsets
RTEMS Source Builder - Set Builder, 6 (65f83cf973d6)
Examining: config
Examining: ../source-builder/config
Examining: ../bare/config
Examining: config
    ...
    7/rtems-x86_64.bset
    bsps/atsamv.bset
    bsps/beagleboneblack.bset
    ...

This is the command I'm trying to use:

$ ../source-builder/sb-set-builder --prefix=$HOME/qs/rtems/6 --target=arm-rtems6 --with-rtems-bsp=atsamv --with-rtems-tests=yes 6/rtems-kernel
RTEMS Source Builder - Set Builder, 6 (65f83cf973d6)
Build Set: 6/rtems-kernel
config: tools/rtems-kernel-6.cfg
package: rtems-kernel-bsps-1
building: rtems-kernel-bsps-1
error: building rtems-kernel-bsps-1
Build FAILED
  See error report: rsb-report-rtems-kernel-bsps-1.txt
error: building rtems-kernel-bsps-1
Build Set: Time 0:00:00.301361
Build FAILED

I have also tried:

--with-rtems-bsp=atsam

and:

--with-rtems-bsp=arm

This is the error from the log file mentioned:

building: rtems-kernel-bsps-1
run: /bin/sh -ex  /home/kyle/qs/src/rsb/rtems/build/rtems-kernel-bsps-1/do-build
+ export SB_ORIG_PATH=/home/kyle/.vscode-server/bin/5235c6bb189b60b01b1f49062f4ffa42384f8c91/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/windows/system32:/mnt/c/windows:/mnt/c/windows/System32/Wbem:/mnt/c/windows/System32/WindowsPowerShell/v1.0/:/mnt/c/windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit/:/mnt/c/Program Files/Microchip/xc32/v4.20/bin:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/Microsoft VS Code/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/TortoiseSVN/bin:/mnt/c/Program Files/nodejs/:/mnt/c/Program Files/gs/gs9.56.1/bin:/mnt/c/Users/kyle.williams/AppData/Local/Microsoft/WindowsApps:/mnt/c/tools/neovim/nvim-win64/bin:/mnt/c/Users/kyle.williams/AppData/Roaming/npm:/snap/bin
/home/kyle/qs/src/rsb/rtems/build/rtems-kernel-bsps-1/do-build: 4: export: (x86)/NVIDIA: bad variable name
shell cmd failed: /bin/sh -ex  /home/kyle/qs/src/rsb/rtems/build/rtems-kernel-bsps-1/do-build
error: building rtems-kernel-bsps-1

What am I doing wrong here? And where in the manual is this explained?

Change History (3)

comment:1 Changed on 12/14/22 at 23:38:10 by Joel Sherrill

Owner: set to Chris Johns
Status: newassigned

I normally just use the RSB to build the tools and then waf to build the BSP. This procedure is covered in the Users Manual. This works well so I am not sure what happened here unless the kernel RSB bset has an issue.

In fact, today I posted results from the rtems-bsp-builder tool which builds every BSP in multiple configurations and there were no failures. The atsamv built fine per https://lists.rtems.org/pipermail/build/2022-December/038438.html.

My guess at this point is that your $PATH has a space in it based on this output from your post:

/home/kyle/qs/src/rsb/rtems/build/rtems-kernel-bsps-1/do-build: 4: export: (x86)/NVIDIA: bad variable name

Beyond that, is there something in a log or rsb-* file which might indicate what went wrong?

comment:2 Changed on 12/21/22 at 03:17:30 by Kyle Williams

That $PATH problem was my mistake. I had started a new shell when I went to reproduce the problem and copy the output for this ticket. I forgot to do the export on my $PATH which typically is this:

/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/kyle/qs/rtems/6/bin

In which case the error is this:

+ ./waf configure --prefix=/home/kyle/qs/rtems/6 --rtems-config=config.ini
Setting top to                           : /home/kyle/qs/src/rsb/rtems/build/rtems-kernel-bsps-1/rtems-kernel-bsps-1-d0b92735b0dfd509e1edb82c7145042b67714f43/rtems-d0b92735b0dfd509e1edb82c7145042b67714f43
Setting out to                           : /home/kyle/qs/src/rsb/rtems/build/rtems-kernel-bsps-1/rtems-kernel-bsps-1-d0b92735b0dfd509e1edb82c7145042b67714f43/rtems-d0b92735b0dfd509e1edb82c7145042b67714f43/build
Regenerate build specification cache (needs a couple of seconds)...
Section name 'atsamv' is a malformed 'arch/bsp' tuple
(complete log in /home/kyle/qs/src/rsb/rtems/build/rtems-kernel-bsps-1/rtems-kernel-bsps-1-d0b92735b0dfd509e1edb82c7145042b67714f43/rtems-d0b92735b0dfd509e1edb82c7145042b67714f43/build/config.log)
shell cmd failed: /bin/sh -ex  /home/kyle/qs/src/rsb/rtems/build/rtems-kernel-bsps-1/do-build
error: building rtems-kernel-bsps-1

The line:

Section name 'atsamv' is a malformed 'arch/bsp' tuple

gave me a clue. So I used:

../source-builder/sb-set-builder --prefix=$HOME/qs/rtems/6 --target=arm-rtems6 --with-rtems-bsp=arm/atsamv --with-rtems-tests=yes 6/rtems-kernel

Which begs the question, why does the Quick Start Guide use:

--with-rtems-bsp=erc32

in Section 2.5.1 if its supposed to be 'arch/bsp'?

But that command seems to complete successfully:

$ ../source-builder/sb-set-builder --prefix=$HOME/qs/rtems/6 --target=arm-rtems6 --with-rtems-bsp=arm/atsamv --with-rtems-tests=yes 6/rtems-kernel
RTEMS Source Builder - Set Builder, 6 (65f83cf973d6)
Build Set: 6/rtems-kernel
config: tools/rtems-kernel-6.cfg
package: rtems-kernel-bsps-1
building: rtems-kernel-bsps-1
sizes: rtems-kernel-bsps-1: 225.306MB (installed: 33.319MB)
cleaning: rtems-kernel-bsps-1
reporting: tools/rtems-kernel-6.cfg -> rtems-kernel-bsps-1.txt
reporting: tools/rtems-kernel-6.cfg -> rtems-kernel-bsps-1.xml
staging: rtems-kernel-bsps-1 -> /home/kyle/qs/src/rsb/rtems/build/tmp/sb-1000-staging
installing: rtems-kernel-bsps-1 -> /home/kyle/qs/rtems/6
cleaning: rtems-kernel-bsps-1
installing: 6/rtems-kernel -> /home/kyle/qs/rtems/6
clean staging: 6/rtems-kernel
Staging Size: 33.323MB
Build Set: Time 0:00:15.271741

But then the test fails:

$ rtems-test --rtems-bsp=arm/atsamv build/arm/atsamv
RTEMS Testing - Tester, 6.0.not_released
 Command Line: /home/kyle/qs/rtems/6/bin/rtems-test --rtems-bsp=arm/atsamv build/arm/atsamv
 Host: Linux DESKTOP-U0P8IUP 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64
 Python: 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]
Host: Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.35 (Linux DESKTOP-U0P8IUP 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64)
error: cannot find bsp configuration file: arm/atsamv.ini

Where am I going wrong? Am I malforming the command parameters again? Are the proper forms documented anywhere? I haven't seen anything in the manual yet.

comment:3 Changed on 05/19/23 at 04:04:25 by Jeffrey H. Johnson

I can confirm this is an error in the documentation - it should be made with a *slash*, that is ../rsb/source-builder/sb-set-builder --prefix=$HOME/rtems/6/ --host=sparc-rtems6 --with-rtems-bsp=sparc/erc32 6/rtems-libbsd, or ../rsb/source-builder/sb-set-builder --prefix=$HOME/rtems/6/ --target=aarch64-rtems6 --with-rtems-bsp=aarch64/raspberrypi4b --with-rtems-test=yes 6/rtems-kernel

Note: See TracTickets for help on using tickets.