Skip to main content
Knowledgebase
Home
Renesas India - Knowledgebase

Error occurs after changing tool chain version for HEW with C/C++

Last Updated:03/07/2018

Question:

When I change the tool chain version for a High-performance Embedded Workshop project created with C/C++ Compiler Package for M16C Series and R8C Family [M3T-NC30WA] V.5xx, and execute a build with M3T-NC30WA V.6xx, the following link error occurs indicating the __sget,__iob, $_sput, and other symbols are undefined.

L2310 (E) Undefined external symbol "__sget" referenced in "fgetc"

Answer:

Workarounds to resolve with error are detailed in the following sections of the M3T-NC30WA V.6.xx C/C+ Compiler User’s Manual: “K.2.6 When Using Only the Standard Library Functions sprintf, vsprintf, and sscanf” “2.2.2 Customizing the Assembler Startup Program: c (1) Settings when not using the standard I/O functions”

Please note that there may be some discrepancies in the source example provided in “2.2.2 c (1) Settings when not using the standard I/O functions.” Please confirm that you have the correct example.

.if     __PROGRAM_NO_ALIGN__==1
    .section program,code
.else
    .section program,code,align
.endif
    .glb $__fp, $__pc, ___fs, ___sc
$__fp:
$__pc:
___fs:
___sc:
    rts
    .end

 

Suitable Products
C/C++ Compiler Package for M16C Series and R8C Family [M3T-NC30WA]