cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
heyuning
Observer
Observer
3,508 Views
Registered: ‎04-13-2017

change extra_compiler_flags in BSP

Hello, thanks for your attention.

I want to change the BSP setting in 2016.4 SDK, for extra_compiler_flags I want to use "-mfloat-abi-soft",but it didn't work as every time automatically change back to default.

so, how to delete this default setting or change it ?

Thanks.

 

666.png

0 Kudos
8 Replies
pvempati
Xilinx Employee
Xilinx Employee
3,486 Views
Registered: ‎01-03-2017

Hi @heyuning,

 

There is an issue with SDK 2016.4 and its fixed in 2017.1.

Please use 2017.1  or 2017.2 release for more updates.

 

Thanks & Regards,

Praveen Kumar. V

0 Kudos
ibaie
Xilinx Employee
Xilinx Employee
3,459 Views
Registered: ‎10-06-2016

Hi @heyuning

 

As pointed by @pvempati there is a known issue in the SDK 2016.4 Release and it is already fixed in the newer releases. Nevertheless there is a workaround for the issue that you could apply to your current release if migration is not possible.

 

When modifying the BSP extra_compiler_flags, this new values are append to the default one generating a duplication of properties that generates the compiler issue.

 

Compiler output:

Running Make include in ps7_cortexa9_0/libsrc/canps_v3_2/src
make -C ps7_cortexa9_0/libsrc/canps_v3_2/src -s include  "SHELL=/bin/sh" "COMPILER=arm-none-eabi-gcc" "ARCHIVER=arm-none-eabi-ar" "COMPILER_FLAGS=  -O2 -c" "EXTRA_COMPILER_FLAGS=-mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -nostartfiles -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=soft -nostartfiles"

So modify from a text editor the .mss file and Makefile file for the BSP

BEGIN PROCESSOR
 PARAMETER DRIVER_NAME = cpu_cortexa9
 PARAMETER DRIVER_VER = 2.3
 PARAMETER HW_INSTANCE = ps7_cortexa9_0
 PARAMETER extra_compiler_flags = -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=soft -nostartfiles
END
%/make.include: $(if $(wildcard $(PROCESSOR)/lib/libxil_init.a),$(PROCESSOR)/lib/libxil.a,)
	@echo "Running Make include in $(subst /make.include,,$@)"
	$(MAKE) -C $(subst /make.include,,$@) -s include  "SHELL=$(SHELL)" "COMPILER=arm-none-eabi-gcc" "ARCHIVER=arm-none-eabi-ar" "COMPILER_FLAGS=  -O2 -c" "EXTRA_COMPILER_FLAGS=-mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=soft -nostartfiles"

%/make.libs: include
	@echo "Running Make libs in $(subst /make.libs,,$@)"
	$(MAKE) -C $(subst /make.libs,,$@) -s libs  "SHELL=$(SHELL)" "COMPILER=arm-none-eabi-gcc" "ARCHIVER=arm-none-eabi-ar" "COMPILER_FLAGS=  -O2 -c" "EXTRA_COMPILER_FLAGS=-mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=soft -nostartfiles"

That will allow you to compile properly the BSP with soft floating point.

 

Regards,

Ibai


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
heyuning
Observer
Observer
3,419 Views
Registered: ‎04-13-2017

@ibaieThanks, as you advice, I  edit the .mss file and Makefile file for the BSP, and then re-generate BSP, then it will add 

"-mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard" in these files automatically. So what can I do then?

0 Kudos
heyuning
Observer
Observer
3,417 Views
Registered: ‎04-13-2017

@ibaie

BEGIN PROCESSOR
 PARAMETER DRIVER_NAME = cpu_cortexa9
 PARAMETER DRIVER_VER = 2.3
 PARAMETER HW_INSTANCE = ps7_cortexa9_0
 PARAMETER extra_compiler_flags = -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -nostartfiles -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=soft -nostartfiles
END
%/make.include: $(if $(wildcard $(PROCESSOR)/lib/libxil_init.a),$(PROCESSOR)/lib/libxil.a,)
	@echo "Running Make include in $(subst /make.include,,$@)"
	$(MAKE) -C $(subst /make.include,,$@) -s include  "SHELL=$(SHELL)" "COMPILER=arm-none-eabi-gcc" "ARCHIVER=arm-none-eabi-ar" "COMPILER_FLAGS=  -O2 -c" "EXTRA_COMPILER_FLAGS=-mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -nostartfiles -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=soft -nostartfiles"

%/make.libs: include
	@echo "Running Make libs in $(subst /make.libs,,$@)"
	$(MAKE) -C $(subst /make.libs,,$@) -s libs  "SHELL=$(SHELL)" "COMPILER=arm-none-eabi-gcc" "ARCHIVER=arm-none-eabi-ar" "COMPILER_FLAGS=  -O2 -c" "EXTRA_COMPILER_FLAGS=-mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -nostartfiles -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=soft -nostartfiles"
0 Kudos
ibaie
Xilinx Employee
Xilinx Employee
3,400 Views
Registered: ‎10-06-2016

Hi @heyuning

 

You cannot regenerate the BSP as that operation will setup again the default extra flags. Just modify the .mss and Makefile files once your BSP is created properly and then just compile it.


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
jerome.crocco
Observer
Observer
2,598 Views
Registered: ‎12-12-2017

 

Hello,

 

I have also been having similar issue with ADV7511 project from Analog Devices. 

 

I have made the requested modifications in bpth BSP files, but this error is still present.  Can you please advise.

 

I have attached a capture of the screen.

SDK Capture.PNG
0 Kudos
ioan.catuna
Newbie
Newbie
2,094 Views
Registered: ‎06-08-2018

Regarding your compilation errors, you can take a look over the post here: https://ez.analog.com/fpga/f/q-a/103444/adv7511-reference-design-not-working-on-zedboard

Points 3 and 4 in the respective post I think refer to your problem as well.

0 Kudos
obruendl_psi
Adventurer
Adventurer
1,683 Views
Registered: ‎10-16-2017

Despite an answer to this post says that this issue is fixed in 2017.1, I still see it in 2018.1. What ist the state here? Is there any proper workaround for this issue?

0 Kudos