An Inexpensive Digital Signal Processing Course with Practicals
- Background
- Setup for the Practical side
- Install and try GNU Octave
- Install The Cypress FM4 Starter Kit
- Encountered Problem
- Similar Academic DSP Course Work
- Programme the Cypress FM4 Starter Kit
- Encountered Problem
- Lightweight IP Demonstration
- Install Keil Microprocessor Development Kit (MDK)
- Creating an SREC file
- Next Steps
- Conclusions
- Useful References
My skills background is in FPGA/ASIC or microelectronic hardware design. I wished to take my FPGA design into a new application domain and make my first steps into digital signal processing (DSP) so I need to identify a suitable starter course. My personal preference is for a practical element to cement then further explore the course work, and I'm happy to write software. I also had a personal preference to study at home away from work distractions. So what course material would meet these requirements? Essentially the answer had to be significantly cheaper than a week long residential training course. For an instructor led, classroom based week long training course plus travel, food and hotel accommodation call it £3,500 as a target to beat. I've written up my solution in the hopes it might help others on a similar journey.
Background
Whilst it is possible to blindly build FPGAs to the order of the DSP experts, being able to talk the same language and understand the context of what is being asked remains advantageous. A previously popular course in DSP "DSPedia" was given by Prof. Robert Stewart of Strathclyde University. Evidently his training courses were purchased by MathWorks in 2013, the makers of Matlab® software, who continue to provide the corporate training, and these courses may well appeal. Of the other possibilities looked at, my line manager found Arm's Online DSP Course, providing a mixture of lectures and practicals over 13 modules in relevant fundamental topics. The video clearly states that the intention is that this course could integrate with a range of relevant undergraduate courses. The practicals are based on the Cypress® FM4 Starter Kit with an Arm® Cortex®-M4 microcontroller. This is currently available for purchase in the UK for under £45 (inc. VAT). It also requires the industry standard Keil® Microcontroller Development Kit (Keil MDK-ARM) which is known to be relatively much more expensive than the proposed hardware, the budget was nearly bust.
The course lists the pre-requisite skills (basic C programming) and a throw away comment "Separate purchase of hardware and/or software tools, in order to replicate the course labs". Watching their course video gave a few clues as to the likely hardware and software tools. Thankfully contacting Arm Education Media were very prompt in replying to my questions, the initial holding reply with basic answers came in one working day, and a more complete reply to more searching questions the following working day. Always a good sign for customer engagement.
Question | Answer, with quotes from Arm Education Media |
---|---|
What is the minimum investment (£) I can make in software licenses in order to complete the DSP course? | Okay, so this is the question I'm hoping to answer in this article. See conclusions below. |
How essential is the oscilloscope? Can the software be used alone, and just download the embedded software (and hope...)? |
"The oscilloscope is most used to measure signals and do a FFT reading. As an alternative, you can use something else like LabTool by Embedded Artists (with LPC-Link2, you will need to buy the hardware yourself, but this may be a cheaper option compared to an oscilloscope). You can also observe the waveforms with Goldwave®, but you may need an audio card for this. For FFT, you may have to use any third party analyser software." NB. LabTool by Embedded Artists (with LPC-Link2) (Under "Ordering Info" tab): "Non-stock product Essentially, the cheap option here is to capture the audio output from the Cypress card using a sound card and audio software. |
Would it be sufficient to use a free MDK-Lite Edition of Keil MDK-ARM? "It is restricted to 32 KByte code size." |
"The Digital Signal Processing Online Course makes use of the free, code-limited version of the Keil MDK-ARM Development Tool. We've run our project files and code solutions with the free MDK-Lite Edition and this seems fine, as long as you do not have any modifications that exceed 32kB code size." |
How essential is Matlab given the course prerequisites only state "Basic C programming" as required? NB. a Matlab trial period is limited to 30 days, which is too tight for part-time study (e.g. over a 6 month period). |
"An alternative to Matlab would be Octave which is free, but we have not tested that the Matlab codes and instructions we provide will work out-of-the box using Octave. However, Octave should be able to run most Matlab functions and should be able to plot out the graphs as part of the labs. You may have to refer to the Octave documentation for most functions and if you want to design a filter, as part of the lab." I'm reassured by the honesty here, excessive claims are not being made. Further details on compatibility can be read in the article: Differences between Octave and MATLAB. "Octave has been mainly built with MATLAB compatibility in mind. It essentially shares a lot of features in common with MATLAB." "GNU Octave is mostly compatible with Matlab. However, Octave's parser allows some (often very useful) syntax that Matlab's does not, so programs written for Octave might not run in Matlab." |
How essential is Goldwave®? Can the course be completed without it? |
"In the labs, you can mostly use Goldwave evaluation version to generate signals if you haven't got a signal generator. Goldwave can also read in signals that you generate with the Cypress board. You will need an audio card for this though." So note the requirement here, satisfied by most desktop PCs and laptops, for a sound card. This is the cheap replacement for an oscilloscope. Note on the evaluation version of GoldWave from its manual: Evaluation Usage Limit If restarting the software after 200 commands is likely to bother or irritate you, its not expensive to purchase at $15 for one year. I note that starting the "help" function consumes one command from the budget. Just looking around at what the software has to offer quickly consumes the budget before you've figured out how the software works. In my case, just wanting to perform an audio capture (as that's what I expect I need the software for most) took some exploration. Alternatively you might consider using Audacity instead, "Free, open source, cross-platform audio software". Performing audio capture with Audacity is trivial and a less buried function. This is no criticism of GoldWave which looks like fine software for creating effects, just simply a question of which is most expedient for the function I expect I need. I can always fall back to Goldwave for any instructions that are very specific to that software, e.g. tone generation, noting that Octave (and Matlab) can also create tones from a formula. Another find was Soundcard Oscilloscope by Christian Zeitnitz. This software can generate tones, plot both time series and frequency domain, capture audio and select input and output audio devices. |
As for the course contents itself:
"The online course comes with labs with instructions on what code modification you will need to make. We also include the project files and solutions that can be found in the Resources section."
Setup for the Practical side
Install and try GNU Octave

Aims: Install GNU Octave and run a simple script to generate a tone, filter it, and plot Fourier transforms to give the spectra before and after. Also establish the mechanisms for playing the created audio files. Become familiar with Octave scripting including library files.
My starting point for this code was a question posed on dsp.stackexchange.com in January 2013, Frequency Response Error for IIR Butterworth in GNU Octave.
% Testing a simple band pass Butterworth filter with input and output plots.
pkg load signal;
clear;
% Set the sampling frequency used by our digital filtering system:
fs = 8000;
% Start designing a butterworth filter, passband. (In Hz)
pass_lo = 600;
pass_hi = 1000;
% The order of the filter
order = 4;
% Use the butterworth filter design function to get the coefficients for a
% bandpass filter with the settings above:
[b, a] = butter(order, 2*[pass_lo pass_hi]/fs); % [0:pi] maps to [0:1] here
% Determine the frequency response of the filter design above. Get the output
% in frequency rather than rad/s. Use fs/2 plot points.
[H, f] = freqz(b, a, fs/2, fs);
% Plot the result so that we can see if it is correct:
figure(1);
subplot(2, 3, 5);
plot(f, H);
title("Filter Frequency Response");
xlabel('Frequency (Hz)');
ylabel('Amplitude');
% Create a 5 seconds signal with several components:
% NB. sin(2*pi*400*t) => 400 Hz
% and add some gaussian noise.
t = 0:1/fs:1;
input = sin(2*pi*300*t) + 0.5 * sin(2*pi*700*t) ...
+ 0.8 * sin(2*pi*800*t) + 0.6 * sin(2*pi*2000*t) ...
+ 0.1 * randn(size(t));
% Apply the filter to the input signal and plot input and output.
output = 1.3 * filter(b, a, input);
subplot (2, 3, 1)
plot(input([1:length(input)/30+1]))
title("Input Time Domain");
xlabel("Time (s)");
ylabel("Amplitude");
subplot (2, 3, 3)
plot(output([1:length(output)/30+1]))
title("Output Time Domain");
xlabel("Time (s)");
ylabel("Amplitude");
fftc = [abs(fft(input)); abs(fft(output))];
subplot (2, 3, 4)
plot(fftc(1, [1:length(fftc)/2+1]))
title("Input Frequency Plot");
xlabel("Frequency (Hz)");
ylabel("Amplitude");
subplot (2, 3, 6)
plot(fftc(2, [1:length(fftc)/2+1]))
title("Output Frequency Plot");
xlabel("Frequency (Hz)");
ylabel("Amplitude");
drawnow()
% All input frequencies > 3kHz
find(fftc(1, [1:length(fftc)/2+1]) > 1000)
% All output frequencies > 3kHz
find(fftc(2, [1:length(fftc)/2+1]) > 1000)
% Playback sounds dreadful here, I would like to think the WAV file is closer to
% reality.
playeri = audioplayer(input, fs, 16);
playblocking(playeri);
playero = audioplayer(output, fs, 16);
playblocking(playero);
An alternative to using Octave to play the audio is to save a WAV file to a local temporary directory and perform a system call. I realise system calls are 'hacky' in practice, but the system (Windows 10) sound player sounds better, and to my mind closer to the output FFT.
function playwav (Y, FS)
% Use the host Windows 10 operating system to write a WAV file and play with
% the OS's media player. This avoids using GNU Octave's awful 'audioplayer'
% implementation.
tmp = getenv("TEMP");
filename = strcat(tmp, "/playwav.wav");
% Shell out to PowerShell to play the save WAV file.
playercmd = "powershell -c (New-Object Media.SoundPlayer '%s').PlaySync();";
audiowrite(filename, Y, FS);
% This is a blocking call, meaning the function returns when playing has
% completed.
system(sprintf(playercmd, filename));
delete (filename);
end
Ensure that playwav.m is placed in the library path and alter the passfilter.m file replacing the last 6 lines with the following:
% Playback both input and output WAV files using OS tools
playwav(input, fs);
playwav(output, fs);
playwav(input, fs);
playwav(output, fs);
Install The Cypress FM4 Starter Kit
Aims: To run the board test application on the Cypress FM4 Starter Kit, and perform an audio loopback test demonstrating the ability to play manufactured sound files to the card (microphone socket), and listen to the card's output (headphone socket), recording the result in a WAV file using audio software.
Order yourself a starter kit. Four places I found these at similar prices are Digi-key Electronics, Mouser Electronics, Farnell, and RS Components Ltd. There will be other suppliers. Digi-key Electronics requires you to provide details of usage for export controls, Farnell does not.

[{"command":"settings","settings":{"basePath":"\/","pathPrefix":"","ajaxPageState":{"theme":"cypress_3","theme_token":"XBv9YCLgmMYSbOdDU4eb75PoroMyJyH0-v6i_VAkfmU"},"colorbox":{"opacity":"0.85","current":"{current} of {total}","previous":"\u00ab Prev","next":"Next \u00bb",...
Encountered Problem
Unable to download software due to a website fault preventing acceptance of terms and conditions. When you click on the download link, the dialogue box shown right briefly appears, intended for you to accept the agreement. But the page quickly refreshes filling it with a JSON string preventing you from reading the terms and conditions, accepting them and clicking the "Download" button. This does not tend to happen for PDF document downloads, only for (most) software.
The solution is to reformat the URL. When the JSON object is displayed, copy the URL from the address bar and create a new URL from it to download the software. Here "000000" represents a 6 digit number. This new URL will download the item you are requesting.
https://www.cypress.com/license-agreement/000000 → https://www.cypress.com/file/000000/download
Install the supporting software. These downloads can be sourced from FM4 32-bit Arm® Cortex®-M4 Microcontroller (MCU) Families:
- Serial Port Viewer Tool, where you will be asked to agree terms and conditions. Only you can't as the website refreshes to a large JSON object replacing the HTML before you can hover the mouse over the checkbox. So instead use https://www.cypress.com/file/253891/download.
- "CMSIS-DAP / Spansion-Cypress FM-Link". You only need to download the link called "CMSIS-DAP Firmware Update.zip" (as the other link "CMSIS-DAP USB Drivers.zip" only contains the USB Driver which is also included in the "CMSIS-DAP Firmware Update.zip"). [As an aside: CMSIS-DAP stands for "Cortex Microcontroller Software Interface Standard – Debug Access Port". It's an Arm thing.]
- S6E2C Series 32-bit Arm® Cortex®-M4F, FM4 Microcontroller Data Sheet (direct link https://www.cypress.com/file/235126/download).
- Peripheral Driver Library (PDL) for PSoC Creator, installer called PDLSetup3.1.0_es100.exe (or later).
Having received the Cypress FM4 Starter Kit hardware you need to connect to it with the Serial Port Viewer Tool. Your excitement will be dulled here. It was obviously connected by the micro USB port on CN2 as the reset button made a board LED flash. But the expected set of default tests that are supposed to be pre-programmed did not display. There are several "Quick Start Guides" available for this board from the page at FM4-176L-S6E2CC-ETH - Arm® Cortex®-M4 MCU Starter Kit with Ethernet and USB Host. The guide I received matches SK-FM4-176L-S6E2CC-ETH_Quick_Start_Guide.pdf, however looking in "SK FM4 176L S6E2CC FM4 Family Quick Start Guide.pdf" you get an additional clue on page 11. You need to ensure all jumpers are in their default position. Out of my box, J2 was closed not open. That's an hour of my life I won't get back. Seems that J2 needs to be closed for FLASH programming, but open to run an application. See jumper settings below.

For the pass-through or loop-back test setup, you need to set the Cypress FM4 Starter Kit to test 9, "Microphone Test". This will repeat the microphone socket's input to the headphone output. It is worth doing test 8 "Audio Test" first just to prove you can correctly capture the cards output. I note how quiet the audio is, and the first time I tried test 9 I struggled to hear the playback. Here I found the Audacity software very helpful.

You can directly select the input and output devices you want to use without relying on setting up the Windows sound mixer. "Click to Start Monitoring" will show that there is a signal on the selected input even when it may be too quiet to be immediately audible. I set the Windows sound mixer to play a WAV file from Windows Groove Music or Media Player, and redirected the sounds from the speakers to the board's microphone socket using the PC's headphone output. Audacity then allowed me to "monitor" the boards headphone output as it recorded on the PC's microphone by playing directly to a second set of speakers (in my case in the display). Care had to be taken to ensure that Audacity was not just recording the media player, but the actual Cypress FM4 Starter Kit output. Playing the sound card's 5.1 speaker test pattern gave a distorted replica of the non-stereo speakers, confirming correct setup. I also noted that over time, after messing about with Audacity's settings for a while, the pass-through or loop-back test stopped working as expected, cured by exiting and starting the Audacity software again.
Similar Academic DSP Course Work
In searching for solutions to programming the Cypress FM4 Starter Kit I stumbled upon lecture notes in Real-Time DSP by Prof. Mark A. Wickert also using the Arm Cortex-M4 Microcontroller and a utility called Soundcard Oscilloscope by Christian Zeitnitz. The Oscilloscope utility could quickly replace the above configuration, particularly as it has an Frequency Plot in one of the tabs, and could save the ears from listening to shrill tones from speakers.
Programme the Cypress FM4 Starter Kit
Perform a successful programme of an existing application back to the Cypress FM4 Starter Kit.
Encountered Problem
Unable to revert the Cypress FM4 Starter Kit to factory programming with board test application. There's an indication that prior to Spansion being merged with Cypress in December 2014, kits were distributed with a CD-ROM containing an application package called SK-176-s6e2ccTestCode-V11.srec (page 12) or SK-176-s6e2ccTestCode-V12.srec (page 17). This application would revert the kit to the original factory programming by using the USB FLASH programmer software. As I did not receive a CD-ROM with my kit, I will loose the ability to test my board with a known quantity once I start programming it with my own code. After a significant amount of searching, I did find a copy of the old CD-ROM contents as a ZIP file on Cypress' website (V10 and V11).
There is also an encouraging looking page with what pretends to be V12. sk-176-s6e2cctestcode.zip contains SK-176-s6e2ccTestCode-V12.srec - Hooray! Not quite. Loading it onto the Cypress FM4 Starter Kit showed the same menu as V11, and WinDiff confirmed that the file SK-176-s6e2ccTestCode-V12.srec is bit identical to SK-176-s6e2ccTestCode-V11.srec. Looks like a configuration management error by Cypress.
These downloads can be sourced from FM4 32-bit Arm® Cortex®-M4 Microcontroller (MCU) Families:
- On the FLASH Programmer page select FLASH USB Direct Programmer. Again you have a terms and conditions issue with a forced page refresh to a large JSON object, so bypass that using https://www.cypress.com/file/253996/download.
- SK-FM4-176L-S6E2CCA CD (dated June 2016) links to sk-fm4-176l-s6e2cca_cd.zip which contains SK-176-s6e2ccTestCode-V11.srec. Download the ZIP file and extract the most recent .srec file (there are two, V10 and V11).
Before programming the Cypress FM4 Starter Kit with a new and dubious application of my own I want to be able to revert the board to the factory settings, with the initial pre-loaded board test application. Using SK-176-s6e2ccTestCode-V11.srec follow the instructions to FLASH the Cypress FM4 Starter Kit with the "FLASH USB Direct Programmer" Do not use the "FLASH MCU Programmer", that's for serial ports not found on modern PCs.
NB. The FLASH programming will fail unless you run the "FLASH USB Direct Programmer" (FlashUSB.exe) as "Administrator", which also means the Administrator user needs to see the same file you wish to programme from their own account. Unless this application is run with Administrator privileges, the COM port setting can't be changed. Once run with Administrator privileges, the "Target MCU" and other settings are remembered.
Having returned the board connections to normal (non-programming) execution, and pressed the obligatory return key, you will be greeted with the familiar test menu. Only you should notice you are now one test short of the previous compliment.


Whilst this might seem like a backwards step, at least you know you successfully changed something through programming the FLASH, and succeeded in running the result. It would be good to find the latest version of the board test application since the programming software refused to let me extract the original application to a local file before overwriting. Also worth noting the three connection changes required to swap between normal execution and programming. I found it irritating to keep referring back to several different places for this basic information, so have summarised it in the table below.

Connector | Normal Execution and CMSIS-DAP access | FLASH Programming | Function |
---|---|---|---|
J1 | Open | Open | Sets device (CMSIS-DAP) to run mode. |
J2 | Open | Closed | Selects FLASH programming mode (CN3). You can programme via Keil MDK using CMSIS-DAP (CN2) with this open. |
J3 | 2-3 position | 2-3 position | Select USB or UART for boot method and programming mode: 1-2 position for UART, 2-3 position for USB. |
J4 | 1-2 position | 2-3 position | Power source select: 1-2 position for CN2, 2-3 position for CN3. |
USB | CN2 | CN3 | CN2 is "USB for CMSIS-DAP", CN3 is "USB Device". Connect both USB cables and J4 setting does not matter. |
Document Source | SK-FM4-176L-S6E2CC FM4 Family Quick Start Guide | AN211122 - Getting Started with FM4 Firmware Development | Any schematic of the board showing the jumper locations is then on a separate page of each document, and in the case of the latter, quite small. Hence the annotated image above. |
Lightweight IP Demonstration

For a more interesting programe example try the "Lightweight IP" demonstration for FM4. This puts a web server on the chip and makes the Ethernet connector function. Download "Demonstrate LwIP on FM4 on SK-FM4-176L-S6E2CC" (s6e2cc_ethernet_lwip_sk-fm4-176l-s6e2cc.zip) and FLASH the pre-compiled HEX file in .\s6e2cc_ethernet_lwip_SK-FM4-176L-S6E2CC-v11\example\ARM\output\release\s6e2cc_ethernet_lwip_SK-FM4-176L-S6E2CC.hex. Then point your web-browser at http://192.168.1.20/. You can interact with this web page to change the colour of the LED through 8 states, or press the user button on the board. The ADC seems to be measuring an accelerometer, so move the board around to see the measurement change.

Install Keil Microprocessor Development Kit (MDK)
Aim: To create a simple project and download it to the Cypress FM4 Starter Kit by following the instructions in Getting started with MDK. This PDF file is installed onto your local storage with the MDK (in %KEIL_INSTALL%\ARM\Hlp).
Downloads and install these sources:
- MDK-Lite Edition
- Cypress S6E2CCAJ0A Device Family Pack
- There are additional examples that are supposed to be specific to the SK-FM4-176L-S6E2CC starter kit features in the Spansion Software Lab download. These application examples provide a starting point for initial software development on the SK-FM4-176L-S6E2CC starter kit board (spansion software labs.zip).
When I downloaded the Spansion Software Labs, I noted that they have all been created for another board, FM4-U120-9B560, with no obvious starting point like "Hello World!" and quite unfriendly to a new starter as there's no explanation. I did load a Keil project only to be told it was an MDK V4 project and needed to be converted, including conversion to device packs. Not exactly dealing with a known working quantity of code here.
"Getting started with MDK" recommends using the examples that come with the device packs. I was particularly interested in the "Blinky" example since it looked the simplest and closest to a "Hello World!" type program. The project needed updating for Cortex-M4 devices, having been setup for Cortex-M3. It did compile with one trivial modification related to the device switch, and the simulator did stop at break points and show the variables, but did not print the promised statements in lieu of LEDs. I could create a HEX file which I did FLASH to the Cypress FM4 Start Kit; it did not work. The "download" function in Keil didn't work, and from searching the web it seems it needs some FLM file(s) installed to manage a memory map, and there's lots of talk about a "ULINK(*) Cortext Debugger", and not sure if I'm supposed to be able to programme with the "CMSIS-DAP Debugger". None of this is explained, there's lot of options for memory mapping, and no default settings are provided to at least provide the satisfaction of getting something working from MDK to device. This too has proven unfriendly and unhelpful.
Having installed the Microprocessor Development Kit you might be tempted to tweek the Lightweight IP example. You might be tempted to recompile the code to use DHCP so the IP address can be automatically assigned. For this you will need a Keil licence since the linker fails over 32kB on the free version.
- Change .\s6e2cc_ethernet_lwip_SK-FM4-176L-S6E2CC-v11\example\source\fm_lwip\fm_lwip.h:85 #define DHCP_ETH0 PDL_ON.
- Check .\s6e2cc_ethernet_lwip_SK-FM4-176L-S6E2CC-v11\example\source\fm_lwip\fm_lwip.c:160-165 lines are no longer dimmed, and lines 167-172 are (where the 192.168.1.20 IP address, 255.255.255.0subnet mask and 192.168.1.1 gateway are assigned).
- Added missing include directory of "..\..\cmsis\include" to path in "C/C++" tab of "Options for Target" dialogue.
- Recompile and FLASH.
- Let me know if it works!
.\output\release\s6e2cc_ethernet_lwip_SK-FM4-176L-S6E2CC.axf: error: L6050U: The code size of this image (36068 bytes) exceeds the maximum allowed for this version of the linker.
Instead, I'm going to strip this example down to just change the LED colour on a user button press. No Lightweight IP, no Ethernet, no web-server. That should get me below 32kB and prove I can write code in Keil and target the Cypress FM4 Starter Kit. I'm hoping this working example will allow me to perform and end-to-end test of the development tools.

The screen shot above shows some evidence of my success. The code from the Lightweight IP Demo was the starting point. I commented out lines of code rather than deleting them. Just as well, as I had to revert some lines in order to print to stdout in the serial port viewer. As I press the user button on the board, the LED State increments rolling over after 7 back to 0 (LED off). As I move the boards 3D position, the ADC readings change. The code already implements a smoothing function over the last 4 readings. My single addition to the code was to change the format of the print out. The compilation no longer includes the extra files of code required for the TCP/IP functions making it plenty smaller than the 32kB MDK-Lite limit, now coming in at 3,532 bytes.
linking...
Program Size: Code=3532 RO-data=608 RW-data=52 ZI-data=1316
FromELF: creating hex file...
Having copied the "Programming Algorithms" from the Lightweight IP example across to %KEIL_INSTALL%\ARM\Flash\ and added them to the "CMSIS-DAP Debugger" settings, it is now possible to "download" (FLASH) the latest build directly to the Cypress FM4 Starter Kit with a USB cable connected to CN2 and without altering with any jumper settings or move the USB to CN3 temporarily. Programming the kit is now extremely quick as well as painless. Turning on the "Debug Information" in the "Output" tab of "Options for Target" allows Keil to interact with the Cypress FM4 Starter Kit and step through code showing variable values as execution proceeds.

S6E2CC_MACRO0_8KB.FLM
S6E2CC_MACRO0_1024KB.FLM
S6E2CC_MACRO1_32KB.FLM
S6E2CC_MACRO1_1024KB.FLM

I did get an error when using more than one 'Target', e.g. 'Debug' and 'Release'. This is clearly useful for build with and without debug information respectively. Only I got "** Error: 'D:\Keil_v5\ARM\BIN\SARMCM3.DLL' not found" when compiling the Debug target, but the operating system disagrees as "dir D:\Keil_v5\ARM\BIN\SARMCM3.DLL" proves the file exists. The online resource of error messages has an entry for "μVISION DEBUGGER: ERROR 'SARMCM3.DLL' NOT FOUND" which is suitably uninsightful. Recreating the 'Debug' target definition does not seem to remove the problem, so the "Options for Target" → "Output" tab will have to be editted instead. I would have expected the build with debug information to be larger in size than without. In my application they are the same size, but only one build works with the debugger (as you might expect).
Another error I encounter, but which seems completely ignorable is shown below. Again the error support documentation for "μVision User's Guide - Error E006" sheds no light on the cause, and where to look to fix the problem.
Load "B:\\DSP Training\\Examples\\LED_ADC_SK-FM4-176L-S6E2CC\\example\\ARM\\output\\release\\LED-ADC_SK-FM4-176L-S6E2CC.axf"
Include ""
*** error 6: missing string terminator
Erase Done.
Programming Done.
Verify OK.
Application running ...
Flash Load finished at 19:56:19
Creating an SREC file
Aim: To create an SREC file from a HEX file produced by Keil's μVision MDK and successfully programme the Cypress FM4 Starter Kit using the FLASH programmer.
- GENERAL: Converting HEX, Binary, etc. File Formats
- srec_examples Man page
- SRecord Download the latest version
The FLASH programmer is quite capable of downloading the HEX file produced by Keil's μVision MDK. But I was curious as to why other Cypress examples preferred SREC format files and how they were produced. Here I'll attempt to answer the latter only. The first reference proved exactly what was required, with pointers to the tools and additional documentation. I list the two references required to solve this problem very quickly. The first reference tells you how to setup Keil's "Options for Target" "User" tab, the second gives an example command line much like I needed. Very simple, only it needed refinement as shown below. "#H" is required to be in quotes to handle path names with spaces in. This step is very much optional since you can just supply the HEX file. The command below produced an SREC file that worked with the FLASH programmer.

D:\srecord\srec_cat.exe "#H" −intel −o ".\output\release\LED-ADC_SK-FM4-176L-S6E2CC.srec"
Next Steps
Purchase the Arm Online DSP Course subscription!
Conclusions
Getting started with the Cypress FM4 Starter Kit is very much a self-help exercise. Resources supposed to assist in this exercise do provide clues, usually pointing to the old Spansion website where resources no longer exist and have not been entirely replaced by Cypress. Cypress' website frustrates the issue of getting hold of the required resources. The Software Labs compile "out of the box", but don't work when FLASHed, so do not look there for answers on how to get the tool chain working from Keil to card. Whilst the programming algorithms are supplied by the examples, there's clearly more setting up needed to get them working with the Software Labs. There are no default settings to the many options that need setting for memory address ranges, e.g. IRAM and IROM below, and 'RAM for Algorithm' ("Target Driver Setup" above). This means you need to find a working example to get started from, and I managed it purely from a lucky find. Whilst a purist embedded software engineer will likely insist the memory settings are an essential part of the design to understand, I'm happy to agree as long as its understood to be a barrier to entry of this technology when that problem has to be understood up front, hence the needs for some senisble defaults to get started. There is no simple "Hello World!" application to branch out from. Finding my way through the above has been an exploratory process, slow and at times painful, just in order to be ready to start a course in DSP.

I believe I have de-risked the use of Arm's Online DSP Course. The differences between free Octave and commercial Matlab sound managable from the online write up in that Octave will parse Matlab files, but I expect to find a few bumps in that road. dsp.stackexchange.com or stackoverflow.com will no doubt provide the remaining solutions required. There's no need for a hardware oscilloscope, the sound card and audio capture software will suffice, and the software oscilloscope looks like an excellent alternative. One just needs a pair of 3.5mm audio jacks to hand instead. The residual risk for me is having skeleton Arm DSP projects that already provide the necessary memory map settings for compilation, i.e. correct values for those shown in the figure above.
Item | Cost (£) |
---|---|
Arm® Online DSP Course, access for 6 month | 65 |
Cypress® FM4 Starter Kit | 45 |
Keil® MDK-Lite | 0 |
Numerical Computing Software: Octave instead of Matlab® | 0 |
Oscilloscope | 0 |
Audio Software: Trial Goldware®, Audacity or Software Oscilloscope | 0 |
Total | £110 |
Finally, in answer to the original question "What is the minimum investment (£) I can make in software licenses in order to complete the DSP course?", taking a 6 month Arm Education Media course subscription plus the Cypress FM4 Starter Kit looks like costing a total of £110. The main assumption here is that your PC has a sound card, which these days is usually integrated into the motherboard as standard whether you want it or not.
Useful References
- Arm Online DSP Course
- FM4 32-bit Arm® Cortex®-M4 Microcontroller (MCU) Families
- Keil® MDK-ARM Microcontroller Development Kit
- Keil® MDK-ARM Microcontroller Development Kit
- Real-Time DSP Lecture Notes by Prof. Mark A. Wickert, using Arm Cortex-M4 Microcontroller
- Soundcard Oscilloscope software by Christian Zeitnitz