Maple Reference Documentation

# Maple Reference Documentation: Troubleshooting

- Hardware Problems
  - The status LED is throbing and I can't upload my program!
  - My board is bricked! I can't upload via the bootloader no matter what!
  - My 5v peripheral doesn't work! (I2C, SPI, USART, etc)
  - The reset and D38/serial buttons don't seem to work reliably!
- Installation Problems
  - I don't have root/administrator access!
  - [Linux] I don't use udev!
- IDE Problems
  - [Mac OSX] The "Board" and "Serial Port" menu items are missing!
- Common Compiler Problems
  - `NullPointerException`
  - `undefined reference to `setup()'`
  - `error: 'Serial' was not declared in this scope`
- Common Upload Problems
  - My program is too large!
  - I have multiple Maples installed; how do I know which one will get flashed?
- Command Line Issues
  - My flash programs don't seem to stick; they behave like they are RAM!
  - `cdc_acm 3-1:1.0: no more free acm devices`

## Hardware Problems

The status LED is throbing and I can't upload my program!
  The LED throbs when there has been a failed software assertion. You can still reprogram by resetting the board and uploading during the short window when the bootloader waits for a program. To make this window longer (it can be hard to get the timing right), hit the reset and then tap the bootloader button (make sure you aren't holding the bootloader button when the reset button is released or it will enter serial bootloader mode; if you tap afterwards it will stay in the USB bootloader window indefinately).
My board is bricked! I can't upload via the bootloader no matter what!
  Use the hardcoded serial stm32 serial bootloader to reflash the bootloader.
  If it really is bricked and you think it's our fault contact us!
My 5v peripheral doesn't work! (I2C, SPI, USART, etc)
  Yup, the Maple is a 3.3v board. You may need to use a level converter. See the compatability, GPIO, or other feature specific documentation for more information.
The reset and D38/serial buttons don't seem to work reliably!
  A few rev3 boards shipped in May-June 2010 may have had unreliable buttons; see the errata page for details, we're happy to replace these for you!

## Installation Problems

I don't have root/administrator access!
  There are probably hacks or work-arounds to getting programs uploaded without higher level system permissions. If you can access usb character devices (ACM or ttyUSB style) you should be able to communicate with the Maple and reprogram using an FTDI converter and the serial bootloader, but we haven' tried and don't have a guide written up.
[Linux] I don't use udev!
  There is probably a simple way to get autoconfiguration working with devfs; in the meanwhile you could try running the entire IDE as root.

## IDE Problems

[Mac OSX] The "Board" and "Serial Port" menu items are missing!
  Sometimes this happens if you try to compile or upload without having a board selected; the work-around is to restart the IDE. Mysterious!

## Common Compiler Problems

`NullPointerException`
  A classic! Make sure you have selected a board from the pulldown menu.
`undefined reference to `setup()'`
  Your sketch/program either does not include a setup function or it is not found by the compiler. Your program must include both `void setup()` and `void loop()` functions; they don't have to do anything, but they have to be there. You can start with an example program (such as Examples > Stubs > BareMinimum) to get the basic structure. See also the language docs.
  This is a common error when your entire sketch is blank.
`error: 'Serial' was not declared in this scope`
  The classic Arduino has only one USART device and uses the unique name "Serial" to control it. Larger devices like the Arduino Mega and the Maple have multiple USARTS refered to as Serial1, Serial2, etc. You probably want Serial2 on the Maple; that's the one connected to pins D0 and D1. See also the USART docs.

## Common Upload Problems

My program is too large!
  First, make sure you're using the FLASH target instead of RAM; there is serveral times more FLASH memory available for user programs.
`No DFU capable USB device found`
  This probably means you don't have a Maple plugged in or powered on!
I have multiple Maples installed; how do I know which one will get flashed?
  Because the Maple IDE uses DFU to upload programs, you can't select a particular Maple from the Serial Port menu to upload to a particular board. There's no solution to this problem for now: you'll have to just plug in the Maples one at a time. If this is a real problem let us know and we'll see if we can come up with a quick solution.

## Command Line Issues

My flash programs don't seem to stick; they behave like they are RAM!
  Make sure you "`make clean`" when switching between FLASH and RAM targets; make isn't smart enough to rebuild everything that needs to be for the new target.
`cdc_acm 3-1:1.0: no more free acm devices` [Linux]
  This is a nasty one! It means that all 32 possible CDC_ACM serial devices (`/dev/ttyACM25` etc) have been used up. This usually happens when you've been using a serial port monitor and didn't close the monitor before restarting the Maple or uploading a new program: the operating system doesn't like that and locks up that device. After reset the Maple comes back up as a new device. If you develop heavily and don't restart you'll blow right through all 32 devices. The lazy solution is to always close the monitor before restarting, and if you get this error in dmesg after a dfu-util "Not Found" error, restart you machine.
  The hacker solution is to restart your cdc_acm kernel module. On Ubuntu 09.10, this goes a little something like:

      $ sudo rmmod cdc-acm
      $ sudo insmod /lib/modules/2.6.31-20-generic/kernel/drivers/usb/class/cdc-acm.ko

### About this Document

A more recent version of this document may be available from the LeafLabs website. Our documentation is versioned on github; you can track changes to the master branch at this link.

This documentation is released under a Creative Commons Attribution-Share Alike 3.0 license.

Translations are welcomed; give us a ping to make sure we aren't in the process of revising or editing first.