Code Overlays?

Technical discussions around xCORE processors (e.g. General Purpose (L/G), xCORE-USB, xCORE-Analog, xCORE-XA).
yzoer
XCore Addict
Posts: 132
Joined: Tue Dec 15, 2009 10:23 pm

Code Overlays?

Postby yzoer » Tue Apr 10, 2012 5:35 pm

Howdy!

I think I asked this a while back on xmoslinkers (RIP) but that's been over a year, so.... Does anyone know if it's possible to:

a) Specify an absolute address for your code?
b) If it's possible to dynamically load code to said absolute address.

Naturally, there wouldn't be any information for the linker but that's ok. All I'm looking for is to load code at an address and execute it. Should in theory be possible but figured I'd ask if anyone here has (successfully) done this...

-Yvo
User avatar
XMatt
XCore Addict
Posts: 147
Joined: Tue Feb 23, 2010 6:55 pm
Contact:

Postby XMatt » Tue Apr 10, 2012 5:43 pm

The XTAG-2 bootloader does this, it runs at location 0x1b000 allowing it to dynamically load the JTAG firmware at runtime into address 0x10000 and jump to it. The options to the tools to do this can be seen in this makefile https://github.com/xcore/proj_xtag2/blo ... r/Makefile and the code for the loader is in https://github.com/xcore/proj_xtag2/tre ... loader/src ... just to note when booting from flash or OTP the code will only be copied to address 0x10000, the XTAG-2 bootloader code is wrapped in a small relocating loader which moves it after boot to 0x1b000 and then executes.
yzoer
XCore Addict
Posts: 132
Joined: Tue Dec 15, 2009 10:23 pm

Postby yzoer » Tue Apr 10, 2012 6:14 pm

Good to know! Thanks!

-Yvo
yzoer
XCore Addict
Posts: 132
Joined: Tue Dec 15, 2009 10:23 pm

Postby yzoer » Wed Apr 18, 2012 6:58 pm

Just to follow up, so if the OTP loads code directly to 0x10000, is there anyway to:

a) compile XE's to any absolute address (i.e. 0x12000 or 8k after the OTP)
b) is there any public code available to initialize constructors, bss, data, etc?

This would allow you to write a front-end / loader in OTP that in turn loads (potentially multiple) executables to the area behind the OTP bootloader...

Thanks!

Yvo
yzoer
XCore Addict
Posts: 132
Joined: Tue Dec 15, 2009 10:23 pm

Postby yzoer » Tue May 29, 2012 7:04 pm

In case anyone's interested, I ask about this about uhm, 3 years ago and managed to dig up some more info from xlinkers...

http://www.xmos.com/discuss/viewtopic.php?f=3&t=459

Return to “Processors”

Who is online

Users browsing this forum: No registered users and 4 guests