New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export: Support Make + ArmC6 + v8m #7559

Merged
merged 5 commits into from Aug 10, 2018

Conversation

Projects
None yet
8 participants
@theotherjimmy
Contributor

theotherjimmy commented Jul 19, 2018

Description

There were a few issues preventing v8m support for make_armc6:
* a -D flag with (...) in it
* the wrong scatterfile was used, making use of armcc in
the preprocessing step

This PR fixes both of these issues.

Pull request type

[x] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change
@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Jul 19, 2018

@deepikabhavnani @cmonr Could one of you verify that this works on windows?

@cmonr cmonr requested review from cmonr and deepikabhavnani Jul 20, 2018

@cmonr cmonr added the needs: review label Jul 20, 2018

@deepikabhavnani

This comment has been minimized.

Contributor

deepikabhavnani commented Jul 20, 2018

@theotherjimmy - I tried the commit for v8 devices and it fails with error

"Compile: main_s.cpp"
armclang '-fno-rtti' '-std=gnu++98' '-include' './mbed_config.h' '-DTARGET_M2351KIAAEES' '-D__MBED__=1' '-DDEVICE_I2CSLAVE=1' '-DTARGET_LIKE_MBED' '-DDEVICE_PORTOUT=1' '-DDEVICE_PORTINOUT=1' '-D__MBED_CMSIS_RTOS_CM' '-DDEVICE_RTC=1' '-DDEVICE_SERIAL_ASYNCH=1' '-D__CMSIS_RTOS' '-DTOOLCHAIN_ARMC6' '-DTARGET_FLASH_CMSIS_ALGO' '-D__CORTEX_M23' '-DDEVICE_I2C_ASYNCH=1' '-DTARGET_CORTEX_M' '-DTARGET_DEBUG' '-DTARGET_UVISOR_UNSUPPORTED' '-DDEVICE_LPTICKER=1' '-DTARGET_NUVOTON' '-DDEVICE_INTERRUPTIN=1' '-DTARGET_CORTEX' '-DDEVICE_I2C=1' '-DTARGET_NUMAKER_PFM_M2351' '-DTARGET_M23' '-DDEVICE_STDIO_MESSAGES=1' '-DDEVICE_SPI_ASYNCH=1' '-DTARGET_LIKE_CORTEX_M23' '-DDEVICE_SERIAL=1' '-DDEVICE_USTICKER=1' '-DTARGET_M2351' '-DDEVICE_PORTIN=1' '-DDEVICE_SLEEP=1' '-DMBED_BUILD_TIMESTAMP=1532101495.47' '-DMBED_FAULT_HANDLER_DISABLED' '-DDEVICE_SPI=1' '-DARM_MATH_ARMV8MBL' '-DDEVICE_SPISLAVE=1' '-DDEVICE_ANALOGIN=1' '-DDEVICE_PWMOUT=1' '-DLPTICKER_DELAY_TICKS=3' '-DMBED_TZ_DEFAULT_ACCESS=1' '-DDEVICE_FLASH=1' '-DTOOLCHAIN_ARM' '-DTOOLCHAIN_ARM_STD' '-DDEVICE_SERIAL_FC=1' '-include' './mbed_config.h' '-c' '--target=arm-arm-none-eabi' '-mthumb' '-g' '-O0' '-Wno-armcc-pragma-push-pop' '-Wno-armcc-pragma-anon-unions' '-DMULADDC_CANNOT_USE_R7' '-fdata-sections' '-fno-exceptions' '-MMD' '-D_LIBCPP_EXTERN_TEMPLATE(...)=' '-mcpu=cortex-m23' '-march=armv8-m.base' '-mcmse' '-fno-rtti' '-std=gnu++98' '-DAPPLICATION_ADDR=0x0' '-DAPPLICATION_SIZE=0x40000' '-DAPPLICATION_RAM_ADDR=0x20000000' '-DAPPLICATION_RAM_SIZE=0x8000' '-DMBED_ROM_START=0x0' '-DMBED_ROM_SIZE=0x40000' -I../. -o main_s.o ../main_s.cpp
../main_s.cpp:2:10: fatal error: 'mbed.h' file not found
#include "mbed.h"
         ^~~~~~~~
1 error generated.
make[1]: *** [main_s.o] Error 1
make: *** [all] Error 2
@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Jul 20, 2018

Thanks. We'll talk offline about how to resolve this.

@theotherjimmy theotherjimmy force-pushed the theotherjimmy:make-armc6-v8m branch from e7bc5d7 to c3da22d Jul 20, 2018

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Jul 20, 2018

@deepikabhavnani and I found out that a call to win_to_unix will not work correctly WRT include paths on windows. This has been remedied in the "Correct path handling after calls to win_to_unix" commit.

@deepikabhavnani Could you test this PR again when you get the chance?

@theotherjimmy theotherjimmy force-pushed the theotherjimmy:make-armc6-v8m branch 3 times, most recently from c2d00d5 to 881803c Jul 20, 2018

@deepikabhavnani

This comment has been minimized.

Contributor

deepikabhavnani commented Jul 20, 2018

Failing at linking step now:

"Compile: spi_api.c"
"Compile: trng_api.c"
"Compile: us_ticker.c"
"Compile: nu_miscutil.c"
"Compile: nu_modutil.c"
"link: 7559_export_test.elf"
The system cannot execute the specified program.
make[1]: *** [7559_export_test.elf] Error 1
make: *** [all] Error 2

@0xc0170 0xc0170 added needs: work and removed needs: review labels Jul 23, 2018

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Jul 23, 2018

@deepikabhavnani Can you run armlink from your command line? it seem that this is another one of those failures.

@deepikabhavnani

This comment has been minimized.

Contributor

deepikabhavnani commented Jul 23, 2018

@theotherjimmy - yes i can run armlink from command line and I did verify ARMC6 path as well

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Jul 23, 2018

@deepikabhavnani Then it's probably fixed by #7583

@deepikabhavnani

This comment has been minimized.

Contributor

deepikabhavnani commented Jul 30, 2018

@theotherjimmy theotherjimmy force-pushed the theotherjimmy:make-armc6-v8m branch from 780352b to 58180db Aug 2, 2018

@SenRamakri SenRamakri added needs: review and removed needs: work labels Aug 3, 2018

@deepikabhavnani

This comment has been minimized.

Contributor

deepikabhavnani commented Aug 6, 2018

Still same error on windows system


"link: 7559_export_test.elf"
The system cannot execute the specified program.
make[1]: *** [7559_export_test.elf] Error 1
make: *** [all] Error 2

Error on linux
C/CPP file compilation was successful, asm files throw below error

2 warnings generated.
Assemble: except.S
Warning: A3912W: Option 'c' is deprecated.
Fatal error: A3903U: Argument 'Cortex-M23' not permitted for option 'cpu'.
1 Error, 1 Warning
/home/deepika/test_7559/Makefile:1038: recipe for target 'mbed-os/rtos/TARGET_CORTEX/TARGET_CORTEX_M/TOOLCHAIN_ARM/except.o' failed
make[1]: *** [mbed-os/rtos/TARGET_CORTEX/TARGET_CORTEX_M/TOOLCHAIN_ARM/except.o] Error 8
Makefile:25: recipe for target 'all' failed
make: *** [all] Error 2

Config setting in linux
deepika@deepika:~/test_7559$ mbed config -G --list
[mbed] Global config:
GCC_ARM_PATH=/home/deepika/gcc-arm-none-eabi-7-2018-q2-update/bin/
ARMC6_PATH=/usr/local/ARMCompiler6.10/bin/

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/ARM_Compiler_5.06u6/bin64:/usr/local/iccarm-7.80.1/bin:/usr/local/gcc-arm-none-eabi-6-2017-q2-update/bin:/usr/local/ARMCompiler6.10/bin:/snap/bin

which armclang
/usr/local/ARMCompiler6.10/bin/armclang

which armasm
/usr/local/ARM_Compiler_5.06u6/bin64/armasm

@deepikabhavnani

This comment has been minimized.

Contributor

deepikabhavnani commented Aug 7, 2018

@theotherjimmy
Linux build was successful if $PATH contains ARMC6 path, if path of ARM compiler 5 and ARM compiler 6 both are set, build fails during assembly file compilation. Can we add this to documents?

Also, srec_cat is the requirement for merging hex files do we capture that anywhere in docs?

CC @AnotherButler

@deepikabhavnani

Verified works for linux. Know issue for windows (command length exceeds 32K during linking)

@cmonr

cmonr approved these changes Aug 9, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 9, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Aug 9, 2018

Build : SUCCESS

Build number : 2770
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7559/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 9, 2018

/morph test

@AnotherButler

This comment has been minimized.

Contributor

AnotherButler commented Aug 9, 2018

@deepikabhavnani To my knowledge, we don't capture that in the docs.

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Aug 10, 2018

@0xc0170 0xc0170 merged commit 2a824a1 into ARMmbed:master Aug 10, 2018

14 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/astyle Passed, 703 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 10137 cycles (+1187 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 9960B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment