This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

C++ eclipse compilation

Hi,

I tried to compile my own program with eclipse and GCC with c/c++. I followed this tutorial : TUTORIAL

I have some problems :

  • First : i have problem with SEGGER RTT lib compilation

    SEGGER_RTT_Syscalls_GCC.c:63:21: warning: its scope is only this definition or declaration, which is probably not what you want

    SEGGER_RTT_Syscalls_GCC.c:98:21: warning: 'struct _reent' declared inside parameter list int _write_r(struct _reent *r, int file, char *ptr, int len) { ^

    SEGGER_RTT_Syscalls_GCC.c:98:5: error: conflicting types for '_write_r' int _write_r(struct _reent *r, int file, char *ptr, int len) { ^

    SEGGER_RTT_Syscalls_GCC.c:63:5: note: previous declaration of '_write_r' was here int _write_r(struct _reent *r, int file, char *ptr, int len); ^

    make: *** [src/Segger_RTT/SEGGER_RTT_Syscalls_GCC.o]

et le contenu du fichier syscalls :

#include "SEGGER_RTT.h"


int _write(int file, char *ptr, int len);
int _write_r(struct _reent *r, int file, char *ptr, int len);

int _write(int file, char *ptr, int len) {
  (void) file;  /* Not used, avoid warning */
  SEGGER_RTT_Write(0, ptr, len);
  return len;
}

int _write_r(struct _reent *r, int file, char *ptr, int len) {
  (void) file;  /* Not used, avoid warning */
  (void) r;  /* Not used, avoid warning */
  SEGGER_RTT_Write(0, ptr, len);
  return len;
}
  • Second : i have problem with memory and standard libraries. (like iostream)

when i use standard lib iostream:

c:/gnutoolsarmembedded/5.42016q2/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: test.elf section .text' will not fit in regionFLASH'

c:/gnutoolsarmembedded/5.42016q2/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 156012 bytes

I saw on google, that is a memory space problem. My .hex is too big.

If someone had same problem or solution.

Regards,

Parents Reply Children
No Data
Related