Skip to content

Conversation

maribu
Copy link
Member

@maribu maribu commented May 17, 2023

Contribution description

Filter out GCC only --param=min-pagesize=0 in clangd mode. This fixes compilation of rust applications, that now fails with:

thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("error: argument unused during compilation: '--param=min-pagesize=0' [-Wunused-command-line-argument]\n")', /home/maribu/.cargo/git/checkouts/rust-riot-sys-d12733b89271907c/b4bd4bd/build.rs:224:10

Testing procedure

make BOARD=cc1352-launchpad -C examples/rust-hello-world

fails in master, but should work again with this PR.

Issues/PRs references

None

@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: Rust Area: Rust wrapper labels May 17, 2023
@github-actions github-actions bot added the Area: tools Area: Supplementary tools label May 17, 2023
@maribu maribu requested a review from chrysn May 17, 2023 10:20
@riot-ci
Copy link

riot-ci commented May 17, 2023

Murdock results

✔️ PASSED

dd19110 dist/tools/compile_commands: add another workaround

Success Failures Total Runtime
1 0 1 01m:00s

Artifacts

@@ -335,6 +335,8 @@ def generate_compile_commands(args):
# it's called -mlong-calls in LLVM, but we don't need it for clangd
# as we do not generate code anyway
'-mlongcalls',
# GCC specific diagnostics: Tell GCC address spaced starts at 0
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess "spaced" is a typo?

Filter out GCC only `--param=min-pagesize=0` in `clangd` mode. This
fixes compilation of rust applications, that now fails with:

    thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("error: argument unused during compilation: '--param=min-pagesize=0' [-Wunused-command-line-argument]\n")', /home/maribu/.cargo/git/checkouts/rust-riot-sys-d12733b89271907c/b4bd4bd/build.rs:224:10
@maribu maribu force-pushed the dist/tools/compile_commands branch from 6a85e3d to dd19110 Compare May 22, 2023 11:26
Copy link
Member

@chrysn chrysn left a comment

Choose a reason for hiding this comment

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

It's purely diagnostic, and the typo is fixed, so off we go. Thanks.

@chrysn
Copy link
Member

chrysn commented May 23, 2023

bors merge

bors bot added a commit that referenced this pull request May 23, 2023
19602: dist/tools/compile_commands: add another workaround r=chrysn a=maribu

### Contribution description

Filter out GCC only `--param=min-pagesize=0` in `clangd` mode. This fixes compilation of rust applications, that now fails with:

    thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("error: argument unused during compilation: '--param=min-pagesize=0' [-Wunused-command-line-argument]\n")', /home/maribu/.cargo/git/checkouts/rust-riot-sys-d12733b89271907c/b4bd4bd/build.rs:224:10


19618: cpu/stm32: fix riotboot settings for L4 and WB r=aabadie a=gschorcht

### Contribution description

This PR fixes the `riotboot` configuration for L4 and WB.

The family is not called `stm32l4` or `stm32wb` but `l4` and `wb`. That is, the `riotboot` configuration didn't work at all. Furthermore, a minimum `RIOTBOOT_LEN` of `0x2000` is required for L4.

Found when investigating the compilation errors for `bootloaders/riotboot_serial` in PR #19576.

### Testing procedure

1. Green CI.
2. Use the following commands:
    ```
    BOARD=nucleo-l496zg make -C tests/riotboot info-debug-variable-RIOTBOOT_HDR_LEN
    BOARD=p-nucleo-wb55 make -C tests/riotboot info-debug-variable-RIOTBOOT_HDR_LEN
    ```
    In master these commands give
    ```
    0x400
    ```
    With this PR these commands give
    ```
    0x200
    ```
    as expected.
3. Use the following commands:
    ```
    BOARD=nucleo-l496zg make -C tests/riotboot info-debug-variable-RIOTBOOT_LEN
    BOARD=p-nucleo-wb55 make -C tests/riotboot info-debug-variable-RIOTBOOT_LEN
    ```
    In master these commands give
    ```
    0x1000
    ```
    With this PR these commands give
    ```
    0x2000
    ```
    as expected.

### Issues/PRs references


19643: examples/suit_update: some test fixes r=aabadie a=kaspar030



Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
@bors
Copy link
Contributor

bors bot commented May 23, 2023

Build failed (retrying...):

@bors
Copy link
Contributor

bors bot commented May 23, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 8408d69 into RIOT-OS:master May 23, 2023
@maribu maribu deleted the dist/tools/compile_commands branch May 24, 2023 19:08
@maribu
Copy link
Member Author

maribu commented May 24, 2023

Thx :)

@benpicco benpicco added this to the Release 2023.07 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Rust Area: Rust wrapper Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants