Linker errors in _flshbuf and malloc

Hello everybody,

maybe this is a stupid question (in which case I apologize). I got two linker errors:

Phase OptLinker starting

License expires in 10 days

L2310 (E) Undefined external symbol "_write" referenced in "_flshbuf"

L2310 (E) Undefined external symbol "_sbrk" referenced in "malloc"

Phase OptLinker finished

I have seen several posts in this and other forums describing this behaviour, but did not find a working solution. I tried to change the Standard Library Settings in the toolchain, without any success. After searching for the sbrk symbol I found it at <HEW>\System\Pg\Renesas\SH\Sh_9_0\Generate\sbrk\sbrk.c. I do not know what this Generate folder is for, but I guess it is part of the files of which the Standard Library is built.

Any idea how to solve this?

C/C++ compiler package for SuperH RISC engine family V.9.04 Release 01          (10-8-2012 15:03:03)

High-performance Embedded Workshop Upgrade 4.09.01          (10-8-2012 16:33:21)

SH-4A E10A-USB Emulator V.3.04.00          (10-8-2012 16:43:15)

SH-4A E10A-USB Emulator V.3.04.00          (10-8-2012 16:44:15)

E10A-USB Emulator Common Module V.4.09.01          (10-8-2012 16:54:26)

SH-2A E10A-USB Emulator V.3.05.00          (10-8-2012 16:59:42)

Parents
  • Hello, I have the same exact problem in a project developed for H8s/tiny 20215F CPU, as soon as I try to insert a malloc() anywhere in any source file in my project, the same exact error message appears.... the difference is that I NEVER use printf in my project, it's a firmware project that only uses direct hardware management (I/O ports, UART, I2c)
    Anyway I tried to #include lowsrc in my project but I can't find the files, it seems they are not supplied with the H8s packege for the HEW...

    any help please?

    regards
Reply
  • Hello, I have the same exact problem in a project developed for H8s/tiny 20215F CPU, as soon as I try to insert a malloc() anywhere in any source file in my project, the same exact error message appears.... the difference is that I NEVER use printf in my project, it's a firmware project that only uses direct hardware management (I/O ports, UART, I2c)
    Anyway I tried to #include lowsrc in my project but I can't find the files, it seems they are not supplied with the H8s packege for the HEW...

    any help please?

    regards
Children
No Data