This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Questions about vectors.S (ARM port)


> 1) Where the symbols __rom_data_start is defined? I think it is generated by
> the linker but I did not find it in the documentation of ld.

In target.ld the linker script in install/lib/

>
> 2) Which is the difference between the following instructions?
>               ldr r1, =__exception_handlers
>               ldr r1, .__exception_handlers
>               ldr r1, __exception_handlers
-the first one puts the value __exception_handlers in r1.(It is actually a
pseudo instruction because on ARM there is no way of putting  32bit
immediate in a reg in a single instruction unless its representable as a
rotation of an 8 bit value)
-the second and the 3rd are similar but refer to different memory
addresses.
ldr r1,something :
Put in r1 word at address something

> 3) Which is the meaning of the following macro?
> #define  PTR(name)
> .##name: .word name
 cpp the GNU C preprocessor expands ##something to the literal string
something.
So PTR(pig) is similar to
.pig .word pig
in other words at address pig we'll have the value pig.

cpp is usually invoked before assembling a gas program.

> 4) The boot procedure assumes that the PLATFORM_SETUP1 macro performs
> a remap operation in order to map RAM memory at the address 0.
> If this operation is not possible (some microcontrollers don't permit to
> modify
> the base address of CS0), is it necessary to heavily change the vectors.S
> file?
PLATFORM_SETUP is a macro defined in your platform specific files
vectors.S just includes it.So you need to have a PLATFORM_SETUP which
knows about your mappings or lack of them. On those targets without
mapping PLATFORM_SETUP does not do it.Look at arch/arm/eb40 it's a
platform without MMu hence that macro does few things.

I hope I got these all right.
Jani.


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]