Getting a board from a distributor like Farnell/Element14/Mouser (add your own distributor) means that chances are high that the default firmware on it is written years from now because the inventory has not been updated, or because boards are still produced with that original firmware (because of testing?). So what happens if I use board with a firmware developed pre-Windows 8/10 area?
Freshly Unboxed NXP FRDM-KL25Z Board
It might work, but chances are high that the bootloader and firmware is not ready for the ‘modern age’, and as a result the board might be bricked. If you still have a Windows 7 machine around (I do!), you are lucky. If not, then you need to read this article….
More and more of my students are using Microsoft Windows 10 machines, and my computer has been upgraded to Windows 10 a couple of week ago too. From my work and experience, a new operating system causes always some challenges, and Windows 10 is no difference. And no, this is not about Microsoft vs. Apple vs. Linux, this post is about addressing a potential and painful problem which I have observed with Windows 10 machines, and to my understanding it could happen with any other operating system too. The problem is that somehow on several student machines the bootloader and OpenSDA application on their FRDM boards did not work any more.
FRDM-K64F (top) programming the OpenSDA Bootloader (bottom)
Sometimes it is very convenient to load a new firmware to a board without the need for a hardware debugger. This is usually done with a bootloader. The NXP Freedom and Tower evaluation boards have on-board debug device/microcontroller (OpenSDA) which can load different firmware implementations like CMSIS-DAP/mbed, P&E Multilink or a Segger J-Link OpenSDA applications. Both mbed and P&E implemenations support to program the board with drag&drop: simply send a file to a virtual MSD (Mass Storage Device) to get it programmed. The latest Segger OpenSDA firmware has this ability added now too: Programming the board with a virtual MSD device:
I’m using the FRDM-KL25Z in my classes, and that board is very popular: low price (<$15), reasonable features (48 MHz ARM Cortex M0+, 128 KByte of FLASH, 16 KByte of RAM), and many tutorials elsewhere and on McuOnEclipse :-).
For the next (Fall) semester I’m looking for alternative boards, and one is the Freescale (now NXP) FRDM-KL27Z:
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.
There are plenty of different software packages available for microcontroller these days from all the silicon vendors. Finding a good software package is one challenge, getting what I really need is another one. Freescale is now part of NXP since December 2015, so this is probably the first release of the former Freescale part now as NXP: The NXP Kinetis SDK Version 2.0.
It comes with an interesting distribution way: instead of downloading huge packages with all-and-everything in it, I can build it ‘on demand’ online and get what I need, on demand from a web-based front end:
Many times it is very useful to debug multiple boards at the same time. For example if I’m debugging a communication stack between two boards: that way I can debug the protocol on both sides. Eclipse is a great framework which allows that. This post shows how to debug multiple boards (e.g. the NXP Freedom boards) in parallel from the same Eclipse IDE using GDB and the Segger J-Link:
It it is obvious that a new trend from the US is swapping over to Europe and probably the rest of the world: Black Friday. That is the day yesterday following Thanksgiving day in the United States. It is a ‘shopping’ day. Consequently, the stores are battling with huge discounts. And I use that to fill up my inventory for the Christmas-time projects 🙂 What caught my attention yesterday Friday was this: a Raspberry Pi Zero for US$5!!!!
In “CodeWarrior Flash Programming from a DOS Shell” I showed how to program a device from the DOS shell. Because that example was for ColdFire and CodeWarrior for MCU10.2, here is the same for a Kinetis (FRDM-KL25Z) and CodeWarrior for MCU10.6. In my workspace (c:\tmp\wsp_10.6) I have a project folder (FRDM-KL25Z).
I’m using the ‘Flash Programmer’ to sneak the needed commands:
In “Unboxing the Freescale FRDM-KL43Z Board” I was using the FRDM-KL43Z board the first time. The FRDM-KL43Z board has an on-board debug interface (Kinetis K20, OpenSDA). In this post I show how to use the FRDM-KL43Z board to debug another ARM board.
In my previous blog I talked about the new getting started process for Kinetis FRDM-K64F development board. Here I am with my next blog going one step further and introducing you to the target application that I have planned for this summer using the awesome FRDM K-64 development board from Freescale. I am planning to work on some really cool stuff that we can do from this board. And I came up with an idea for making an Adafruit NeoPixel NeoMatrix Signboard!!
Wait….does it sound boring to you? Nah… we are not planning some ordinary signboard. This Adafruit NeoPixel NeoMatrix signboard is really cool. It will display what you want to display and it will change the displayed text with just the movement of your hand. Sounds interesting now?? Continue reading →
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 🙂
There are cases where my application runs find for days, weeks or even months, but then from time to time there is an application crash. Yes, the watchdog will recover it, but still it would be good to know what happened? One solution would be to hook up a trace probe (like the one I have described in this post: “First Steps with the P&E Tracelink“). But having such a trace probe attached all the time is first not cheap and second not always possible. So what if the application would leave ‘breadcrumbs’ behind which would tell me the flow of the program leading to the problem? I have found a functionality in the GNU tools which seems not be widely known or use, but is incredibly helpful in such cases.
So what if I could get a log like this telling me which functions get called by whom?
For a home automation project I need to know the room temperature and humidity percentage of the room air. Adafruit has an inexpensive DHT11 sensor from http://www.aosong.com which I decided to use for that project.