Search the web
Sign In
New User? Sign Up
gnu-m68hc11 · GNU 68HC11/HC12
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Linear s-records   Message List  
Reply | Forward Message #9363 of 9382 |
Re: Linear s-records

James,

Here is how I do it. The following sets the lma/vma
addresses in the script rather than in the Makefile--
> FLASHLO AT>BANK3E =0xff

The Makefile only has the objcopy flags--
OBJCOPY_FLAGS=--srec-len=0x20 --change-addresses 0xffff0000

Below are some snips of my script.

Don


---snip--
MEMORY
{
PAGE0 (rwx) : ORIGIN = 0x000000, LENGTH = 0X100
RAM (rwx) : ORIGIN = 0x000100, LENGTH = 0x2000-0X100
FLASHLO (rx) : ORIGIN = 0x004000, LENGTH = 0x4000
FLASHHI (rx) : ORIGIN = 0x00c000, LENGTH = 0X4000-0x1000
BOOT (rx) : ORIGIN = 0x00f000, LENGTH = 0x1000
BANK38 (rx) : ORIGIN = 0x0f0000, LENGTH = 0x4000
BANK39 (rx) : ORIGIN = 0x0f4000, LENGTH = 0x4000
BANK3A (rx) : ORIGIN = 0x0f8000, LENGTH = 0x4000
BANK3B (rx) : ORIGIN = 0x0fc000, LENGTH = 0x4000
BANK3C (rx) : ORIGIN = 0x100000, LENGTH = 0x4000
BANK3D (rx) : ORIGIN = 0x104000, LENGTH = 0x4000
BANK3E (rx) : ORIGIN = 0x108000, LENGTH = 0x4000
BANK3F (rx) : ORIGIN = 0x10c000, LENGTH = 0x4000-0x1000
BANK3FA (rx) : ORIGIN = 0x10f000, LENGTH = 0x1000
}
/* Setup the stack on the top of the data memory bank. */
PROVIDE (_stack = 0x2000);

SECTIONS
{
---snip---
.bank3b :
{
BinHexFastbk.o(.text .rodata)
timer/MorseCodebk.o(.text .rodata)
ScaleATD.o(.text .rodata)
DoATDbk.o(.text .rodata)
tramps3B.o(.text .rodata)
*(.bank3b)
. = ALIGN(2);
} > BANK3B =0xff
.bank3c :
{
---snip---
/* Start of text section. */
.text :
{
/* Put startup code at beginning so that _start keeps
same address. */
/* Startup code. */
KEEP (*(.install0)) /* Section should setup the stack
pointer. */
--snip--
. = ALIGN(2);
} > FLASHLO AT>BANK3E =0xff

.text_h :
{
*(.text_h) /* Bootloader; high Flash area
unbanked */
. = ALIGN(2);
} > FLASHHI AT>BANK3F =0xff
---snip--




On Friday 03 July 2009 06:00:10 am James Murray wrote:
> --- In gnu-m68hc11@yahoogroups.com, "Diego Manenti
Martins" <dmmartins@...> wrote:
> > I used it to generate a linear s-record from a paged
> > elf:
> >
> > m6811-elf-objcopy --output-target=srec --srec-len=0x20
> > --change-addresses 0xffff0000 --change-section-lma
> > .bank8=0x388000 --change-section-lma .bank9=0x398000
> > --change-section-lma .bank10=0x3a8000
> > --change-section-lma .bank11=0x3b8000
> > --change-section-lma .bank12=0x3c8000
> > --change-section-lma .bank13=0x3d8000
> > --change-section-lma .text=0x4000 --change-section-lma
> > .text_h=0xc000 --change-section-lma .vectors=0xff80
> > main.elf main.s19
> >
> > and it works! :)
> >
> > is there other way to do it?
>
> that's pretty much what I'm doing in my application and
> it works too.
>
> James
>
>
>
>
> ------------------------------------
>
> To Post a message, send it to: gnu-m68hc11@eGroups.com
>
> To Unsubscribe, send a blank message to:
> gnu-m68hc11-unsubscribe@...! Groups Links
>
>
>




Fri Jul 3, 2009 4:19 pm

ptfwq
Offline Offline
Send Email Send Email

Forward
Message #9363 of 9382 |
Expand Messages Author Sort by Date

Hi, I used it to generate a linear s-record from a paged elf: m6811-elf-objcopy --output-target=srec --srec-len=0x20 --change-addresses 0xffff0000...
Diego Manenti Martins
snitramd
Offline Send Email
Jan 12, 2007
3:15 am

On Fri, 12 Jan 2007 13:12:28 +1000, Diego Manenti Martins ... that's what linker scripts are for :) http://hc11-ide.funkmunch.net/newbrain/handyboard.x and ...
Triffid Hunter
triffid_hunter
Offline Send Email
Jan 12, 2007
3:28 am

yes, but if I put this on linker script: bank8 (rx) : ORIGIN = 0x388000, LENGTH = 16k that is the linear address for bank 8, the functions on these bank...
Diego Manenti Martins
snitramd
Offline Send Email
Jan 12, 2007
3:43 am

... Yes! Like this: MEMORY { (...) bank3 (rx) : ORIGIN = 0x0dc000, LENGTH = 16k /* VMA */ (...) } SECTIONS { (...) .bank3 : AT(0x338000) /* LMA */ { ...
Diego Manenti Martins
snitramd
Offline Send Email
Jan 12, 2007
12:44 pm

... I use a DP256 whith many regions... too many to manage all on that one commandline. Like Triffid said, that's what linker scripts are for. So, of course...
Jefferson Smith
imajeff84663
Offline Send Email
Jan 12, 2007
5:10 pm

Is there a "Hello world" equivalent for demonstrating paged memory with the 9S12E (or similar) versions of the HCS12? I'm stuck trying to make use of paged...
Donald E Haselwood
ptfwq
Offline Send Email
Jun 22, 2009
12:49 am

Hi, I have a demo of FreeRTOS using 9S128E, with banked memory. I can send it to you. On Sun, Jun 21, 2009 at 9:48 PM, Donald E ... -- diego...
Diego Manenti Martins
snitramd
Offline Send Email
Jun 22, 2009
11:14 am

Diego, Thanks. I would appreciate a copy. Since my post, I have been experimenting, and my problem appears to be my .ld file, but I don't what it is. A few ...
Donald E Haselwood
ptfwq
Offline Send Email
Jun 22, 2009
3:48 pm

I'm finding the far C calls have a page number that is 4 pages lower than the page where the code resides. I checked the code v pages and it is loaded...
Donald E Haselwood
ptfwq
Offline Send Email
Jun 26, 2009
3:49 am

(Answering my own question, maybe or maybe not correctly!)-- The combination of memory.x and objcopy flag in the Makefile is the issue. To work correctly the...
Donald E Haselwood
ptfwq
Offline Send Email
Jun 28, 2009
5:04 pm

... that's pretty much what I'm doing in my application and it works too. James...
James Murray
jsmcortina
Offline Send Email
Jul 3, 2009
10:00 am

James, Here is how I do it. The following sets the lma/vma addresses in the script rather than in the Makefile-- ... The Makefile only has the objcopy flags--...
Donald E Haselwood
ptfwq
Offline Send Email
Jul 3, 2009
4:20 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help