Hi Martin,
Thanks for getting back. I am not using the Middleware, but for completeness I was trying to describe my setup of Keil.
Just to give you some context, I work in a UK University, and we started using mbed (ST Nucleo) with our yr2 students last year. In yr3 they progress to 'bare metal' ARM programming at register level and using CMSIS and the Standard Peripheral Libraries (using Keil). Its important for us to have single step debugging facilities, so the 'export to Keil' facility is really useful. It worked well all last year, but as I mentioned above, it has now stopped working. The latest successful setup I have been able to use is Keil v5.11 - I can make mbed compile on later versions of Keil if I use mbed library revision 95.
Basically, I compile Blinky on-line, to check its OK, then 'export' to Keil v4 (v5 not available?). I then migrate to 'packs', open it in Keil 5.14 (just done it now) and try to build. I get a linker error:
linking...
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol gpio_init_out (referred from main.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol mbed_assert_internal (referred from main.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol wait (referred from main.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol wait_ms (referred from board.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol SlaveCounter (referred from hal_tick.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol oc_int_part (referred from hal_tick.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol oc_rem_part (referred from hal_tick.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol set_compare (referred from hal_tick.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol us_ticker_irq_handler (referred from hal_tick.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol HAL_SPI_MspInit (referred from stm32f1xx_hal_spi_ex.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol mbed::FileSystemLike::opendir() (referred from retarget.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol mbed::FilePath::fileSystem() (referred from retarget.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol mbed::FilePath::file() (referred from retarget.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol mbed::FilePath::exists() (referred from retarget.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol mbed::FilePath::isFile() (referred from retarget.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol mbed::FilePath::fileName() (referred from retarget.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol mbed::FilePath::FilePath(const char*) (referred from retarget.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol serial_getc (referred from retarget.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol serial_init (referred from retarget.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol serial_putc (referred from retarget.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol stdio_uart (referred from retarget.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol stdio_uart_inited (referred from retarget.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol HAL_TIMEx_BreakCallback (referred from stm32f1xx_hal_tim.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol HAL_TIMEx_CommutationCallback (referred from stm32f1xx_hal_tim.o).
.\build\Nucleo_blink_led.axf: Error: L6218E: Undefined symbol TIMEx_DMACommutationCplt (referred from stm32f1xx_hal_tim.o).
Not enough information to list image symbols.
Finished: 1 information, 0 warning and 25 error messages
Other things I have noticed: if I substitute mbed official library Revision 95 it does not have this problem, and compiles and links correctly. The download zip file size using rev95 is 474k, whereas for later versions jumps to >650k, so something is significantly different.
Other versions of Keil give different linker error messages, like the one in my earlier post.
I wondered if it was obvious from the above errors what is going wrong?
Sorry this has been so long-winded, but I really want to get this resolved if possible. I'd really appreciate some support with this, Martin.
Thanks
Phil
Hi,
Today I tried to compile a program for the STM32 Nucleo F103RB and got a bunch of errors:
Quote:
Error: Class "GPIO_InitTypeDef" has no member "GPIO_Pin" in "main.cpp", Line: 12, Col: 21
Error: Identifier "GPIO_Pin_2" is undefined in "main.cpp", Line: 12, Col: 32
Error: Class "GPIO_InitTypeDef" has no member "GPIO_Mode" in "main.cpp", Line: 13, Col: 21
Error: Identifier "GPIO_Mode_PP" is undefined in "main.cpp", Line: 13, Col: 33
Earlier this week another project of mine using the STM32F103 compiled just fine but I noticed today that there was an update symbol on the mbed library. I updated this to the new version and now it also does not compile anymore.
What happened ?