Most of the warnings are new, such as needing to mark fallthroughs on
cases explicitly. A few are based on signed vs unsigned comparisons.
Disable one warning that was annoying about comparing null to arguments
marked nonnull.
A bunch of the register access here didn't match STM's docs. The old
code had a few bugs:
1) The EXTI4-15 handler would clear pending bits for interrupts 16-31.
2) GPIO interrupt configuration was very misindexed.
make_buf() is a static function with two callers who pass in one of
two constants. The parameters allowed for any uint count to be
supplied and the arithmetic during memory allocation was unchecked
This change updates make_buf() to reflect its usage, which is
safe, while eliminating any future uses from accidentally becoming
unsafe.
lib/bio/bio.c:345:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Signed-off-by: Tristan Shieh <tristan.shieh@mediatek.com>
In 64-bit mode, the TSS descriptor is expanded to 16 bytes.
Currently, high 32-bit of TSS base address is set to be zero.
Updte descriptor structure definition, add high 32-bit high adress
and reserved bit.
Signed-off-by: Zhong,Fangjian <fangjian.zhong@intel.com>
Previously, if tail was == 0, and we wrote exactly enough bytes to
the end of the buffer, then head would end up at 0 as well. This
would make the buffer instaneously empty, as head == tail.
When lib/version was included, a rule depended on .PHONY. This would
unexpectedly invoke other rules defined as dependent on .PHONY (standard
phony-ness signal).
As a side effect, this used to generate srcfiles.txt and
include_paths.txt in build dir. Since they are useful, we might always
build those anyway, and not make them phony at all.
If some included rule.mk defines an additional make target that the user
might want to call (e.g., "flash"), and user specifies a project name on
the command line, then previously the outer "makefile" would call
engine.mk multiple times. The new logic prevents that.
Additionally, silence extra "Nothing to be done" messages when calling
engine.mk again after removing the project name from make goals.
Previously power.c was only implemented for f7, but the
same functionality exists in other stm32 devices, thanks
to CMSIS defines.
This refactors out f7's power.c to platform/stm32/ and adds
deps from f7 and f4.