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
ARM Cortex-M3 and igen

 
Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> Getting Started
View previous topic :: View next topic  
Author Message
JensVkb



Joined: 08 Feb 2017
Posts: 26

PostPosted: Thu Jun 22, 2017 12:46 am    Post subject: ARM Cortex-M3 and igen Reply with quote

Hi

I'm trying to create a platform consisting out of a Cortex-M3 and a peripheral.

To make sure I build the correct module via a .tcl file and igen, I started without a peripheral and a very simple application.

application code:
Code:

#include <stdio>

int main(int argc, char **argv){
   printf("In main\n");
}


module.op.tcl
Code:

ihwnew -name CortexM3IntPeri

ihwaddbuss -instancename bus -addresswidth 32

ihwaddprocessor -instancename cpu1 -vendor.ovpworld.org \
   -library processor -type armm -version 1.0 \
   -variant Cortex-M3 -endian little

ihwconnect -bus bus -instancename cpu1 -busmasterport INSTRUCTION
ihwconnect -bus bus -instancename cpu1 -busmasterport DATA


Usinge the standard makefiles, I'm able to build both the application.elf file and the model.so file.

According the the examples, I should be able to use harness.exe to run the .elf file on the created module
Code:

harness.exe --modulefile module/model.so --program application.elf -v "$@"


While this command does not give any errors, the application is NOT executed. To make sure it's not my application, I used the iss.exe to try and run it on a Cortex-M3. The iss.exe does execute my application. This makes me believe the fault is in my module. Can anyone tell me what's missing?

Thanks in advance!
Back to top
View user's profile Send private message
JensVkb



Joined: 08 Feb 2017
Posts: 26

PostPosted: Thu Jun 22, 2017 1:50 am    Post subject: Solution Found Reply with quote

I found the solution in the manual (duh).

I forgot 2 options:
Code:

-semihostname armNewlib -semihostvendor arm.ovpworld.org


Thanks anyway.
Back to top
View user's profile Send private message
DuncGrah
OVP Technologist
OVP Technologist


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

PostPosted: Tue Jun 27, 2017 4:27 am    Post subject: Reply with quote

A note to say here .. if you are not sure your applcation is executing i.e. the simualtor starts up and appears to run but nothing happens.

try running again using the following additional command line arguments
turn on tracing so you can see if instructions are being executed
--trace --tracechange
start to debug the application with GDB (console)
--gdbconsole
or GDB GUI
--gdbegui
turn on verbose output
--verbose

Of course in your case I assume you will see the instructions executed BUT you do not see any output e.ge from using printf because there must be the correct semihost library loaded.
In the ISS this is loaded automatically, when using your own module you must specify either to use the default semihost library or a specific semihost library.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Open Virtual Platforms Forum Index -> Getting Started 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-2020 Imperas Software