-
Notifications
You must be signed in to change notification settings - Fork 3k
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
IAR support broken with Pelion DM Client during ASM #8931
Comments
Interesting. Looking at this problem, it looks like it stretches back all the way back to 5.10. Doing the following results in the same error:
Running the command any sooner than 5.10 doesn't work because the BOOTLOADER feature wasn't introduced until them. |
If you look at ARM/IAR/GCC_ARM toolchains, the
If you look at the latter file, many macros are filtered out for when doing assemble, yet for whatever reason, the app level config macros are being passed to IAR iasmarm. |
Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-235 |
Passing of any macros to IAR was originally missing: #6670 That was required to solve various problems, but it seems that didn't filter the same as the other toolchains? Last problem I saw in this area was incorrect escaping of string literals (like the error URL) causing failure. Found here: #8023, fix/workaround commit added to that PR: 62a55a6 (filter all string literal macros to IAR) If you know the other 2 toolchains are filtering stuff, then applying same filtering to IAR makes sense. If it makes the problem go away, good, but would still be nice to know what the actual tool complaint is. Is there an incorrect escaping, or are we triggering a variant of the IAR 7.80 bug? (I don't see any reason in principle why you shouldn't be able to pass mbed conf options to the assembler, but clearly it's causing practical issues). |
@theotherjimmy please take a look at this |
I believe I've found the issue causing the IAR assembler to error. A macro was being repeated in the .xcl file, specifically This macro appears twice in this case because it is set as a For consistency reasons, I'd recommend removing the |
Description
While trying to compile Pelion DM tests (and also example programs) for IAR, compilation fails with the following message:
Upon further investigation, running the IAR's iasmarm command
"D:\Tools\IAR\IAR 7.8\arm\bin\iasmarm" --cpu Cortex-M4F -DTRANSACTION_QUEUE_SIZE_SPI=2 -D__CORTEX_M4 -DARM_MATH_CM4 -D__FPU_PRESENT=1 -DUSBHOST_OTHER -D__MBED_CMSIS_RTOS_CM -D__CMSIS_RTOS -DTWO_RAM_REGIONS -f .\BUILD\tests\DISCO_L475VG_IOT01A\IAR\asm_macros_d292d317e7777fda6310dff5bcba2c50.xcl -o BUILD\tests\DISCO_L475VG_IOT01A\IAR\mbed-os\cmsis\TARGET_CORTEX_M\TOOLCHAIN_IAR\cmain.o .\mbed-os\cmsis\TARGET_CORTEX_M\TOOLCHAIN_IAR\cmain.S
returns:I'm attaching the
asm_macros_d292d317e7777fda6310dff5bcba2c50.xcl
for convenience -asm_macros_d292d317e7777fda6310dff5bcba2c50.zip
Upon even further investigation, removing the aforementioned file from the iasmarm command allows the file to be compiled successfully, e.g.
Continuing to try to compile the tests and manually removing the .xcl file from the compile helps me to finally compile + link the tests, and then successfully pass greentea run:
This makes me think that there's something fundamentally broken in the IAR support in Mbed OS 5.10.4 / master, where the toolchain assembling receives application level macros/config (some of which look invalid for IAR), while it's expected that assembling should only receive the target level config variables.
Note that this impacts all Pelion examples and fails with both mbed-os-5.10.4 and mbed-os master branch.
CC @theotherjimmy @cmonr @bridadan
How to reproduce:
mbed import pelion-enablement
mbed test -t IAR -m DISCO_L475VG_IOT01A -n simple-mbed-cloud-client-tests*dev* -v
@ashok-rao Please label this in JIRA.
FYI @MarceloSalazar regarding Mbed OS 5.11 OOB.
Issue request type
The text was updated successfully, but these errors were encountered: