2014-03-22 02:18 AM
My application board has STM32F405RG microcontroller. I tried to use a project came from STM32F4 Discovery Board by just changing the microcontroller from Keil manual ''Project\Select Device for Target 'ST Link Flash..., selecting STM32F405RG, then Rebuild all target files. The following error occured:
C:\Keil\ARM\CMSIS\Include\core_cm4.h(97): warning: #1215-D: #warning directive: ''Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)'' The strange thing is that after I change the device back to STM32F407VG which is the original selection and Rebuild all target files, the same error occured again. Can anyone tell me why? Thanks!2014-03-22 07:40 AM
In the past, I've found that changing the 'target device' setting on an existing Keil project didn't work - it didn't update all the things that were done in creating the project.
It seemed that the setting was only (fully) used when creating a new project - not for updating an existing project.Therefore, I've not tried it lately; so don't know if that's still true - but your experience rather suggests that it is...2014-03-22 08:38 AM
Well, you might want to go double check things like MicroLib, Use FPU, Include Paths, Defines, Target Memory Map, etc within the Project.
I don't recall having that much grief changing part designators, but as Andrew says the scope of what it changes is some what ill defined, the main reason I change it is to get the compiler to the right CPU, and define the Target memory map. I tend to make template/shell projects that work to my satisfaction, and then clone them. When porting to a different architecture (chip or fw library revision), I create a new shell project and then add back in the key files I need, and all the new files from the new target architecture. ie a Mix-n-Match approach. Then I go back in and fix any include file references, which I try to localize, and then fix the things that need changing to match the new architecture.2014-03-24 07:01 PM
Thanks clive1. You pointed to the right direction. I created a new project for STM32F405. Then I checked the C/C++ tab of Options. Here is what's different in the ''Compiler control string'' field:
Original :-c –cpu Cortex-M4 –D__RTX –D__MICROLIB -g
New project I created for STM32F405:-c --cpu Cortex-M4.fp -g
I tried to modified the content of this field. But it can not be changed. So it must be set from somewhere else and I don't know where. Jim2014-03-25 03:25 AM
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.