Page 3 of 4

Re: Renesas RL78 port

Posted: Fri Feb 07, 2014 7:14 am
by lbednarz
I didn't use debugger. If I needed to find a bug, I used uart to print or analyzed listing and map file.

Re: Renesas RL78 port

Posted: Tue Feb 11, 2014 3:09 pm
by asv
Great job!

But is it possible to run this port in e2studio (Eclipse-based environment)? Is there any makefile in the port?

And one more question, will this port work for RL78/G14?

Re: Renesas RL78 port

Posted: Tue Feb 11, 2014 7:04 pm
by lbednarz
I don't know e2studio, but if it is based on gcc, the port should work. Unfortunately there is no makefile attached, only code::blocks project is available.

And about RL78/G14, it seems to be extended version (by multiply/divide instructions) of G13, so current port will run on both I think.

Re: Renesas RL78 port

Posted: Tue Jul 29, 2014 1:27 am
by DeusExMachina
Hi!
I tried this port on YRPBRL78G14 promotion board (other MCU R5F104LE), and it seems that demo is working without any modifications. Led is blinking :) But I don't understand how to receive tests output via UART. Is it virtual USB port which is provided by board? Or I need to use some UART pins? What settings of serial port do you use?

Re: Renesas RL78 port

Posted: Tue Jul 29, 2014 5:15 am
by DeusExMachina
ok, I received test output using 7(RX) and 8(TX) pins of CN3 connector.

Re: Renesas RL78 port

Posted: Wed Jul 30, 2014 12:04 am
by DeusExMachina
I created make file for demo project, but I failed to link it.

Code: Select all

rl78-elf/bin/ld.exe: rl78.elf: Not enough room for program headers, try linking with -N

As for C:B project it links OK, but the demo code size is too big for 16 bit MCU, I think:

Code: Select all

   text      data       bss       dec       hex   filename
  38669       214      2228     41111      a097   bin\Release\rl78_demo.exe

I use the same compiler and linker flags, but map files is different and o files size is bigger in my case too...

Code: Select all

USE_OPT = -O2 -fomit-frame-pointer -Wall -std=gnu99 -funsigned-char -fshort-enums -Wswitch -Wunused-variable -Wno-pointer-sign -ffunction-sections
LDFLAGS = $(MCFLAGS) -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch,--gc-sections $(LLIBDIR)

What could help me to link? I use the same ld file.

Re: Renesas RL78 port

Posted: Wed Jul 30, 2014 6:34 am
by lbednarz
Hi

Missing "-nostartfiles" and "-Wl,--relax" in LDFLAGS?
Look at the rl78_demo.cbp, maybe that can help you.

lb

Re: Renesas RL78 port

Posted: Wed Jul 30, 2014 6:56 am
by DeusExMachina
oh, it works, I missed this linker options :[ Thanks!!!

Re: Renesas RL78 port

Posted: Fri Aug 15, 2014 10:03 am
by DeusExMachina
I uploaded makefile version to Github
https://github.com/Nomados/Chibios-RL78 ... h-Makefile

Unfortunately I have some strange problems: it seems that elf and bin files don't contain some code objects, and demo is still non-working... I used LD and GCC options from Code:Blocks project, but I think that missed smth... :oops:

Re: Renesas RL78 port

Posted: Sat Aug 16, 2014 10:28 am
by lbednarz
Are you working on Windows or Linux? Because I tried to build in Windows and got this:
make: echo: Command not found
make: *** [../../os/ports/GCC/RL78/crt0.o] Error 127

I've noticed missing option -fomit-frame-pointer, maybe that makes difference.
Also you can try to compare map and listing files with those generated by C:B.