How to find __ram_vectors_start on iMX.6 Sabre

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to find __ram_vectors_start on iMX.6 Sabre

876 Views
spayno
Contributor I

Background. I'm learning how to make a bootloader / minimal operating system on an i.MX6 Sabre board. 

  • The (older) book I'm using pastes a new vector table onto 0x00000000 however, this doesn't work on the iMX6 and probably any ARMv7 board. 
  • What appears to work is the iMX6Platform_SDK which uses a linker script in apps/common/basic_sdk_app.ld.S to put the vector table at the end of OCRAM (at 0x0093FFB8).

I have 3 questions I'm hoping someone with more experience can comment on:

1. Is this address 0x0093FFB8 hardwired for my board?

2. Is it possible to look it up at runtime (instead of specifying it at link time?) 

3. I found it by digging around in the linker script.  Is there a more normal way to find this kind of value? Is there a specification or datasheet I should be referring to?

Labels (1)
Tags (2)
0 Kudos
2 Replies

552 Views
Yuri
NXP Employee
NXP Employee

   According to section 8.4.5 (Exception Handling) of the i.MX6 DQ Reference Manual :
“The exception vectors located at the start of ROM are used to map all the ARM

exceptions (except the reset exception) to a duplicate exception vector table in internal

RAM.”

 

< http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf >

So, the vector table at 0x00000000 cannot be located, because it is occupied by boot ROM.

Instead internal RAM should be used.


Have a great day,

Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

552 Views
spayno
Contributor I

Thank you for the reference to the "i.MX 6Dual/6Quad Applications Processor Reference Manual" it was quite helpful as it shows on Figure 8.3 that This address 0x0093FFB8 *IS* hardwired for this board.

To answer my own questions, after looking at Chapter 8 and poking around using JTAG:

1. Is this address 0x0093FFB8 hardwired for my board?

Yes.  Look at Figure 8-3 to see where ROM is.  And then look at 0x00000028 in ROM: it's hardcoded to 0x0093FFBC which is the undefined address vector in OCRAM

2. Is it possible to look it up at runtime (instead of specifying it at link time?)

Yes, using 0x00000028 in ROM as above.  But that might not really be reasonable.

3. I found it by digging around in the linker script.  Is there a more normal way to find this kind of value? Is there a specification or datasheet I should be referring to?

Yes. Per your answer, read the Processor Reference Manual

0 Kudos