Repository navigation
arch/rh850: add Renesas RH850 architecture and qemu-rh850-u2c board - #21456
Conversation
|
casaroli
left a comment
There was a problem hiding this comment.
Each arch has an Arch: and a Board: entry in .github/labeler.yml (Arch: renesas, Arch: tricore), but rh850 has none. A later PR on arch/rh850/** gets no arch label, so arch.yml takes "Allow the build" and starts every job.
Fix: add Arch: rh850 for arch/rh850/** and Board: rh850 for boards/rh850/**.
install= in tools/ci/platforms/ubuntu.sh:434 has rx_gcc_toolchain but no RH850 entry, so a local cibuild.sh run on Ubuntu has no v850-elf-gcc for /rh850.
Fix: add rh850_gcc_toolchain and rh850_qemu to ubuntu.sh as in linux.sh.
Impact says "checked on sim and ARM, see Testing", but Testing has no such check.
Fix: add the check and what it compared to Testing.
raiden00pl
left a comment
There was a problem hiding this comment.
please use NTFC for tests in CI
c1a6b80 to
6eae3e6
Compare
Thanks for the quick review. Added the rh850 labels to labeler.yml. ubuntu.sh now installs the toolchain and QEMU, together with linux.sh and the Dockerfile in #21497. The compiler.h change moved to #21498, which has the sim and ARM before/after results in Testing. |
Thanks for the quick review. I tried NTFC locally. It looks up test symbols by exact name, and v850 GCC prefixes C symbols with "_", so all tests get skipped and the run reports a pass. With a local fix for the prefix, test_os passes, but some nsh tests still time out, which I'm looking into. I'll send the prefix fix to nuttx-ntfc and switch this board to NTFC once that's sorted. Until then citest runs ostest under QEMU and checks the exit code. |
6eae3e6 to
b21cb99
Compare
casaroli
left a comment
There was a problem hiding this comment.
The body says "RH850 does not link without this change, so it is part of this PR.", but the compiler.h change is not in this PR now; it is in #21498. Without it, builtin_original() in include/nuttx/compiler.h names memcpy without the "_" prefix, and both defconfigs build with -Os, so qemu-rh850-u2c:nsh and :citest do not link if this PR merges first.
Fix: add depends-on: apache/nuttx/pull/21498 to the body.
The body still describes the old content: "v850 GCC prefixes C symbols with "_", so compiler.h now uses the compiler's user label prefix in the asm names of the builtin and fortify wrappers.", "compiler.h: same symbols and code on targets without a user label prefix (checked on sim and ARM, see Testing).", "CI builds both and runs ostest under QEMU through citest." and "CI: the Linux image gets the RH850 toolchain and QEMU." This PR has no compiler.h, Dockerfile or testlist change now.
Fix: remove these lines, and say that compiler.h is in #21498, the CI image in #21497, and that the testlist entries come in a later PR.
|
Thanks @casaroli @xiaoxiang781216 for the reviews. am currently making some core changes to the toolchain around RH850, which should be available soon and I will update this changes for this PR. Mostly tracked under https://github.com/open-rh850 |
403a448 to
47279ff
Compare
Thanks. #21498 is merged now, so the link issue is gone. I updated the description: compiler.h was in #21498, the CI image is in #21497, and the testlist entries come in a later PR. citest is dropped too |
|
@casaroli @xiaoxiang781216 @raiden00pl kindly revisit. |
@raiden00pl citest is dropped as @xiaoxiang781216 suggested. NTFC will come in a follow up PR with the nuttx-ntfc prefix fix. |
@ssekar15 please rebase to the last master and enable ci in this pr since #21497 is merged. |
Add the architecture code for the Renesas RH850 family with the G4KH core, built with v850-elf GCC through Make or CMake. Interrupts nest by priority, and a context switch happens only at the outermost exit. Co-authored-by: Saravanan Sekar <saravanan@linumiz.com> Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Add the RH850/U2C chip (R7F702600) on CPU0, with the interrupt controllers, OSTM0 as the system timer (ticked or tickless), the RLIN311 UART as console and the software system reset. Co-authored-by: Parthiban Nallathambi <parthiban@linumiz.com> Signed-off-by: Saravanan Sekar <saravanan@linumiz.com> Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Add a board for the rh850-u2c machine of qemu-rh850 (github.com/linumiz/qemu-rh850), with an nsh configuration. With QEMU_RH850_U2C_TEST_EXIT, a test run stops QEMU with its exit status, so a failed test or a panic shows up as a non-zero exit code. Co-authored-by: Saravanan Sekar <saravanan@linumiz.com> Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Label changes under arch/rh850 and boards/rh850 like those of the other architectures, so that RH850 pull requests get their Arch and Board labels. Signed-off-by: Saravanan Sekar <saravanan@linumiz.com> Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
Add the pages for the RH850 architecture, the RH850/U2C chip and the qemu-rh850-u2c board. Signed-off-by: Saravanan Sekar <saravanan@linumiz.com> Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
The Linux CI image now has the v850-elf toolchain and qemu-system-rh850. Build qemu-rh850-u2c:nsh with CMake. Signed-off-by: Saravanan Sekar <saravanan@linumiz.com> Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
44baa63
47279ff to
44baa63
Compare
Rebased on master and added the testlist commit, so CI now builds qemu-rh850-u2c:nsh. |
Summary
RH850 is Renesas' 32-bit automotive MCU family. This PR adds the RH850 architecture with the G4KH core, the RH850/U2C chip and a board for the QEMU rh850-u2c machine, so the port can be built and tested in CI before real boards follow. The chip covers what is needed to run NuttX: the interrupt controllers, the OSTM system timer (ticked or tickless), the RLIN3 UART console and software reset. The board has an nsh configuration.
The compiler.h change for the v850 user label prefix was merged in #21498. The toolchain and QEMU for the CI image are in #21497. The testlist entries for CI come in a later PR, once that image is published.
Toolchain: https://github.com/linumiz/rh850-gcc-toolchain/releases/tag/v1.2.0
QEMU: https://github.com/linumiz/qemu-rh850/releases/tag/rh850-v1.2.0
Impact
Testing
Host: apache-nuttx-ci-linux image, x86_64
Toolchain: v850-elf GCC 14.3.0 (release above)
QEMU: qemu-system-rh850 11.1.90 (release above)
nuttx-apps: f04aee6015
Run Test and Boot log
Boot log from the earlier v1.0.0 build; the nsh behaviour is the same with v1.2.0.
$ export PATH=/bin:/bin:$PATH
$ cd nuttx
$ ./tools/configure.sh -l qemu-rh850-u2c:nsh
$ make -j$(nproc)
$ qemu-system-rh850 -M rh850-u2c,test-exit=on -icount shift=4,sleep=on -nographic -kernel nuttx