FAQ:General

From GNU 68HC11/HC12
(Difference between revisions)
Jump to: navigation, search
 
(I have downloaded everything, what do I do now?)
Line 1: Line 1:
  
 
==I have downloaded everything, what do I do now?==
 
==I have downloaded everything, what do I do now?==
 +
 +
It is suggested to start with a simple example.  The GNU Development
 +
Chain comes alone and does not have any example packaged with it.
 +
 +
However, you can get the GNU Embedded Libraries which contain a number
 +
of utility libraries and several examples.  GEL is available at:
 +
 +
[[http://gel.sourceforge.net http://gel.sourceforge.net]]
 +
 +
You can also compile this small program, which does nothing
 +
useful (just to show out the procedure):
 +
 +
<pre>
 +
unsigned short fact(unsigned short a)
 +
{
 +
  if (a)
 +
    return a * fact (a - 1);
 +
  else
 +
    return 1;
 +
}
 +
int main()
 +
{
 +
  return fact (5) - fact (4);
 +
}
 +
</pre>
 +
 +
You must compile it with the following command:
 +
<pre>
 +
  m6811-elf-gcc -o prog.elf prog.c -mshort -g -Os
 +
</pre>
 +
 +
And you can execute or debug it with the GNU Debugger as follows:
 +
<pre>
 +
  m6811-elf-gdb prog.elf
 +
  <i>(gdb)</i> target sim
 +
  <i>(gdb)</i> load
 +
  <i>(gdb)</i> b main
 +
  <i>(gdb)</i> run
 +
  <i>(gdb)</i> step
 +
  ...
 +
</pre>
 +
 
==Is S19 format supported?==
 
==Is S19 format supported?==
 
==Why is release 2.x based on gcc 3.0.4 ?==
 
==Why is release 2.x based on gcc 3.0.4 ?==
 
==What is ELF?==
 
==What is ELF?==
 
==Is my processor or board supported?==
 
==Is my processor or board supported?==

Revision as of 16:20, 18 February 2006

Contents

I have downloaded everything, what do I do now?

It is suggested to start with a simple example. The GNU Development Chain comes alone and does not have any example packaged with it.

However, you can get the GNU Embedded Libraries which contain a number of utility libraries and several examples. GEL is available at:

[http://gel.sourceforge.net]

You can also compile this small program, which does nothing useful (just to show out the procedure):

unsigned short fact(unsigned short a)
{
  if (a)
    return a * fact (a - 1);
  else
    return 1;
}
int main()
{
  return fact (5) - fact (4);
}

You must compile it with the following command:

  m6811-elf-gcc -o prog.elf prog.c -mshort -g -Os

And you can execute or debug it with the GNU Debugger as follows:

  m6811-elf-gdb prog.elf
  <i>(gdb)</i> target sim
  <i>(gdb)</i> load
  <i>(gdb)</i> b main
  <i>(gdb)</i> run
  <i>(gdb)</i> step
  ...

Is S19 format supported?

Why is release 2.x based on gcc 3.0.4 ?

What is ELF?

Is my processor or board supported?

Personal tools