The error: [50275] xxx.elf section '.unspecified_sections' will not fit in region `must_be_empty'

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Madushan
Level 1
Level 1
First like received First reply posted First like given

When I try to declare an member of one class in another class it gives the following error 

 

12:16:29: Starting: "C:\HighTec\PPC\toolchains\powerpc\v4.6.6.1-bosch-1.3\bin\make.exe" -j4 all
found cpp sources [cpp/src/app.cpp cpp/src/ManagerProvider.cpp ]
found c sources [c/src/application.c c/src/bds_diag_appl_adapt.c]
cpp onjects [cpp/src/app.o cpp/src/ManagerProvider.o]
c onjects [c/src/application.o c/src/bds_diag_appl_adapt.o]
C:/HighTec/PPC/toolchains/powerpc/v4.6.6.1-bosch-1.3/bin/ppc-vle-g++ -mcpu=MCU_JDP_UC1 -mfixed-sda -nostdlib -Wl,--cref -Wl,-no-demangle,-demangle=none -Wl,--extmap=a -ferror-numbers -Wl,-r -Wl,-T -Wl,rel_linker_cmd.lcf -Wl,\
--start-group \
c/src/application.o c/src/bds_diag_appl_adapt.o cpp/src/app.o cpp/src/ManagerProvider.o ../../bsw/libs/_prj_ebos.a ../../bsw/libs/_prj_link_archive.a ../../bsw/libs/_reduced_rtaos.a -Wl,\
--end-group \
-Wl,-Map -Wl,relocatable.map -Wl,--mcpu=z425Bn3 -lgcc -o results/relocatable.elf
C:/HighTec/PPC/toolchains/powerpc/v4.6.6.1-bosch-1.3/bin/ppc-vle-vared -w -l -efull -i results/relocatable.elf -c mcop_adaptrefs.txt -o results/reloc_vared.elf
No fatal errors occurred.
C:/HighTec/PPC/toolchains/powerpc/v4.6.6.1-bosch-1.3/bin/ppc-vle-g++ -mcpu=MCU_JDP_UC1 -mfixed-sda -nostdlib -Wl,--cref -Wl,-no-demangle,-demangle=none -Wl,--extmap=a -ferror-numbers -Wl,--warn-once -Wl,--warn-orphan -Wl,-T -Wl,prj_linker_cmd.lcf -Wl,-Map -Wl,\
results/RC40_test.map \
-Wl,--mcpu=z425Bn3 results/reloc_vared.elf -o results/RC40_test.elf
warning: [50118] 1.incompatible section flags results/reloc_vared.elf:
input section'.ctors' = 'al'
output section '.unspecified_sections' ='axvl'
c:/hightec/ppc/toolchains/powerpc/v4.6.6.1-bosch-1.3/bin/../lib/gcc/ppc-ht-eabi/4.6.4/../../../../ppc-ht-eabi/bin/ld.exe: error: [50275] results/RC40_test.elf section `.unspecified_sections' will not fit in region `must_be_empty'
c:/hightec/ppc/toolchains/powerpc/v4.6.6.1-bosch-1.3/bin/../lib/gcc/ppc-ht-eabi/4.6.4/../../../../ppc-ht-eabi/bin/ld.exe: error: [50283] region `must_be_empty' overflowed by 36 bytes
collect2: ld returned 1 exit status
make: *** [RC40_test] Error 1
12:16:35: The process "C:\HighTec\PPC\toolchains\powerpc\v4.6.6.1-bosch-1.3\bin\make.exe" exited with code 2.
Error while building/deploying project vcu_f (kit: RC40-ppc)
The kit RC40-ppc has configuration issues which might be the root cause for this problem.
When executing step "Make"

Simply classed are as follows: 

#ifdef __cplusplus
#include "ManagerProvider.hpp"

class app
{
private:

public:
app();
~app();
void Initialize();
ManagerProvider mManager;
};
#endif //#ifdef __cplusplus

 

example Make file: 

.PHONY: clean all

PROJECT = RC40_test
INSTALL = $(PROJECT)

cpp_sources = $(wildcard cpp/src/*.cpp)
cpp_headers = $(wildcard cpp/src/*.h)
cpp_headers += $(wildcard cpp/src/*.hpp)

$(info found cpp sources [${cpp_sources}])

c_sources = $(wildcard c/src/*.c)
c_headers = $(wildcard c/src/*.h)

$(info found c sources [${c_sources}])

cpp_objects = $(patsubst %.cpp,%.o,$(cpp_sources))

$(info cpp onjects [${cpp_objects}])

c_objects = $(patsubst %.c,%.o,$(c_sources))

$(info c onjects [${c_objects}])

CXXFLAGS += -I../../bsw/includes
CXXFLAGS += -I../../bsw/includes/core
CXXFLAGS += -I.
CXXFLAGS += -O2
CXXFLAGS += -W
CXXFLAGS += -Wall
CXXFLAGS += -Wcast-align
CXXFLAGS += -Wcast-qual
CXXFLAGS += -Wmissing-noreturn
CXXFLAGS += -Wpointer-arith
CXXFLAGS += -Wfloat-equal
CXXFLAGS += -Wredundant-decls
CXXFLAGS += -Wundef
CXXFLAGS += -mversion-info
CXXFLAGS += -Werror=vla
CXXFLAGS += -Wmissing-declarations
CXXFLAGS += -Winline
CXXFLAGS += -Werror-implicit-function-declaration
CXXFLAGS += -finline
CXXFLAGS += -mcpu=MCU_JDP_UC1
CXXFLAGS += -DGNU -mhard-float
CXXFLAGS += -fmessage-length=0
CXXFLAGS += -mfixed-sda

CCFLAGS += -I../../bsw/includes
CCFLAGS += -I../../bsw/includes/core
CCFLAGS += -I.
CCFLAGS += -O2
CCFLAGS += -W
CCFLAGS += -Wall
CCFLAGS += -Wcast-align
CCFLAGS += -Wcast-qual
CCFLAGS += -Wmissing-noreturn
CCFLAGS += -Wmissing-prototypes
CCFLAGS += -Wnested-externs
CCFLAGS += -Wpointer-arith
CCFLAGS += -Wfloat-equal
CCFLAGS += -Wredundant-decls
CCFLAGS += -Wstrict-prototypes
CCFLAGS += -Wundef
CCFLAGS += -Wunsuffixed-float-constants
CCFLAGS += -mversion-info
CCFLAGS += -Werror=vla
CCFLAGS += -Wmissing-declarations
CCFLAGS += -Winline
CCFLAGS += -Werror-implicit-function-declaration
CCFLAGS += -finline
CCFLAGS += -mcpu=MCU_JDP_UC1
CCFLAGS += -DGNU -mhard-float
CCFLAGS += -fmessage-length=0
CCFLAGS += -mfixed-sda

OUTPUT_PATH = results

LDPATH += -L../../bsw/libs
LIBRARIES += ../../bsw/libs/_prj_ebos.a
LIBRARIES += ../../bsw/libs/_prj_link_archive.a
LIBRARIES += ../../bsw/libs/_reduced_rtaos.a

default: $(PROJECT)
all: $(PROJECT) $(PROJECT).hex

$(PROJECT): $(c_objects) $(cpp_objects)
$(CXX) $(LDFLAGS) -mcpu=MCU_JDP_UC1 -mfixed-sda -nostdlib -Wl,--cref -Wl,-no-demangle,-demangle=none -Wl,--extmap=a -ferror-numbers -Wl,-r -Wl,-T -Wl,rel_linker_cmd.lcf -Wl,\
--start-group \
$(c_objects) $(cpp_objects) $(LIBRARIES) -Wl,\
--end-group \
-Wl,-Map -Wl,relocatable.map -Wl,--mcpu=z425Bn3 -lgcc -o $(OUTPUT_PATH)/relocatable.elf

$(VARED) -w -l -efull -i $(OUTPUT_PATH)/relocatable.elf -c mcop_adaptrefs.txt -o $(OUTPUT_PATH)/reloc_vared.elf

$(CXX) $(LDFLAGS) -mcpu=MCU_JDP_UC1 -mfixed-sda -nostdlib -Wl,--cref -Wl,-no-demangle,-demangle=none -Wl,--extmap=a -ferror-numbers -Wl,--warn-once -Wl,--warn-section-align -Wl,--warn-orphan -Wl,-T -Wl,prj_linker_cmd.lcf -Wl,-Map -Wl,\
$(OUTPUT_PATH)/$(PROJECT).map \
-Wl,--mcpu=z425Bn3 $(OUTPUT_PATH)/reloc_vared.elf -o $(OUTPUT_PATH)/$(PROJECT).elf

$(PROJECT).hex : $(PROJECT)
$(OBJCOPY) --set-start 0x0000 -R .ram -R .sbRam -R .sb_fix_ram -I elf32-powerpc -O ihex $(OUTPUT_PATH)/$(PROJECT).elf $(OUTPUT_PATH)/$(PROJECT)_linker.hex
"$(TOOLS)/createHexmodBat.exe" "$(HEXMOD)" $(OUTPUT_PATH)\$(PROJECT).map starthexmod.bat
"starthexmod.bat" "$(OUTPUT_PATH)/$(PROJECT)"

%.o: %.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $(patsubst %.cpp,%.o,$<) $<

%.o: %.c
$(CC) $(CCFLAGS) $(INCLUDES) -c -o $(patsubst %.c,%.o,$<) $<


clean:
rm -f $(PROJECT) $(cpp_objects) $(c_objects)
rm -f relocatable.map
rm -f starthexmod.bat
rm -rf results/*
rm -f HexmodX.log

run:

 

 


Once I declare the 'mManager' within the class 'app'it gives above mention errors. Highly appreciate your any helpful idea. 

Thanks inadvance ...

 

0 Likes
2 Replies
Prudhvi_E
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 25 likes received

Hi,

It looks like the architecture - PowerPC that you're using is not related to Aurix. Could you please check this with the concerned Tooling partner?

Thank you.

Madushan
Level 1
Level 1
First like received First reply posted First like given

Yes you are right. I posted in the wrong group. It is powerPc