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.
- 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.
Please follow the installation instructions for each of the supported build environments.
- Ensure you have Docker installed, following these instructions. Be sure to add more resources to the virtual machine that Docker is creating for you.
- 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.
- We've provided an automated script that does the process for you, just run
Please follow the installation instructions for each of the supported platforms.
- 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.
- Use
- 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.
- Use
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,
- JLinkGDBServer -device MK64FN1M0xxx12 -if SWD
- arm-none-eabi-gdb -ex 'target remote:2331' your.elf
- monitor reset
- monitor halt
- load
- cont
- happy debugging & flashing
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 🔥🔥🔥.
- https://github.com/pisontechnology/nrf52-starter-template
- https://github.com/peakhunt/frdm-k64f-projects
All components within this project that have not been bundled from external creators, are licensed under the terms of the MIT License.