"No valid CPU defined!"

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

"No valid CPU defined!"

6,673 次查看
leeshaver
Contributor III

I came across what seems to be a bug in code generated by KDS 1.1.0, and was encouraged to report it here.

 

Tools involved:

KDS 1.1.0

KSDK 1.0.0 (release version, not beta, installed into KDS)

IAR EW 7.2

KV31 TWR module

 

Resulting error message:

Fatal Error[Pe035]: #error directive: "No valid CPU defined!" C:\Freescale\KSDK_1.0.0\platform\CMSIS\Include\device\fsl_device_registers.h 1520

 

Tested fix:

Add CPU_MKV31F512VLH12 as a Defined Symbol in IAR EW Project>>Options>>C/C++ Compiler>>Preprocessor

 

Untested fix:

Add appropriate #define pragma.

 

Abbreviated steps to reproduce:

  1. Create a new KDS project
    1. Processor: TWR-KV31F120M
    2. KSDK checked (with updated SDK Environment Variable)
    3. Processor Expert checked (Linked)
  2. In CPU component>>Build Options, change target compiler to IAR ARM C Compiler
  3. Generate Code
  4. Create a blank IAR EW project
  5. Link EW project to using Project>>Add Project Connection
    1. Processor Expert Project
    2. target appropriate "ProjectInfo.xml" generated by KDS
  6. EW Project>>Make
    1. See error listed above reported by 22 files

 

Notes:

It seems most likely that the code generator mistakenly omitted the appropriate #define pragma.

 

I would also like to mention that attempting to 'ask a question' (either link) while not signed in sent me to a page which simply says "An unexpected error has occured". There is no indication that I needed to sign in to solve the problem, which apparently worked. Similarly annoying, the community page saved my credentials, but required me to explicitly click "Sign In". If it's going to save my credentials anyway, it might as well sign me in.

标签 (1)
标记 (5)
8 回复数

3,621 次查看
BlackNight
NXP Employee
NXP Employee

Kinetis Design Studio with the Processor Expert in it is not intended to be a front end to IAR EW out of the box, so I'm not surprised that this does not work without tweaking. The IAR tools/IDE check the project linking file for the source files and header include paths, but IAR does not support reading in options (like the needed define you have found out yourself). So you need to have this added manually to the IAR EW until that project connection functionality will cover things like build tool options.

Erich

PS: about that "ask a question" forum issue: thanks for reporting, I have passed this on so hopefully this can be addressed.

0 项奖励
回复

3,621 次查看
leeshaver
Contributor III

That's interesting. Previous Processor Expert versions provided near-seamless integration, which was used as a selling point to our group at FTF from both IAR and Freescale. It sounds like you're saying such features will be added eventually, though. Hopefully we don't run into too many similar problems. Are there any resources that I can use to educate myself on what else is missing from this advertised feature?

Should I bother with similar reports if other issues are found?

0 项奖励
回复

3,621 次查看
BlackNight
NXP Employee
NXP Employee

I think nothing is missing:

What is used as integration for non-Eclipse IDE's is the Microcontroller Driver Suite (Processor Expert Software, Microcontroller Dr|Freescale) where V10.4.1 is the latest version.

This is used for example with Keil (Using Keil µVision (ARM-MDK) with Processor Expert Driver Suite | MCU on Eclipse) or with IAR EW (Tutorial: IAR + FreeRTOS + Freedom Board | MCU on Eclipse). The Driver Suite is creating projects which then are used e.g. in IAR or Keil (or others).

Kinetis Design Studio is an integrated development toolchain (like CodeWarrior), and the wizards in these IDE's are creating projects for their toolchains, respectively. The underlying Processor Expert is shared technology, so like you did, it is technically possible to tweak the projects.

I hope this makes sense?

0 项奖励
回复

3,621 次查看
leeshaver
Contributor III

Using an up-to-date Processor Expert installation, I repeated the process listed in the report, including using the most current KSDK. This time I was asked my target build environment, instead of changing it in the component manually in KDS. Completing the remaining steps resulted in the same error.

Would it be more accurate for me to describe this as a PEx or KSDK bug instead of mentioning KDS? I had been using KDS because I was told the process would essentially be the same given that it has the same PEx and KSDK installed, but that could certainly have been a faulty assumption. I've now reproduced the error without involving KDS directly.

This compatibility was used as a selling point at a class we attended, staffed by Freescale, where we walked through this process as part of the class (shortly before the KDS announcement; we used PEx and the SDK with the KL FRDM board). It was also sold to us as a feature at FTF 2014. I'm mentioning this so you understand why I feel this is a bug rather than an intended incompatibility.

During the KDS beta I tested this functionality with the KV10 TWR board, and it seemingly worked perfectly. Hence my assumption that this is a bug with the KV31-specific generated code.

I do want to mention that I appreciate your taking the time to respond, and I have a great deal of respect and appreciation with the time you spend here and on your blog. Your blog was a big part of what led us to deciding on Freescale for this, and hopefully future, projects.

0 项奖励
回复

3,621 次查看
BlackNight
NXP Employee
NXP Employee

Hi Lee,

thanks for that mention :-).

I believe this is more of a Kinetis SDK related question. The forum owners probably will need to restructure the forums, and I suggest you might post SDK related questions in the Kinetis Microcontrollers ( Kinetis Microcontrollers) forum. It has a Kinetis SDK category there:

As for your actual problem: I suggest that you check

C:\Freescale\KSDK_1.0.0\platform\CMSIS\Include\device\fsl_device_registers.h

(where the error happens) what kind of CPU define it expects, based on what you are using.

And that you add that define to the IAR preprocessor/define settings.

I hope that helps,

Erich

0 项奖励
回复

3,621 次查看
leeshaver
Contributor III

Hi Erich,

That fix works - I had listed it under "Tested fix" in my original post.

I went ahead and moved the discussion to Kinetis Microcontrollers, per your suggestion.

I'm also somewhat amused that the question is "Assumed Answered" and I apparently have no way of changing that.

0 项奖励
回复

3,621 次查看
leeshaver
Contributor III

I seem to have lost the ability to label this a question, now that it is one. Is there a better place to take this discussion?

Another minor bug report, possibly: On August 11, under the first post's title was a message that I had "99999[...] [units of time]" to label the post a question. I assumed this meant an infinite time had been set, and never saw it tick down when I came back to the discussion. That option seems to be gone. Would that be because time ran out, or some other reason?

0 项奖励
回复

3,621 次查看
BlackNight
NXP Employee
NXP Employee

I was still able to mark it as a question, so I just did :-)

0 项奖励
回复