Commit graph

38760 commits

Author SHA1 Message Date
Aidan MacDonald
450687bc3d stm32h743: fix incorrectly defined SRAM3 size
Change-Id: Ia31e22fb2c6e7becf380abf440b03a73ec383582
2026-01-13 13:42:51 -05:00
Aidan MacDonald
adb5e2e44f arm: handle unaligned addresses in Cortex-M cache ops
For commit-type operations it's useful to be able to pass
unaligned addresses, so round the address/size to ensure
all cache lines in the address range are hit.

Change-Id: Ibb23050ecf11b6ef6ab1dd517990a68ef62ecfa9
2026-01-13 16:20:45 +00:00
Solomon Peachy
74d86ab965 manual: Document the 'database scan paths' setting
Change-Id: I3a6505655461c13fac4f2246277b811757bdd180
2026-01-13 07:55:04 -05:00
Solomon Peachy
d9289e7f5c rbutil: Use lang-enum.txt in voicestrings.zip if present
With this change, the code that looks for the VOICE_INVALID_VOICE_FILE
and VOICE_LANG_NAME to produce standalone clips will finally work.

Change-Id: I65ec592a1d3a6c83f92efadec72657c42552b41a
2026-01-12 20:22:43 -05:00
Aidan MacDonald
55f2e2d5d5 echoplayer: fix incorrect loop bounds in lcd_update_rect()
Change-Id: I96b3d235db4a988374967131caba0344c655e5d3
2026-01-12 19:41:08 -05:00
mojyack
c41242615e usb: designware: allow maxpktsize >= 1024
Change-Id: I25a1bc2be8e5b4028a360d80411d4e0182a50c99
2026-01-12 17:00:23 -05:00
mojyack
3dff77460d usb: arc: fix unable to receive 64 bytes long control packet
by adding QH_ZLT_SEL to control endpoints

Change-Id: I27ccf6a6db302688f1df2e6fd1d3fe98c20323cf
2026-01-12 16:59:34 -05:00
mojyack
1319426749 usb: hid: move hid definitions to usb_hid_def.h
Change-Id: I5883d27b96dcedfc0d0149961228a170b8d8e744
2026-01-12 16:57:36 -05:00
Aidan MacDonald
97dce282b4 echoplayer: add USB support
Enable high speed USB for the Echo R1. Includes reasonably
complete support for full speed USB on the STM32H743 since
that was necessary to debug why it wasn't working at first
(which turned out to be a bug in memcpy, not a hardware or
driver issue).

Change-Id: Ie713195b22ba88c79b9b0d6eb289cb9ccd2763c2
2026-01-12 19:13:23 +00:00
Aidan MacDonald
671320b5d1 echoplayer: implement basic power-on / power-off logic
Use cpu_power_on as a GPIO to keep the main power supply
enabled when running from battery.

Change-Id: Ic79283a0cc640585a0297e11f9dcc2264ec9af26
2026-01-12 13:01:35 -05:00
Aidan MacDonald
e29780fe09 firmware: fix thread_exit handling on ARM Cortex-M
The "mov lr, pc" instruction doesn't link a proper return
address in Thumb mode: bit 0 will be unset, leading to a
UsageFault exception when returning from the thread's main
function.

Cortex-M has the "blx" instruction to automatically branch
and link the correct return address, so use that.

Change-Id: I4c0ca55b1b2204286343f906f0b53be0c0ddc392
2026-01-12 15:37:29 +00:00
Aidan MacDonald
af4ff3e270 firmware: split ARM classic & Cortex-M thread implementations
The implementations diverge enough that it is too confusing
to support them in the same source file; split them so it
is easier to understand.

Change-Id: Ic2f91c75e8a9bb605241441f2caed841585f5b87
2026-01-12 15:37:27 +00:00
Solomon Peachy
2db798ff6d FS#13755: Updated Moldavian and Romanian translations (Mihai Alexandru Vasiliu)
Change-Id: I631393e17de68ea80e5f9b7ccc8793d1273b07d5
2026-01-12 08:26:16 -05:00
Nyx Guan
b9089640a3 Add Nyx Guan to CREDITS
Change-Id: I23245e46c3ab0173da513a483724ce51819fdaca
2026-01-10 21:31:49 -05:00
Aidan MacDonald
d15ccd771d echoplayer: add function to enable 1V8 regulator
This supply is shared by the USB PHY and the audio codec,
so it needs to be reference counted to allow them to be
powered up & down independently (and not just leave the
1V8 regulator enabled all the time).

Change-Id: Ib99b41c2a94b9f0c378153b33c6f91b4370ee998
2026-01-10 21:29:23 +00:00
Aidan MacDonald
80e1c2b27e usb-designware: allow setting USB speed in DCFG register
This allows targets to select full speed operation instead
of the default high-speed mode, which is mainly interesting
for debugging USB communication.

Change-Id: I405ff63c6660ca03ea04282a12b59dac06ca46f5
2026-01-10 21:29:23 +00:00
Aidan MacDonald
5dd2756b14 usb-designware: allow setting FDMOD bit to force device mode
If the PHY doesn't correctly report the ID pin state,
then the DWC2 core may operate in host mode by default.

Defining USB_DW_FORCE_DEVICE_MODE in the target config
will set the FDMOD bit in the GUSBCFG register to force
the core into device mode regardless of what the PHY
reports.

Change-Id: If2391aaa4a7c65ba6c90dd56074faeb3ed1ac2ca
2026-01-10 21:29:10 +00:00
Aidan MacDonald
361cd46a08 usb-designware: fix incorrect cache discard with DMA disabled
Two cache discards for targets with POST_DMA_FLUSH were
not properly guarded by USB_DW_ARCH_SLAVE, which causes
data loss when DMA is disabled.

Change-Id: If14ffdc5662f77b3ff57a04c5b9f94d4cac7e514
2026-01-10 21:28:01 +00:00
Aidan MacDonald
047871c58a stm32h7: detect unsupported SDMMC transfers to ITCM
Change-Id: I4916829155d334148bf9683a9a66a125ef90a1f4
2026-01-10 10:06:57 -05:00
Christian Soffke
3da69af83c font: logf: fix pointer in buflibmove_callback
Buffer contents are only moved after the callback
returns, so we need to log the path before it has
been updated to prevent reading garbage.

Change-Id: I187fbd56484249c456155ffcbdde9e44e766dde8
2026-01-10 07:11:51 +01:00
Mauricio Garrido
752467dee4 3ds: Various fixes, optimizations.
This commit does the following changes:

- Fix mkdir implementation not reporting EEXIST error.
- Fix database build feature.
- Small speed-up when parsing directories and files.
- Fix buffering thread hogging cpu and preventing other threads to run.
- Fix sdl plugins not compiling by re-adding ctru specific cflags in sdl.make.

Change-Id: I507c0dcc85cdbcc607ab9c9c6d0b42e6a80caa5a
2026-01-09 20:54:44 -05:00
Solomon Peachy
0777add596 voice: Support generating voice files from contents of voicestrings.zip
Every build includes .rockbox/lang/voicestrings.zip, which contains
everything needed to build a voice file for that build.

This is already used by the rockbox utility, but now it is possible to
achieve the same using purely cmdline tools.

If the new voice-enum.txt file is present in the voicestrings.zip file,
this new flow produces bit-for-bit identical voice as the existing 'make
voice' flow.

Change-Id: Ieb24bc261a75b0e531c1889c49402217f7d14302
2026-01-09 20:50:09 -05:00
Solomon Peachy
0abfb3ff78 voice: Include a simple string enumeration in voicestrings.zip
This maps the numerical IDs contained within the binary .vstrings files
to their logical LANG_* and VOICE_* names.

While not strictly needed to produce voice files, it adds the final
piece to be able to use vstrings files to produce the same voice files
as the existing 'make voice' flow that directly parses the language files.

The 'make voice' flow intentionally divert a few of the generated clips
into standalone files:

 * "invalid voice file"
 * <spoken language name>
 * <short pause>

For this to be possible, we need to know which specific entries in
vstrings map to the ones we care about, and without this enumeration
(which can change on a per-target or even per-build basis) this is
effectively impossible.

The produced lang-enum.txt is simple, with one entry per line of the
format: number:name

Note that nothing uses this new file yet; that will come in subsequent
commits.

Change-Id: Iec3fccbb6d503dd7e2d529aad318009a489b1d77
2026-01-09 20:47:34 -05:00
William Wilgus
032a38df4e lua -- remove direct rb-> libc calls infavor of macro substitution WIP
there are no functional changes in this patch
it just makes it easier to build lua in core app
or plugin form

-Update moved some things around messing up compilation on Native targets
due to *errno

Change-Id: I0921df62d72a87516ad95c68e986b5931c35345e
2026-01-08 22:32:23 -05:00
William Wilgus
ded29fd751 lua plugin remove strfrtime in favor of strfrtm.lua
saves 2.2k on the bin

also supplies gmtime, and a test script to check the returned time/dates

Change-Id: Ib83b11d89bdf44a50830ff51c72ac6395b675603
2026-01-08 21:39:54 -05:00
Sebastian Leonhardt
873163c671 iMX233 RTC init: make clock source (32kHz/24MHz) explicit for targets
Change-Id: Ib4fa56ad8ee28f3799b6c6c3c058d156353dd15c
2026-01-08 13:48:44 -05:00
Aidan MacDonald
2f2b90535a firmware: use C versions of memcpy and memmove for ARM Cortex-M
The ARM assembly versions of memcpy and memmove try to
directly modify the PC based on the number of bytes to
be copied as an "optimization"; but this only works if
instructions are guaranteed to be 4 bytes wide.

This trick is completely broken on Cortex-M, since an
instruction can be 2-4 bytes wide: for example a memcpy
of 4 bytes ends up storing 32 bytes worth of garbage to
the target address!

Use the C memcpy/memmove implementations for Cortex-M
instead; fixing the ASM version is more trouble than
it's worth.

Change-Id: I695587fd585ec25ef276f2dbc61e2290b7015e13
2026-01-08 16:41:59 +00:00
Aidan MacDonald
6f4b6a8078 make: remove asm.make and use asm/SOURCES directly
asm.make replaces source files listed in asm/SOURCES with
a corresponding .c or .S file under firmware/asm/${ARCH}.
This makes it difficult to handle differences within one
architecture, eg. different instruction sets or versions
of the architecture.

Get rid of asm.make, and instead use the preprocessor to
select the architecture-specific sources directly from
asm/SOURCES. This is slightly more verbose but is more
flexible.

Change-Id: Id2a484794d5d951b7ba7b54a552de6960414fa45
2026-01-08 16:41:57 +00:00
Vencislav Atanasov
e2196c4566 Run the LBA48 check only if the target has support for reading of SysCfg
This fixes a regression introduced in ad6cc2f0 for the ipodnano4g bootloader.

Change-Id: Iacf079adbfa85399b248a4c4ac35b93155a1d87b
2026-01-08 10:12:57 -05:00
Vencislav Atanasov
e3372f495e Add a dummy nand_get_info for ipodnano3g and ipodnano4g
All non-simulator and non-hostfs targets are required to implement storage_get_info() since 04dc052a

Change-Id: I87febd12e101797d9cbbffc0e2e46efc2dace9da
2026-01-08 10:12:51 -05:00
Solomon Peachy
98a182a19f genlang: More fixes
* "english.list" started the VOICE_* enumeration at the wrong number
 * vstrings file had the wrong string count

There is still one remaining issue; Currently the vstrings header is
generated with a section size that is consistently 6 bytes shorter than
the actual data. However, the non-voice .lng file has correct size.

Change-Id: I01f9622399cf3f3ac4c62ddea1deeb19a7b028ba
2026-01-08 09:35:12 -05:00
Solomon Peachy
24220d13e5 genlang: Correct the 'size' in the binary vstrings sub-header
It was only taking into account LANG_* strings, and ignoring VOICE_*

Fortunately rbutil currently ignores this field as it's not needed.

Change-Id: If58230cd047abe7a80ebab7eca9147e510b034ea
2026-01-06 23:09:49 -05:00
Aidan MacDonald
1f39ae52e3 codecs: fix compile error on ARM Cortex-M DEBUG app builds
Some of the inline assembly generates "impossible constraint"
errors in this function, but only when DEBUG is enabled.

Change-Id: I3b1135a8a55436bd3068ef560ebcef64a5184a05
2026-01-05 15:33:16 -05:00
Aidan MacDonald
e6e56ceb51 firmware: make lc_open_from_mem() optional
Define HAVE_LC_OPEN_FROM_MEM if the target implements
lc_open_from_mem(). Make HAVE_CODEC_BUFFERING depend
on this feature.

Change-Id: If5f70db58963dcdc33848b860c028841ac380ab2
2026-01-05 13:42:52 -05:00
Aidan MacDonald
cb2b2a5021 simulator: remove lc_open_from_mem() implementation
This was not actually used in practice because codec
buffering was switched off in playback.c.

Change-Id: Ic337db4a6f20972fe8a6480e7b182b5857294e9b
2026-01-05 13:42:52 -05:00
Aidan MacDonald
d791d26b6b apps: remove lc_open_from_mem() from plugin API
No plugin uses it and it doesn't work on hosted targets,
which limits its utility.

Change-Id: I5f29eec4dd11ffceb7be3e4d26e536483058055f
2026-01-05 13:42:23 -05:00
Aidan MacDonald
3d281c2ea3 apps: cleanly disable codec buffering when not supported
Move HAVE_CODEC_BUFFERING to config.h, and disable all
related code on targets that don't support the feature,
ie. hosted targets that can't implement lc_open_from_mem().

Change-Id: I0d2a43900cd05b1a80c3cee519f8ad7b26e39fe7
2026-01-05 13:15:49 -05:00
Aidan MacDonald
3d0888875e firmware: introduce CONFIG_BINFMT
Add CONFIG_BINFMT to select the binary format used for
plugins/codecs and define two options for the existing
implementations (native ".rock" format or dlopen-based).

Split the load_code.h header into two separate headers
to make it look less messy.

Change-Id: Ibd66773160df35a8c6f29a617d12c961bdabf317
2026-01-05 13:14:30 -05:00
Hairo R. Carela
8b6491db57 rbutil: fix stray rbutil.log creation when using a suffix
When instaling rockbox rbutil.log was still created in /sdcard/.rockbox

Change-Id: Iea987623a206d8c8f663e8ef0ee26a103ccc285f
2026-01-05 11:54:27 -04:00
Nyx Guan
012245c51f tagtree/tagcache add new clause operator contains_oneof
new operators @~, *~
contains_oneof and not_contains_oneof

genre @~ "metal|core"
black metal, death metal, grindcore, mathcore

genre ~ "jazz" & genre *~ "rock|pop|fusion"
included: jazz, free jazz, cool jazz, etc.
excluded: jazz rock, jazz pop, jazz fusion

Change-Id: If9590c8607b58373a98f5c9ea537f54df78d5a2f
2026-01-04 22:55:40 -05:00
Solomon Peachy
b31becd4bc lang: Actually remove the deleted translations from SOURCES
Change-Id: I3cca83c2c999cbd99361606ef3fafc341d5b1395
2026-01-04 17:43:41 -05:00
Solomon Peachy
87f135b349 Retire the Afrikaans and Walliser German "translations"
They have not been touched in over 20 years, and have effectively
bitrotted to the point where they are effectively untranslated.

Any interest in these translations would have to effectively start from
scratch anyway, so let's stop pretending the status quo is useful.

Change-Id: I13e1ae920883f5babb232f0592076be24c8122d4
2026-01-04 17:25:51 -05:00
Solomon Peachy
2c30a6e243 voice: Switch default Turkish Piper TTS voice from fettah to dfki
The former was removed from the upstream repositories "at the request of
contributors", leaving only the latter.

Change-Id: I4afe827be9037915d6d13b4d7ec0713509b88da3
2026-01-04 17:24:53 -05:00
Aidan MacDonald
2e532129d7 echoplayer: add storage & RTC demo in bootloader
Change-Id: I146e2205182239ed9d0176c23e3d0ad05e72a3be
2026-01-04 10:27:30 -05:00
Aidan MacDonald
6a8989f347 echoplayer: enable SD card using sdmmc_host
Enable pullups on SDMMC CMD/DATx lines and set output
speed to medium. Using HIGH and VERYHIGH speeds seems
to cause data corruption, with frequent CRC failures.

Change-Id: I732d19e03a2a857453755b68b6749497eafaef70
2026-01-04 10:27:15 -05:00
Aidan MacDonald
141b4a223f stm32h7: implement sdmmc_host-based SDMMC controller driver
Change-Id: I26c47c630ea364de043a224b549d7867fb1e5794
2026-01-04 09:31:05 -05:00
Aidan MacDonald
38db211a48 stm32h743: add SDMMC registers and RCC_AHB3RSTR register
Change-Id: I134a10e4b9116b85ec4327cc76c539c8340973cf
2026-01-04 09:31:05 -05:00
Aidan MacDonald
ed1f34af75 system: add membarrier() function for compiler memory barrier
Change-Id: I27be9b635bdabee523e56dd0c2245812cb7647eb
2026-01-04 09:08:22 -05:00
Aidan MacDonald
87bf6b4ebb firmware: add sdmmc_host storage driver
sdmmc_host is a portable driver for targets with SD/MMC
storage. It handles all the logic needed to initialize
and access SD/MMC devices which is common to all targets.

Targets only need to implement functions to issue SD/MMC
commands, manage clocks & power, and managing the insert
state of the card (if it is hotswappable). This vastly
reduces the work needed to get a new SD/MMC based target
up & running.

At present it's only written for and tested with SD cards,
as I don't have access to an MMC-based target to test on.

Change-Id: I6a0d7747113c11a3697ae20cbb551bef8bfd1292
2026-01-04 09:07:06 -05:00
Solomon Peachy
385483d6c5 manual: Don't lead a paragraph with '\\'
(Turns out that tex4ht is a lot pickier than latex)

Change-Id: I4fa320a14ca6fd136fb8abc31120ebecb17a23e3
2026-01-03 23:18:53 -05:00