project-generator / project_generator

Project generators for various embedded tools (IDE). IAR, uVision, Makefile, CoIDE, Eclipse and many more in the roadmap!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[RC5 OoB] armasm errors for --preinclude option

toyowata opened this issue · comments

How to reproduce:

mbed import https://github.com/ARMmbed/mbed-os-example-ble
mbed update mbed-os-5.1.0-rc5
cd BLE_HeartRate
# Add K22F config in the mbed_app.json
mbed export -i uvision -m K22F
# Open project file and build it

I got errors below for the armasm.

*** Using Compiler 'V5.06 update 2 (build 183)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'Unnamed_Project'
assembling startup_MK22F51212.S...
startup_MK22F51212.S: error: A3900U: Unrecognized option '--preinclude=mbed_config.h'.
assembling SVC_Table.S...
SVC_Table.S: error: A3900U: Unrecognized option '--preinclude=mbed_config.h'.
".\.build\uvision4\Unnamed_Project.axf" - 2 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed:  00:00:02

cc @sg- @theotherjimmy

Hi Toyo, see my comment here ARMmbed/mbed-os#2347. I believe this is an mbed issue.

@sarahmarshy I don't think the armasm support --preinclude option. Why do you think this is an mbed issue?

@toyowata the line that I have just changed with this commit was adding the --preinclude option to the assembler flags.

Also, mbed is the one to hand off all the correct flags to progen when exporting.

@toyowata Sarah is correct. Progen does not know and never will what is a valid option for tools (uvision uses proprietary xml for instance). therefore a consumer of progen (in this in this case mbed) needs to take care of how to make preinclude work with assembly files.

I noticed this was fixed in the mbed, not to use preinclude. I'll close this issue