Commit graph

38495 commits

Author SHA1 Message Date
Aidan MacDonald
83950bf233 New WIP port: Echo R1
The Echo R1 is a new open-hardware music player design, based
on the STM32H743 microcontroller. Schematics and hardware
documentation for it can be found here:

- https://github.com/amachronic/echoplayer

This is an incomplete port. The bootloader can be loaded using
OpenOCD and it can draw to the LCD using SPI. SDRAM is working
but hasn't been extensively tested.

Change-Id: Ifd2bee15c49868fbc989683d3ca14dce48bf3e18
2025-04-22 20:08:08 -04:00
Paul Sauro
abae4660e2 fr translation: 100% coverage
Change-Id: I7b45562f98257139b8c611ed42b52de664bd22f8
2025-04-22 13:10:53 -04:00
Solomon Peachy
fb096e64b4 misc: Re-enable the -Wtautological-compare warning (GCC>=6)
Every globally surpressed warning potentially hides real bugs.  Let's
fix up the false positives.

Change-Id: I8f4ed43fac4c2496f7fcfafa1cb33633dcc7a9be
2025-04-22 12:48:36 -04:00
Aidan MacDonald
71d3bd2091 erosqnative: use same target ID for hw3/hw4 bootloaders
The bootloaders for version 3 and 4 hardware used separate target
IDs which now overlap with the Nano 3G / Nano 4G ports. It likely
makes sense for all the ErosQ native builds to share the same ID.

Change-Id: I40d166758744e8ba25931e568da11f374b2d7b90
2025-04-22 10:48:13 -04:00
Solomon Peachy
4096669eb5 dsp: Partial revert of previous commit, just disable warning
The "fix" produces different asm and I don't have the bandwidth
to determine if it's functionally equivalent.

Change-Id: I822557d1244f8e8a05e7ebfc45da2643152345a4
2025-04-22 10:23:14 -04:00
Solomon Peachy
865de6b907 dsp: Another warning fix in the compressor.
Change-Id: Ie4266d4d71d7b8f2faae9c5f4924e0d07ceae4e6
2025-04-22 10:09:53 -04:00
Solomon Peachy
303f262acb dsp: Silence a warning in the compressor code
/* offset = -3db * (ratio - 1) / ratio */
    db_curve[2].offset = (int32_t)((long long)(-3 << 16)
        * (ratio - 1) / ratio);

Results in a warning: left shift of negative value [-Wshift-negative-value]

To fix this, replace the '-3' with -3UL.

(As that is effectively what is already happening)

Change-Id: I5aa269ff332703d3c2d889fa032d2fdc403ff14f
2025-04-22 09:45:24 -04:00
Solomon Peachy
6f5760b41a jpeg: Silence -Wshift-negative-value warnings
These are all from upstream code, so just force-ignore the warnings

Change-Id: I9936e1cb79636b0bfee5dd4db0c98a06792d2f69
2025-04-22 09:43:40 -04:00
Solomon Peachy
9e52dcc7e7 iriverify: Fix a build warning
Change-Id: I12a50a8e71c50c232dad89342f59f5afe8d0aace
2025-04-22 09:34:30 -04:00
Solomon Peachy
8f3b8390d1 codecs: hopefully silence a -Wshift-negative warning in the metadata code
Change-Id: I023499e098bbc706c2f677a7f7a156ec58bd5b14
2025-04-22 09:00:21 -04:00
Solomon Peachy
bcf925a35f codecs: Silence two sets of warnings in musepak and wma codecs
The warnings triggered by -Wshift-negative-value are in the
upstream code, and presumably "correct"

Change-Id: I1cf20e12208f493c69e0852477d800cd417a67c6
2025-04-22 08:55:37 -04:00
Solomon Peachy
3975584497 mikmod: We don't need its custom 'strdup()' function
Fixes a warning with newer GCCs

Change-Id: I9ccf7bf77a40a0ad79122e9cf4a5e8e6859cfcfa
2025-04-22 08:54:19 -04:00
Solomon Peachy
4cac35b603 misc: re-enable -Wshift-negative-value and -Wnonnull-compare (GCC6+)
Change-Id: I37c98da8d42fb6825b43006a549980b59d179698
2025-04-22 07:50:11 -04:00
Solomon Peachy
6d24ff3257 h1x0/h3x0: Fix missing TIME context in remote button map
It was actually defined but not actually mapped in.

Also shut up a warning in the peakmeter code when not using a color
display.

Both caught by -Wunused-const-variable

Change-Id: Ie2403c0cd77e6fdf3468fd45115a1e0f228238e8
2025-04-22 07:40:27 -04:00
Solomon Peachy
3b974e791a misc: Fix more build warnings uncovered with GCC15 and -Wunused-const-variable
Change-Id: I43f5d03d8496b2ac8b30df30b14d1c6e816ef0e2
2025-04-21 21:55:03 -04:00
Solomon Peachy
9d4632b0c3 misc: Clean up a pile of -Wunused-const-variable warnings
And re-enable the warning (applies to GCC 6+)

Change-Id: I7aa679ec65707db12de83c0433966b3821d07087
2025-04-21 21:13:59 -04:00
Solomon Peachy
c7eda36341 misc: Clean up a large pile of -Wexpansion-to-defined warnings
And re-enable the warning (applies with GCC 7+)

Change-Id: I406ce796ebd06bad53cab911e17a28265a79b420
2025-04-21 21:04:05 -04:00
Aidan MacDonald
6fc87143df stm32: add sample files for OpenOCD and GDB usage
Change-Id: I674ebab9c25a8dcd69bcebf665dc8d749c380b42
2025-04-21 18:15:15 -04:00
Solomon Peachy
0d8f99e78c Fix red in 180753ce0a
Change-Id: Ie324d923a322bb8fbf429498ad653d4e83b6f97d
2025-04-21 16:59:10 -04:00
Solomon Peachy
180753ce0a misc: Correct various -Wunterminated-string-initialization warnings
-Wunterminates-string-initialization will complain if we try to shove
a "string" into a fixed array that is too small.  Sometimes this is
intentional; when you are merely using "string" as a standin for
"non-terminated sequence of bytes".  In these cases we need to mark
the "string" as "not actually a string" with an attribute.  Applies to
GCC >=8, but this warning isn't pulled in by -Wextra until GCC >= 15.

Change-Id: Ib94410a22f4587940b16cf03d539fbadc3373686
2025-04-21 16:39:00 -04:00
Solomon Peachy
c65050571e docs: Do a proper "merge" with the API docs
This keeps all the old descriptions etc that were there before.

Had to fix up the tools some more, honestly feels better to just
rewrite this crap in perl.

Change-Id: Ic15deae200c143ba5457423e12c81f871c0fef09
2025-04-21 15:59:00 -04:00
Aidan MacDonald
bf689e9b5d stm32h743: add intitial register definitions
Change-Id: I0c9f94103eedb333b2167a8ef49568c8e50c2218
2025-04-21 14:15:31 -04:00
Aidan MacDonald
d68efd3363 arm: add NVIC utility functions
Change-Id: I85567251fb00dec0f38be2a63261ad5509f4ec4f
2025-04-21 13:07:38 -04:00
Aidan MacDonald
d14ddcafd5 arm: implement cache maintenance ops for ARMv7-M
To keep the code size small, this hardcodes the D-Cache line
size and set/way information (which is defined by the target
and should be fixed for a given CPU) and assumes there is only
one level of cache.

Change-Id: Ia6d0e6a87b5dbfc6c39bda83b58461ed8767edf6
2025-04-21 13:07:38 -04:00
Aidan MacDonald
4d3190f416 arm: split ARM cache maintenance functions to separate header
Cortex-M processors don't have an MMU, but can still have caches
that need software management, so on those platforms we don't want
to include the MMU related functions.

While here, remove an outdated section of a comment referring to
deprecated cache maintenance functions which no longer exist.

Change-Id: I6f0fe694560bdee25ed7c69a846bf46e3e544cb1
2025-04-21 12:39:47 -04:00
Aidan MacDonald
bfa76dca9a arm: add ARM Cortex-M register definitions
Change-Id: Ifb90606d2b6c94c4f91798a41415c895e2888520
2025-04-20 20:19:10 -04:00
Solomon Peachy
96f5cb728c docs: Update the Plugin API document, which was _very_ out of date
Change-Id: I2490e86e6cc4d949eca0298498d384c3dba733f4
2025-04-20 17:07:40 -04:00
Solomon Peachy
6d656814dd api: Fix some basic syntax problems with the plugin API generator
Change-Id: I9e6afa5b75e7fb803ee4c29f8306b56d7f8d7f64
2025-04-20 17:07:40 -04:00
Solomon Peachy
3383060990 docs: Delete some _very_ obsolete documentation
Change-Id: I9c04c8eed8d7400d9d16f80c7dab1d6c8c42674f
2025-04-20 16:53:57 -04:00
Aidan MacDonald
89a9b5cf39 reggen-ng: add support for floating instances and nochild flag
Change-Id: I790149587b622f95f575964cd29caab4a0cff6d4
2025-04-20 16:28:07 -04:00
Solomon Peachy
bcee6318f0 headergen_v2: Add additional generator types to help output
Change-Id: I070c9554958c45e78462b8515cdce56fcee1a5ed
2025-04-20 16:26:50 -04:00
Aidan MacDonald
ecfc62cda6 headergen_v2: add ST generator for STM32 family
Change-Id: Id8f06a6f77cc58d3f0f94b72108dc91ba8037813
2025-04-20 16:25:58 -04:00
Aidan MacDonald
2db0627d38 headergen_v2: add ARM Cortex-M generator
Change-Id: If9059b0964ce6f905aa230139eb78b800ff6a102
2025-04-20 16:25:58 -04:00
Aidan MacDonald
08f800d5b8 headergen_v2: only generate MT_REG_INDEX macro when needed
This is only needed if the generator sets has_sct() to true.

Change-Id: Ie7fcb6a1f0f9d27e9ef8a5558c12a66ab6da4394
2025-04-20 15:53:54 -04:00
Aidan MacDonald
af9156406d headergen_v2: only generate GET_VARIANT macro if needed
This is an internal macro which is only used if has_sct()
is set by the generator, so don't generate it if we don't
need to.

Change-Id: I7ad51ad34ecabd833b84a270b5046e77131dcb41
2025-04-20 15:53:54 -04:00
Aidan MacDonald
f50455f6a7 headergen_v2: increase macro argument limit to 20
When registers have lot of 1- and 2-bit fields it's possible
to exceed the 13 argument limit. Usually this only shows up
when programming a configuration register, but it's annoying
to have to split up the write. 20 arguments should be enough
to avoid that.

Change-Id: I6240fae4a51ae14600afcfb8a4e3f1e983cbffa6
2025-04-20 15:53:54 -04:00
Aidan MacDonald
cffd158ace headergen_v2: add helper macros for base+offset addressing
Add a relative version of the register/field read/write operations
which takes a base address (which may be a void pointer or integer)
and computes the register address using offsets.

Change-Id: I7c012192e67adcd675a0fc1975ca4b16ed87bcac
2025-04-20 15:53:54 -04:00
Aidan MacDonald
387f67cab6 headergen_v2: add floating instances and nochild flag
Floating instances don't have an address and will only generate
child nodes and registers with offsets. The 'nochild' flag will
disable generating the children for a node but will generate the
node's own address, which can be used to generate base addresses.

Change-Id: Ib1014de94531436d5708db46aa684741e7740ace
2025-04-20 15:53:54 -04:00
Aidan MacDonald
0f5c2877fe headergen_v2: generate register offsets and node addresses
Register offsets are defined as the address of the register minus
the address of the parent node. If enabled by the generator, these
will be emitted alongside defines for the node base addresses.

This allows the base address to be stored in a variable, and the
offset can be used to access registers relative to the base.

Change-Id: I15576aeb2945293a259007da7f00a26055f4d0f0
2025-04-20 15:53:54 -04:00
Solomon Peachy
81e050871b updatelang: Correct grammatical goofs in some of the errors
Change-Id: I3795d89e68453e636188b26a1620226a836c8a4d
2025-04-20 11:58:38 -04:00
Roman Artiukhin
17d73c968a Codecs: mp4: Fix possible glitch at the end of song
sample_to_chunk last value was ignored in some cases leading to invalid sample value in lookup_table.

Fixes FS#13600

Change-Id: I8f066966e15c384d3185f689b68a2cc2a3abad1d
2025-04-20 13:43:15 +03:00
Solomon Peachy
f563fe54c2 updatelang: Alter syntax for 'phrase missing entirely' errors
Instead of 'this phrase missing entirely [...]' followed by the
verbatim phrase copied from English, instead the message now
reads 'the 'PHRASE_ID' is missing entirely [...].  This allows
the warning to be self-contained.

Change-Id: I413c29e0c1f6616e74d875d197b34c4724330d67
2025-04-19 21:59:01 -04:00
Solomon Peachy
ceeca12f07 lang: Apply some mechanical corrections to Romanian and Korean
Change-Id: I01a2d4c2d4ee39e502913e58fc175ab5aaf8e9fd
2025-04-19 20:59:53 -04:00
Christian Soffke
ae54b06af4 playlist catalog: Hide Copy/Cut/Open With
It may make sense to only show these in the
file browser, where you'd expect to do more
general file operations involving other folders.

Change-Id: I008569d2017811ee54b4449acb30359843f35294
2025-04-19 20:59:16 -04:00
Solomon Peachy
b7b20c4a77 FS#13599: Updated Romanian translation (Mihai Alexandru Vasiliu)
Change-Id: Ia87c6a34c6776059e51c06f96708040914d3a97b
2025-04-19 17:43:14 -04:00
Aidan MacDonald
1aa9f26b02 arm: workaround to build Cortex-M7 targets with GCC 4.9
Cortex-M7 support was added in GCC 5, while GCC 4.9 only
supports the M4. The instruction set is almost identical
between both processors; the only difference is that the
M7 supports double-precision floating point and the M4
doesn't.

Since Rockbox currently doesn't use the FPU, building M7
targets as M4 works fine.

Change-Id: I5880d6e81a85fa9b3e16e08d57e7955b4493df0b
2025-04-19 13:16:36 -04:00
Aidan MacDonald
da4e02cdd3 codecs: disable incompatible ARM assembly for Cortex-M
Some assembly routines don't work on Thumb as-is. For now
just disable these so the codecs compile.

Affected codecs:

- libflac
- libmad
- libspeex
- libtta
- libwavpack

A few DSP routines need to be disabled for the same reason:

- crossfeed_process
- crossfeed_meier_process
- resample_hermite
- filter_process
- sample_output_stereo

Change-Id: I277e0719652096745a19a7e2b597eff32d8e1553
2025-04-19 13:00:17 -04:00
Aidan MacDonald
94c7c908b3 libmusepack: add ARMv7-M version of MPC_MULTIPLY_EX
We can't use Operand2 with register based shifts on ARMv7-M as it
isn't supported in the Thumb encoding. Instead, perform the shift
separately.

Change-Id: Ie96aa0a565e98bbca724dffc2ffc6d64fdb5d7c3
2025-04-19 12:26:47 -04:00
Aidan MacDonald
c249dea2b7 libsetjmp: fix unpredictable behavior warning on ARM Cortex-M
GAS warns about unpredictable behavior of "ldr sp, [a1], #4"
that exists on Cortex-M3 (errata 752419) but this warning is
incorrectly issued on other cores too (eg, Cortex-M7).

Since the fix is just one extra instruction we may as well
apply the workaround for all Cortex-M targets.

Change-Id: I0c2aa46837f776d67d0236b627af1572aa5ab307
2025-04-19 11:24:01 -04:00
Aidan MacDonald
6ea328f0f1 arm: add div0 handler for 64-bit division on ARMv7-M
Even though ARMv7-M has a hardware divider, 64-bit division is
handled in software and needs a div0 handler. The libgcc routines
call __aeabi_{i,l}div0 so we alias those to __div0.

Change-Id: I5152c43d39e25e03f31404753f13978a614aca06
2025-04-19 09:43:40 -04:00