| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The headers just #define some numbers, so there's no need for them to
be including libmaple headers.
|
| |
|
|
|
|
|
| |
First in what is sure to be a long series of efforts in educating
people that you can have GPIOs 56--100 or the SRAM chip, but not both.
|
|
|
|
| |
SerialUSB.read() is already blocking, so no sense looping on available().
|
| |
|
| |
|
|
|
|
| |
Measure pins one at a time.
|
|
|
|
|
| |
Each call to measure_adc_noise() now does
N_ADC_NOISE_MEASUREMENTS (currently 40) samples, instead of just 1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update measure_adc_noise() to actually use the Welford online
algorithm, instead of accumulating data in an array on the stack.
This allows us to increase the number of samples (to 1000).
Revised algorithm tested on host PC and compared (in Python) against
numpy with a list of 100 values in [0, 1) drawn using random.random().
Results (Python):
>>> r = [random.random() for i in xrange(100)]
>>> numpy.mean(r)
0.50073064742634854
>>> numpy.var(r)
0.083726090293309297
Results (C++, x86 host PC):
n: 100 mean: 0.500731 variance: 0.084572
So this algorithm for variance has some inaccuracies, but it appears
to be good to a couple of significant figures.
|
| |
|
| |
|
|
|
|
| |
Print input as if it were an ASCII character, not a number.
|
| |
|
| |
|
|
|
|
|
| |
These apparently didn't get updated from an earlier prototype's
values.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
For some unfathomable reason, Doxygen happily believes in PCLK2, but
but not PCLK1, so Breathe can't find the docs for PCLK1, and all the
children are unhappy. As a workaround, move all the Doxgyen crap into
__DOXYGEN_PREDEFINED_HACK sections immediately preceding the actual
definitions.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|