Welcome! Log In Create A New Profile

Advanced

Compiling PanelDue Firmware

Posted by DADIY 
Compiling PanelDue Firmware
July 27, 2016 04:06AM
Just tried to compile the latest version of the PanelDue firmware from github in Atmel Studio 7.0.1006 (I suspect this might be too new?) but I'm running into errors - I suspect my toolchain is wrong but Im a bit lost at which one I should be using - Any tips which the correct one is and where I can get it?


Task "RunCompilerTask"
		Shell Utils Path C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils
		C:\Program Files (x86)\Atmel\Studio\7.0\shellUtils\make.exe all --jobs 2 --output-sync 
		Building file: ../src/MessageLog.cpp
		Invoking: ARM/GNU C Compiler : 5.3.1
		"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-g++.exe" -mthumb -D__SAM3S2B__ -DDEBUG -Dscanf=iscanf -DBOARD=USER_BOARD -DARM_MATH_CM3=true -Dprintf=iprintf  -I"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel\Device\ATMEL\sam3s\include" -I"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel" -I"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel\CMSIS\Include" -I"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel\Device\ATMEL" -I"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel\Device\ATMEL\sam3s\include" -I"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel" -I"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel\CMSIS\Include" -I"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\..\..\CMSIS_Atmel\Device\ATMEL" -I"../common/applications/user_application/user_board/config" -I"../src/config" -I"../src/ASF/thirdparty/CMSIS/Lib/GCC" -I"../src/ASF/sam/utils/cmsis/sam3s/include" -I"../src/ASF/common/utils" -I"../src" -I"../src/ASF/sam/utils/cmsis/sam3s/source/templates" -I"../src/ASF/sam/utils" -I"../src/ASF/sam/utils/preprocessor" -I"../src/ASF/common/boards" -I"../src/ASF/sam/utils/header_files" -I"../src/ASF/common/boards/user_board" -I"../src/ASF/thirdparty/CMSIS/Include" -I"../src/ASF/sam/drivers/pio" -I"../src/ASF/sam/drivers/pmc" -I"../src/ASF/common/services/clock" -I"../src/ASF/common/services/delay" -I"../src/ASF/sam/drivers/wdt" -I"../src/ASF/sam/drivers/pwm" -I"../src/ASF/sam/drivers/uart" -I"../src/ASF/sam/drivers/matrix" -I"../src/ASF/sam/drivers/efc" -I"../src/ASF/sam/services/flash_efc" -I"../src/ASF/sam/drivers/rstc"  -Os -ffunction-sections -fno-rtti -fno-exceptions -mlong-calls -g3 -Wall -mcpu=cortex-m3 -c -MD -MP -MF "src/MessageLog.d" -MT"src/MessageLog.d" -MT"src/MessageLog.o"   -o "src/MessageLog.o" "../src/MessageLog.cpp" 
C:\Users\david\Desktop\PanelDue-master\Debug\Makefile(434,1): error: recipe for target 'src/MessageLog.o' failed
		In file included from ../src/MessageLog.cpp:13:0:
C:\Users\david\Desktop\PanelDue-master\src\Fields.hpp(154,2): error: #error Unsupported DISPLAY_X value
		 #error Unsupported DISPLAY_X value
		  ^
		In file included from ../src/MessageLog.hpp:12:0,
		                 from ../src/MessageLog.cpp:12:

Edited 1 time(s). Last edit at 07/27/2016 05:58AM by DADIY.


DC42 Kossel 330mm x 2meters
My Thingiverse Creations
Re: Compiling PanelDue Firmware
July 27, 2016 06:14AM
I suspect you are trying to build the Debug configuration. Try building one of the three Release configurations.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Compiling PanelDue Firmware
July 27, 2016 06:36AM
Thanks - That's made a big difference. Just leaves me with one error that looks more sensible,


Oddly commenting out OPTIMIZE_HIGH from cycle_counter.c allows a clean build.



Building file: ../src/ASF/common/services/delay/sam/cycle_counter.c
		Invoking: ARM/GNU C Compiler : 5.3.1
		"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe"  -x c -mthumb -D__SAM3S2B__ -DNDEBUG -DBOARD=USER_BOARD -DARM_MATH_CM3=true  -I"../common/applications/user_application/user_board/config" -I"../src/config" -I"../src/ASF/thirdparty/CMSIS/Lib/GCC" -I"../src/ASF/sam/utils/cmsis/sam3s/include" -I"../src/ASF/common/utils" -I"../src" -I"../src/ASF/sam/utils/cmsis/sam3s/source/templates" -I"../src/ASF/sam/utils" -I"../src/ASF/sam/utils/preprocessor" -I"../src/ASF/common/boards" -I"../src/ASF/sam/utils/header_files" -I"../src/ASF/common/boards/user_board" -I"../src/ASF/thirdparty/CMSIS/Include" -I"../src/ASF/sam/drivers/pio" -I"../src/ASF/sam/drivers/pmc" -I"../src/ASF/common/services/clock" -I"../src/ASF/common/services/delay" -I"../src/ASF/sam/drivers/wdt" -I"../src/ASF/sam/drivers/pwm" -I"../src/ASF/sam/drivers/uart" -I"../src/ASF/sam/drivers/matrix" -I"../src/ASF/sam/drivers/efc" -I"../src/ASF/sam/services/flash_efc" -I"../src/ASF/sam/drivers/rstc"  -O2 -fdata-sections -ffunction-sections -mlong-calls -Wall -mcpu=cortex-m3 -c -pipe -fno-strict-aliasing -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror-implicit-function-declaration -Wpointer-arith -std=gnu99 -ffunction-sections -fdata-sections -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -Wmain -Wparentheses -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -Wshadow -Wbad-function-cast -Wwrite-strings -Wsign-compare -Waggregate-return  -Wmissing-declarations -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wnested-externs -Wlong-long -Wunreachable-code -Wcast-align --param max-inline-insns-single=500 -MD -MP -MF "src/ASF/common/services/delay/sam/cycle_counter.d" -MT"src/ASF/common/services/delay/sam/cycle_counter.d" -MT"src/ASF/common/services/delay/sam/cycle_counter.o"   -o "src/ASF/common/services/delay/sam/cycle_counter.o" "../src/ASF/common/services/delay/sam/cycle_counter.c" 
C:\Users\david\Desktop\PanelDue-master\Release-7.0\Makefile(497,1): error: recipe for target 'src/ASF/common/services/delay/sam/cycle_counter.o' failed
		In file included from ../src/ASF/common/services/delay/sam/cycle_counter.h:51:0,
		                 from ../src/ASF/common/services/delay/sam/cycle_counter.c:44:
C:\Users\david\Desktop\PanelDue-master\src\ASF\sam\utils\compiler.h(238,50): error: 's' undeclared here (not in a function)
		 #   define OPTIMIZE_HIGH __attribute__((optimize(s)))
		                                                  ^
C:\Users\david\Desktop\PanelDue-master\src\ASF\common\services\delay\sam\cycle_counter.c(47,1): info: in expansion of macro 'OPTIMIZE_HIGH'
		 OPTIMIZE_HIGH
		 ^
		make: *** [src/ASF/common/services/delay/sam/cycle_counter.o] Error 1

Edited 1 time(s). Last edit at 07/27/2016 06:40AM by DADIY.


DC42 Kossel 330mm x 2meters
My Thingiverse Creations
Re: Compiling PanelDue Firmware
July 27, 2016 08:06AM
I suspect that the version of gcc it is using is not compatible with the version of ASF that my code uses. I will check which version of gcc my Atmel Studio installation uses when I am in the office.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Compiling PanelDue Firmware
July 27, 2016 08:24AM
There is a bug in the latest version of compiler.h.

This line
# define OPTIMIZE_HIGH __attribute__((optimize(s)))

needs to be like this with quotes.

# define OPTIMIZE_HIGH __attribute__((optimize("s")))

Seems to affect newer versions but the quotes are backward compatible - more details here. [asf.atmel.com]


DC42 Kossel 330mm x 2meters
My Thingiverse Creations
Sorry, only registered users may post in this forum.

Click here to login