Where can a Newbie find KSDK 2.0 Resources?

cancel
Showing results for 
Search instead for 
Did you mean: 

Where can a Newbie find KSDK 2.0 Resources?

1,091 Views
myke_predko
Senior Contributor III

Going forward with my product (which I'm going to use the SD Card driver on the MK22 that I just posted), I would like to like to use KSDK 2.0 for the product code but I don't seem to be able to find any information on how to create a new bare metal project. 

 

Experimenting with creating a new project in KDS with KSDK 2.0 added, it looks like there are basic new project options in terms of:

- Loading a basic API/device driver set versus a full version

- Loading in freeRTOS versus bare metal

 

I'm guessing that to start out, I should load the full set of drivers and then delete what I don't need later in the project. 

 

I just did a test "Hello World" application and I was surprised that the base #includes weren't sufficient for the project.  I added:

  • fsl_device_registers.h
  • fsl_debug_console.h
  • fsl_common.h

that were used in the "Hello World" application.  I'm guessing that as I create an application, I need to put in the required APIs and then when I get the errors/warnings saying that there is an undefined reference, I add the appropriate #include .h. 

 

Similarly, for adding "middleware" (the "FatFs" will be the big requirement for me) I should create a new folder in the project.  I'm guessing that I have to add the folder to the include paths in the "Properties" ==> "C/C++ Build" ==> "Cross ARM C Compiler" ==> "Includes". 

 

My questions are:

  1. Does my approach above for creating a new project seem correct? 
  2. Is it safe to assume that clocks and other dependencies will be carried forward to the different driver methods?  This does not include:
    1. Pin Muxes, I'll have to set those myself.
    2. Interrupt Handlers will have to be explicitly defined. 
    3. DMA setup. 
    4. Anything else that as a rule of thumb I should look at setting up when I add new hardware?
  3. Where can I find an explanation on how to add a USB CDC device to my project? 
  4. Where can I find a good introduction to freeRTOS and creating applications?

 

Thanx,

 

myke

Labels (1)
4 Replies

236 Views
therealfreegeek
Contributor IV

I was pleased to see the release of 2.0 and the much improved FTM driver and had planned to use it, but on closer inspection I feel 2.0 is not yet ready for the novice like myself.

I think NXP have pushed it out asap, which is great for the expert user, but for me I have decided to stay on 1.3 until there has been more development to support for those used to using PE to pull a project together.

As for integration of USB CDC integration, I did find a great example for a PE project here.

KSDK USB CDC PRINTF | Centaurian

236 Views
myke_predko
Senior Contributor III

Heya,

I ported my SD Card application to KSDK 2.0 and posted it here: https://community.freescale.com/thread/385436

I would agree that KSDK 2.0 is not ready for new users. 

Thanx for the link, I'm not sure how useful it will be when I start working on my USB CDC interface for the product, but I'll let you know. 

myke

0 Kudos

236 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Myke:

Thank you for posting these questions. Please see below:

1) Yes your procedure is correct. Actually the KDS New Project Wizard for KSDK v2.x includes 3 modes for the selected drivers:

All drivers: The full set of driver source files is included in the project. You just need to include the corresponding header file when calling APIs from a particular driver.

Minimal set: Includes just a few of the basic drivers (e.g. clocks, gpio, smc, uart). To add any extra drivers you have to copy the source file from the KSDK installation.

Empty: None of the drivers are included. There is just an empty drivers folder for you to add the required drivers.

The wizard also offers the option to select between a board or a device:

Board: Includes a set of pre-configured source and header files for the use of a particular development board (e.g. pin muxing, clocking, switch and LEDs access macros).

Device: There are just template files under the board folder. The files have empty function declarations for you to include code according to your custom board.

2) Clock source selection, interrupt enabling and pin muxes are configured outside of the drivers. Anything else is handled by the driver APIs. Best way to get familiar with the drivers is to look at the example projects.

3) There is a USB guide in KSDK installation: <KSDK_PATH>\docs\usb\USB Stack User's Guide.pdf

4) Some FreeRTOS example projects are included for reference, but I guess the best source of information is the FreeRTOS page itself:

FreeRTOS - Market leading RTOS (Real Time Operating System) for embedded systems with Internet of Th...

I hope this helps!

Jorge Gonzalez

0 Kudos

236 Views
myke_predko
Senior Contributor III

Hi Jorge,

Thank you for your comments.  I have ported my application to KSDK 2.0 and put it up here (https://community.freescale.com/thread/385436) along with my comments on what I see and what issues I found. 

Next steps is to port the application to freeRTOS under KSDK 2.0 and then add the USB CDC interface. 

I'll let you know the status,

myke

0 Kudos