Skip to content

iar - fix flags for cmd and exporters #1948

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

Merged
merged 1 commit into from
Jun 15, 2016
Merged

iar - fix flags for cmd and exporters #1948

merged 1 commit into from
Jun 15, 2016

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented Jun 15, 2016

Exporters and cmd do not share all flags, some asm and c flags are not the same (cpu, fpu).
This is the clean up of the latest changes, that made some changes not available for cmd or exporters.

The changeset applied to mbed lib:

After the change:

C file

before:
[DEBUG] Command: C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.2/arm\bin\iccarm --no_wrap_diagnostics -e --diag_suppress=Pa050,Pa084,Pa093,Pa082 --cpu=Cortex-M3 --thumb --dlib_config C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.2/arm\inc\c\DLib_Config_Full.h -Oh -DDEVICE_ERROR_PATTERN=1 -D__MBED__=1 -DDEVICE_I2CSLAVE=1 -DTARGET_LIKE_MBED -DTARGET_NXP -DTARGET_LPC176X -D__MBED_CMSIS_RTOS_CM -DDEVICE_RTC=1 -DDEVICE_LOCALFILESYSTEM=1 -D__CMSIS_RTOS -DDEVICE_CAN=1 -DTARGET_LIKE_CORTEX_M3 -DTARGET_CORTEX_M -DARM_MATH_CM3 -DDEVICE_ANALOGOUT=1 -DTARGET_UVISOR_UNSUPPORTED -DTARGET_M3 -DTOOLCHAIN_IAR -DDEVICE_INTERRUPTIN=1 -DDEVICE_I2C=1 -DDEVICE_PORTOUT=1 -D__CORTEX_M3 -DDEVICE_STDIO_MESSAGES=1 -DTARGET_LPC1768 -DTARGET_RELEASE -DDEVICE_PORTINOUT=1 -DDEVICE_SERIAL=1 -DTARGET_MBED_LPC1768 -DDEVICE_PORTIN=1 -DDEVICE_SLEEP=1 -DDEVICE_SPI=1 -DDEVICE_ETHERNET=1 -DDEVICE_SPISLAVE=1 -DDEVICE_ANALOGIN=1 -DDEVICE_PWMOUT=1 -DMBED_BUILD_TIMESTAMP=1465985941.61 -DDEVICE_SEMIHOST=1 -DDEVICE_DEBUG_AWARENESS=1 -DDEVICE_SERIAL_FC=1 -f C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\.includes_aa994213323abcbbaffc3d5adc84efa1.txt --dependencies C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\TARGET_NXP\TARGET_LPC176X\analogin_api.d -l C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\TARGET_NXP\TARGET_LPC176X\analogin_api.s.txt -o C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\TARGET_NXP\TARGET_LPC176X\analogin_api.o C:\Code\git_repo\github\mbed\hal\targets\hal\TARGET_NXP\TARGET_LPC176X\analogin_api.c

after:
[DEBUG] Command: C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.2/arm\bin\iccarm --no_wrap_diagnostics -e --diag_suppress=Pa050,Pa084,Pa093,Pa082 --cpu=Cortex-M3 --thumb --dlib_config C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.2/arm\inc\c\DLib_Config_Full.h -Oh -DDEVICE_ERROR_PATTERN=1 -D__MBED__=1 -DDEVICE_I2CSLAVE=1 -DTARGET_LIKE_MBED -DTARGET_NXP -DTARGET_LPC176X -D__MBED_CMSIS_RTOS_CM -DDEVICE_RTC=1 -DDEVICE_LOCALFILESYSTEM=1 -D__CMSIS_RTOS -DDEVICE_CAN=1 -DTARGET_LIKE_CORTEX_M3 -DTARGET_CORTEX_M -DARM_MATH_CM3 -DDEVICE_ANALOGOUT=1 -DTARGET_UVISOR_UNSUPPORTED -DTARGET_M3 -DTOOLCHAIN_IAR -DDEVICE_INTERRUPTIN=1 -DDEVICE_I2C=1 -DDEVICE_PORTOUT=1 -D__CORTEX_M3 -DDEVICE_STDIO_MESSAGES=1 -DTARGET_LPC1768 -DMBED_BUILD_TIMESTAMP=1465985166.62 -DTARGET_RELEASE -DDEVICE_PORTINOUT=1 -DDEVICE_SERIAL=1 -DTARGET_MBED_LPC1768 -DDEVICE_PORTIN=1 -DDEVICE_SLEEP=1 -DDEVICE_SPI=1 -DDEVICE_ETHERNET=1 -DDEVICE_SPISLAVE=1 -DDEVICE_ANALOGIN=1 -DDEVICE_PWMOUT=1 -DDEVICE_SEMIHOST=1 -DDEVICE_DEBUG_AWARENESS=1 -DDEVICE_SERIAL_FC=1 -f C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\.includes_aa994213323abcbbaffc3d5adc84efa1.txt --dependencies C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\TARGET_NXP\TARGET_LPC176X\analogin_api.d -l C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\TARGET_NXP\TARGET_LPC176X\analogin_api.s.txt -o C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\TARGET_NXP\TARGET_LPC176X\analogin_api.o C:\Code\git_repo\github\mbed\hal\targets\hal\TARGET_NXP\TARGET_LPC176X\analogin_api.c

C++ file

before:
[DEBUG] Command: C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.2/arm\bin\iccarm --no_wrap_diagnostics -e --diag_suppress=Pa050,Pa084,Pa093,Pa082 --cpu=Cortex-M3 --thumb --dlib_config C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.2/arm\inc\c\DLib_Config_Full.h -Oh --c++ --no_rtti --no_exceptions --guard_calls -DDEVICE_ERROR_PATTERN=1 -D__MBED__=1 -DDEVICE_I2CSLAVE=1 -DTARGET_LIKE_MBED -DTARGET_NXP -DTARGET_LPC176X -D__MBED_CMSIS_RTOS_CM -DDEVICE_RTC=1 -DDEVICE_LOCALFILESYSTEM=1 -D__CMSIS_RTOS -DDEVICE_CAN=1 -DTARGET_LIKE_CORTEX_M3 -DTARGET_CORTEX_M -DARM_MATH_CM3 -DDEVICE_ANALOGOUT=1 -DTARGET_UVISOR_UNSUPPORTED -DTARGET_M3 -DTOOLCHAIN_IAR -DDEVICE_INTERRUPTIN=1 -DDEVICE_I2C=1 -DDEVICE_PORTOUT=1 -D__CORTEX_M3 -DDEVICE_STDIO_MESSAGES=1 -DTARGET_LPC1768 -DTARGET_RELEASE -DDEVICE_PORTINOUT=1 -DDEVICE_SERIAL=1 -DTARGET_MBED_LPC1768 -DDEVICE_PORTIN=1 -DDEVICE_SLEEP=1 -DDEVICE_SPI=1 -DDEVICE_ETHERNET=1 -DDEVICE_SPISLAVE=1 -DDEVICE_ANALOGIN=1 -DDEVICE_PWMOUT=1 -DMBED_BUILD_TIMESTAMP=1465985941.61 -DDEVICE_SEMIHOST=1 -DDEVICE_DEBUG_AWARENESS=1 -DDEVICE_SERIAL_FC=1 -f C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\.includes_5db34761fd03a133ffc669f7760b2bc8.txt --dependencies C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\.\AnalogIn.d -l C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\.\AnalogIn.s.txt -o C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\.\AnalogIn.o C:\Code\git_repo\github\mbed\hal\common\AnalogIn.cpp

after:
[DEBUG] Command: C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.2/arm\bin\iccarm --no_wrap_diagnostics -e --diag_suppress=Pa050,Pa084,Pa093,Pa082 --cpu=Cortex-M3 --thumb --dlib_config C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.2/arm\inc\c\DLib_Config_Full.h -Oh --c++ --no_rtti --no_exceptions --guard_calls -DDEVICE_ERROR_PATTERN=1 -D__MBED__=1 -DDEVICE_I2CSLAVE=1 -DTARGET_LIKE_MBED -DTARGET_NXP -DTARGET_LPC176X -D__MBED_CMSIS_RTOS_CM -DDEVICE_RTC=1 -DDEVICE_LOCALFILESYSTEM=1 -D__CMSIS_RTOS -DDEVICE_CAN=1 -DTARGET_LIKE_CORTEX_M3 -DTARGET_CORTEX_M -DARM_MATH_CM3 -DDEVICE_ANALOGOUT=1 -DTARGET_UVISOR_UNSUPPORTED -DTARGET_M3 -DTOOLCHAIN_IAR -DDEVICE_INTERRUPTIN=1 -DDEVICE_I2C=1 -DDEVICE_PORTOUT=1 -D__CORTEX_M3 -DDEVICE_STDIO_MESSAGES=1 -DTARGET_LPC1768 -DMBED_BUILD_TIMESTAMP=1465985166.62 -DTARGET_RELEASE -DDEVICE_PORTINOUT=1 -DDEVICE_SERIAL=1 -DTARGET_MBED_LPC1768 -DDEVICE_PORTIN=1 -DDEVICE_SLEEP=1 -DDEVICE_SPI=1 -DDEVICE_ETHERNET=1 -DDEVICE_SPISLAVE=1 -DDEVICE_ANALOGIN=1 -DDEVICE_PWMOUT=1 -DDEVICE_SEMIHOST=1 -DDEVICE_DEBUG_AWARENESS=1 -DDEVICE_SERIAL_FC=1 -f C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\.includes_5db34761fd03a133ffc669f7760b2bc8.txt --dependencies C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\.\AnalogIn.d -l C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\.\AnalogIn.s.txt -o C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\.\AnalogIn.o C:\Code\git_repo\github\mbed\hal\common\AnalogIn.cpp

asm file

before:
[DEBUG] Command: C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.2/arm\bin\iasmarm --cpu Cortex-M3 -DDEVICE_ERROR_PATTERN=1 -D__MBED__=1 -DDEVICE_I2CSLAVE=1 -DTARGET_LIKE_MBED -DTARGET_NXP -DTARGET_LPC176X -D__MBED_CMSIS_RTOS_CM -DDEVICE_RTC=1 -DDEVICE_LOCALFILESYSTEM=1 -D__CMSIS_RTOS -DDEVICE_CAN=1 -DTARGET_LIKE_CORTEX_M3 -DTARGET_CORTEX_M -DARM_MATH_CM3 -DDEVICE_ANALOGOUT=1 -DTARGET_UVISOR_UNSUPPORTED -DTARGET_M3 -DTOOLCHAIN_IAR -DDEVICE_INTERRUPTIN=1 -DDEVICE_I2C=1 -DDEVICE_PORTOUT=1 -D__CORTEX_M3 -DDEVICE_STDIO_MESSAGES=1 -DTARGET_LPC1768 -DTARGET_RELEASE -DDEVICE_PORTINOUT=1 -DDEVICE_SERIAL=1 -DTARGET_MBED_LPC1768 -DDEVICE_PORTIN=1 -DDEVICE_SLEEP=1 -DDEVICE_SPI=1 -DDEVICE_ETHERNET=1 -DDEVICE_SPISLAVE=1 -DDEVICE_ANALOGIN=1 -DDEVICE_PWMOUT=1 -DMBED_BUILD_TIMESTAMP=1465985941.61 -DDEVICE_SEMIHOST=1 -DDEVICE_DEBUG_AWARENESS=1 -DDEVICE_SERIAL_FC=1 -f C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\.includes_3d294514372c7904fe8e7450281c868c.txt -o C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\TOOLCHAIN_IAR\cmain.o C:\Code\git_repo\github\mbed\hal\targets\cmsis\TOOLCHAIN_IAR\cmain.S

after:
[DEBUG] Command: C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.2/arm\bin\iasmarm --cpu Cortex-M3 -DDEVICE_ERROR_PATTERN=1 -D__MBED__=1 -DDEVICE_I2CSLAVE=1 -DTARGET_LIKE_MBED -DTARGET_NXP -DTARGET_LPC176X -D__MBED_CMSIS_RTOS_CM -DDEVICE_RTC=1 -DDEVICE_LOCALFILESYSTEM=1 -D__CMSIS_RTOS -DDEVICE_CAN=1 -DTARGET_LIKE_CORTEX_M3 -DTARGET_CORTEX_M -DARM_MATH_CM3 -DDEVICE_ANALOGOUT=1 -DTARGET_UVISOR_UNSUPPORTED -DTARGET_M3 -DTOOLCHAIN_IAR -DDEVICE_INTERRUPTIN=1 -DDEVICE_I2C=1 -DDEVICE_PORTOUT=1 -D__CORTEX_M3 -DDEVICE_STDIO_MESSAGES=1 -DTARGET_LPC1768 -DMBED_BUILD_TIMESTAMP=1465985166.62 -DTARGET_RELEASE -DDEVICE_PORTINOUT=1 -DDEVICE_SERIAL=1 -DTARGET_MBED_LPC1768 -DDEVICE_PORTIN=1 -DDEVICE_SLEEP=1 -DDEVICE_SPI=1 -DDEVICE_ETHERNET=1 -DDEVICE_SPISLAVE=1 -DDEVICE_ANALOGIN=1 -DDEVICE_PWMOUT=1 -DDEVICE_SEMIHOST=1 -DDEVICE_DEBUG_AWARENESS=1 -DDEVICE_SERIAL_FC=1 -f C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\.includes_3d294514372c7904fe8e7450281c868c.txt -o C:\Code\git_repo\github\mbed\.build\mbed\.temp\TARGET_LPC1768\TOOLCHAIN_IAR\TOOLCHAIN_IAR\cmain.o C:\Code\git_repo\github\mbed\hal\targets\cmsis\TOOLCHAIN_IAR\cmain.S

I am still running some local test, going to compare sizes of executables within make.py and project.py, to be sure flags are 1:1 as they used to be (more than 1 week ago when the consolidation of flags happened).

@sg- @bridadan @screamerbg

@0xc0170
Copy link
Contributor Author

0xc0170 commented Jun 15, 2016

@mbed-bot: TEST

HOST_OSES=windows
BUILD_TOOLCHAINS=all
TARGETS=all

@mbed-bot
Copy link

[Build 483]
FAILURE: Something went wrong when building and testing.

@bridadan
Copy link
Contributor

@mbed-bot: TEST

HOST_OSES=windows
BUILD_TOOLCHAINS=IAR
TARGETS=ALL

@mbed-bot
Copy link

[Build 484]
FAILURE: Something went wrong when building and testing.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Jun 15, 2016

@mbed-bot: TEST

HOST_OSES=windows
BUILD_TOOLCHAINS=IAR
TARGETS=ALL

@0xc0170
Copy link
Contributor Author

0xc0170 commented Jun 15, 2016

Test 484 looks good. I tested this on some examples within project.py, all looking fine (MBED_10, RTOS_1 for 2 different targets).

This patch fixes in this repo IAR projects (they would not compile as some flags were not compatible).

Please review

@mbed-bot
Copy link

[Build 487]
FAILURE: Something went wrong when building and testing.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Jun 15, 2016

It seems M7 has some weird hiccups, investigating.

Exporters and cmd do not share all flags, some asm and c flags are not the same (cpu, fpu)
@0xc0170
Copy link
Contributor Author

0xc0170 commented Jun 15, 2016

@mbed-bot: TEST

HOST_OSES=windows
BUILD_TOOLCHAINS=IAR
TARGETS=ALL

@mbed-bot
Copy link

[Build 493]
FAILURE: Something went wrong when building and testing.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Jun 15, 2016

Cortex-M7 problem corrected (if anyone ever gets Return 3 error from IAR , look at how you are passing arguments, in my case "[--cpu mode]" was failing, had to be ["--cpu", "mode"]), tests results look good.

@sg-
Copy link
Contributor

sg- commented Jun 15, 2016

👍

@sg- sg- merged commit 44e706e into ARMmbed:master Jun 15, 2016
ohagendorf added a commit to ohagendorf/mbed-os that referenced this pull request Jul 1, 2016
- creating new core name Cortex_M7F_DP for a target with a double precision fpu
- adding new core name to arm.py to set compiler/linker flags to a double precision fpu when configured in target.json
- up to now: gcc wrote flag for a double precision fpu -> target with STM32F746 didn't run when using double variables - mcu has only single precision fpu
- changing gcc.py to use single precision for Cortex-M7 und double precision for Cortex_M7F_DP

tested with NUCLEO_F746, NUCLEO_F767 and build.py+make.py and exporting with project.py + compiling/flashing

- iar.py need a similar extention - I didn't change that yet because
  - did not run at the moment - python exception
  - currently worked on in PR ARMmbed#1948
ohagendorf added a commit to ohagendorf/mbed-os that referenced this pull request Jul 4, 2016
- creating new core name Cortex_M7F_DP for a target with a double precision fpu
- adding new core name to arm.py to set compiler/linker flags to a double precision fpu when configured in target.json
- up to now: gcc wrote flag for a double precision fpu -> target with STM32F746 didn't run when using double variables - mcu has only single precision fpu
- changing gcc.py to use single precision for Cortex-M7 und double precision for Cortex_M7F_DP

tested with NUCLEO_F746, NUCLEO_F767 and build.py+make.py and exporting with project.py + compiling/flashing

- iar.py need a similar extention - I didn't change that yet because
  - did not run at the moment - python exception
  - currently worked on in PR ARMmbed#1948
ohagendorf added a commit to ohagendorf/mbed-os that referenced this pull request Jul 6, 2016
- creating new core name Cortex_M7F_DP for a target with a double precision fpu
- adding new core name to arm.py to set compiler/linker flags to a double precision fpu when configured in target.json
- up to now: gcc wrote flag for a double precision fpu -> target with STM32F746 didn't run when using double variables - mcu has only single precision fpu
- changing gcc.py to use single precision for Cortex-M7 und double precision for Cortex_M7F_DP

tested with NUCLEO_F746, NUCLEO_F767 and build.py+make.py and exporting with project.py + compiling/flashing

- iar.py need a similar extention - I didn't change that yet because
  - did not run at the moment - python exception
  - currently worked on in PR ARMmbed#1948
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants