1/1

|
Relocate ISR to RAM area and execute
by krantikumar.t on May 18, 2012 |
krantikumar.t
Posts: 7 Joined: Aug 12, 2010 Last seen: May 3, 2017 |
||
|
Hi,
Can we relocate the ISR implementation to RAM area while compile/load time. Usually other processors supports this by using the #pragma. ex: #pragma Data(ISREXEC) extint_isr () { .... } #pragma Data where ISREXEC is RAM section, and should be included in the map file. extint_isr will be pointed to the intr handler in the ivt (in OR1200 case, 0x800). Does the OR1200 gcc compiler supports this ?? If not, what is alternate way for this problem ?? Thanks in advance.. Kranti |
|||
|
RE: Relocate ISR to RAM area and execute
by julius on May 18, 2012 |
julius
Posts: 363 Joined: Jul 1, 2008 Last seen: May 17, 2021 |
||
|
Are you talking about code and data in an image which initially executes from, and is located in, flash?
Also, is this relocation supposed to happen automatically or are you assuming you've done it during CRT initialisation? I'm not familiar with these pragmas, but perhaps it just results in the code ending up in a different section during linking? You can achieve this (code being linked to X but assumed it'll be at Y for execution) by using the AT() function. See here for more information: http://www.math.utah.edu/docs/info/ld_3.html#SEC18 But in short, I think that we don't support this in our port. Perhaps this isn't even what those pragmas do, but I figure that's what you want to do. |
|||
|
RE: Relocate ISR to RAM area and execute
by krantikumar.t on May 18, 2012 |
krantikumar.t
Posts: 7 Joined: Aug 12, 2010 Last seen: May 3, 2017 |
||
|
Thanks for your reply.
Actually I tried to create a new section in the startup.ld file as follows: in MEMORY :: rom (rx) : ORIGIN = 0x00000000, LENGTH = 0x00003fff ram (rwx) : ORIGIN = 0xF0000000, LENGTH = 0x00003fff ram2 (rwx) : ORIGIN = 0xF0001000, LENGTH = 0x00000fff in SECTIONS :: .isrsec : AT ( ADDR(.bss) + SIZEOF ( .bss ) ) { /*_data = . ; *(.data); _edata = . ;*/ *(.isrsec); } > ram2 In the generated .lst file, I could not able to see isrsec section. The linker is not taking my own defined section "isrsec". Please correct me if I am missing anything. Thanks, Kranti |
|||
|
RE: Relocate ISR to RAM area and execute
by julius on May 18, 2012 |
julius
Posts: 363 Joined: Jul 1, 2008 Last seen: May 17, 2021 |
||
|
Where in your code have you specified the .isrec section?
http://sourceware.org/binutils/docs-2.20/as/Section.html If you're doing it in C, maybe that's not translating right. |
|||
|
RE: Relocate ISR to RAM area and execute
by krantikumar.t on May 18, 2012 |
krantikumar.t
Posts: 7 Joined: Aug 12, 2010 Last seen: May 3, 2017 |
||
|
Thank you very much julius.
Now I have specified isrsec as follows: extern void extint_isr() __attribute__ ((section (".isrsec"))); Now it is working... :) Thanks, Kranti |
|||
1/1

