Closed pfalcon closed 5 years ago
@MaureenHelm, @dleach02: I'm trying to dig into this myself, but if you have any suggestions, they're appreciated.
So, frdm_kw41z is Cortex-M0. Per @carlescufi's suggestion also tried BOARD=nrf51_pca10028, and it leads to the same error. So, it's a Cortex-M0 codegeneration problem.
@galak : FYI
did you try to build with another compiler?
@nashif : I didn't. I can try, but the aim is anyway to build with Zephyr toolchain.
@pfalcon
but the aim is anyway to build with Zephyr toolchain.
yeah, but it help to know if this is an issue in the Zephyr SDK or something general
Will do. In the meantime:
$ /home/pfalcon/opt/zephyr-sdk-0.9.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-zephyr-eabi/arm-zephyr-eabi-as --version
GNU assembler (GNU Binutils) 2.27.0.20160806
With ARM GCC https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 (tried this first because that's what we use in Linaro CI):
$ ./arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 6.3.1 20170620 (release) [ARM/embedded-6-branch revision 249437]
$ ./arm-none-eabi-as --version
GNU assembler (GNU Tools for ARM Embedded Processors 6-2017-q2-update) 2.28.0.20170620
The same error:
cd /home/pfalcon/projects-3rdparty/Embedded/Zephyr/jerryscript/build/frdm_kw41z/obj/jerry-core && /home/pfalcon/toolchain/gcc-arm-none-eabi-6-2017-q2-update/bin/arm-none-eabi-gcc -DCONFIG_DISABLE_BUILTINS [...]
[...]
/tmp/ccpJ7vZd.s: Assembler messages:
/tmp/ccpJ7vZd.s: Error: unaligned opcodes detected in executable segment
jerry-core/CMakeFiles/jerry-core.dir/build.make:350: recipe for target 'jerry-core/CMakeFiles/jerry-core.dir/ecma/base/ecma-helpers-string.c.obj' failed
Next specimen: gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 from https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads , release 2017-12-18:
$ ./arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]
$ ./arm-none-eabi-as --version
GNU assembler (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 2.29.51.20171128
Here, finally success at building:
make[1]: Leaving directory '/mnt/hdd/projects-3rdparty/Embedded/Zephyr/jerryscript/build/frdm_kw41z/zephyr'
Finished
text data bss dec hex filename
130540 2740 23872 157152 265e0 build/frdm_kw41z/zephyr/zephyr/zephyr.elf
Will check if it runs shortly.
Will check if it runs shortly.
It does.
outdated
There's an error When building JerryScript Zephyr port for BOARD=frdm_kw41z, originally hit by Linaro CI build: https://ci.linaro.org/view/lite-iot-ci/job/lite-aeolus-jerryscript/202/PLATFORM=frdm_kw41z,ZEPHYR_GCC_VARIANT=zephyr,label=docker-xenial-amd64-13/console . Relevant:
As can be seen, error reporting is stellar: no line number, no nothing. Reproducing the error locally, it happens with the following command line:
Offending .s file, generating by adding -S to the command above, is attached: ecma-helpers-string.s.txt