Embedded ARM assembly compile error on STm32F4
Hello,
I'm working on a library for nucleo F401RE board, with LL library, I'm trying to add some embedded ARM assembly code as written in the guide of arm Developer web site:
__asm return-type function-name(parameter-list)
{
// ARM/Thumb/Thumb-2 assembler code
instruction{;comment is optional}
...
instruction
}My function is :
__ASM uint8_t ARM_GET_pin(PIN_TypeDef *pin_number) {
// ARM instructions
}I'm using "__ASM" instead of "__asm" just beacuse it is defined in the files "cmsis_***.h",
I write the function, but when I build the code I get the following error:
../Core/Inc/stm32f4_REGISTER_instruction.h:102:7: error: expected '(' before 'uint8_t'
102 | __ASM uint8_t ARM_GET_pin(PIN_TypeDef *pin_number) {
| ^~~~~~~
| (I have tryed to change the return-type, as well as the function arguments, or add a "( )" that contains all the code __ASM(function), but it doesn't work.
There is a way to use embedded ARM with STM32CubeIDE?
Thanks in advance.
