ebmDevMag.com home
ebm Developer's Magazine
links

developer's mag
main page

article
part 1
part 2
part 3
part 4
part 5
part 6
part 7
part 8
part 9


6 - Compiler Caveat

If you try to compile the source code for use with the emulator (via 'make'), you will get a link error for function 'piezo_play_1tone'. This is one example of a function for the ebm not included with the emulator. In this case, you can successfully compile and run with an actual ebm, using 'make seb'.

Of course, if you're trying to debug, this will cause problems, so you may want to comment out individual commands using an #define:
  // uncomment the following line when compiling for emulator
  //#define FRANKLIN_EMULATION

... later in the code ...
#ifndef FRANKLIN_EMULATION piezo_play_1tone(info,0); #endif

While not convenient, this will let you debug the rest of the code in the emulator. Unfortunately, you need to remember to comment the #define when making the final program, or your audio won't work. There seems to be no easier way, and a check with Franklin informed me that there is no way to detect this automatically - perhaps in the next SDK release…

Previous Section
Next Section

Copyright © 2001-2006 ebmDevMag.com - Legal Notice