cancel
Showing results for 
Search instead for 
Did you mean: 

SPC5Studio 4.1.0 compilation errors from generated code

sebastian239955
Associate II
Posted on April 27, 2016 at 09:34

When I use SPC5Studio 4.1.0 to generate files for a project that worked with 4.0.0 and try to compile with gcc, I get the following error

scc1.exe: error: bad value (e200z0) for -mcpuIf I replace the line in the Makefile

MCU  = e200z0 -meabi -msdata=none -mregnameswith the previous code from 4.0.0

MCU  = e200zx -meabi -msdata=none -mnew-mnemonics -mregnamesit works again.

Likewise, in the file checkCompiler.h I have to add the line 

&sharpdefine se_bge   bgeoutside of the &sharpif defined(__hightec_asm), otherwise I get this error:

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:163: Error: Unrecognized opcode: `se_bge'

#spc5studio
This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
12 REPLIES 12
Erwan YVIN
ST Employee
Posted on April 27, 2016 at 10:00

Hello Sebastian ,

on SPC5Studio 4.1.0,

if you have updated HAL & RLA , you must update the freegcc 4.9.2 too.

e200zx option is for the old compiler 4.6.1

e200z0 option  is for the is for the new compiler 4.9.2.

i recommend you to switch on the new compiler

This release of gcc for e200-VLE supports the ''Power Architecture® 32-bit Application Binary Interface Supplement 1.0 - Embedded''. It is based on gcc 4.9.2, binutils 2.24 and gdb 7.8.

                  Best Regards

Erwan

sebastian239955
Associate II
Posted on April 27, 2016 at 10:20

Hello Erwan,

thanks for your quick reply.

In the SPC5 Studio Market place, the Free PowerPC-VLE GCC 4.9.2 is installed and the update option is greyed out.

Did something go wrong with the update maybe?

Erwan YVIN
ST Employee
Posted on April 27, 2016 at 10:42

Hello Sebastian ,

Could you give me your installation details ?

you should have (cf screenshot)

Best regards

Erwan

________________

Attachments :

2016-04-27_104038.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006qWry&d=%2Fa%2F0X0000000boZ%2FDlKdT220ZsfP3VJqTkDtf.0pjUcI3zzhGLZ0gO9MphQ&asPdf=false
Erwan YVIN
ST Employee
Posted on April 27, 2016 at 10:43

Hello Sebastian ,

Do you use hightec or freegcc ?

After updating , Old projects should be cleaned first

Best Regards

                           Erwan

sebastian239955
Associate II
Posted on April 27, 2016 at 11:20

Hello Erwan,

I'm using 

after uninstalling and reinstalling freegcc 4.9.2 the previous errors are gone.

My install looks like this:0690X00000604toQAA.png

After cleaning and regenerating, I get the following errors when compiling:

make all 

Compiler Options

ppc-freevle-eabi-gcc -c -mcpu=e200z0 -meabi -msdata=none -mregnames -mvle -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -msoft-float -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/ -DPPC_USE_VLE=1 -DCOMPILER=8 -DBOARD=230 -DMCAL=60 -MD -MP -MF .dep/build.d -I. -I./components/spc560bcxx_platform_component_rla/lib/include -I./components/spc560bcxx_board_initialization_component_rla/lib/include -I./components/spc560bcxx_clock_component_rla/lib/include -I./components/spc560bcxx_irq_component_rla/lib/include -I./components/spc560bcxx_low_level_drivers_component_rla/lib/include -I./components/spc560bcxx_platform_component_rla/cfg -I./components/spc560bcxx_board_initialization_component_rla/cfg -I./components/spc560bcxx_clock_component_rla/cfg -I./components/spc560bcxx_irq_component_rla/cfg -I./components/spc560bcxx_low_level_drivers_component_rla/cfg -I./components [...] main.c -o main.o

mkdir -p build/obj

mkdir -p build/lst

Compiling boot.s

./components/spc560bcxx_platform_component_rla/lib/src/boot.s: Assembler messages:

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:40: Error: Illegal instruction for VLE mode: `bl'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:42: Error: Illegal instruction for VLE mode: `bl'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:68: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:111: Error: Illegal instruction for VLE mode: `lis'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:112: Error: Illegal instruction for VLE mode: `ori'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:113: Error: Illegal instruction for VLE mode: `lis'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:114: Error: Illegal instruction for VLE mode: `ori'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:117: Error: Illegal instruction for VLE mode: `bge'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:118: Error: Illegal instruction for VLE mode: `stmw'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:119: Error: Illegal instruction for VLE mode: `addi'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:120: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:126: Error: Illegal instruction for VLE mode: `li'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:129: Error: Illegal instruction for VLE mode: `blr'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:138: Error: Illegal instruction for VLE mode: `lis'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:139: Error: Illegal instruction for VLE mode: `ori'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:143: Error: Illegal instruction for VLE mode: `lis'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:144: Error: Illegal instruction for VLE mode: `ori'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:147: Error: Illegal instruction for VLE mode: `blr'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:153: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:155: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:157: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:159: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:161: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:163: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:165: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:167: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:169: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:171: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:173: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:175: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:177: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:179: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:181: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:183: Error: Illegal instruction for VLE mode: `b'

./components/spc560bcxx_platform_component_rla/lib/src/boot.s:210: Error: Illegal instruction for VLE mode: `b'

make: *** [build/obj/boot.o] Error 1

Erwan YVIN
ST Employee
Posted on April 27, 2016 at 11:46

Hello Sebastian ,

Your installation is correct.

but your boot.s is still the old one after regeneration.

your clean procedure is not ok.

did you use clean procedure by Activity Wizard ?

(cf screenshot)

you can remove by hand your components directory in your application

Best regards

Erwan

________________

Attachments :

2016-04-27_114359.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006qXVA&d=%2Fa%2F0X0000000boo%2FyP2nyBlXmmQt5GSFS1oYSVnyv9IauZU2QYSMSxRGmak&asPdf=false
sebastian239955
Associate II
Posted on April 27, 2016 at 14:30

Hello Erwan,

the boot.s file had been patched with the old code, after I removed the patch the error disappeared. Thank you.

Unfortunately, I still get errors from the code in my user.mak. 

I structured the wildcard includes the same way as in the makefile, but with gcc 4.9.2 there seems to be a problem in that all of my externally included files are not found:

14:10:13 **** Build of configuration Default for project Console_Switch_SPC560B40L3_11 ****

make all 

Compiling boot.s

Compiling crt0.s

Compiling ivor.s

Compiling vectors.s

Compiling pal.c

Compiling clock.c

Compiling irq.c

Compiling spc5_lld.c

Compiling adc_lld.c

Compiling can_lld.c

Compiling spc5_emios.c

Compiling icu_lld.c

Compiling pwm_lld.c

Compiling serial_lld.c

Compiling board.c

Compiling irq_cfg.c

Compiling adc_lld_cfg.c

Compiling can_lld_cfg.c

Compiling icu_lld_cfg.c

Compiling pwm_lld_cfg.c

make: *** No rule to make target `CHALSPC5.c', needed by `build/obj/CHALSPC5.o'.  Stop.

14:10:28 Build Finished (took 15s.39ms)

I used wildcard includes in user.mak like the ones in the Makefile like so, and it worked with the old gcc:

rwildcard = $(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))

AUTO_C_MODULES = $(call rwildcard,D:/<path>/,*.c)

AUTO_C_MCAL = $(call rwildcard,D:/<path>/,*.c)

AUTO_C_BOARD = $(call rwildcard,D:/<path>/,*.c)

AUTO_C_APP = $(call rwildcard,D:/<path>/,*.c)

AUTO_INC_MODULES = $(sort $(dir $(call rwildcard,D:/<path>/,*)))

AUTO_INC_MCAL = $(sort $(dir $(call rwildcard,D:/<path>/,*)))

AUTO_INC_BOARD = $(sort $(dir $(call rwildcard,D:/<path>/,*)))

AUTO_INC_APP = $(sort $(dir $(call rwildcard,D:/<path>/,*)))

# List of all user C source files

U_C_SRC     = $(AUTO_C_MCAL) $(AUTO_C_MODULES) $(AUTO_C_BOARD) $(AUTO_C_APP)  

# List of all user C++ source files

U_CPP_SRC   =

# List of all user ASM source files

U_ASM_SRC   =

# List all user C define here, like -D_DEBUG=1

UDEFS       = -DCOMPILER=8 -DBOARD=231 -DMCAL=60

# add same options in paths and symbols for eclipse

# Define ASM defines here

UADEFS      =

# List all user directories here

UINCDIR     = $(AUTO_INC_MODULES) $(AUTO_INC_MCAL) $(AUTO_INC_BOARD) $(AUTO_INC_APP)

# List the user directory to look for the libraries here

ULIBDIR     = 

# List all user libraries here

ULIBS       = 

The verbose compile shows the include directories correctly like:

ppc-freevle-eabi-gcc -c -mcpu=e200z0 -meabi -msdata=none -mregnames -mvle -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -msoft-float -ffunction-sections -fdata-sections -fno-common  -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/lst/pwm_lld_cfg.lst -DPPC_USE_VLE=1 -DCOMPILER=8 -DBOARD=231 -DMCAL=60 -MD -MP -MF .dep/pwm_lld_cfg.o.d -I. -I./components/spc560bcxx_platform_component_rla/lib/include -I./components/spc560bcxx_board_initialization_component_rla/lib/include -I./components/spc560bcxx_clock_component_rla/lib/include -I./components/spc560bcxx_irq_component_rla/lib/include -I./components/spc560bcxx_low_level_drivers_component_rla/lib/include -I./components/spc560bcxx_platform_component_rla/cfg -I./components/spc560bcxx_board_initialization_component_rla/cfg -I./components/spc560bcxx_clock_component_rla/cfg -I./components/spc560bcxx_irq_component_rla/cfg -I./components/spc560bcxx_low_level_drivers_component_rla/cfg -I./components -ID:/<path1>/ -ID:/<path2>/ ./components/spc560bcxx_low_level_drivers_component_rla/cfg/pwm_lld_cfg.c -o build/obj/pwm_lld_cfg.o

make: *** No rule to make target `CHALSPC5.c', needed by `build/obj/CHALSPC5.o'.  Stop.

Do you have any idea what could have caused this?

Erwan YVIN
ST Employee
Posted on April 27, 2016 at 14:59

Hello Sebastian ,

a Makefile issue.

Could you try with our old gnutools ?

1) Perform a backup of

c:\SPC5Studio\eclipse\plugins\com.st.tools.spc5.tools.gnu.win32_1.0.0.201604221501\gnu\bin\

2) copy the contents of the zip files in

c:\SPC5Studio\eclipse\plugins\com.st.tools.spc5.tools.gnu.win32_1.0.0.201604221501\gnu\bin\

if there is no secret inside , could you send me your application ?

otherwise use my direct email.

Best regards

Erwan

________________

Attachments :

gnutools.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006qYr7&d=%2Fa%2F0X0000000bp5%2FLqATvPOPPIuarxReMCu9s0QU_W7URwr.mLNbwfy98xc&asPdf=false
sebastian239955
Associate II
Posted on April 27, 2016 at 16:23

Hello Erwan,

the old gnutools worked, thank you for your excellent support!

Unfortunately, the project contains our whole IP stack and I can't send it to you.

If I can help you to find a fix for the Makefile issue in another way, contact me anytime.