2016-04-27 12:34 AM
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 MakefileMCU = e200z0 -meabi -msdata=none -mregnameswith the previous code from 4.0.0MCU = 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' #spc5studio2016-04-27 01:00 AM
2016-04-27 01:20 AM
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?2016-04-27 01:42 AM
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=false2016-04-27 01:43 AM
2016-04-27 02:20 AM
Hello Erwan,
I'm using after uninstalling and reinstalling freegcc 4.9.2 the previous errors are gone.My install looks like this:After cleaning and regenerating, I get the following errors when compiling:make all Compiler Optionsppc-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.omkdir -p build/objmkdir -p build/lstCompiling 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 12016-04-27 02:46 AM
2016-04-27 05:30 AM
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?2016-04-27 05:59 AM
2016-04-27 07:23 AM
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.