A few weeks ago a library that I have worked on stopped building due to a .s file, but nothing changed in the file.
I have been doing some digging and found that the ARM assembler doesn't support 'C' preprocessor directives unless the flag --cpreproc is used when the assembler is invoked. I am assuming this used to happen since the file uses 'C' preprocessor directives and used to build. Has anything changed recently in the build configuration for the ARM toolchain?
I have also tried using the offline build tools documented here, https://docs.mbed.com/docs/mbed-os-handbook/en/5.1/dev_tools/cli/, and can successfully build the library with the other two toolchains; IAR GCC_ARM, but not ARM.
While experimenting with the offline tools I grabbed a snippet of where the ARM compiler appears to preprocess the .s file and then try to compile it. I am not sure if the ARM compiler invokes the assembler to do this, or how this takes place, but I did notice the --via flag being used without an '=' sign for the 'via' file. Is this correct? Please see below.
[DEBUG] Compile: C:\Keil_v5\ARM\ARMCC\bin\armcc -c --gnu -Otime --split_sections --apcs=interwork --brief_diagnostics --restrict --multibyte_chars --cpu=Cortex-M3 -I "C:\Keil_v5\ARM\ARMCC\include" -D__CMSIS_RTOS -D__MBED_CMSIS_RTOS_CM -D__SYSTEM_HFX=24000000 -D__CORTEX_M3 -DARM_MATH_CM3 --via ..build\MAX32600MBED\ARM.includes_1e50e440b5cf0df164a3683d7fead445.txt --preinclude=..build\MAX32600MBE
D\ARM\mbed_config.h -E -o ..build\MAX32600MBED\ARM\Masters\OwGpio.temp\owlink.o.E.s C:\Users\Justin.Jordan\Documents\svn\mbed\OneWireLibrary\mbed\trunk\fw\OneWire\Masters\OwGpio\owlink.s
[DEBUG] Return: 0
[DEBUG] Compile: C:\Keil_v5\ARM\ARMCC\bin\armcc -c --gnu -Otime --split_sections --apcs=interwork --brief_diagnostics --restrict --multibyte_chars --cpu=Cortex-M3 -I "C:\Keil_v5\ARM\ARMCC\include" -o ..build\MAX32600MBED\ARM\Masters\OwGpio\owlink.o ..build\MAX32600MBED\ARM\Masters\OwGpio.temp\owlink.o.E.s
[DEBUG] Return: 0
I can provide the whole output if it would be helpful. I appreciate any feedback on this issue.