Code Monkey home page Code Monkey logo

sir-branch / k64f-starter-template Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 75.71 MB

A bundle of code and script to quickly start developing for NXP FRDM-K64F

License: MIT License

CMake 0.23% C 86.56% C++ 4.20% Assembly 0.39% Makefile 0.11% CSS 0.06% HTML 6.84% Batchfile 0.01% Shell 0.23% Dockerfile 0.01% PowerShell 0.01% Java 0.14% Objective-C 0.32% Python 0.40% Perl 0.09% JavaScript 0.39% Tcl 0.01% SmPL 0.01% GDB 0.01% Lex 0.01%
k64f frdm-k64f bundle quickstart

k64f-starter-template's Introduction

K64F Starter Template -- Not tested waiting for DEV-BOARD!

This project contains a starter template and a lot of bundled tools to allow a quick start developing for the NXP K64F on your IDE or text editor of choice.

It is not a one-size-fits-all environment, some customization and porting from the original SDK might still be needed, but for the most common and basic stuff, you should be good to go with this.

Contents

  • fw-sample: A minimalist user application as an example.
    • (Note) We're assuming that all applications are versioned using Semanting Versioning.
  • sdk_cmake: The collection of .cmake files necessary to build this whole thing. Note: You'll have to tweak fw-<your-project>/CMakeLists.txt for your specific use-case.
  • sdk_k64f: Here is where the files from the NXP FRDM-K64F SDK reside. The contents are almost identical to the v2.7.0 SDK download, the cmake_toolchain_files were moved to the sdk_cmake folder. In theory, if you want to upgrade to a newer SDK version, replacing the contents of this folder should be enough.
  • toolchain: All the build scripts for the project in a containerized environment.
  • utils: General utilities that you'd might find useful.
    • vscode: Some useful configurations for Visual Studio Code.

Build Environment Installation

Please follow the installation instructions for each of the supported build environments.

Windows (Enterprise, Educational or Pro, DO NOT USE HOME)

  • Ensure you have Docker installed, following these instructions. Be sure to add more resources to the virtual machine that Docker is creating for you.

Linux, MacOS

  • Ensure you have Docker installed, following these instructions.
    • We've provided an automated script that does the process for you, just run ./toolchain/utils/linux_install_docker.sh
    • After rebooting, make sure that you can run docker run hello-world without requiring root privileges.
    • Run ./toolchain/env_setup.sh. This will create the Docker image with the entire build environment.

Usage

Please follow the installation instructions for each of the supported platforms.

Windows

  • Run ./toolchain/env_compile.bat
    • Use -c or -clean to perform a full rebuild of the project.
    • Use -fw to select which firmware target to build.

Linux, MacOS

  • Run ./toolchain/env_compile.sh
    • Use -c or -clean to perform a full rebuild of the project.
    • Use --fw to select which firmware target to build.

Note on target selection: The name of each target is specified by those folders prefixed by fx-. One must specify the folder name without the prefix. (Eg. --fw my-project to select fw-my-proyect.)

For flashing and debugging it's best to go for Segger OpenSDA and JLink. Just download Segger OpenSDA V2.0 from segger web site. Be sure to download Board-Specific Firmware.

With Segger OpenSDA, flashing is just a matter of drag & drop. If it doesn't work, you might have installed a generic firmware.

To debug,

  1. JLinkGDBServer -device MK64FN1M0xxx12 -if SWD
  2. arm-none-eabi-gdb -ex 'target remote:2331' your.elf
  3. monitor reset
  4. monitor halt
  5. load
  6. cont
  7. happy debugging & flashing

Pins, Clocks and Peripherals Configuration

To generate these files it's probably best to go for:

  • MCUXpresso IDE: IDE with Config Tools, will let you write code as well as generate code using the SDK for Pins, Clocks and Peripherals. If you're here there's probably a reason why you don't want to use it.
  • MCUXpresso Config Tools: You probably want to use this to generate the board and device files

If you've got time on your hands can always just use the Kinetis K64 reference manual and write the baremetal code. You'll probably need a fire extinguisher πŸ”₯πŸ”₯πŸ”₯.

Reference Project

Useful References

License

All components within this project that have not been bundled from external creators, are licensed under the terms of the MIT License.

k64f-starter-template's People

Contributors

sir-branch avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

kdewald tokenv1

k64f-starter-template's Issues

CMAKE_FORCE Warning

The armgcc.cmake from the NXP SDK uses the CMAKE_FORCE_C_COMPILER.

From NXP guide on cmake community : "The SDK documentation recommends using an older version 3.0.x. Using the 3.10 version will show warnings like β€˜The CMAKE_FORCE_C_COMPILER macro is deprecated. Instead just set CMAKE_C_COMPILER and allow CMake to identify the compiler.’ because the SDK cmake files are not compatible with newer cmake versions. The warnings are annoying, but do not affect the functionality so they can be ignored."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.