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...
Message search is now enhanced, find messages faster. Take it for a spin.

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
reset vector   Message List  
Reply | Forward Message #9277 of 9422 |
Re: reset vector

On Wed, 2009-03-11 at 20:27 +0000, jeo_dan wrote:
> i compile hello.c and generate hello.s19 code compiled at 0x8000 correctly.
but s19 file not contain reset vector info
> i run myown emulator correctly when i add reset vector info manually to s19
file.
> how can i generate s19 with reset vector info?

The way I do it is as follows:

Define a section in the linker script where the vector table is to go,
simplified linker script just for vectors below:

MEMORY
{
vectors : ORIGIN = 0xFFC0, LENGTH = 0x40
}

SECTIONS
{
.vectors :
{
} > vectors
}

Then you can either in C code use

__attribute__ ((section(".vectors"))

or in ASM code (this is how I do it):

.section .vectors
short someFunction
short someFunction
... ; Entries skipped
short resetVector ; last call, reset vector

And that's it.

When you go to link, the linker will now know where to put the vector
table and your s19 file will contain the correct addresses. If you
haven't created your own linker script yet, now would be a good time to
do so. The default linker script more than likely doesn't 100% match
your hardware. =)

Stephan





Thu Mar 12, 2009 3:06 am

kermos2000
Offline Offline
Send Email Send Email

Forward
Message #9277 of 9422 |
Expand Messages Author Sort by Date

How can i specify ,and write into, the reset vector with gnugcc? is it a line in memory.x or a line into the C code? thanx Olivier...
cfr21@...
Send Email
Jul 8, 2003
7:37 am

<cfr21@...> wrote Tue, 8 Jul 2003 09:37:23 +0200 ... Have a look into GEL and look through the archive of this mailing list. In short: You need to...
42Bastian Schick
bastian42
Offline Send Email
Jul 8, 2003
9:26 am

... I have a few lines in an asm file (crt0.s in my case) which look like this: ;----------------------------------------- ; Boot-Table ...
Robert Goldsmith
far8lue
Offline Send Email
Jul 8, 2003
3:40 pm

My freeware IDE (EmbeddedGNU v0.8) comes with some examples of how to use vectors. Tom Almy and John Hilton contributed these examples. ...
Eric Engler
englere.geo
Offline Send Email
Jul 11, 2003
2:00 am

thanx i find something.. i load a vector.s file in my project (i'am using your application!) and it works fine ... From: "Eric Engler" <englere@...> ...
olivier
cfr21@...
Send Email
Jul 11, 2003
5:59 am

Hello Eric, ... vectors. I downloaded twice the ZIP archive pointed by the link, seems corrupted... Tried with WinRAR 3, Winzip 6.3 & 8.0. I'm gonna try once &...
G.T
gt_is_really_gt
Offline Send Email
Jul 15, 2003
7:35 pm

Hi Eric, Sorry, but archive seems corrupted for me :-( Regards, G.T g.t6@... mike@... 205 Diesel & turbo-Diesel : http://205d.fr.st...
G.T
gt_is_really_gt
Offline Send Email
Jul 15, 2003
8:45 pm

... I just downloaded Eric's IDE, again, from http://www.geocities.com/englere_geo/asmide27.zip and it comes thru fine. At least 2 of my unzipping programs...
larry_brasfield
Offline Send Email
Jul 15, 2003
10:52 pm

Hi, ... http://www.geocities.com/englere_geo/asmide27.zip Hey, I downloaded the C++ IDE, not the ASM IDE (I downloaded it, indeed, and it works). The C IDE...
G.T
gt_is_really_gt
Offline Send Email
Jul 17, 2003
8:05 pm

... My first posting of EmbeddedGNU v0.8a had a corrupted zip file. Try the download again: http://www.geocities.com/englere_geo/egnu08a.zip Eric...
Eric Engler
englere.geo
Offline Send Email
Jul 20, 2003
3:19 am

I am using a 68hc11a1p in expanded mode with a 28c64 eeprom mapped at E000, as shown at http://www.freescale.com/files/microcontrollers/doc/app_note/AN1010.pd...
cd_willis
Offline Send Email
Sep 28, 2004
5:02 am

If you look in the GEL project, there are some sample vectors.s/c files there for populating the interrupt vectors/reset vector. The vectors.c/s file sets up a...
John E Clymer
johnc56031
Offline Send Email
Sep 28, 2004
1:26 pm

Thank you for your help. I modified an example vectors.s file, assembled it and linked vectors.o with the other object files. This solved the problem. Chris...
cd_willis
Offline Send Email
Oct 10, 2004
3:31 pm

i compile hello.c and generate hello.s19 code compiled at 0x8000 correctly. but s19 file not contain reset vector info i run myown emulator correctly when i...
jeo_dan
Offline Send Email
Mar 11, 2009
8:27 pm

... The way I do it is as follows: Define a section in the linker script where the vector table is to go, simplified linker script just for vectors below: ...
Stephan Rose
kermos2000
Offline Send Email
Mar 12, 2009
3:06 am
Advanced

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