• Advertisement

Archived

This topic is now archived and is closed to further replies.

problems with gcc thumb 2.9

This topic is 5695 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, where can I get standard lib functions (memset, memcpy, sprintf etc) as well for division/mod operatons for gcc thumb 2.9? I''m using thumb gcc 2.9 that came together with HAM. Rgds.

Share this post


Link to post
Share on other sites
Advertisement
<memory.h>, <stdlib.h>, and <stdio.h>

[edited by - Aprosenf on June 12, 2002 3:06:59 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by Aprosenf
, , and

[edited by - Aprosenf on June 12, 2002 3:06:59 PM]


Header files do not contain implementation.

[edited by - Abominus on June 13, 2002 1:14:06 AM]

Share this post


Link to post
Share on other sites
Well, that made me look bad. I do know that if you know a fair amount of ASM, then you can easily program your own versions of memory operators. Aren''t division and modulus operations built into the language? As for the other standard functions, I wouldn''t really know where to look.

Share this post


Link to post
Share on other sites
quote:
Original post by Aprosenf
Well, that made me look bad. I do know that if you know a fair amount of ASM, then you can easily program your own versions of memory operators. Aren''t division and modulus operations built into the language? As for the other standard functions, I wouldn''t really know where to look.


I know some arm/thumb asm, but I''m porting C code from PC to GBA, which relies quite heavily on the c libs. Memory functions are easy enough, but the other stuff like sprintf, atoi etc etc can be a pain to re-implement. As for mod/div, the arm processor doesn''t have a div opcode, its emulated by the c compiler.

Share this post


Link to post
Share on other sites
#include <stdio>
#include <stdarg.h>
#include <string>

works with DevKitAdvance

Perhaps one can download DevKitAdv and just copy the libraries ? (hmm.. would that work ?)

Share this post


Link to post
Share on other sites
quote:
Original post by LeoMaheo
#include <stdio>
#include <stdarg.h>
#include <string>

works with DevKitAdvance

Perhaps one can download DevKitAdv and just copy the libraries ? (hmm.. would that work ?)



I might try that. Thanks. But devkitadv support thumb? cos my gcc compiler generates thumb code only.

Share this post


Link to post
Share on other sites

  • Advertisement