This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Does DS-5 ultimate evaluation version offer an FVP to ARMv8 executable?

I have compiled a simple "Hello World" program on DS-5 ultimate evaluation version and couldn't find a bare metal FVP on which I can run it. When I select "ARM FVP->VE_AEMv8x1->Bare Metal Debug->Debug ARMAEMv8-A" in "Connection" tab of "Debug Configuration" connection fails and I see a message that "Unable to connect to armv8_FVP"

  • Yes, there is an ARMv8-A model provided with DS-5 Ultimate edition.  It's the "VE_AEMv8x4" (4 cores, based on Versatile Express memory map):

      ARM FVP --> VE_AEMv8x4 --> Bare Metal Debug --> Debug ARMAEMv8-A_MP_<n>

    Where n is 0 to 3.

    As this is a multi-core target, if you are writing bare metal code you will need to take this into account.  This could be as simple as putting the cores you do not want to use into stand-by.  Alternatively, having a proper multi-core boot scheme (DS-5 comes with an example).

  • On selecting ARM FVP --> VE_AEMv8x4 --> Bare Metal Debug --> Debug ARMAEMv8-A_MP_<0> I am getting following error

    "ERROR(TAB180): The semihosting breakpoint address has not been specified"

    How could I resolve this error?

    How could I put other core into stand-by?

    Best Regards,

  • I've not noticed that before, but I get it when connecting to the FVP as well.  Doesn't seem to stop semihosting from working, my test image (which had a number of semihosting calls) worked without a hitch.  Have you tried building and running one of the example projects?

    On the putting the cores into stand-by, there are a couple of ways you could do this.  A relatively simple method would be to have a check at the beginning of your initialization code.  Something like this:

      MRS x0, MPIDR_EL1   ; Read MPDIR, which reports affinity
      AND x0, x0, #0xFF   ; Mask to leave Aff0 field
      CBZ x0, boot        ; If Aff0==0 (core 0), branch to boot code
    sleep
      WFI                 ; If Aff0!=0 (cores 1 to 3), go to sleep
      B sleep
    boot
    
    
  • I see following messages in command window

    Connected to stopped target ARM FVP - VE_AEMv8x4

    Execution stopped at: EL3:0x0000000000000000

    loadfile "D:\test-armv8\hello\Debug\hello.axf"

    EL3:0x0000000000000000   DCI      0xe7ff0010 ; ? Undefined

    Loaded section ER_RO: EL3:0x0000000000008000 ~ EL3:0x000000000000CCD3 (size 0x4CD4)

    Loaded section ER_RW: EL3:0x000000000000CCD8 ~ EL3:0x000000000000CD1F (size 0x48)

    Loaded section ER_ZI: EL3:0x000000000000CD20 ~ EL3:0x000000000000CEEF (size 0x1D0)

    Entry point EL3:0x0000000000008000

    cd "D:\test-armv8"

    ERROR(TAB180): The semihosting breakpoint address has not been specified

    Working directory "D:\test-armv8"

    set debug-from main

    start

    Starting target with image D:\test-armv8\hello\Debug\hello.axf

    Running from entry point

    wait

    but I don't see my print "Hello World" in Target Console window which has following prints

    terminal_1: Listening for serial connection on port 5000

    terminal_0: Listening for serial connection on port 5001

    terminal_2: Listening for serial connection on port 5002

    terminal_3: Listening for serial connection on port 5003

    WARNING: motherboard.mmc: MMC backing store file mmc.dat could not be used

    INFO: motherboard.mmc backing store: no image file connected

    CADI server started listening to port 7000

    CADI server is reported on port 7000

    Could ARM provide a simple "Hello World" application running on a single core?

    Best Regards,

  • I got following reply from Ash Wilding - Applications Engineer through support-sw@arm.com that solved my problem.

    Hello Ashwani,

    This is because your Hello World program is being loaded into an invalid location. By default, programs are loaded to location 0x0000_0000. Consult the following memory map: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0834a/rob1395750469013.html

    As you can see, address 0x0000_0000 is the location of the Trusted Boot ROM / secureflash, so you definitely don't want to be loading your program here. Instead, you want to load the program at the location of DRAM, which is address 0x8000_0000 according to the memory map.

    To do this, first right-click your project in DS-5 and then navigate to Properties > C/C++ Build > Settings > ARM Linker 6 > Image Layout.

    In the "RO base address (--ro_base)" field, enter the following: 0x80000000

    Click "OK", rebuild your project, and attempt to run it again. This time you should see "Hello world" printed in the Target Console window.

    This method does not give you much control. More realistic projects instead use scatter files, passing these to the ARM Linker using the "--scatter=scatter.txt" option. For more information regarding scatter files, see this ARM Infocenter link: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0493h/BABFJEAI.html

    Also, be sure to check the ARMv8 Bare Metal examples provided with DS-5 as these include complete scatter files for the model.

    I hope this helps.

    Regards,

    Ash.

    --

    Ash Wilding - Applications Engineer

    ARM Ltd, 110 Fulbourn Road, Cambridge CB1 9NJ, England