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

Fix C++ exception handling on NIOS2 #35790

Merged
merged 3 commits into from
May 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/arch/nios2/linker.ld
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ SECTIONS

} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)

#include <linker/cplusplus-ram.ld>

__data_ram_end = .;

SECTION_DATA_PROLOGUE(_BSS_SECTION_NAME,(NOLOAD),)
Expand All @@ -250,8 +252,6 @@ SECTIONS

#include <linker/common-noinit.ld>

#include <linker/cplusplus-ram.ld>

/* Define linker symbols */
_image_ram_end = .;
_end = .; /* end of image */
Expand Down
1 change: 0 additions & 1 deletion subsys/cpp/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ if LIB_CPLUSPLUS

config EXCEPTIONS
bool "Enable C++ exceptions support"
depends on !NIOS2
help
This option enables support of C++ exceptions.

Expand Down
1 change: 0 additions & 1 deletion tests/subsys/cpp/libcxx/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ tests:
min_flash: 54
tags: cpp
cpp.libcxx.exceptions:
arch_exclude: nios2
Copy link
Collaborator

Choose a reason for hiding this comment

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

we probably need to platform_exclude: qemu_nios2 here.

Copy link
Member Author

Choose a reason for hiding this comment

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

For the time being, twister automatically skips any tests with FLASH overflow and treats it as a non-failure. Also, If we ever manage to slim down Zephyr such that it can fit into the current 128KB flash, it will pass anyway.

stephanos@devworx1:~/Dev/zephyrproject/zephyr$ scripts/twister -v -N -s tests/subsys/cpp/libcxx/cpp.libcxx.exceptions -p qemu_nios2
ZEPHYR_BASE unset, using "/home/stephanos/Dev/zephyrproject/zephyr"
Renaming output directory to /home/stephanos/Dev/zephyrproject/zephyr/twister-out.14
INFO    - Zephyr version: v2.6.0-rc2-57-g053ff6fa0e72
INFO    - JOBS: 60
INFO    - Using 'zephyr' toolchain.
INFO    - Building initial testcase list...
INFO    - 1 test scenarios (1 configurations) selected, 0 configurations discarded due to filters.
INFO    - Adding tasks to the queue...
INFO    - Added initial list of jobs to queue
INFO    - 1/1 qemu_nios2                tests/subsys/cpp/libcxx/cpp.libcxx.exceptions      SKIPPED (FLASH overflow)

INFO    - 0 of 0 test configurations passed (0.00%), 0 failed, 1 skipped with 0 warnings in 11.06 seconds
INFO    - In total 0 test cases were executed, 4 skipped on 1 out of total 372 platforms (0.27%)
INFO    - 0 test configurations executed on platforms, 0 test configurations were only built.
INFO    - Saving reports...
INFO    - Writing xunit report /home/stephanos/Dev/zephyrproject/zephyr/twister-out/twister.xml...
INFO    - Writing xunit report /home/stephanos/Dev/zephyrproject/zephyr/twister-out/twister_report.xml...
INFO    - Run completed

In that sense, I doubt it is necessary to platform_exclude: qemu_nios2 here.

@nashif any comments on this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, if that's the case than no issues.

toolchain_exclude: xcc
min_flash: 54
tags: cpp
Expand Down