| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
- libmaple/bkp.h: Mark availability restriction.
- Move libmaple/bkp.c to libmaple/stm32f1; adjust rules.mk files
accordingly.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
| |
enum stm32_series gives a tag to each STM32 series, including the ones
we don't yet support.
STM32_MCU_SERIES is a define which the series stm32.h header must
provide, identifying the series of the MCU being targeted.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is for greater consistency with the ST application notes, which
refer to migrating "across" series (e.g. F1 to F2), but compatibility
"within" a family (e.g. F1).
So:
- Move libmaple/stm32x/include/family to .../include/series/ and fix
up includes appropriately.
- Refer to "family" headers as "series" headers in comments.
- Make similar "find and replace"-style changes to build system
variable names and comments.
- Move support/ld/stm32/family to .../stm32/series.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the smallest wait state value that is safe for use when the
MCU is at its fastest rate, not considering overclocking. This
requires moving the FLASH_WAIT_STATE defines above the family include,
so do that, and add the missing #defines (for wait states up to 7).
For the STM32F1, the correct value for FLASH_SAFE_WAIT_STATES is
FLASH_WAIT_STATE_2; say so in the F1-family flash.h.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
| |
These go in a new family header, libmaple/stm32f1/include/family/stm32.h.
While we're at it, do some reorganizing.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
| |
Add license headers to libmaple/stm32f1/isrs_performance.S and
libmaple/stm32f1/vector_table_performance.S. Copyright to Perry
Hung. I was present when Perry wrote these files. Also mark these as
STM32F1 specific (rather than "STM32", say "STM32F1").
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
| |
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Portions of rcc_clk_enable(), rcc_reset_dev(), and rcc_set_prescaler()
are portable; break these into static inline helpers in
rcc_private.h. These guts of these are portable, but the arrays of
registers etc. are not.
Also add an extern declaration for rcc_dev_table into
rcc_private.h. This lets us put rcc_dev_clk() into a newly resurrected
libmaple/rcc.c, since that's portable.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
|
| |
libmaple/rules.mk: Add LIBMAPLE_PRIVATE_INCLUDES, a place for storing
headers which should be commonly available throughout libmaple, but
not made public. Currently, this is just the libmaple directory.
Add LIBMAPLE_PRIVATE_INCLUDES to the target flags in the STM32F1 and
USB submodules.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make a new family header, libmaple/stm32f1/include/family/gpio.h, and
supporting libmaple/stm32f1/gpio.c.
Beyond registers and devices, these also include anything mentioning
AFIO, which doesn't exist on F2.
Update libmaple/stm32f1/rules.mk for new gpio.c.
Alter gpio_write_bit() to use dev->regs->BSRR only. BRRs are not
present on STM32F2.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
| |
Backwards-compatible. Only the headers need to change.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a backwards-compatible change.
The Flash registers on the STM32F2 line are different than on
STM32F1. Therefore, move the register map and bit definitions to new
libmaple/stm32f1/include/family/flash.h.
Move flash_enable_prefetch() from libmaple/flash.c to new
libmaple/stm32f1/flash.c. The remaining pieces of libmaple/flash.c use
a common subset of the Flash registers, so they're's portable to F2,
and that's all we're currently interested in.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a backwards-compatible change.
Modify libmaple/rules.mk to include the family's include
directory. This allows libmaple/include/libmaple/rcc.h to include the
STM32F1 RCC header with #include <family/rcc.h>. We'll use this
convention henceforth to distinguish between top-level and
family-specific headers.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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>
|