AnsweredAssumed Answered

GNU ARM compile problem, FLASH_KEY

Question asked by gregson.peter on Nov 17, 2013
Latest reply on Nov 18, 2013 by Clive One
Hello,
I am using GNU ARM gcc version 4.7.4 to compile a simple LED flasher using STM32_USB-FS-Device_Lib_V4.0.0.  I am getting the following error:

          -I/AddIns/Development/STMicro/STM32_USB-FS-Device_Lib_V4.0.0/Libraries//AddIns/Development/STMicro/STM32_USB-FS-Device_Lib_V4.0.0/Libraries/STM32F10x_StdPeriph_Driver/inc -o build/stm32f10x_flash.o /AddIns/Development/STMicro/STM32_USB-FS-Device_Lib_V4.0.0/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c
/AddIns/Development/STMicro/STM32_USB-FS-Device_Lib_V4.0.0/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c: In function 'FLASH_Unlock':
/AddIns/Development/STMicro/STM32_USB-FS-Device_Lib_V4.0.0/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c:323:17: error: 'FLASH_KEY1' undeclared (first use in this function)
/AddIns/Development/STMicro/STM32_USB-FS-Device_Lib_V4.0.0/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c:323:17: note: each undeclared identifier is reported only once for each function it appears in
/AddIns/Development/STMicro/STM32_USB-FS-Device_Lib_V4.0.0/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_flash.c:324:17: error: 'FLASH_KEY2' undeclared (first use in this function)

and many more copies of "FLASH_KEY" errors.

My code compiles and runs fine with the STM32F10x_StdPeriph_Lib_V3.5.0 on the Olimex STM32_P103 board.

I  used grep -lr to try to find where this is defined without success.  Can anyone explain the problem to me and suggest a solution, please?

Thanks and Best regards,

Peter

Outcomes