Skip to content

Can we use an Arm FVP for testing #358

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

Closed
thejpster opened this issue Oct 25, 2021 · 7 comments
Closed

Can we use an Arm FVP for testing #358

thejpster opened this issue Oct 25, 2021 · 7 comments

Comments

@thejpster
Copy link
Contributor

#355 is brilliant, we we should do that. But can we also do something with https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps? It appears to emulate a Cortex-M55.

@thejpster
Copy link
Contributor Author

Ah, to be specific, I was looking at the Corstone-300 FVP.

The Corstone-300 model is aligned with the Arm MPS3 development platform. It is based on the Cortex-M55 processor and offers a choice of the Ethos-U55 and Ethos-U65 processors.

Unlike the other FVPs, these ones appear to have no licence control (at least at download time). Normally you need an Arm account and a licence to use an FVP.

@thejpster
Copy link
Contributor Author

Seems to be an SDL application - and I think the serial ports come up as TCP connections.

image

@newAM
Copy link
Member

newAM commented Oct 30, 2021

I tried this out, some thoughts:

  • Not as accessible as QEMU.
    • ARM packaged the software poorly which will make it difficult to use on some Linux systems, officially it is only supported on recent versions of RedHat Enterprise and Ubuntu Linux.
    • Impossible to use on some systems. No binaries for mac users.
  • Telemetry is built-in by default. This is a minor gripe since it can be disabled. I dislike that it is opt-out instead of opt-in.
  • Writing tests for the Ethos-U55 FPV will result in less portable code. I was not able to find any semihosting features on the platform, testing would need a serial driver specific to the Ethos-U55 for logging.
  • The platform is difficult to debug.
    • There is not a lot of documentation on this platform (publicly) available.
    • Closed source. Given that we are not paying customers I am not sure what we can expect for support, if at all.

I wanted to start writing some tests and poking at the peripherals to do a more technical comparison, but the sparse documentation for the FVP does not make this a very pleasant experiment.

I do like that the FVP model is a better representation of the CPU, but I think that QEMU is a better choice for the target audience of cortex-m.

@jonathanpallant
Copy link
Contributor

I had a chat with Arm about this and the basic free FVP doesn't have any kind of debug ability. That only comes with the paid licences. So it's possible we could run on FVP but then debugging any issues would only be possible on local machines by developers who had those licences.

@jonathanpallant
Copy link
Contributor

For anyone interested in playing, this Dockerfile will spin up the GUI for you. I post it as doing an X server in a Docker container isn't straightforward. You'll want to adapt this to either start the FVP with your binary, or start an xterm so you can run the FVP GUI on demand.

# syntax=docker/dockerfile:1
FROM ubuntu:latest
RUN apt-get -y update && apt-get install -y tightvncserver twm xterm libatomic1 libdbus-1-3
COPY FVP_Base_AEMv8R_11.17_21.tgz /tmp
RUN tar xvf /tmp/FVP_Base_AEMv8R_11.17_21.tgz -C /root
RUN mkdir -p /root/.vnc
RUN echo "letmein123" | vncpasswd -f > /root/.vnc/passwd
RUN chmod 400 /root/.vnc/passwd
EXPOSE 5901/tcp
EXPOSE 5000/tcp
EXPOSE 5001/tcp
EXPOSE 5002/tcp
EXPOSE 5003/tcp
CMD USER=root tightvncserver -geometry 1920x1080 && DISPLAY=:1 /root/AEMv8R_base_pkg/models/Linux64_GCC-9.3/FVP_BaseR_AEMv8R

@thejpster
Copy link
Contributor Author

@thejpster
Copy link
Contributor Author

thejpster commented Jun 25, 2023

In https://github.com/Neotron-Compute/Neotron-QEMU-BIOS/tree/a5b00635feff73aa2b551c4673f97774ae1f7121 I have an example application which runs in both QEMU and the Arm FVP - both emulating the MPS3-AN547 (which is an Arm MPS3 evaluation board where the FPGA is loaded with the Corstone SSE-300 SoC image, which in turn has a Cortex-M55 inside it).

In that repo is a UART driver, so there's a starter for ten. You could set up various interrupt handlers and write to the UART from them to prove they'd been called, and so on.

Edit: Ah, I see in https://github.com/rust-embedded/cortex-m/tree/master/testsuite we already have some QEMU tests on the LM3 simulated machine. That's probably good enough, we can close this - after two days I didn't find anything FVP can do that QEMU can't do and it's nightmarishly undocumented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants