| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
timer_oc_set_mode() incorrectly writes to CCMR1 when channel is 2; fix
this.
Thanks to ala42 for the fix.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
| |
usart_rx() is a nonblocking USART receive. Add it for symmetry with
usart_tx().
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Tweak Makefile further for cs-make on Windows. Add Windows support
to support/scripts/reset.py
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
| |
|
|
|
|
|
|
|
| |
This messes with timing a little, but makes it faster to test. The
timing was never perfect anyway, due to incrementing count.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
| |
Make on Windows doesn't seem to like @echo without a string.
Give it an empty one to keep it happy.
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
| |
This uses the SCB_AIRCR register to force a system reset.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the change log: This commit breaks backwards compatibility with
0.0.12. However, it appears that the previous version was incorrect,
so these changes are necessary.
The SCB register map type (scb_reg_map) appears to be adapted from
versions specified by ARM; these include every possible register, and
do not necessarily apply to the STM32, since some registers are
implementation defined, to the extent that the implementation is
allowed not to feature them at all. Thus, the current definition
appears to be an overreach, since libmaple is STM32-specific. We
should thus revise it based on ST's PM0056, where the STM32 SCB is
specified.
However, the ST docs appear to be buggy. In particular, they appear
to contradict requirements made by ARM v7-M ARM with respect to the
debug fault status register (DFSR), which ARM says must exist, but ST
fails to specify (it does leave a DFSR-sized hole in the SCB memory
layout, conveniently located next to some obvious typos which suggest
that the section was not well-proofread). We defer to ARM and assume
ST just forgot to document the register, and leave the DFSR field in
struct scb_reg_map, since (based on my reading) its absence would be a
silicon bug.
All of the registers appearing in memory addresses higher than that of
SCB_BFAR are not specified by ST, but the v7-M ARM appears to give
some latitude on this to the implementation. Leave them in the source
text, but put them in an appropriately-commented #if 0 block so that
users who know they're there can yell at us if they find them missing.
In this block, the Auxiliary Feature Register's field was "ADR"
instead of "AFR" in struct scb_reg_map; fix this.
Register bit definitions have been added which are named based on
PM0056 when possible, and on the November 2010 "Derrata 2010_Q3" issue
of the ARM v7-M Architecture Reference Manual, in the case of the
DFSR.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
| |
This replaces the previously undocumented 'd' option, which tested the
pin mode INPUT_PULLDOWN.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: RJ Ryan <rryan@mit.edu>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A variety of USB descriptor structures have been manually
"unpacked". Instead of using the struct, their members were unpacked
into the struct they were nested in. Additionally sizeof()'s were
commented in favor of manual calculation of structure sizes.
After uncommenting these changes, the USB CDC peripheral stopped
correctly configuring with the host. The root problem with the
structures is that GCC is padding them. By applying
__attribute__((__packed__)), these problems are fixed. I removed all
the instances of the workaround I saw within the USB code.
Signed-off-by: RJ Ryan <rryan@mit.edu>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The STL in particular relies on abort() for entering an error
state. Without an abort() definition, the use of many STL primitives
results in a link error because the default implementation of abort()
uses _kill, _exit, and _getpid -- none of which are present. My
abort() implementation writes an error message to the error USART and
enters the throbbing-LED error state.
Signed-off-by: RJ Ryan <rryan@mit.edu>
|
|/
|
|
|
|
|
| |
default implementation. This allows the use of assert() from libc's
assert.h.
Signed-off-by: RJ Ryan <rryan@mit.edu>
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Michael Hope <michaelh@juju.net.nz>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's been tricky for users to start their own projects while still
using our build system. The current recommended practice to get this
done involves modifying the top-level Makefile to add their module
into LIBMAPLE_MODULES, and include their own rules.mk. Editing the
repository Makefile is stupid and shouldn't be a necessary step.
Instead of that, allow the environment to provide the initial value
for LIBMAPLE_MODULES. This allows users to specify it on the command
line.
Also add WIRISH_PATH to the initial set of "useful" paths.
|
| |
| |
| |
| | |
Oh, copy-to-ide. I long for your death.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
|
|
|
|
|
| |
Stick FSMC_BCR_MTYP_SRAM among the bitfields assigned to the BCR
write. Technically not necessary (SRAM is the default after reset),
but good for readability and future-proofing.
|
|
|
|
|
|
| |
Rename HEAP_START/HEAP_END macros CONFIG_HEAP_START/CONFIG_HEAP_END,
to mark them as build-time configuration options. Wrap their
definitions with #ifndefs appropriately.
|
|
|
|
|
|
|
| |
nzmichaelh rightly argues that actual RX buffers should be
heap-allocated, to avoid wastage for unused devices. Deprecate the
field for 0.0.12, since that's coming out soon. This will let us get
rid of this field in master immediately after 0.0.12 gets shipped.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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().
|
|
|
|
| |
Explain what's going on so unfamiliar readers have more hope.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix _sbrk() implementation so it properly rejects negative arguments
which would send the program break below the heap start. Fix
incorrect check against argument causing heap overflow. Also set
errno properly to ENOMEM when the call fails.
Beginning and end of the heap are now determined by HEAP_START and
HEAP_END macros. Their current values seem to work OK for heaps on
the internal SRAM, but they'll need to get generalized for Maple
Native.
|
| |
|
|
|
|
|
| |
stm32.h has been updated to prefix its definitions. Update the rest
of libmaple to take this into account.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove SRAM_SIZE define. This seems like a bad idea given that
bootloader builds drop user code at an offset from the SRAM start
address.
Prefix every #define with "STM32_" to avoid polluting the namespace.
Keep and deprecate the remaining ones (except for aforementioned
SRAM_SIZE), but define them to be the same as their prefixed variant.
Take a little extra care to break libmaple builds which specify PCLK1
and PCLK2 instead of the prefixed versions. Some libmaple forks make
use of these; they will break in mysterious ways if they don't handle
this change properly.
|
|
|
|
| |
Comment/whitespace changes only.
|
|
|
|
|
|
|
|
|
| |
uart_send() is not part of libmaple, and nm doesn't show it getting
linked in from anywhere else, so I don't believe it exists. Remove it.
Also remove some commented-out sections from getch(), putch(),
_write(), and fgets(). These either reference uart_send() or use old
libmaple APIs which no longer exist.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
Remove doxygen from clean; no sense killing the docs just because you
want to change boards.
Add new "mrproper" target to nuke all autogenerated files; currently,
this is just the build/ and doxygen/ directories.
Make a note of BOARD env. variable and doxygen, mrproper targets from
help target.
|
|
|
|
|
| |
The tables are too long to read comfortably without additional
horizontal line breaks.
|
|
|
|
|
| |
Actually read a character each time we ask for one. Put pin 22 back
into OUTPUT mode when we're done.
|