Technical discussions about Freescale Microcontrollers: M68HC11. (Freescale Semiconductor is a Subsidiary of Motorola).
Program Format - Ravi Haksar - Jun 19 19:03:09 2006
Hi
i managed to find a free C compiler (Dev-c++) and now i am trying to program my chip
(m68hc11). However, i dont know how to transfer my program.
my compiler just creates a .C file; i dont think its in the right format for my chip(i
think the format is .s19, im not sure).
do i need to convert the file then dowload the program onto the chip?
or can i just download the program as it is?
also, when i make a program do i have to do it in embedded C, or will regular C work?
thanks
---------------------------------
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
[Non-text portions of this message have been removed]

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Program Format - Steve Tabler - Jun 20 1:06:10 2006
I can offered some limited suggestions. I made a google search on Dev-c++
and came up with a wide variety of hits. It would be helpful if you would
provide a link to where you obtained the program, so that somebody else
could comment about the same particular Dev-c++.
With that said, I can make some general observations: file that is a .C
file is generally just your source code file, which you've typed into your
compiler environment (which could also mean you've typed using Microsoft
Notepad). The extension will be different for the file that comes out of
your compiler. Some compilers for the 68HC11 will have a default output
file of out.s19, which one might assume to be an s19 file. You also have
to use a compiler that is written for the 68HC11 to be the target, or you
won't get a 68HC11 program. Finally, I suspect that you didn't tell your
compiler to "compile". If you did, the compiler would have generated files
in addition to the .c file that you mention.
Steve
At 05:02 PM 6/19/2006, you wrote:
>Hi
>
>i managed to find a free C compiler (Dev-c++) and now i am trying to
>program my chip (m68hc11). However, i dont know how to transfer my program.
>my compiler just creates a .C file; i dont think its in the right format
>for my chip(i think the format is .s19, im not sure).
>
>do i need to convert the file then dowload the program onto the chip?
>or can i just download the program as it is?
>
>also, when i make a program do i have to do it in embedded C, or will
>regular C work?
>
>thanks

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Program Format - n4hhe - Jun 20 11:17:35 2006
--- In m...@yahoogroups.com, Ravi Haksar
wrote:
>
> Hi
>
> i managed to find a free C compiler (Dev-c++) and now i am trying to program my chip
> (m68hc11). However, i dont know how to transfer my program.
> my compiler just creates a .C file; i dont think its in the right format for my chip(i
think
> the format is .s19, im not sure).
>
> do i need to convert the file then dowload the program onto the chip?
> or can i just download the program as it is?
No, you need a compiler. Dev-C++ is an Integrated Development Environment. Thats
fancy talk for GUI Wrapper. Usually includes an editor. That's why its output was a .c
file.
http://www.bloodshed.net/download.html says:
> Bloodshed Dev-C++ is a full-featured Integrated Development Environment (IDE) for the
> C/C++ programming language. It uses Mingw port of GCC (GNU Compiler Collection) as
> it's compiler. Dev-C++ can also be used in combination with Cygwin or any other GCC
> based compiler.
> also, when i make a program do i have to do it in embedded C, or will regular C
work?
You have to use a compiler which writes code for the 68HC11. On top of that it ought to
know something about the particulars of the specific 68HC11 you are using.
The difference between "embedded C" and "regular C" has more to do with the design of
the code and the programmer's mindset. As long as the compiler writes code for the CPU
that you are using, it can be used to generate embedded code. The difference between
compilers is in how much work you have to do to get the code into the CPU. I once used
ThinkC on Mac to generate code for an MC68302. Didn't do much, but got the CPU and a
couple serial ports running enough to demonstrate it worked.
Some have made gcc for HC11 work but its far from ideal. C++ is a bad idea for HC11
class of CPU.
Many years ago I purchased Introl C11. It has proven to be an excellent compiler over the
years but currently out of business and Rich Pennington hasn't been heard from of
late.

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )Re: Program Format - n4hhe - Jun 20 11:27:30 2006
--- In m...@yahoogroups.com, "n4hhe"
wrote:
> Many years ago I purchased Introl C11. It has proven to be an excellent compiler over
the
> years but currently out of business and Rich Pennington hasn't been heard from of
late.
A bit of digging found ftp://ftp.pennware.com/introl/demos/
Last I tried the demos were fully operational. Then again I preferred a Unix command
line, or
MPW (which was supported under 3.x versions of Introl compilers).

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )Re: Re: Program Format - BobG...@aol.com - Jun 20 11:31:24 2006
I use the Imagecraft HC11 compiler (still!) and the only quibble I have ever had with it
is I was unable to allocate variables to the direct addressed area of ram. It has a free
eval period. Maybe that will be good enough!
________________________________________________________________________
Check out AOL.com today. Breaking news, video search, pictures, email and IM. All on
demand. Always Free.
[Non-text portions of this message have been removed]

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Program Format - Ravi Haksar - Jun 20 23:40:26 2006
the website for dev-c++ is www.bloodshed.net/devcpp.html
i did compile the program and it only generated a .c file and an execute file (.exe)
Steve Tabler
wrote: I can offered some
limited suggestions. I made a google search on Dev-c++
and came up with a wide variety of hits. It would be helpful if you would
provide a link to where you obtained the program, so that somebody else
could comment about the same particular Dev-c++.
With that said, I can make some general observations: file that is a .C
file is generally just your source code file, which you've typed into your
compiler environment (which could also mean you've typed using Microsoft
Notepad). The extension will be different for the file that comes out of
your compiler. Some compilers for the 68HC11 will have a default output
file of out.s19, which one might assume to be an s19 file. You also have
to use a compiler that is written for the 68HC11 to be the target, or you
won't get a 68HC11 program. Finally, I suspect that you didn't tell your
compiler to "compile". If you did, the compiler would have generated files
in addition to the .c file that you mention.
Steve
At 05:02 PM 6/19/2006, you wrote:
>Hi
>
>i managed to find a free C compiler (Dev-c++) and now i am trying to
>program my chip (m68hc11). However, i dont know how to transfer my program.
>my compiler just creates a .C file; i dont think its in the right format
>for my chip(i think the format is .s19, im not sure).
>
>do i need to convert the file then dowload the program onto the chip?
>or can i just download the program as it is?
>
>also, when i make a program do i have to do it in embedded C, or will
>regular C work?
>
>thanks
---------------------------------
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail Beta.
[Non-text portions of this message have been removed]

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )Re: Re: Program Format - Ravi Haksar - Jun 20 23:42:22 2006
the m68ch11 can be programmed in C; dev-c++ can do both C and C++
n4hhe
wrote: --- In m...@yahoogroups.com,
Ravi Haksar wrote:
>
> Hi
>
> i managed to find a free C compiler (Dev-c++) and now i am trying to program my chip
> (m68hc11). However, i dont know how to transfer my program.
> my compiler just creates a .C file; i dont think its in the right format for my chip(i
think
> the format is .s19, im not sure).
>
> do i need to convert the file then dowload the program onto the chip?
> or can i just download the program as it is?
No, you need a compiler. Dev-C++ is an Integrated Development Environment. Thats
fancy talk for GUI Wrapper. Usually includes an editor. That's why its output was a .c
file.
http://www.bloodshed.net/download.html says:
> Bloodshed Dev-C++ is a full-featured Integrated Development Environment (IDE) for the
> C/C++ programming language. It uses Mingw port of GCC (GNU Compiler Collection) as
> it's compiler. Dev-C++ can also be used in combination with Cygwin or any other GCC
> based compiler.
> also, when i make a program do i have to do it in embedded C, or will regular C
work?
You have to use a compiler which writes code for the 68HC11. On top of that it ought to
know something about the particulars of the specific 68HC11 you are using.
The difference between "embedded C" and "regular C" has more to do with the design of
the code and the programmer's mindset. As long as the compiler writes code for the CPU
that you are using, it can be used to generate embedded code. The difference between
compilers is in how much work you have to do to get the code into the CPU. I once used
ThinkC on Mac to generate code for an MC68302. Didn't do much, but got the CPU and a
couple serial ports running enough to demonstrate it worked.
Some have made gcc for HC11 work but its far from ideal. C++ is a bad idea for HC11
class of CPU.
Many years ago I purchased Introl C11. It has proven to be an excellent compiler over
the
years but currently out of business and Rich Pennington hasn't been heard from of
late.
---------------------------------
Sneak preview the all-new Yahoo.com. It's not radically different. Just radically
better.
[Non-text portions of this message have been removed]

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )Re: Re: Program Format - Ravi Haksar - Jun 21 0:03:30 2006
if dev-c++ needs a GCC, can you recommend one that is pretty good?
if dev-c++ is used in combination with a GCC can it generate files that can be directly
downloaded onto the chip?
thanks
n4hhe
wrote: --- In m...@yahoogroups.com,
Ravi Haksar wrote:
>
> Hi
>
> i managed to find a free C compiler (Dev-c++) and now i am trying to program my chip
> (m68hc11). However, i dont know how to transfer my program.
> my compiler just creates a .C file; i dont think its in the right format for my chip(i
think
> the format is .s19, im not sure).
>
> do i need to convert the file then dowload the program onto the chip?
> or can i just download the program as it is?
No, you need a compiler. Dev-C++ is an Integrated Development Environment. Thats
fancy talk for GUI Wrapper. Usually includes an editor. That's why its output was a .c
file.
http://www.bloodshed.net/download.html says:
> Bloodshed Dev-C++ is a full-featured Integrated Development Environment (IDE) for the
> C/C++ programming language. It uses Mingw port of GCC (GNU Compiler Collection) as
> it's compiler. Dev-C++ can also be used in combination with Cygwin or any other GCC
> based compiler.
> also, when i make a program do i have to do it in embedded C, or will regular C
work?
You have to use a compiler which writes code for the 68HC11. On top of that it ought to
know something about the particulars of the specific 68HC11 you are using.
The difference between "embedded C" and "regular C" has more to do with the design of
the code and the programmer's mindset. As long as the compiler writes code for the CPU
that you are using, it can be used to generate embedded code. The difference between
compilers is in how much work you have to do to get the code into the CPU. I once used
ThinkC on Mac to generate code for an MC68302. Didn't do much, but got the CPU and a
couple serial ports running enough to demonstrate it worked.
Some have made gcc for HC11 work but its far from ideal. C++ is a bad idea for HC11
class of CPU.
Many years ago I purchased Introl C11. It has proven to be an excellent compiler over
the
years but currently out of business and Rich Pennington hasn't been heard from of
late.
---------------------------------
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
[Non-text portions of this message have been removed]

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )Re: Re: Program Format - Mike McCarty - Jun 22 11:04:30 2006
Ravi Haksar wrote:
I'd prefer that you not top post.
> if dev-c++ needs a GCC, can you recommend one that is pretty good?
You might look into Stephane Carre's port.
> if dev-c++ is used in combination with a GCC can it generate files that can be directly
downloaded onto the chip?
I know nothing about your package, but judging from what I've seen
here, it's just a graphical front end for whatever toolset you
choose to use. So it will do whatever the underlying tools can
do. Stephane's port generates S19 records. Whether you can load
them depends on what you use to communicate with your machine.
The port I'm recommending is not easy to install or use, however.
You might look into getting the freeware ICC11. It's rather old,
and runs only with an MSDOS emulator, but it is free and easy to
install. The GCC port does not have much in the way of support
library, like sprintf() etc. It's a non-hosted environment.
If you get desperate, I've done a back end of Small C which
works well. It's easy to install and use, but it is only a
subset of C. No struct, no union, no float (though I do have
a float package I wrote, it would be clumsy and need some
assembly language glue), and no pointer-to-pointer or array-of-
pointer. If you can live with that, then I could build you a
version to run on your machine. It uses ASXXXX as the assembler.
> thanks
Well, HTH
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Re: Program Format - David Kelly - Jun 22 19:42:26 2006
I have gone to effort to reformat this entire message the way it
should have been in the archives. Be sure to read the whole thing
because the quoted sections were retained because I don't think you
read them the first couple of times.
On Jun 20, 2006, at 10:44 PM, Ravi Haksar top-posted:
> if dev-c++ needs a GCC, can you recommend one that is pretty good?
>
> if dev-c++ is used in combination with a GCC can it generate files
> that can be directly downloaded onto the chip?
>
> thanks
>
> n4hhe
wrote:
>> You have to use a compiler which writes code for the 68HC11. On
>> top of that it ought to know something about the particulars of
>> the specific 68HC11 you are using.
>>
>> The difference between "embedded C" and "regular C" has more to do
>> with the design of the code and the programmer's mindset. As long
>> as the compiler writes code for the CPU that you are using, it can
>> be used to generate embedded code.
[...]
>> Some have made gcc for HC11 work but its far from ideal. C++ is a
>> bad idea for HC11 class of CPU.
You are in the wrong Yahoo! Group for that answer. Try
http://groups.yahoo.com/group/gnu-m68hc11/messages/
>> Many years ago I purchased Introl C11. It has proven to be an
>> excellent compiler over the years but currently out of business
>> and Rich Pennington hasn't been heard from of late.
Guessing you missed my followup:
http://groups.yahoo.com/group/m68HC11/message/2803?l=1 where I said:
>
> A bit of digging found ftp://ftp.pennware.com/introl/demos/
The Introl C-11 compiler (which can be downloaded from the above URL
which is hosted by the owner of the code, but has uncertain license)
generates excellent code and is purpose-made for embedded use. In
Introl terms "CODE" was their GUI IDE written in TCL/TK. "CODE" was
also the name used to collectively describe the whole "Introl CODE"
product. The tools also work from DOS or Unix command lines without
the fool GUI.
GCC-6811 writes code which works, but the code is inefficient, slow,
and larger than it should be. If you must use gcc then you are using
the wrong CPU. Gcc for the AVR works very very well. As you are
Windows-limited see
http://winavr.sourceforge.net/
Freescale now owns Metrowerks, lock stock and barrel. Typically
offers free versions with limited generated code size. Know the HC12
version was good for 32k but don't know if any HC11 version was ever
offered. Otherwise its easy to get an unlimited "trial" 30 day
license, just ask for it, one is usually included in the download.
--
David Kelly N4HHE, d...@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )Re: Re: Program Format - David Kelly - Jun 22 19:42:36 2006
On Jun 20, 2006, at 10:42 PM, Ravi Haksar wrote:
> the m68ch11 can be programmed in C; dev-c++ can do both C and C++
Yes, that's nice. But while one can write in C and generate 68HC11
code with the right compiler, Dev-C++ does not generate 68HC11 code.
As supporting evidence you said the result was a .c file and a .exe
file.
--
David Kelly N4HHE, d...@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Program Format - r0807s - Jun 25 1:07:40 2006
I looked up WinAVR and downloaded it. it looks pretty good but i cant
figure out how to use it. i wrote out a simple hello world program in
the programers notebook, but now i dont know how to compile or make the
file (i am not quite sure what making and make files are).

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Re: Program Format - David Kelly - Jun 25 9:24:20 2006
On Jun 25, 2006, at 12:07 AM, r0807s wrote:
> I looked up WinAVR and downloaded it. it looks pretty good but i cant
> figure out how to use it. i wrote out a simple hello world program in
> the programers notebook, but now i dont know how to compile or
> make the
> file (i am not quite sure what making and make files are).
WinAVR does not create code which runs on a Freescale 68HC11. It
writes code for an Atmel AVR. I suggested the AVR CPU and WinAVR as
the best prospect if one must use gcc. For new designs the AVR family
has every advantage over the HC11. Then again the HC12 family has
every advantage over the HC11 as well.
This is the wrong mailing list for AVR or WinAVR discussions.
WinAVR is heavily documented and comes with several working examples.
It has a Makefile generator that can get you started, but probably
has to be run initially from a command line. WinAVR ships Programmers
Notebook 2 with several make commands that can be executed from the
GUI while capturing output for mouse click shortcuts to the detected
errors in appropriate files.
--
David Kelly N4HHE, d...@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Re: Program Format - BobG...@aol.com - Jun 25 10:08:44 2006
I use the imagecraft icc11 compiler. Easy to install and use. I also like
the technological arts microcore hc11 computers. Even though the hc11 is several
decades old, it is still a good way to learn microcontrollers and c. Then
you can move up to atmel avrs.
[Non-text portions of this message have been removed]

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Re: Program Format - Mike McCarty - Jun 26 9:39:56 2006
r0807s wrote:
> I looked up WinAVR and downloaded it. it looks pretty good but i cant
> figure out how to use it. i wrote out a simple hello world program in
> the programers notebook, but now i dont know how to compile or make the
> file (i am not quite sure what making and make files are).
The "make" utility is a program developed under UNIX and now available
for just about any system you can name. It takes as input a special file
which describes how to make an object, which file is called a "make
file". The make file lists derived files, and the source files from
which they are derived. After that, it lists the commands necessary
to build the derived files. When one uses the make program, it reads
the make file, and checks whether the source files are newer than
the derived files. If so, then it performs the commands.
For example, suppose you have some text processing program which
processes some specially formatted input and produces a nicely
formatted output. Then the make file might have an entry like this:
prettyout.txt: prettyin.txt prettyrules.txt
preprocess prettyin.txt prettyrules.txt > prettytmp.txt
prettyprint
prettyout.txt
If you use this make file, then it looks to see if prettyout.txt
exists. If not, or if it does exist, but it is older than
either prettyin.txt or prettyrules.txt, then it does the two
commands listed under the dependency.
Typical dependency rules (more jargon there) for a C program
for Windows might be this:
myprog.exe: myprog.obj mylib.obj
cc -o myprog.exe myprog.obj mylib.obj
myprog.obj: myprog.c myprog.h mylib.h
cc -c -o myprog.obj myprog.c
mylib.obj: mylib.c mylib.h
cc -c -o mylib.o mylib.c
These rules specify that myprog.exe depends on (is made from)
myprog.obj and mylib.obj, and if either of these two files
changes, then the program must be relinked. It further specifies
that myprog.obj depends on myprog.c, myprog.h, and mylib.h,
and if any of these changes, then myprog.obj must be rebuilt,
and shows how to do that.
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )Re: Re: Program Format - David Kelly - Jun 26 11:52:26 2006
On Mon, Jun 26, 2006 at 08:24:30AM -0500, Mike McCarty wrote:
>
> Typical dependency rules (more jargon there) for a C program
> for Windows might be this:
>
> myprog.exe: myprog.obj mylib.obj
> cc -o myprog.exe myprog.obj mylib.obj
>
> myprog.obj: myprog.c myprog.h mylib.h
> cc -c -o myprog.obj myprog.c
>
> mylib.obj: mylib.c mylib.h
> cc -c -o mylib.o mylib.c
>
> These rules specify that myprog.exe depends on (is made from)
> myprog.obj and mylib.obj, and if either of these two files
> changes, then the program must be relinked. It further specifies
> that myprog.obj depends on myprog.c, myprog.h, and mylib.h,
> and if any of these changes, then myprog.obj must be rebuilt,
> and shows how to do that.
Yes, but make goes farther than that in a properly configured system
make has default rules for how to convert a .c file into a .o file, and
how to turn a .o file into a dot-nothing file. And without being told
explicitly will find that multi-step route if asked to convert a .c file
into a dot-nothing (or .exe in the Microsoft case).
Many don't realize for simple cases a Makefile is not necessary. Create
a hello.c file and simply type "make hello" and magic happens.
A Makefile is necessary when the output depends on multiple output
files, or when one wishes to use other than the system defaults. This is
clearly the case when using the gcc tool chain to cross-compile C for a
target other than the host computer. Or in simpler terms, when one uses
a compiler running on x86 to create code that will run on 68hc11. The
Makefile has to know *which* compiler to use and what options to give
it.
This is what I really like about WinAVR and the gcc tool chain over
Metrowerks. That the whole project configuration is contained in a
humanly readable text Makefile and not hidden/scattered in undocumented
binary project file(s) viewable only in the specific GUI application,
and only if one knows all the menus and sub menus to view.
This is also how I ran Introl C-11, from a Makefile. Under Apple's MPW.
Yes, on a Macintosh. With a command line.
--
David Kelly N4HHE, d...@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Re: Program Format - Mike McCarty - Jun 26 12:34:43 2006
David Kelly wrote:
>
> Yes, but make goes farther than that in a properly configured system
> make has default rules for how to convert a .c file into a .o file, and
[snip]
I was just trying to give him a quick intro to make. The context is
that of cross-compiles to MC68HC11, in which case default rules are
useless.
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Re: Program Format - David Kelly - Jun 27 12:14:34 2006
On Mon, Jun 26, 2006 at 11:27:38AM -0500, Mike McCarty wrote:
> David Kelly wrote:
> >
> > Yes, but make goes farther than that in a properly configured system
> > make has default rules for how to convert a .c file into a .o file, and
>
> [snip]
>
> I was just trying to give him a quick intro to make. The context is
> that of cross-compiles to MC68HC11, in which case default rules are
> useless.
Not useless, but you should know that they exist and that you have to
override them. As for the originator of this thread, IMO he's in over
his head as apparently didn't understand that the output of a C compiler
differs depending on what target the code is to run on.
--
David Kelly N4HHE, d...@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Re: Program Format - Mike McCarty - Jun 27 16:08:26 2006
David Kelly wrote:
>>I was just trying to give him a quick intro to make. The context is
>>that of cross-compiles to MC68HC11, in which case default rules are
>>useless.
> Not useless, but you should know that they exist and that you have to
> override them. As for the originator of this thread, IMO he's in over
> his head as apparently didn't understand that the output of a C compiler
> differs depending on what target the code is to run on.
At first, I thought you actually meant what you wrote, and started
to send you an indignant response, but I suppose you mean "one should
know" rather than meaning to indicate that you think *I* don't know
that. I deliberately omitted discussion of default build rules
which modern makes have, because I thought that the response I wrote was
already beginning to edge into overburden for a newbie.
Everyone has to start somewhere. Everyone starts in over his head.
I think having some idea of what make does is better than having
none. I just drew the line a little further back than you would have.
In the meantime, I wonder where the OP is and how he's doing.
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Re: Program Format - David Kelly - Jun 27 16:45:16 2006
On Tue, Jun 27, 2006 at 02:11:43PM -0500, Mike McCarty wrote:
> David Kelly wrote:
> >
> > Not useless, but you should know that they exist and that you have
> > to override them.
>
> At first, I thought you actually meant what you wrote, and started to
> send you an indignant response, but I suppose you mean "one should
> know" rather than meaning to indicate that you think *I* don't know
> that.
Yes, my choice of words was imprecise. Didn't intend a specific person
but the all-encompassing anonymous "one".
In the case of avr-gcc I use the following:
#
#$Id: Makefile,v 1.39 2006/03/13 21:30:44 dkelly Exp $
#
CC= avr-gcc
MCU=atmega64
CFLAGS= -O -gdwarf-2 -Wall -ffreestanding -mmcu=$(MCU)
# .eeprom section start must match here and in _eeprom.hex rule:
LDFLAGS= -Wl,-Map,$@.map -Wl,--section-start=.eeprom=0x00810001 \
-Wl,--section-start=.eemeter=0x008105ef
.SUFFIXES:
.SUFFIXES: .c .o .bin .elf .hex .srec .cof .list
# the rule to convert .c's into .o's
.c.o:
$(CC) $(CFLAGS) -c $<
[...]
The first .SUFFIXES: nukes the existing default rules. The second
defines my own list. Had the first not been listed the 2nd would have
only expanded the default suffixes.
This sort of thing applies no matter what target CPU or compiler one
uses. As I said earlier I much prefer a Makefile over hidden details in
a binary config file. One reason is that CVS can efficiently deal with
changes in a Makefile for possible future merges, and that one can
understand what changed by looking at diffs.
Most all of this project's special config details are contained in the
CFLAGS and LDFLAGS lines. Only thing remaining is the list of source
files.
--
David Kelly N4HHE, d...@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Re: Program Format - Mike McCarty - Jun 27 17:22:19 2006
David Kelly wrote:
> On Tue, Jun 27, 2006 at 02:11:43PM -0500, Mike McCarty wrote:
>
>>David Kelly wrote:
>>
>>>Not useless, but you should know that they exist and that you have
>>>to override them.
>>
>>At first, I thought you actually meant what you wrote, and started to
>>send you an indignant response, but I suppose you mean "one should
>>know" rather than meaning to indicate that you think *I* don't know
>>that.
> Yes, my choice of words was imprecise. Didn't intend a specific person
> but the all-encompassing anonymous "one".
[snip]
Amusingly, there appeared a message just now over on the Debian
Linux e-mail group from a fellow who is doing cross-compiles of
Linux for other architectures, who is desperately trying to eliminate
all the default rules, because they are hampering his ability to
build simultaneously for more than one target architecture with one
make file.
I've always thought that having the "default rules" put into make
was a bad idea. I remember using make when those rules didn't exist,
and for a while I kept source for a make which didn't have them.
But the FSF has pushed so hard for making everything they do so
overburdened with extraneous trash, and have become so influential,
that I eventually gave up. I still do use a grep on my MSDOS machines
which is not burdened by the FSF junk.
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Re: Program Format - "Paul B. Webster VK2BZC" - Jun 27 18:03:48 2006
On Tue, 2006-06-27 at 16:04 -0500, Mike McCarty wrote:
> But the FSF has pushed so hard for making everything they do so
> overburdened with extraneous trash, and have become so influential,
> that I eventually gave up.
Are you suggesting that the FSF has in fact, paradoxically fallen into
the trap of assuming that there is no architecture other than i86?
--
Cheers,
Paul B.

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Re: Program Format - Mike McCarty - Jun 28 11:27:11 2006
Paul B. Webster VK2BZC wrote:
> On Tue, 2006-06-27 at 16:04 -0500, Mike McCarty wrote:
>>But the FSF has pushed so hard for making everything they do so
>>overburdened with extraneous trash, and have become so influential,
>>that I eventually gave up.
> Are you suggesting that the FSF has in fact, paradoxically fallen into
> the trap of assuming that there is no architecture other than i86?
>
No, not at all. But their tools gradually become more and more
rococo until they are nearly unusable. The introduction of "default
rules" happened in UNIX, and is not the fault of the FSF, except
in so far as they followed along.
In fact, GNU make has an option (-r) which turns off the default
rules.
But please tell me why a TEXT EDITOR needs to be larger than 4 MB?
$ ls -l /usr/bin/emacs
-rwxr-xr-x 2 root root 4408492 Feb 4 2005 /usr/bin/emacs
This is getting severely off-topic.
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Re: Program Format - David Kelly - Jun 28 15:00:20 2006
On Tue, Jun 27, 2006 at 04:04:05PM -0500, Mike McCarty wrote:
>
> Amusingly, there appeared a message just now over on the Debian Linux
> e-mail group from a fellow who is doing cross-compiles of Linux for
> other architectures, who is desperately trying to eliminate all the
> default rules, because they are hampering his ability to build
> simultaneously for more than one target architecture with one make
> file.
Years ago I built custom versions of FreeBSD for an embedded x86
application but needed a few special tweaks, such as everything was
linked against shared libraries to share space and CPU memory.
FreeBSD's source is structured so as one can use a host to build a
different target. Once I had created a directory tree of my desired
target I chroot'ed into it to build the accessories such as Apache and
Perl, so that these could only find the tools I intended the target to
have rather than the tools and environment I was using to build them.
Just now for kicks I launched the following on my PII-450 FreeBSD
machine: "make TARGET_ARCH=sparc64 buildworld" and it seems to be
happily building the GNU toolchain for sparc64.
--
David Kelly N4HHE, d...@HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )