_sbrk_ and the sequence of requirements

Hi,

I am using Coldfire (MCF5272) and M68k Tool-chain.

_sbrk_ is a low level system call called by malloc. I got "undefined reference " for sbrk which is actually defined in libc . So, i tried including libc. ( I got the above info after some google searches for the _sbrk_ problem)

But, Libc is looking for some kind of functions present in libgloss.

I included libgloss.

After some searches i found the libgloss sourcecode inside newlib package which I compiled with --target = m68K. (Compilation took long time - takes 40 minutes and breaks finally (some kind of pointer problem) ). I did not get any readily available package that i can use it.

I need to find out the libgloss now for fixing this.

Tried to search in cygwin, they have one kind of libgloss for another archetecture. I would like to have libgloss for M68K. (MCF5272 Coldfire) which could solve the above problems . But, i am unable to get it. Could someone of you here share some info regarding the above problems that i face now.

Thx in advans, Karthik Balaguru

Reply to
KBG
Loading thread data ...

Are you perchance trying to adapt my nmalloc to your system (which should be possible). If so sbrk is defined in the (non-standard) unistd.h header. If not, you might want to take a look at it anyhow:

The nm utility may be of help in your search. In binutils.

--
Chuck F (cbfalconer at maineline dot net)
   Available for consulting/temporary embedded and systems.
Reply to
CBFalconer

Hi,

The newlib-1.14.0 got compiled well to generate the libgloss (It took

50 minutes for compilation ... pretty looooong) . I got the m68k along with the required m5200 stuffs which had all the necessary objects. . I did link with libnosys.a for resolving the sbrk's other reference requirements.

Now, i find that lot of errors oriented with _exit, _read and _sbrk have got resolved after using these libraries.

Thx , Karthik Balaguru

Reply to
KBG

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.