I’m using Processor Expert components for nearly every Freescale (now NXP) projects: for S08, S12, ColdFire, DSC and especially all the different NXP Kinetis devices. Not only because it makes software development fast and easy and allows re-use of software, but as well because Processor Expert has a good way to pack and distribute software components. Unfortunately Processor Expert is not any more included for the new Kinetis devices (see “First NXP Kinetis SDK Release: SDK V2.0 with Online On-Demand Package Builder“). So I have looked into an alternative and hopefully vendor neutral way to build and distribute software packages using CMSIS-Pack.
New in this release:
- Segger SystemViewer: Upgraded to V2.30, added stack high-water mark
- Segger RTT: fixed BASEPRI issue on Cortex M4 for critical sections
- Utility: Fixed issue with Utility module and Kinetis SDK (usage of ‘byte’)
- USB CDC: property to specify USB device current usage, new status getter functions.
I have been asked to provide a command line shell example for a bare-metal (no RTOS) application, so here we go!
Having a way to communicate to the firmware on a board is essential for most of my projects: it is simply, incredibly helpful and easy to do (see “A Shell for the Freedom KL25Z Board“). This tutorial shows how to add a simple command line shell to the NXP Freedom board which then can be extended as necessary.
With the start of the new year 2016 I have published a new McuOnEclipse component release with the following major updates:
- Updated Segger SystemView and Real Time Transfer (RTT): added terminal functions and extra interfaces
- Improved USB CDC with serial number handing
- FreeRTOS TaskList shell command
- USB Stack: added MSD Host support for MCF52259, added support for K24FN120 and for the 100 MHz K20 devices
- New NEOMatrix component for Adafruit NeoPixel Matrix displays
In many of my embedded projects I’m using successfully the Nordic Semiconductor nRF24L01+ (see “Tutorial: Nordic Semiconductor nRF24L01+ with the Freescale FRDM-K64F Board“) and the HC-06 Bluetooth transceivers (see “Getting Bluetooth Working with JY-MCU BT_BOARD V1.06“) for wireless communication. However, the nRF24L01+ is using a proprietary protocol, and the HC-06 does not work with Apple products (it does very well with Android devices). To close that gap I decided to add Bluetooth Low Energy (BLE, or Bluetooth 4.x). So this post is about how to add Bluetooth Low Energy (BLE) to NXP (formerly Freescale) Kinetis devices:
For my home automation project with openHAB I want to attach Freescale (now NXP) FRDM (Freedom) boards so they can take care about the realtime aspects and to act as gateways to my other systems. One way is to use USB CDC (Serial over USB) as communication channel. USB has the advantage that it powers the board, plus I can attach multiple devices: up to four on the Raspberry Pi 2 and even more with using a USB hub. In a standard configuration with a USB WiFi and a USB HID (mouse plus keyboard) dongle I still can attach two Freescale (ahem, NXP) Freedom boards to the Raspberry Pi:
A lot of good things happened in the last three weeks, so here is a new updated McuOnEclipse component release, with the following main improvements:
- Updated Segger RTT component
- New Segger SystemView component
- FreeRTOS ‘tasklist’ shell command
- FreeRTOS with support for Segger SystemView
One of the most important aspects for developing complex realtime applications is get insights into what is going on the target. Segger just has released a free tool which gives an incredible useful insight view and visualization:
Time is flying fast, time for another McuOnEclipse components release on SourceForge with the following main changes and features:
- New component for Segger RTT makes adding a console communication interface super easy (and fast!)
- RTT support for the command line Shell component
- RTT component used for Percepio FreeRTOS Tracing
- Updated USB component, support for USB CDC blocking/waiting and endpoint configuration
- Updated FreeRTOS to V8.2.3, memory heap selection improved and setting for time slicing
- RingBuffer implements a Delete() method
- Extended Kinetis SDK support in components, added by default
On SourceForge I have published an update of the McuOnEclipse software components, with following major changes:
- FreeRTOS updated to version V8.2.2 which comes with TLS (Thread Local Storage) support and GDB debug helpers.
- Percepio Trace updated to V3.0.2 with the release of Segger Real Time Terminal (RTT) for continuous trace streaming.
- FSL_USB_Stack with alternate USB initialization to deal with an issue in combination with the Kinetis SDK v1.3.0
- GenericI2C and GenericSWI2C have added support for custom I2C bus handling.
FreeRTOS is probably the most popular RTOS used and I love it: it is efficient, has a lot of features, simple and easy to use. But despite its popularity, debugging it with open source tools as with Eclipse and GDB is really not that user-friendly: debugging threads/tasks is a pain compared to commercial solutions. For my university classes this semester I was looking for something easy to use by my students. Finally I managed to use a GDB helper which makes things easier now: I can switch task threads in Eclipse with GDB now 🙂
Check out the article by Wesley Hunter about how to use the FRDM-K64F as a data logger. He describes all the steps how to use the Kinetis SDK v1.2.0 with FatFS.
Happy Logging 🙂
This blog is a guide on how to setup using the FatFs library included with the Kinetis SDK 1.2.0 using mostly the Processor expert within Eclipse Luna. FatFs is a generic FAT file system module for small embedded systems written by Chan. I prefer to use Processor Expert when possible as this will often generate code that is smaller in size than using the KSDK library files direct. I experienced many gotcha’s and complication setting this up and wanted to share how I finally managed to get it to work.
- Create New Project
- Open Processor Expert
- Add SD card component
- Add Init_Port component
- Add GPIO component
- Configure the clock
- Import FatFs
- Add Card detection code
- FAT file appender function
- Disable the MPU
Before you begin please make sure your development environment is setup and you can already compile and debug code using KSDK 1.2.0 on Eclipse Luna…
View original post 2,197 more words
Getting the hands on an embedded project has always been exciting for me. So, here I am again with my blog trying to provide you with an easy to use guide for the Kinetis Design Studio 3.0.0 (KDS_3.0.0). Well, as you all know I am an intern at Freescale working for the first time on KDS, I will tell you what all we can do to start working on it with a perspective of a novice. But personally I feel KDS is one of the most encouraging IDE you can work on. So how do I start with my code for our NeoMatrix board? I am currently working with one of the demo codes for the NeoMatrix:
So, my first task is to write the code in KDS for the NeoMatrix_Demo. How do I do that? After opening the KDS 3.0.0, I need to go to File and select New and then Kinetis Project. You can see that the New Kinetis Project wizard appears once you click the File>New> Kinetis Project. Type a name and click next.
Key to successfully implementing embedded applications these days is to have detailed visibility into what is going on with the application on the board. For this, I’m using the FreeRTOS+Trace from Percepio to inspect the runtime behaviour. Stop-Mode debugging is very useful, but visibility into the runtime is even more important. FreeRTOS+Trace is a tool to accomplish this, but it requires to dump the data off the target to the host (see “Updated Percepio Tracealyzer and Trace Library to Version V2.7.0“). Usually, I’m using the GDB debugger for this, and that works for shorter trace sequences like a few seconds. Yes, I can combine them, but it painful to stop, dump and continue. So what if I could collect trace for several minutes or hours without the need to stop the application? Why not stream the data to the host directly?
So here is it: I’m now able to get almost unlimited trace streaming off the target, witout user intervention. I can trace my application for hours 🙂
Freescale has released the new Kinetis SDK v1.2 back in May. Because of the changes in v1.2, previous applications (or my tutorials) do not work any more :-(. So time to write a new tutorial: how I can use Processor Expert with FreeRTOS for the Kinetis SDK v1.2.
Processor Expert for Kinetis v3.0.0 (which is part of Freescale Kinetis Design Studio v3.0.0, KDS) has now the concept of ‘repositories’ for the components.
Previously, Processor Expert was able to use two paths for its components (e.g. in KDS v2.0.0):
- The ‘System‘ directory inside the Eclipse installation
- The ‘User‘ directory: a fixed path, global for all installations
These directories are listed in the workspace settings (menu Window > Preferences > Processor Expert > Paths):