AnsweredAssumed Answered

"No valid CPU defined!"

Question asked by Lee Shaver on Aug 7, 2014
Latest reply on Aug 20, 2014 by Lee Shaver

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.

Outcomes