With some help I got the USB Mouse example from the LM3S9D90 board working on the Stellaris Launchpad. It needed a few changes:
- Replaced the linker script usb_dev_mouse.ld with one from the Launchpad examples. The only difference was the size and location of the FLASH and SRAM memory regions.
- Added code to configure the USB pins at startup, as suggested by dellwoodbu.
- Changed several lines in the Makefile:
- Set ROOT to my StellarisWare directory as usual
- Added a target for programming the board:
lm4flash -v $<
- Replaced all instances of “cm3” with “cm4f”
You can download the example project files. Remember to set ROOT in the Makefile to your StellarisWare directory.
Warning: it does not work when compiled with the Summon Arm Toolchain. It compiles without errors but the device fails to enumerate. It responds to descriptor requests with malformed USB packets (seen with Wireshark). Works fine if compiled with Sourcery Codebench, haven’t tried other toolchains.