Settings compiler flags for SPI Slave Boot Loader thru XTime Composer Studio

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
KurtOz
New User
Posts: 2
Joined: Tue Jul 04, 2017 7:56 pm

Settings compiler flags for SPI Slave Boot Loader thru XTime Composer Studio

Postby KurtOz » Wed Aug 23, 2017 8:55 pm

Hi,
I have been working on a SPI Slave Boot Loader for our project which is based on xCore XU216. The application note AN00238 (1.0.2) clearly outlines the steps to compile both loader and a demo application by using standalone Makefiles. I would like to extend those compiler settings by using xTime Application Makefile editor to bind loader objects to our applications created by xTimeComposer. Currently I am working on xTimeComposer 14.2.24.

Specifically I would like to add those flags to corresponding Makefile editor fields:

XCC_EXTRA_MAP_FLAGS = -L . -lloader -Xmapper --first -Xmapper ./loader_pre_crt.o ./loader_init.o

Is there any field that I can insert those extra flags, or should I directly edit the Makefile at source level as:

...
# The flags passed to xcc when building the application
# You can also set the following to override flags for a particular language:
# XCC_XC_FLAGS, XCC_C_FLAGS, XCC_ASM_FLAGS, XCC_CPP_FLAGS
# If the variable XCC_MAP_FLAGS is set it overrides the flags passed to
# xcc for the final link (mapping) stage.
XCC_FLAGS = -O2 -g
XCC_MAP_FLAGS =
XCC_XC_FLAGS =
XCC_EXTRA_MAP_FLAGS = -L . lloader -Xmapper --first -Xmapper ./loader_pre_crt.o ./loader_init.o
...

Even if I include as shown above make fails by complaining about not finding loader_init.o file. All the loader files are copied at the project directory top level.

Should I ignore the makefile created by the xTimeComposer and use a standalone Makefile for this purpose?

Thanks
User avatar
xsamc
Active Member
Posts: 54
Joined: Fri Mar 04, 2011 3:38 pm

Postby xsamc » Tue Sep 12, 2017 3:23 pm

KurtOz wrote:Is there any field that I can insert those extra flags, or should I directly edit the Makefile at source level as:

Switching to the "Source" tab in the Makefile editor allows you to edit parts of the Makefile for which there aren't fields in the "Options" view. The "Options" view is just editing the Makefile for you behind the scenes though, so not having a field for this shouldn't stop you from using it for the rest.

KurtOz wrote:XCC_EXTRA_MAP_FLAGS = -L . lloader -Xmapper --first -Xmapper ./loader_pre_crt.o ./loader_init.o
...
Even if I include as shown above make fails by complaining about not finding loader_init.o file. All the loader files are copied at the project directory top level.


I'm not very familiar with the mapper flags myself, but have you tried adding "-Xmapper" before "./loader_init.o"?

Cheers,
Sam

Return to “Development Tools and Programming”

Who is online

Users browsing this forum: No registered users and 13 guests