Renesas RL78 port

ChibiOS public support forum for topics related to the Renesas RL78 family of micro-controllers.

Moderators: lbednarz, DeusExMachina

lbednarz
Posts: 32
Joined: Sat Dec 18, 2010 11:36 am
Location: Poland

Re: Renesas RL78 port

Postby lbednarz » Fri Feb 07, 2014 7:14 am

I didn't use debugger. If I needed to find a bug, I used uart to print or analyzed listing and map file.

asv
Posts: 5
Joined: Tue Feb 11, 2014 2:37 pm

Re: Renesas RL78 port

Postby asv » Tue Feb 11, 2014 3:09 pm

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?

lbednarz
Posts: 32
Joined: Sat Dec 18, 2010 11:36 am
Location: Poland

Re: Renesas RL78 port

Postby lbednarz » Tue Feb 11, 2014 7:04 pm

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.

User avatar
DeusExMachina
Posts: 223
Joined: Tue Apr 03, 2012 5:08 am
Location: South Korea
Has thanked: 3 times
Been thanked: 3 times

Re: Renesas RL78 port

Postby DeusExMachina » Tue Jul 29, 2014 1:27 am

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?

User avatar
DeusExMachina
Posts: 223
Joined: Tue Apr 03, 2012 5:08 am
Location: South Korea
Has thanked: 3 times
Been thanked: 3 times

Re: Renesas RL78 port

Postby DeusExMachina » Tue Jul 29, 2014 5:15 am

ok, I received test output using 7(RX) and 8(TX) pins of CN3 connector.

User avatar
DeusExMachina
Posts: 223
Joined: Tue Apr 03, 2012 5:08 am
Location: South Korea
Has thanked: 3 times
Been thanked: 3 times

Re: Renesas RL78 port

Postby DeusExMachina » Wed Jul 30, 2014 12:04 am

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.

lbednarz
Posts: 32
Joined: Sat Dec 18, 2010 11:36 am
Location: Poland

Re: Renesas RL78 port

Postby lbednarz » Wed Jul 30, 2014 6:34 am

Hi

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

lb

User avatar
DeusExMachina
Posts: 223
Joined: Tue Apr 03, 2012 5:08 am
Location: South Korea
Has thanked: 3 times
Been thanked: 3 times

Re: Renesas RL78 port

Postby DeusExMachina » Wed Jul 30, 2014 6:56 am

oh, it works, I missed this linker options :[ Thanks!!!

User avatar
DeusExMachina
Posts: 223
Joined: Tue Apr 03, 2012 5:08 am
Location: South Korea
Has thanked: 3 times
Been thanked: 3 times

Re: Renesas RL78 port

Postby DeusExMachina » Fri Aug 15, 2014 10:03 am

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:

lbednarz
Posts: 32
Joined: Sat Dec 18, 2010 11:36 am
Location: Poland

Re: Renesas RL78 port

Postby lbednarz » Sat Aug 16, 2014 10:28 am

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.


Return to “RL78 Support”

Who is online

Users browsing this forum: No registered users and 8 guests