Problems with source codes of TWR-K60F120M

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Problems with source codes of TWR-K60F120M

1,389件の閲覧回数
kenansun
Contributor II

Hi,

I'm using the evaluation board TWR-K60F120M and I try to start from creating a project with source codes within the "KINETIS_120MHZ_SC" package.

What I tried to do is that:

  • Create a "Bareboard Project" in CW10.6 without Processor Expert;
  • Attach files, as well as their folders to the created project; (copy to the workspace not link to)
  • Add relative Include paths to the project;
  • Add definition lines of platform : #define TWR_K60F120M;
  • Add definition line in order to include cw.h: #define CW

After that, I build the project, then there are more than 500 errors occurring, most of which are in the file ''cstddef.h' or "cstdint.h". The error hint is like:

  • Multiple makers at this line:
    • 'path/to/the/file' declaration for parameter 'name_of_param' but no such parameter;
    • 'path/to/the/file' storage class specified for parameter 'name_of_param'

I've ever tried to import an easy "helloword" project as contrast, but I cannot figure out why there are so many errors. (In fact several errors even occurred in the fpu_asm.s file, so I eliminated it to pass compile. But I don't understand why there are errors in the example project...)

OK, so my question is:

  • How to get rid of these errors if I just want to create a project including nothing but the basic drivers, cpu files, etc.?
  • Is there any tutorial exactly about that?

Note that I'm using CodeWorrior 10.6 version. I'm not going to use Processor Expert or MQX tool kit in my project.

Thanks very much!!

0 件の賞賛
返信
4 返答(返信)

851件の閲覧回数
troylavigne
Contributor I

Hi Kenan, @johnmc

You're not alone. I'm a new user of the TWR-K70F120M and CodeWarrior 10.6. I am seeing the exact same errors with fpu_asm.s (Undefined macro or opcode:end & opcode:export).

I just extracted the KINETIS_120MHZ_SC, and found the readme.txt file which includes general directions for codewarrior.


I am able to import example projects, but they do not build properly (also tried cleaning the project prior to building).


Were you able to find a workaround, or did you submit a support request with Freescale?


Regards,


Troy

0 件の賞賛
返信

851件の閲覧回数
adriancano
NXP Employee
NXP Employee

Hi Troy,

I sent you an answer through the service request you submitted. I will post the solution to this issue here in order to help some other members.

If you go to the path: C:\Users\b50274\Documents\MCUs\Samples\KINETIS_120MHZ_SC\build\cw you can find there a cw_readme.txt which contains the instructions to build correctly the sample projects. Basically you can do the next steps:

  • Close CodeWarrior.
  • Inside the KINETIS_120MHZ_SC you can see there are two folders: src and build. You can copy or cut this folder, we are going to move them. In the cw_readme.txt document says to set the workspace to the folder but I find this way simpler.

src and build.png

  • Open in windows explorer your workspace location, typically the location is C:\workspace.
  • Paste inside the workspace location the src and build folders. This is because the paths of the sample projects are relative to the workspace location and if you do not have those folders there the compiler will not be able to find the files.

workspace paste.png

  • Go to the build folder and select the project you want to run, drag and drop the .project file into the CodeWarrior’s workspace (Open CodeWarrior for this).
  • Now there is an issue with the fpu_asm.s file which is inside sources>drivers>fpu. It has a startup routine that another IDE (KEIL uVision) needs to run correctly these examples. You can either delete or exclude from build this file because it causes some conflicts when is used within CodeWarrior.

        -Erase the file: simply select the file and delete it.

        -Exclude from build (it is the polite way): Right click on the file > Resource configuration > Exlcude from Build… ; You can see that now the file has a line across its icon, this means it is excluded from build.

exlcude .png

  • Compile the project and should be no errors.

I hope this information can help you.

Regards,

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. It would be nice!

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

851件の閲覧回数
troylavigne
Contributor I

Thank you very much Adrian.

I would very strongly recommend that Freescale update the KINETIS_120MHZ_SC zipfile on the Freescale website to reflect this.

It is frustrating for new users, who cannot simply download and use this code “out of the box”. If new users are sufficiently frustrated by issues with new development systems, they will simply move on to another dev system.

Thanks again,

Troy

0 件の賞賛
返信

851件の閲覧回数
wayne2056
Contributor I

Troy,

I must agree with you on the frustration of new users.  I have been developing hardware and firmware for another popular MCU manufacturer for many years and wanted to try to spread my wings and dive into an ARM based product.  I looked a FRDM-KL25Z  and the TWR-K60F-120M. 

I have spent numerous hours trying to figure out what IDE I can use, I typically want to try the OEMs offerings before any 3rd party.   The quick start document says to download Codewarrior  from the tower web site... Couldn't find that..  when I did find it.. there was so many numerous versions I couldn't tell which one I should use.   Ended up on tower geeks and found Kinetis Design Suite... I'm still working on that going through the tutorial.  Not sure I have all the required parts to be able to compile any code...

Anyway, I am feeling your pain and just about ready to back out of my well intention plans...

0 件の賞賛
返信