Commit Graph

18 Commits

Author SHA1 Message Date
Karl Palsson 2b54119b78 cm3: scs: drop all duplicate information
Keeps the best version of the documentation.

Fixes: https://github.com/libopencm3/libopencm3/pull/269
2019-10-18 22:38:16 +00:00
Karl Palsson 833da4b672 cm3: extract SCB SHPR to the SCB world it belongs to
Pull out the duplicate into the right file, keeping the newly fixed
version.
2019-10-18 22:33:23 +00:00
Karl Palsson cae295ee2c doc: cm3/scb+scs: turn on existing documentation
Lots of registers were already documented extensively.  Turn it all in
doxygen with groups and the right syntax.
2018-09-09 15:27:41 +00:00
Karl Palsson 1ad2cda496 doc: add all cm3 headers to doxygen.
Just get them all included as they are.  Gets them grouped up and
visible so we can start clarifying the rest of their docs.
2018-09-09 15:27:41 +00:00
keepkeyjon f53e12d2da cm3: Only inline asm is allowed in naked functions
According to: https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/ARM-Function-Attributes.html

"Only basic asm statements can safely be included in naked functions (see Basic
Asm). While using extended asm or a mixture of basic asm and C code may appear
to work, they cannot be depended upon to work reliably and are not supported."
2018-07-29 20:31:17 +00:00
King Kévin 1f58917cb2 cm3: scb: rename SEVEONPEND to SEVONPEND
SEVEONPEND is a typo. According to the The ARM v7-M
Architecture Reference Manual SEVONPEND is the correct name.
2017-06-08 23:01:45 +00:00
Henning W f974861cba cm3: SCB on M0/M0+ has SHCSR and DFSR regs too
SHCSR and DFSR are only implement on ARMv6 if the "Debug extension" is
implemented, but that's pretty much everywhere, so allow access to the
defines.

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2016-12-17 01:01:40 +00:00
Anatol Pomozov ae41782e1a Fix misspellings using codespell tool 2016-03-08 08:52:54 -08:00
Karl Palsson c72f3d588a Surround all macro parameters with ()
All the macro arguments that are user supplied, or potentially, wrap properly
in () as good practice.

Probably missed one or two, and a lot of them are possibly unnecessary, but
it's straightforward to just do it always.

Fixes github issue #321
2015-10-14 22:15:15 +00:00
Karl Palsson 3f0bbf6153 [SCB] More useful definitions for SHPR fields
The direct access definitions to the SHPR1 SHPR2 and SHPR3 were simply
wrong, and though a handy macro for directly reaching any priority field
was provided, the definitions of the fields assumed direct access to the
registers.

Provide field definitions that match the handy macro, and correct the
direct access definitions for people wishing to use them.
2013-08-22 23:14:30 -07:00
BuFran e1ebcc9da8 [Cortex] Add preliminary support for core-dependent defines ARMv6m / ARMv7m, ARMv7em 2013-08-22 17:18:35 -07:00
Piotr Esden-Tempski cabbd21329 Reverted the __packed and __aligned change.
We should not add compiler extensions, it is not our job. We are not a
selfcontained project as kernel is so we should not introduce things
like this.

If we need to add some abstraction for this in the future to support
compilers doing these things differently then we will do that the same
way we dealt with the depricated attribute.
2013-06-13 10:29:43 -07:00
Piotr Esden-Tempski 39fa9e4c58 Stile fixes run, 80 char boundry. 2013-06-12 21:07:35 -07:00
Piotr Esden-Tempski 34de1e776e Changed to use stdint types. 2013-06-12 19:11:22 -07:00
Piotr Esden-Tempski 7df63fcae0 First coarse run to fix coding style in locm3.
Added --terse and --mailback options to the make stylecheck target. It
also does continue even if it enounters a possible error.

We decided on two exceptions from the linux kernel coding standard:
- Empty wait while loops may end with ; on the same line.
- All blocks after while, if, for have to be in brackets even if they
  only contain one statement. Otherwise it is easy to introduce an
  error.

Checkpatch needs to be adapted to reflect those changes.
2013-06-12 18:22:56 -07:00
Andrey Smirnov 6cb7d8abf3 Add a "noreturn" attribute to 'scb_reset_system'
Adding this attribute allows to avoid warnings issued by GCC in cases
when 'scb_reset_system' is used as a last call in a function with
"noreturn" attribute set(usually reset handler of some sorts)
2013-04-16 16:57:58 -07:00
Andrey Smirnov e944876b63 Add a exception handling helper code
This commit add a structure definition that represents the stack frame
layout as it is upon entering exception handler. This is useful when
one wants to alter the exception return address, or get information
about registers state saved by the CPU.
2013-04-16 16:57:45 -07:00
chrysn e20f1c0d8f unify scb (system control block)
these register definitions are common to all cortex mcus. some of the
registers might not be implemented everywhere (especially the floating
point registers), but defining them does no harm.

this modification does not result in any changes in the example
binaries.
2012-10-18 21:45:20 +02:00