X
RSS YouTube LinkedIn Twitter XCore IRC

Search




Post new topic Reply to topic   [ 5 posts ] 
Author Message
PostPosted: Tue Apr 10, 2012 5:35 pm 
Joined: Tue Dec 15, 2009 10:23 pm
Posts: 108
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


Top
Offline Profile View all posts by this user  
 
PostPosted: Tue Apr 10, 2012 5:43 pm 
User avatar
XMOS Employee
Joined: Tue Feb 23, 2010 6:55 pm
Posts: 125
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.


Top
Offline Profile View all posts by this user  
 
PostPosted: Tue Apr 10, 2012 6:14 pm 
Joined: Tue Dec 15, 2009 10:23 pm
Posts: 108
Good to know! Thanks!

-Yvo


Top
Offline Profile View all posts by this user  
 
PostPosted: Wed Apr 18, 2012 6:58 pm 
Joined: Tue Dec 15, 2009 10:23 pm
Posts: 108
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


Top
Offline Profile View all posts by this user  
 
PostPosted: Tue May 29, 2012 7:04 pm 
Joined: Tue Dec 15, 2009 10:23 pm
Posts: 108
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


Top
Offline Profile View all posts by this user  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic   [ 5 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest



Search for:
Jump to: