Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tools:libmaple [2015/03/17 19:03] – [Build] darron | tools:libmaple [2015/03/22 21:55] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
==== libmaple ==== | ==== libmaple ==== | ||
- | libmaple is a firmware library for the Leaflabs maple and maple mini and clones with STM32 CPUs. | + | libmaple is a firmware library for the Leaflabs |
- | The firmware library | + | The firmware library |
- | === Build === | + | === Download |
+ | Here we fetch the source to the maple libraries. | ||
< | < | ||
mkdir -p / | mkdir -p / | ||
Line 11: | Line 12: | ||
git clone https:// | git clone https:// | ||
cd libmaple | cd libmaple | ||
- | cp main.cpp.example main.cpp | ||
- | make CROSS_COMPILE=/ | ||
</ | </ | ||
+ | |||
+ | === Help === | ||
+ | The help function of the make file gives us some clues about how to create our own projects with it. | ||
+ | < | ||
+ | make CROSS_COMPILE=/ | ||
+ | |||
+ | Basic usage (BOARD defaults to maple): | ||
+ | $ cp your-main.cpp main.cpp | ||
+ | $ make BOARD=your_board | ||
+ | $ make BOARD=your_board install | ||
+ | |||
+ | (Multiple source files? Link with libmaple.a (`$ make library' | ||
+ | or hack build-targets.mk appropriately.) | ||
+ | |||
+ | Important targets: | ||
+ | sketch: | ||
+ | install: | ||
+ | |||
+ | You *must* set BOARD if not compiling for Maple (e.g. | ||
+ | use BOARD=maple_mini for mini, etc.), and MEMORY_TARGET | ||
+ | if not compiling to Flash. Run `$ make list-boards' | ||
+ | a list of all boards. | ||
+ | |||
+ | Valid MEMORY_TARGETs (default=flash): | ||
+ | ram: Compile to RAM (doesn' | ||
+ | flash: | ||
+ | jtag: | ||
+ | |||
+ | Other targets: | ||
+ | clean: Remove all build and object files | ||
+ | doxygen: Build Doxygen HTML and XML documentation | ||
+ | help: Show this message | ||
+ | mrproper: Remove all generated files | ||
+ | </ | ||
+ | |||
+ | === List boards === | ||
+ | |||
+ | This function didn't list the boards correctly for me, so this is a sanitised listing. | ||
+ | < | ||
+ | make CROSS_COMPILE=/ | ||
+ | cm900 | ||
+ | | ||
+ | maple | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | === Demo === | ||
+ | |||
+ | This is the standard LED demo for the [[: | ||
+ | < | ||
+ | cp examples/ | ||
+ | make CROSS_COMPILE=/ | ||
+ | </ | ||
+ | |||
+ |