Renesas RZ Linker file and binary

qwedvit wrote on Wednesday, November 19, 2014:

[SOLVED] I’ve managed to get the Blinky demo running from the FreeRTOS along with a QSPI bootloader. Now development on the FreeRTOS can really start!

[SOLUTION] In case anyone is having the same issues for this platform, I’d like to contribute my solution to the society :slight_smile:
set-up: RZ/A1H, QSPI flash chip used on Renesas RSK, no external RAM, DS-5, Eclipse, GCC compiler v13.01.

The binary output file of the FreeRTOS showed me a wrong start address, wrong end address and wrong execution start address. This seems to be locical as the FreeRTOS for the RZ in combination with the above mentioned developmentstudio was developed for the Renesas RSK. Therefore you need to add the following code at the end of the Start.S asembly file of the FreeRTOS which is located in {projdir}\Source\RenesasFiles\copmiler_specific\asm\

code_start:
.word start /* pointer to the user application start address /
/
Used by NOR and SPI (RZ_A1H_xxxx_LOADER_RSK) */
code_end:
.word end

code_execute:
.word execute /* execute address of first instruction */
.string “.BootLoad_ValidProgramTest.”

This code was copied from another sample project which was released by Renesas. When you’ve added this piece of code, you need to modify the linker file too as the compiler doesn’t know where the execute base address is located. Just add the following code between MEMORY{…} and SECTIONS{…}:

EXEC_BASE = 0x20040000; /* VECTOR_TABLE located here */

And add the following code within the parenthesis of SECTIONS{ add here }:

.reset EXEC_BASE :
{
	execute = .;
	*start.o (.text)
	.	= ALIGN(0x4);
	*(.text)
	*(.text.startup)
} > RAM0L

This code is also copied from a working Renesas sample project. Right now I’ve got a combination of the two projects and are working on integrating the UARTs used by my prototype.

Thanks for the help! And keep up the good work!

Regards