This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C Preprocessing in ARM Assembler 6

I am trying to pre-process a header file written in C syntax, as an include in my device startup assembly file.

Snippets of the Assembly file:

#include "mcu_powers_preprocessed_macros.h"
Stack_Size      EQU     STACK_SIZE
                AREA    STACK, READWRITE, ALIGN=3
Stack_Mem       FILL    Stack_Size,WATERMARK_PATTERN,4   ;defined in Assembler preprocessor MACRO

It used to work with arm assembler 5.

I have included the following options in the assembler Misc Controls field :

--cpreproc --cpreproc_opts=-xc

And the resulting Assembler control string looks like:

--cpu Cortex-M4.fp -g --cpreproc --cpreproc_opts=-xc --cpreproc_opts=--target=arm-arm-none-eabi --cpreproc_opts=-mcpu=cortex-m4 --cpreproc_opts=-mfpu=fpv4-sp-d16 --cpreproc_opts=-mfloat-abi=hard --cpreproc_opts=-D__UVISION_VERSION="526" --cpreproc_opts=-D_RTE_ --cpreproc_opts=-DSTM32F407xx --cpreproc_opts=-D__UVISION_VERSION="526" --cpreproc_opts=-D_RTE_ --cpreproc_opts=-DSTM32F407xx
-I.\RTE\Device\STM32F407ZGTx
-I.\RTE\Device\STM32F407ZGTx\STCubeGenerated\Inc
-I.\RTE\_Target_1
-IC:\Keil_v5\ARM\PACK\ARM\CMSIS\5.4.0\CMSIS\Core\Include
-IC:\Keil_v5\ARM\PACK\ARM\CMSIS\5.4.0\CMSIS\DSP\Include
-IC:\Keil_v5\ARM\PACK\ARM\CMSIS\5.4.0\CMSIS\Driver\Include
-IC:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.13.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include
-IC:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.13.0\Drivers\STM32F4xx_HAL_Driver\Inc
--pd "__UVISION_VERSION SETA 526"
--pd "_RTE_ SETA 1"
--pd "STM32F407xx SETA 1"
--list .\Listings\*.lst --xref -o .\Objects\*.o

The Assembler generated the following warnings:

assembling startup_stm32f407xx.s...
startup_stm32f407xx.s: warning: RTE\Device\STM32F407ZGTx\startup_stm32f407xx.s: 'assembler' input unused [-Wunused-command-line-argument]
startup_stm32f407xx.s: warning: argument unused during compilation: '-I .\RTE\Device\STM32F407ZGTx' [-Wunused-command-line-argument]
startup_stm32f407xx.s: warning: argument unused during compilation: '-I .\RTE\Device\STM32F407ZGTx\STCubeGenerated\Inc' [-Wunused-command-line-argument]
startup_stm32f407xx.s: warning: argument unused during compilation: '-I .\RTE\_Target_1' [-Wunused-command-line-argument]
startup_stm32f407xx.s: warning: argument unused during compilation: '-I C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.4.0\CMSIS\Core\Include' [-Wunused-command-line-argument]
startup_stm32f407xx.s: warning: argument unused during compilation: '-I C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.4.0\CMSIS\DSP\Include' [-Wunused-command-line-argument]
startup_stm32f407xx.s: warning: argument unused during compilation: '-I C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.4.0\CMSIS\Driver\Include' [-Wunused-command-line-argument]
startup_stm32f407xx.s: warning: argument unused during compilation: '-I C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.13.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include' [-Wunused-command-line-argument]
startup_stm32f407xx.s: warning: argument unused during compilation: '-I C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.13.0\Drivers\STM32F4xx_HAL_Driver\Inc' [-Wunused-command-line-argument]
startup_stm32f407xx.s: warning: argument unused during compilation: '-mfloat-abi=hard' [-Wunused-command-line-argument]
startup_stm32f407xx.s: warning: argument unused during compilation: '-D __UVISION_VERSION=526' [-Wunused-command-line-argument]
startup_stm32f407xx.s: warning: argument unused during compilation: '-D _RTE_' [-Wunused-command-line-argument]
startup_stm32f407xx.s: warning: argument unused during compilation: '-D STM32F407xx' [-Wunused-command-line-argument]
Z:\g_vm\iREG_MCU_v3\branch\Developing Branch\IREG_FW-Master\MCU_Power\RTE\Device\STM32F407ZGTx\startup_stm32f407xx.s(1): warning: A1313W: Missing END directive at end of file

I think the header file hasn't been pre-processed correctly. What am I doing wrongly?

Appreciate your advice.

ST

Parents Reply Children
No data