on Tue 15 of Dec., 2009 14:05 EST, by poslathian
> Once the driver is up and going I'd want to design a PCB with FET driver etc. If I stick an STM32 on the PCB with the USB connection, would I be able to program it directly via DFU or do I have to load a bootloader / configure the chip somehow first?
stock stm32 chips do not have the USB DFU bootloader. We wrote that and load it on to every Maple before shipping. However, you can use this bootloader with few (if any) modifications on your own projects if you have a way of getting it into the stm32 flash memory (JTAG, UART Boot mode...). The bootloader lives at:
leaflabs.googlecode.com
>
> If I want to sell the motor drivers, is there any way to do the equivalent of the memory lock fuses for the ATMega chips so that somebody can't just clone the firmware off the board?
The STM32 flash memory has non volatile option bits that allows you to configure special settings for certain regions of memory. This includes execute only mode, which means code can be run but not read. I'd recommend looking at the documentation on st.com (about the stm32 series) to see if this feature can really provide the level security youre looking for. By default, Maple sketches are not protected, and use of the option bits are not supported by the Maple IDE, but its not difficult to do.
> What are my options for debugging (under Mac OS X)?
Debugging...If youre using the Maple IDE, then debugging resources are limited to the standard hacks and clever tricks, using the serial port, blinking lights, using asserts, etc etc. However, the JTAG pins are broken out on Maple, so if you are equipped with a JTAG dongle, you can use the debugging tools associated with your JTAG hardware. At LeafLabs, we use OpenOCD along with Olimex JTAG programmers (70$). These are great and give full GDB-based debugging.