aboutsummaryrefslogtreecommitdiffstats
path: root/support
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove "CS3" prefix from libmaple symbol names.Marti Bolivar2012-04-112-9/+9
| | | | | | | | | | | | | | | | | | | We're no longer even marginally compatible with CS3, so it's inappropriate to use that prefix in our names. Rename: __cs3_stm32_vector_table -> __stm32_vector_table. __cs3_stack -> __msp_init __cs3_reset -> __exc_reset __cs3_start_c -> start_c Also add an MIT license header and assert LeafLabs copyright over wirish/start.S and wirish/start_c.c. These files are modified from the original CodeSourcery versions, which were distributed under a license that permits modifications to be distributed under a different copyright and licensing terms than the originals. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Remove CS3-style initialization.Marti Bolivar2012-04-1121-529/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove libcs3-related bits from support/ld. Break them out into libmaple proper and Wirish as appropriate: vector table definition and ISR declarations go into libmaple proper, and startup code goes into Wirish. Vector table symbols are included into common.inc from an STM32 family-specific directory under support/ld/stm32. This is a combination of 5 commits. Individual commit messages follow: libcs3_stm32_src: Don't depend on cs3.h. So we can use the existing toolchain. Move ISR decls/vector table into libmaple proper. This allows us to configure the vector table on a per-family basis. - Move support/ld/libcs3_stm32_src/stm32_isrs.S stm32_vector_table.S to libmaple/stm32f1/isrs_performance.S vector_table_performance.S, respectively. The directory libmaple/stm32f1/ is intended to hold all STM32F1-specific code within libmaple. Obviously, there's a lot of work to do before this becomes true. - support/ld/libcs3_stm32_src/Makefile: Don't try to compile stm32_isrs.S and stm32_vector_table.S anymore. - Add libmaple/stm32f1/rules.mk to include these new files in the standard libmaple build. - support/make/target-config.mk: Add LIBMAPLE_MODULE_FAMILY, which selects a directory to use as a family-specific libmaple submodule. - Makefile: Add LIBMAPLE_MODULE_FAMILY to LIBMAPLE_MODULES. Remove support/ld/libcs3_stm32_src and derived object files. From support/ld/libcs3_stm32_src, move start.S and start_c.c into Wirish. Modify wirish/rules.mk accordingly. Delete support/ld/libcs3_stm32_*_density.a. These are no longer necessary, as the relevant objects are included in the standard Wirish build. Remove the GROUP statements from the board linker scripts accordingly. Remove SEARCH_DIR(.) from common.inc; it's no longer necessary. Also fix up some comments that are now out of date. wirish/start_c.c: Don't use CS3-style memory initialization. Switch memory initialization to a simpler style of initializing .data if necessary, then zeroing .bss. Initializing .data is only necessary during Flash builds, since during RAM builds, LOADADDR(.data) == ADDR(.data). This makes libmaple completely incompatible with the CS3 startup sequence. Subsequent commits will clean up the namespace to reflect that fact. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* copy-to-ide: Remove references to libcs3_stm32_*_density.a.Marti Bolivar2012-04-111-2/+0
| | | | | | These no longer exist. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Make vector table symbols family-specific during linking.Marti Bolivar2011-11-153-4/+15
| | | | | | | | | | | | | | | | | - support/make/target-config.mk: add LD_FAMILY_PATH, the directory to search for STM32 family-specific link configuration files. For now, this is just a stub which points to support/ld/stm32/f1/performance, since that's all we currently support. We can add the logic to support different STM32 families here later. - Makefile: Pass -L $(LD_FAMILY_PATH) to linker. - Rename support/ld/names.inc to support/ld/stm32/f1/performance/vector_symbols.inc. - common.inc: INCLUDE vector_symbols.inc instead of names.inc. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* reset.py: Hackishly silence DeprecationWarning.Marti Bolivar2011-10-071-2/+1
| | | | Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Add support for the Olimex STM32 H103 board.David Kiliani2011-09-272-0/+11
| | | | | | | | Pin layout and header files for the STM32 H103 prototype board from Olimex featuring an STM32F103RBT6 chip. This commit contains all necessary changes to compile with BOARD=olimex_stm32_h103. Signed-off-by: David Kiliani <mail@davidkiliani.de>
* Add Windows support to DFU installation tools.Marti Bolivar2011-09-261-53/+84
| | | | | | | Tweak Makefile further for cs-make on Windows. Add Windows support to support/scripts/reset.py Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
* Update support/scripts/copy-to-ide.Marti Bolivar2011-09-131-2/+1
| | | | Oh, copy-to-ide. I long for your death.
* [support/ld] Unify linker scripts.Marti Bolivar2011-09-1315-248/+89
| | | | | | | | | | | | | | | | Add new common.inc, which is common_rom.inc with some DEFINED(_FLASH_BUILD) usages thrown in to allow for RAM builds. It also uses a new REGION_RODATA region alias for read-only data. Move section .USER_FLASH to REGION_RODATA. This means it lives in RAM under RAM builds. Although this might be surprising, not doing so would make RAM builds useless. Modify the individual board linker scripts to properly set REGION_RODATA and _FLASH_BUILD before calling out to common.inc. Delete common_rom.inc, common_ram.inc, common_header.inc, in favor of common.inc. This should fix RAM builds on all boards.
* [make] Factor out target/board configuration.Marti Bolivar2011-09-131-0/+56
| | | | | | | | | Comment the Makefile more verbosely. It's been causing confusion on the forums. Add target-config.mk, this contains build configuration depending on the BOARD and MEMORY_TARGET variables. Its contents were cluttering up the Makefile and making it harder to read.
* [support/ld] Put Maple Native's heap on external SRAM chip.Marti Bolivar2011-09-123-0/+12
| | | | | | Specify _lm_heap_start and _lm_heap_end in Maple Native's linker scripts to point respectively to beginning and end of FSMC-mapped external SRAM chip addresses.
* [support/ld] Add linker support for reconfigurable heap.Marti Bolivar2011-09-122-2/+16
| | | | | | | | | | | | | | | - common_header.inc: Declare EXTERN symbols _lm_heap_start and _lm_heap_end. - common_rom.inc: Check for _lm_heap_start and _lm_heap_end. If they are defined, preserve their values. Otherwise, _lm_heap_start is starts after .bss, and _lm_heap_end is the end of SRAM. This allows existing linker scripts to continue using the old heap scheme, but allows for customizability elsewhere. - syscalls.c: Respect the addresses of _lm_heap_start and _lm_heap_end as the boundaries of the heap in _sbrk().
* common_rom.inc: More comments.Marti Bolivar2011-09-121-8/+20
| | | | Explain what's going on so unfamiliar readers have more hope.
* common_rom.inc: Eliminate apparently useless sections.Marti Bolivar2011-09-091-8/+0
|
* [support/ld] Rename vector table section.Marti Bolivar2011-09-094-5/+2
|
* Linker scripts: Remove useless junk.Marti Bolivar2011-09-092-16/+1
|
* Linker scripts: Rename section targets.Marti Bolivar2011-09-092-14/+5
| | | | | | Use region aliases in common_ram.inc, common_rom.inc. These are provided by the individual board scripts which include these. Note that the aliases have horrible names. We'll need to fix that up.
* Linker scripts: Indent common_ram.inc, common_rom.inc.Marti Bolivar2011-09-092-148/+149
|
* Tidy up linker scripts.Marti Bolivar2011-09-0712-27/+19
| | | | Comment/whitespace changes only.
* [support/ld] Factor out header from common_rom.inc, common_ram.inc.Marti Bolivar2011-09-073-73/+48
| | | | | | | The linker scripts share an initial section. Factor this out into a new file common_header.inc, and have the main linker scripts include this file. Apart from eliminating a redundancy, this will make it easier to add new linker scripts in the future.
* Doxyfile: add __DOXYGEN_PREDEFINED_HACK to PREDEFINED.Marti Bolivar2011-08-221-1/+2
| | | | | | | Doxygen refuses to trust us when we \def something that it doesn't notice as a #define. To work around this, we put __DOXYGEN_PREDEFINED_HACK into our Doxyfile's PREDEFINED, so that documentation may be inserted for #defines which we know will exist.
* Fix Doxyfile.Marti Bolivar2011-08-031-5/+5
|
* DMA: Fix non-working DMA interrupts.Marti Bolivar2011-06-201-7/+7
| | | | | | | | | | | | | | | | | | | | | | libmaple/dma.c defines DMA interrupts __irq_dma_channel[1-7], consistent with what is specified by support/ld/names.inc. However, names.inc is inconsistent with what support/ld/libcs3_stm32_src/ expects. Specifically, it contradicts the files - support/ld/libcs3_stm32_src/stm32_isrs.S - support/ld/libcs3_stm32_src/stm32_vector_table.S Which use the names __irq_dma1_channel[1-7]. Change names.inc and dma.c to use the correct IRQ names. The original names.inc/libcs3_stm32_src inconsistency was introduced in 43d6921658cd29b8022af4424d340a90fbcb9a7f, but dma.c had the correct names until ec3cf2903f4b03bc1dae5e159495c9e5ef0938ca, where they were renamed for consistency with names.inc. At that point, DMA interrupts stopped working. (This was documented in the commit message). Thanks to forum user robodude666 for tracking this down.
* Remove reST documentation, attendant updates.Marti Bolivar2011-06-112-17/+1642
| | | | | | | | | | | | | | | | | | | | | | The documentation covers topics not specifically relevant to libmaple, so it doesn't make sense for it to be part of the libmaple source distribution. Delete the docs/ tree, and prepare libmaple for use with the new leaflabs-docs repo, which will contain the docs from now on. * README: update to reflect this change * support/doxygen/Doxyfile: This is the old docs/Doxyfile * Makefile: Add a doxygen target * wirish/comm/HardwareSerial.h: fix reference to docs/. The comment informing maintainers that the HardwareSerial interface is documented by hand refers to the docs/ tree, which no longer exists. Update it to refer to the separate leaflabs-docs repository. * support/scripts/copy-to-ide: No longer build the documentation
* Added libs in libraries/ to the include pathCamille Moncelier2011-06-021-0/+1
| | | | | | | | - This allows to including of libs headers eg: #include <Servo.h> which wasn't possible for some reason.
* openocd: Add missing filePerry Hung2011-05-271-0/+16
| | | | | Forgot openocd support script in 0e5eb75c80bd8036bf85bfe0cce09d1fce56f50a.
* openocd: Fix repeated JTAG flash failure, use alternate reset configPerry Hung2011-05-262-7/+13
| | | | | | | | | | | | | | | | | | 1) Reset, halt, and unprotect the the flash before writing to it. This fixes a bug in which every other flash attempt would fail. 2) Maple R5 and below have NRST and JTNRST erroneously tied together, resulting in a full TAP and system reset when a reset is asserted. This prevents the 'reset halt' command from working. This can be fixed hard-hack style by cutting the trace out of JTNRST. Users of the Leaf Maple JTAG adapter will also need to cut the trace between TRST and SRST. 3) Assuming you have a functioning 'reset halt' setup (see 2), the 'make debug' command now halts the chip and waits for a gdb connection before proceeding execution.
* openocd: Detect openocd versionPerry Hung2011-05-265-1/+1
| | | | | Small script to detect the openocd version and choose the appropriate debug/flash script for use with JTAG debugging.
* Converting all files to UNIX newlines.Marti Bolivar2011-05-1015-752/+752
| | | | | | | Committing the results of running the following on the libmaple root directory: $ fromdos `grep --exclude-dir='[.]git' -Ilsr $'\r$' .`
* Ancillary file cleanups.Marti Bolivar2011-04-145-308/+112
|
* stm32loader.py prints more information about what it's doing.Marti Bolivar2011-04-081-6/+5
|
* Hacks to get things to compile in the IDE.Marti Bolivar2011-03-301-1/+6
|
* Maple RET6 edition supportMarti Bolivar2011-03-165-7/+65
|
* support: linker: Fix high density vector tablePerry Hung2011-03-152-17/+17
| | | | | | | Entries for high-density interrupt vectors were incorrectly declared to be .weak instead of .long. Thanks redfox74!
* Cleanups; new support/gdb/gpio.gdb.Marti Bolivar2011-03-111-0/+12
|
* Refactor linker scripts. Rename irq and exception handlers.Perry Hung2011-02-2722-1817/+1102
| | | | | Add common linker scripts for ram and rom. Add medium and high density libraries for libcs3.
* Merge branch 'nzmichaelh-master' into master.Marti Bolivar2011-02-161-31/+102
|\ | | | | | | | | | | | | | | | | This provides DMA, IWDG, PWR, and BKP support, and fixes several bugs. Conflicts: libmaple/adc.h libmaple/libmaple.h libmaple/ring_buffer.h
| * Merge remote branch 'upstream/master'Michael Hope2010-09-293-4/+14
| |\
| * | Added support for programming ELF files without converting first.Michael Hope2010-09-291-3/+34
| | |
| * | Do basic validation on the boot version and chip IDs.Michael Hope2010-09-291-1/+11
| | |
| * | Make the initial chip detection much more robust.Michael Hope2010-09-291-7/+21
| | |
| * | Changed the exception handling so that Ctrl-C passes through and isn't ↵Michael Hope2010-09-291-15/+16
| | | | | | | | | | | | treated as a timeout.
| * | Added auto detection of the USB to serial port under Linux and MacOS.Michael Hope2010-09-291-2/+17
| | |
* | | Function examples/test-session.cpp on NativeMarti Bolivar2011-02-102-3/+3
| | |
* | | support: Add openocd scripts for openocd 0.4.0Perry Hung2011-01-252-0/+164
| | | | | | | | | | | | | | | | | | flash and run scripts for opencd v0.4.0 also snuck in a gitignore rule for notes/
* | | updating copy-to-ide script for more convenient IDE compilationMarti Bolivar2011-01-131-7/+11
| | |
* | | 0.0.9 release.Marti Bolivar2010-12-151-9/+25
| | | | | | | | | | | | | | | | | | Made some changes to Servo to get it to compile from within the IDE. Also fixed a lurking broken link in the docs.
* | | Finalized 0.0.9 documentation.Marti Bolivar2010-12-151-9/+7
| | |
* | | maple mini runs blinky now.Marti Bolivar2010-10-223-0/+617
| |/ |/| | | | | still need usb descriptors to improve, and also nothing else is tested.
* | Enable USB auto-reset in a hard fault.Perry Hung2010-09-171-2/+5
| | | | | | | | | | | | | | | | Redirect thread-mode execution to a fail routine which throbs the LED to indicate a hard fault. Because the fail routine runs in thread mode with interrupts on, USB auto-reset should now work. Test by executing some bogus instruction (e.g. *(volatile int*)0xf34fdaa = 0;) and check that the auto-reset continues to work.