Re: Makefile for a simple program

"Bob Brusa" <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers.coldfire
Organization private
Message-ID <op.t53gyxxl8qukij@localhost>
Morning Greg
stand alone. The board has dBUG loaded and I use it to download and launch  
my helloworld program. But it crashes, probably because the startup file  
or the libraries or both used during the link process are not the right  
ones.
Regards Bob

PS: When sending or answering a mail to [email protected] - what  
should be the entry in the field "replay to". Up to now, I put  
[email protected] there - and rarely got an answer - then I put my own  
mail address there and got your answer. Coincidence or something else?

On Wed, 06 Feb 2008 01:45:47 +0100, Greg Ungerer <[email protected]> wrote:

> Hi Bob,
>
> Bob Brusa wrote:
>> Hm, it seems simple, but it is not. I have tried a lot and get errors  
>> only.
>>  I use a COBRA5282-board (with dBUG ready) and I want to compile, link,  
>> download and execute the simple helloworld-program shown below:
>> ----------------------------------
>> #include <stdio.h>
>>  int main(void)
>> {
>>     printf("Hello World\n");
>>     return 0;
>> }
>> -----------------------------------
>>  I use the toolchain installed by executing the script  
>> m68k-uclinux-tools-20061214.sh (downloaded from  
>> http://www.uclinux.org/pub/uClinux/m68k-elf-tools/)
>> My present understanding is, that the makefile should use a prefix of  
>> m68k-uclinux and hence invoke gcc as m68k-uclinux-gcc. But there are  
>> options (and more) required and I do not really see which ones. Does  
>> anyone have a "proposal" how my makefile should look like?
>
> Are you trying to build a uClinux application, or a stand alone
> run-on-bare-metal binary?
>
> The above toolchain can of course do both, but you will supply
> a different set of compile options.
>
> If compiling a stand alone binary you will need some assembler start
> up code, and a library to supply a bare-metal printf as well.
> The above toolchain does not have those in it. (It does have
> libraries and startup code for uClinux applications though).
>
> Regards
> Greg
>
>
>
>> Thank you and best regards
>> Bob
>>  PS: Download to the board using tftp works fine, but the binaries I  
>> get from my makefile do not work.
>>  --Bob Brusa                [email protected]
>> Chapfwiesenstr. 14       ph: +4144 926 74 74
>> CH-8712 Stäfa            fx:   +4144 926 73 34
>> ---
>> [email protected]              Send a post to the list.
>> [email protected]        Join the list.
>> [email protected]    Join the list in digest mode.
>> [email protected]     Leave the list.
>>
>



-- 
Bob Brusa                [email protected]
Chapfwiesenstr. 14       ph: +4144 926 74 74
CH-8712 Stäfa            fx:   +4144 926 73 34
---
[email protected]              Send a post to the list.
[email protected]        Join the list.
[email protected]    Join the list in digest mode.
[email protected]     Leave the list.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.