Register

Renesas' toolchain errors

Discuss issues related to Calculator Hacking/Modding.
Senior Member
User avatar
Posts: 101
Joined: Sun Mar 27, 2016 10:24 am
Location: France
Calculators: Casio Afx 1.0, Casio fx-9860GII, Casio fx-CG50

Renesas' toolchain errors

Postby cakeisalie5 » Fri May 12, 2017 8:56 pm

Hi! These last days, I've been trying to build libcarrot (my alternative libc) using Python 3.x and Renesas' toolchain. After a few stupid problems with the C compiler and the assembler, I'm encountering a problem with the linker, optlnk.exe. Basically, I'm doing a command like this (using -subcommand):
Code: Select all
noprelink
nomessage
nologo
form library=s
output "libcarrot.lib"
input="arch\casiowin\fxlib\obj\file\sdk.c.obj"
input="arch\casiowin\fxlib\obj\timer\sdk.c.obj"
...
exit

But here is the error I get:
Code: Select all
** L2301 (E) Duplicate module "sdk.c" in "arch\casiowin\fxlib\obj\file\sdk.c.obj"

The thing is, I want to be able to have two sdk.c, so I would like to change the module name, or import it in the created library with the new name (which would basically be the complete path, if possible). But I looked through the manual, and couldn't find anything like this... help D:

PS: My subcommand for using SHC is the following one (CPU options, source and object files are generated, SHCPU, SHC_LIB, SHC_INC and SHC_TMP are set):
Code: Select all
arch\casiowin\fxlib\src\file\sdk.c
-cpu=sh4a
-endian=big
-object="arch\casiowin\fxlib\obj\file\sdk.c.o"
-lang=c
-size
-gbr=auto
-noinline
-chgincpath
-errorpath
-nologo
-debug
Part of the Planète Casio community (FR) - main author of Cahute

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: Renesas' toolchain errors

Postby SimonLothar » Fri May 12, 2017 10:00 pm

This are some optlnk commands to manage libraries

Add or replace the module "lean_setup_test" in library fx_test.lib:
optlnk -FO=library -LIB=fx_test -LIS=fx_test.lst -REP=lean_setup_test.obj

Delete the module "lean_setup_test" from library fx_test.lib:
optlnk -FO=library -LIB=fx_test -LIS=fx_test.lst -DEL=lean_setup_test

List a library:
optlnk -FO=library -LIB=fx_test -LIS=fx_test.lst
I'll be back!

Senior Member
User avatar
Posts: 101
Joined: Sun Mar 27, 2016 10:24 am
Location: France
Calculators: Casio Afx 1.0, Casio fx-9860GII, Casio fx-CG50

Re: Renesas' toolchain errors

Postby cakeisalie5 » Fri Jul 21, 2017 1:16 am

Thanks, but... even though I haven't been able to try yet (the tool supposed to call Optlnk isn't ready yet, it will be soon if I continue working on it as much as nowadays), it doesn't solve the "no object files with two different names", does it? (will I have to rename objects with names such as 000000A2.obj to make sure all of them are unique?)
Part of the Planète Casio community (FR) - main author of Cahute

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: Renesas' toolchain errors

Postby SimonLothar » Sun Jul 23, 2017 5:46 pm

cakeisalie5 wrote:...it doesn't solve the "no object files with two different names", does it?...

Yes. You are right, I think. I do not believe, that optlnk can maintain libraries with objects of the same name distinguished by the path only. But to be honest, I never tried such a thing.
I'll be back!

Return to Calculator Hacking/Modding Discussions

Who is online

Users browsing this forum: No registered users and 35 guests