Naturally, I have several project ideas lingering around. No time to make them all (for now). One of it is interfacing the Raspberry Pi camera with a microcontroller. To store the images, I need plenty of RAM on the device, and so far the Kinetis microcontroller did not have that. Finally, Freescale announced the K64F120 a few months back, and my ordered TWR-K64F120M board arrived on my desk, waiting to be used: Finally I get an ARM Cortex-M4F with 1 MByte of FLASH and 256 KByte of RAM :-).
I have created and published on GitHub a new component ‘CriticalSection’:
This component is a wrapper between my components and the problematic current implementation in Processor Expert (see
ExitCritical(): Why Things are Failing Badly). It uses a flexible approach and uses macros to either use my modified version of
ExitCritical(), or simply defaults to the original implementation.
I have I project which I want to debug on multiple boards the same time. So how can I download and debug the same application to multiple boards/processors, and debug them all the same time from within the same workspace and Eclipse IDE?
This is a typical scenario I have with my RNet stack: the same application runs on multiple boards, and I want to debug all the boards with the same project with the same Eclipse. For example to wireless sensor nodes with the RNet nRF24L01+ stack as in the picture below:
This post is not about variables in my application code (which I debug). It is about using Variables in Eclipse for building projects. Eclipse variables allow me to make my projects ‘position independent’ whenever I cannot use a path relative to my projects or workspace.
Which variables are used where in Eclipse might be sometimes not very clear. Depending in which context variables are used, not everything might be available. This link for example gives a list of variables which can be used to invoke an external tool.
Eclipse comes with many built-in variables, especially for the build system. If I want to see what variables are already defined, I can show them in the project properties, under C/C++ Build > Build Variables with enabled option ‘Show system variables’:
I have one rule I try to follow every day: my code shall be warning free. Writing software for multiple compilers gets challenging with this rule, but it avoids the ‘not seeing the forest because of the trees’ problem. This rule extends to writing Processor Expert components with CDE (Component Development Environment). What I have missed (and not used) is a useful option to enable debug output:
In case you are desperately looking a component in the components library view, but somehow it does not show up? For example I know there is component ‘InterruptVector’, but it is not present in the Components library view?
Yes, I have been busy with all the different ARM Cortex Mx cores I’m using in my projects. But beside of the ‘ARM domination of the world’, there are other interesting processors out there. While the ARM cores have added DSP (Digital Signal Processing) capabilities blurring the boundaries between pure MCU and DSP processors, there is still a place (or niche?) for specialized DSP processors. The power of such processors is in the domain of fast signal processing, e.g. for intelligent power switches or for advanced motor control.
CodeWarrior for MCU10.5 comes with a new Eclipse and new Processor Expert. Things are working very well so far. But I have spotted an issue which seems to be related to the new Eclipse Juno used: sometimes the Processor Expert ‘Components’ view is not correctly showing the current project used.
In my earlier post “S-Record Generation with gcc for ARM/Kinetis” I documented how to have the ARM GNU gcc toolchain to produce a S19 (Motorola (or now Freescale) S-Record) file. Here are a few more tips on that subject:
- Changing length of S-Records
- Only using 32bit addresses
- Combining S19 files
Eclipse based IDE’s have typically one limitation: the IDE has not much scripting capabilities. Yes, I can use things like JUnit for testing, but if it comes to build and debug C/C++ applications, then support gets really rare. An exception to this is CodeWarrior for MCU which features a command line version of the IDE which can be used for test automation as I used it in one of my tutorials. What I missed so far is to have a command line interface for Processor Expert to generate code. This is now possible with CodeWarrior for MCU10.5 :-).
Sometimes I have ‘multiple definitions’ in my projects: this means that I have functions defined in one source files, and I need to ‘overwrite’ one or more with a version in another source file. For example I have a source file with utility functions (Utility.c), and I want to overwrite some of these functions with a different implementation in a different file (MyUtility.c). How can I do this?
Now I have implemented a watchdog with Processor Expert for my system. But what I have found out? I ended up with a looping system, and the watchdog did not fire
What went wrong?
In this semester course, students (and myself too, of course :-)) are building a Mini Sumo Robot. That robot is using the Freescale FRDM-KL25Z board with an ARM Cortex-M0+ on it. Today I’ll give an introduction to the ARM core to the class, and timing is right: this morning I have found an excellent overview about ARM microcontroller and tools written by Jay Carlson.: Getting Started with ARM Microcontrollers.
On Friday, Freescale has updated CodeWarrior for MCU10 from V10.4 to V10.5, available on http://www.freescale.com/cwmcu10. I have not had much time to use it over the week-end, but here is a list of the things which in my view will make me switch my projects over to 10.5 and use it in my university classes:
- Smaller: smaller setup and less disk space
- Faster: faster debugging and flashing
- Features: Eclipse Juno, detachable editor views, ‘unlimited’ breakpoints, simplified debugger attach/connect/download, and more.