Linking/mapping code sections with Xilinx EDK

I'm using a V2Pro based eval board with a simple set of frimware and software files. The software set includes the Xvectors.S file from the EDK library and I want/expect the code in the xvectors.S file to be loaded into memory with the image.

The vector code is in section .vectors, which is mapped by the linker script to 0xFFFF0000. However the map file shows zero length for the section and the debugger confirms that what is loaded there is the next section after the .vectors section.

map file snippet:

.vectors 0xffff0000 0x0 0xffff0000 __vectors_start = . *(.vectors) 0xffff0000 __vectors_end = .

linker script snippet:

.vectors : { __vectors_start = .; *(.vectors) __vectors_end = .; } > plb_bram_if_cntlr_1

xvectors.S file snippet:

.section .vectors,"ax"

.globl _vectorbase

_vectorbase: // Vector 0x0000, Jump to zero. critical_interrupt 0000, 0

// Vector 0x0100, Critical interrupt. critical_interrupt 0100, 1

It all looks right to me. I must be missing something. I've tried lots of name/case/quoting changes. I can't get the code for the vectors (expanded macro 'critical_interrupt" etc.) to be loaded in memory no matter what I do. Even messed with the case of the .s file extension which very bizarrely (to me anyway) changes whether the C preprocessor is invoked.

Any clues or ideas?? Thanks Steve

Reply to
sgfallows
Loading thread data ...

Steve,

That .s/.S proprocessor thing is a feature (.S signals gcc to use the preprocessor, .s tells it not to use the CPP). Assuming all the linkers and such are right (I am not an expert on this by any means), I'd wonder how you are actually compiling and linking. How are you calling the tools? Do you have a makefile? Maybe the .S isn't getting into the action with your makefile?

Joey

snipped-for-privacy@gmail.com wrote:

Reply to
Joseph

Yes, I know it's a feature, I just think it's bizarre to key on such a small difference, especially when Windows doesn't *really* support case in filenames. Anyway...

I'm using the XPS tools from the GUI. Whatever canned/internal makefiles it uses. There are no makefiles in my project directory

No, I did see the different behavior with .s/.S -- it just didn't affect whether the code in the vectors section was output into the .elf file.

Anyway, thanks for the comments... Steve

Reply to
sgfallows

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.