OVP Forums - A community of assistance, help, questions, and answers.
  FAQFAQ    SearchSearch      RegisterRegister  ProfileProfile    Log in to check your private messagesLog in to check your private messages    Log inLog in
Demo could not run

 
Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> Ask a Question
View previous topic :: View next topic  
Author Message
YanChang



Joined: 17 Jun 2015
Posts: 5

PostPosted: Tue Jun 23, 2015 3:57 pm    Post subject: Demo could not run Reply with quote

I use armcc cross compile the fibonacci.c the demo in OVPsim_arm directory. The compilation passed but when I ran the RUN_fibonacci.sh case, the simulation just hung after print out the program header information like this:
-----------------------------------------------------------------------

OVPsim (32-Bit) v20150205.3 Open Virtual Platform simulator from www.OVPworld.org.
Copyright (c) 2005-2015 Imperas Software Ltd. Contains Imperas Proprietary Information.
Licensed Software, All Rights Reserved.
Visit www.IMPERAS.com for multicore debug, verification and analysis solutions.

OVPsim started: Tue Jun 23 16:51:42 2015


Info (ICM_AL) Found attribute symbol 'modelAttrs' in file 'C:/Imperas/lib/Windows32/ImperasLib/arm.ovpworld.org/semihosting/armNewlib/1.0/model.dll'
Info (ICM_AL) Found attribute symbol 'modelAttrs' in file 'C:/Imperas/lib/Windows32/ImperasLib/arm.ovpworld.org/processor/arm/1.0/model.dll'
Info (OR_OF) Target 'platform/cpu0' has object file read from 'fibonacci.ARM_CORTEX_R4.elf'
Info (OR_PH) Program Headers:
Info (OR_PH) Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align
Info (OR_PD) LOAD 0x00000034 0x00008000 0x00008000 0x000001e4 0x00000244 RWE 4
--------------------------------------------------------------------
Any help is appreciated.
Back to top
View user's profile Send private message
DuncGrah
OVP Technologist
OVP Technologist


Joined: 27 Feb 2008
Posts: 1656
Location: United Kingdom

PostPosted: Wed Jun 24, 2015 1:21 am    Post subject: Reply with quote

If you have compiled a C program using the C libraries provided with the cross compiler toolchain there are specific functions or instructions that are used for detection of the semihosting. Semihosting is required to allow access to the Host system, for example printf directed to host stdout, access to files on host filesystem etc

The semihost library loaded must be the correct one for the Cross Compiler C libraries that are being included in your application.

As you as using the armcc compiler I suspect that the semihosting required is by the ARM Angel trap. This is a specific instruction used to tell a connected debugger or an OVP semihost library that a function is being performed that should be completed by the debugger or semihost library, for example open, read, write ...

I can see from the logfile you added
Quote:
Info (ICM_AL) Found attribute symbol 'modelAttrs' in file 'C:/Imperas/lib/Windows32/ImperasLib/arm.ovpworld.org/semihosting/armNewlib/1.0/model.dll'
that the armNewlib semihost library is being loaded.
Please try swapping the armNewlib (built for the CodeSourcery ARM Toolchain) semihost library with the armAngel (built for ARM Angel trap) semihost library.
Back to top
View user's profile Send private message Visit poster's website
YanChang



Joined: 17 Jun 2015
Posts: 5

PostPosted: Wed Jun 24, 2015 9:22 am    Post subject: How to swap the library? Reply with quote

Hi DuncGrah,

Thanks for you help.

Can you tell me how to swap the armAngel and armNewlib libraries? I do find them both in two directories: c:/Imperas/ImperasLib/source.arm.ovpword.org/semihosting/ and c; Imperas/lib/Windows32/ImperasLib/arm.ovpworld.org/semihosting/. Can I just rename them?
Back to top
View user's profile Send private message
DuncGrah
OVP Technologist
OVP Technologist


Joined: 27 Feb 2008
Posts: 1656
Location: United Kingdom

PostPosted: Thu Jun 25, 2015 12:29 am    Post subject: Reply with quote

Quote:
Can I just rename them?
NO!

The items in the library are all unique and are then referenced and selected in the platform C file.

So in the platform C file you will have the selection of the semihost library from the VLNV component Library using
Code:
    const char *armSemihost = icmGetVlnvString(NULL, "arm.ovpworld.org", "semihosting", "armNewlib", "1.0", "model");

Simply change armNewlib to the required semihost library you want armAngel
Code:
    const char *armSemihost = icmGetVlnvString(NULL, "arm.ovpworld.org", "semihosting", "armAngel", "1.0", "model");

So now the armAngel semihost library will be loaded, selected from the library by the V/L/N/V using icmGetVlnvString(NULL, V, L, N, V, "model");
Back to top
View user's profile Send private message Visit poster's website
YanChang



Joined: 17 Jun 2015
Posts: 5

PostPosted: Thu Jun 25, 2015 10:14 am    Post subject: Swap the libray but not work Reply with quote

Hi DuncGrah,

I have replaced all "armNewLib" with "armAngel" for all platform.c file under the path %IMPERAS_HOME/ImperasLib/Source/arm.ovpworld.org/platform/. But I could still see the problem as I run the demo script. Do I need to do anything else? I find there are also a lot platform.igen.xml are using "armNewLib", also need to change them?

Thanks in advance.
Back to top
View user's profile Send private message
YanChang



Joined: 17 Jun 2015
Posts: 5

PostPosted: Mon Jun 29, 2015 9:49 am    Post subject: Reply with quote

Hi DuncGrah,

I have fixed the previous problem. I misunderstood your reference platform c file. It should be the OVPSim_arm.c in the Demo path instead of platform.c file in the library dir. After change in the OVPSim_arm.c, I can see some print out.
----------------------------------------------------------------------------

Info (ICM_AL) Found attribute symbol 'modelAttrs' in file 'C:/Imperas/lib/Windows32/ImperasLib/arm.ovpworld.org/semihosting/armAngel/1.0/model.dll'
Info (ICM_AL) Found attribute symbol 'modelAttrs' in file 'C:/Imperas/lib/Windows32/ImperasLib/arm.ovpworld.org/processor/arm/1.0/model.dll'
Info (OR_OF) Target 'platform/cpu0' has object file read from 'fibonacci.ARM_CORTEX_R4.elf'
Info (OR_PH) Program Headers:
Info (OR_PH) Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align
Info (OR_PD) LOAD 0x00000034 0x00008000 0x00008000 0x000001e4 0x00000244 RWE 4
Info (ARM_ANGEL_HEAP_INFO) ARM Angel heap_base=0xc0000000 heap_limit=0xdfffffff stack_pointer=0xfffffffc stack_limit0xe0000000
Info (ARM_ANGEL_REPORT_EXCEPTION) Process exception (0x0,unknown)
*** simulation interrupted
Info
Info ---------------------------------------------------
Info CPU 'platform/cpu0' STATISTICS
Info Type : arm (Cortex-R4)
Info Nominal MIPS : 100
Info Final program counter : 0x81cc
Info Simulated instructions: 1,535,012,228
Info Simulated MIPS : 385.9
Info ---------------------------------------------------
Info
Info ---------------------------------------------------
Info SIMULATION TIME STATISTICS
Info Simulated time : 15.35 seconds
Info User time : 3.98 seconds
Info System time : 0.00 seconds
Info Elapsed time : 3.99 seconds
Info Real time ratio : 3.84x faster
Info ---------------------------------------------------

OVPsim finished: Mon Jun 29 10:43:27 2015


OVPsim (32-Bit) v20150205.3 Open Virtual Platform simulator from www.OVPworld.org.
Visit www.IMPERAS.com for multicore debug, verification and analysis solutions.
----------------------------------------------------------------------------
There problem is there is still no print out from the Fibonacci program yet. I see it it is interrupted. Any suggestions?
Back to top
View user's profile Send private message
YanChang



Joined: 17 Jun 2015
Posts: 5

PostPosted: Mon Jun 29, 2015 10:03 am    Post subject: Reply with quote

Hi DuncGraph,

Problem solved. The printing statement was commented due to compilation error. After uncommenting, everything works now.

Thanks,
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> Ask a Question All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Information regarding OVP © 2008-2022 Imperas Software