OVP Forums - A community of assistance, help, questions, and answers.
|
View previous topic :: View next topic |
Author |
Message |
JensVkb
Joined: 08 Feb 2017 Posts: 31
|
Posted: Thu Jun 22, 2017 12:46 am Post subject: ARM Cortex-M3 and igen |
|
|
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 |
|
 |
JensVkb
Joined: 08 Feb 2017 Posts: 31
|
Posted: Thu Jun 22, 2017 1:50 am Post subject: Solution Found |
|
|
I found the solution in the manual (duh).
I forgot 2 options:
Code: |
-semihostname armNewlib -semihostvendor arm.ovpworld.org
|
Thanks anyway. |
|
Back to top |
|
 |
DuncGrah OVP Technologist

Joined: 27 Feb 2008 Posts: 1646 Location: United Kingdom
|
Posted: Tue Jun 27, 2017 4:27 am Post subject: |
|
|
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 |
|
 |
|
|
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
|