EmbeddedRelated.com
Forums

Cannot simulate in CrossStudio

Started by fjrg...@yahoo.com June 2, 2007
Hi

When building a solution of my own or those of the examples included in CrossWorks 1.5 for ARM, I cannot simulate them because the simulator launchs me to

dabort_handler:
b dabort_handler

My target is the LPC-E2129 board from Olimex.

When simulatin a solution without speceific target it works great. Does anybody can help me?? Am I missing something to configure in the project?? Thanks in advanced =)

An Engineer's Guide to the LPC2100 Series

--- In l..., fjrg76@... wrote:
>
> Hi
>
> When building a solution of my own or those of the examples included
in CrossWorks 1.5 for ARM, I cannot simulate them because the
simulator launchs me to
>
> dabort_handler:
> b dabort_handler
>
> My target is the LPC-E2129 board from Olimex.
>
> When simulatin a solution without speceific target it works great.
Does anybody can help me?? Am I missing something to configure in the
project?? Thanks in advanced =)
>

Since you are ending up in the Data Abort handler, your code is
apparently reading or writing a memory location that does not exist in
the memory map of your target device. Do you have the proper header
file for the device you are targeting?

--Dave
--- In l..., fjrg76@... wrote:
>>
>> Hi
>>
>> When building a solution of my own or those of the examples included
>in CrossWorks 1.5 for ARM, I cannot simulate them because the
>simulator launchs me to
>>
>> dabort_handler:
>> b dabort_handler
>>
>> My target is the LPC-E2129 board from Olimex.
>>
>> When simulatin a solution without speceific target it works great.
>Does anybody can help me?? Am I missing something to configure in the
>project?? Thanks in advanced =)
>>Since you are ending up in the Data Abort handler, your code is
>apparently reading or writing a memory location that does not exist in
>the memory map of your target device. Do you have the proper header
>file for the device you are targeting?
>
>--Dave

Hi

I'm using the "wizard" for this little project, and the startup files are those that CrossStudio decides. They are:

crt0.s
flash_placement.xml
Philips_LPC210X_Startup.s
Philips_LPC210X_Target.js
sram_placement.xml

When creating the project I chose LPC2129 as a target, so I supossed that the files that CS set for me are the correct ones.

Debugging step by step inside crt0.s there is certain point where the sim launchs me to the exception handler. This is exactly in the line 198 of such a file. An excerpt of this file is

/* Initialise the heap */
ldr r0, = __heap_start__
ldr r1, = __heap_end__
sub r1, r1, r0 /* r1 = r1-r0 */
mov r2, #0
str r2, [r0], #+4 /* *r0++ = 0 */ <-- from here to the exception (line 198)
str r1, [r0] /* *r0 = __heap_end__ - __heap_start__ */

I guess the crt0.s is not the right one for my target. May I choose another one??
--- In l..., fjrg76@... wrote:
>
> --- In l..., fjrg76@ wrote:
> >>
> >> Hi
> >>
> >> When building a solution of my own or those of the examples included
> >in CrossWorks 1.5 for ARM, I cannot simulate them because the
> >simulator launchs me to
> >>
> >> dabort_handler:
> >> b dabort_handler
> >>
> >> My target is the LPC-E2129 board from Olimex.
> >>
> >> When simulatin a solution without speceific target it works great.
> >Does anybody can help me?? Am I missing something to configure in the
> >project?? Thanks in advanced =)
> >>
> >
> >Since you are ending up in the Data Abort handler, your code is
> >apparently reading or writing a memory location that does not exist in
> >the memory map of your target device. Do you have the proper header
> >file for the device you are targeting?
> >
> >--Dave
> >
> > Hi
>
> I'm using the "wizard" for this little project, and the startup
files are those that CrossStudio decides. They are:
>
> crt0.s
> flash_placement.xml
> Philips_LPC210X_Startup.s
> Philips_LPC210X_Target.js
> sram_placement.xml
>
> When creating the project I chose LPC2129 as a target, so I supossed
that the files that CS set for me are the correct ones.
>
> Debugging step by step inside crt0.s there is certain point where
the sim launchs me to the exception handler. This is exactly in the
line 198 of such a file. An excerpt of this file is
>
> /* Initialise the heap */
> ldr r0, = __heap_start__
> ldr r1, = __heap_end__
> sub r1, r1, r0 /* r1 = r1-r0 */
> mov r2, #0
> str r2, [r0], #+4 /* *r0++ = 0 */ <-- from here to the exception
(line 198)
> str r1, [r0] /* *r0 = __heap_end__ - __heap_start__ */
>
> I guess the crt0.s is not the right one for my target. May I choose
another one??
>

Can't say anything about what you can do with your toolset.

The line that you say caused the Data Abort is storing R2 in a
location pointed to by R0, so the address in R0 must not be a valid
memory location for your target? The value in R0 was determined by the
symbol "__heap_start__", so you probably want to find out how you
defined that symbol? From the comments in your code fragment, R0
should be pointing to your RAM.

--Dave
Hi, if you purchased a valid copy, just email the support crew at
Rowley! If you're getting dumped at that point it's probably because
you haven't configured the project properly for your target.

Also, have you had a look at the FAQ on their website?
> Hi
>
> I'm using the "wizard" for this little project, and the startup
files are those that CrossStudio decides. They are:
>
> crt0.s
> flash_placement.xml
> Philips_LPC210X_Startup.s
> Philips_LPC210X_Target.js
> sram_placement.xml
>
> When creating the project I chose LPC2129 as a target, so I supossed
that the files that CS set for me are the correct ones.
>
> Debugging step by step inside crt0.s there is certain point where
the sim launchs me to the exception handler. This is exactly in the
line 198 of such a file. An excerpt of this file is
>
> /* Initialise the heap */
> ldr r0, = __heap_start__
> ldr r1, = __heap_end__
> sub r1, r1, r0 /* r1 = r1-r0 */
> mov r2, #0
> str r2, [r0], #+4 /* *r0++ = 0 */ <-- from here to the exception
(line 198)
> str r1, [r0] /* *r0 = __heap_end__ - __heap_start__ */
>
> I guess the crt0.s is not the right one for my target. May I choose
another one??
>
Hi, if you purchased a valid copy, just email the support crew at
>Rowley! If you're getting dumped at that point it's probably because
>you haven't configured the project properly for your target.
>
>Also, have you had a look at the FAQ on their website?
>> Hi
>>
>> I'm using the "wizard" for this little project, and the startup
>files are those that CrossStudio decides. They are:
>>
>> crt0.s
>> flash_placement.xml
>> Philips_LPC210X_Startup.s
>> Philips_LPC210X_Target.js
>> sram_placement.xml
>>
>> When creating the project I chose LPC2129 as a target, so I supossed
>that the files that CS set for me are the correct ones.
>>
>> Debugging step by step inside crt0.s there is certain point where
>the sim launchs me to the exception handler. This is exactly in the
>line 198 of such a file. An excerpt of this file is
>>
>> /* Initialise the heap */
>> ldr r0, = __heap_start__
>> ldr r1, = __heap_end__
>> sub r1, r1, r0 /* r1 = r1-r0 */
>> mov r2, #0
>> str r2, [r0], #+4 /* *r0++ = 0 */ str r1, [r0] /* *r0 = __heap_end__ - __heap_start__ */
>>
>> I guess the crt0.s is not the right one for my target. May I choose
>another one??
>>

Thanks to everyone that posted a comment. This is what people at Rowley says, but before that I want to say that they answer you incredible fast!! and always give you an exact response to your question. Thanks to them as well =)
I wrote:
-------------
Hi

Using CrossStudio 1.5 for ARM I tried to simulate the examples that come with the instalation. Specifically the one called "Led" for the LPC mcu. However I cannot do it because the simulator launches me to

_vectors:
...
ldr pc, [pc, #dabort_handler_address - . - 8] /* abort data */

in Philips_LPC210X_Startup.s.

Before that whenever I've tried to make a solution for a LPC everything goes ok, until I simulate it because the same problem happens. I thought it was a problem of the solution, but when looking at your own example I guess I'm missing something to make it run in the simulator. When building a solution without a specific target simulator works great. I hope you can help me with thisissue. Thanks =)
-------------------------

They wrote:
-----------------------

Message by Michael on Sun, 3rd Jun 2007 2:05 pm

The 1.5 release doesn't model the memory system of LPC21xx. The 1.6 release does model the memory system of the LCP21xx but not the peripherals.
-------------------------