Commit graph

901 commits

Author SHA1 Message Date
Hairo R. Carela
707585e6c0 rgnano: Change ROCKBOX_DIR to /mnt/FunKey/.rockbox
For consistency's sake.

Change-Id: Ia2ef27dceaf143ab85adb22581c6461d50914a84
2025-08-10 14:47:17 -04:00
Hairo R. Carela
7b0f408c71 rgnano: UI simulator support
Change-Id: Id488d16e01ef49a9d1b57641bc1c22ed2fef4931
2025-08-05 08:30:30 -04:00
Solomon Peachy
e4abe9177e build: Turn on -fno-common globally
Can make global variable access more efficient at the price of erroring
out if a variable is declared in more than one place.

Change-Id: I918eacf4a4c8c7827be64f7f2ee04cc6cc2009e0
2025-08-04 23:12:42 -04:00
Hairo R. Carela
8dfd219598 rgnano: Fix duplicated target_id
The surfansf28 port was already using 120, my bad.

Change-Id: I40574d818e4bf5635996d6babce546172ff500ba
2025-08-02 19:06:50 -04:00
Solomon Peachy
52e3fe4906 misc: Fix warble build
Change-Id: If5672285f2832ca6a5034e3f765785769e813409
2025-07-30 11:30:25 -04:00
Solomon Peachy
8e9125ee28 configure: re-export FUNKEY_SDK_PATH
Change-Id: I41bb5ba91fd69a40f2136315c6f27b00c78a7792
2025-07-30 10:46:49 -04:00
Hairo R. Carela
48392bab94 New port: Anbernic RG Nano
A bit of context, this device is a clone of the FunKey-S with a different form factor, hardware is mostly identical, the relevant difference is it has audio out (via usb-c, adapter to 3.5mm is included), this is the reason why the FunKey-SDK is needed for bulding.

This port is based on the old SDL 1.2 code because the device doesn't have SDL2 support. Alongside what was supported in the SDL 1.2 builds this port supports battery level, charging status and backlight control.

Change-Id: I7fcb85be62748644b667c0efebabf59d6e9c5ade
2025-07-29 21:01:53 -04:00
Christian Soffke
e7110c0beb macos: tools: configure: use GCC 15
Matches updated GCC Homebrew formula:
https://formulae.brew.sh/formula/gcc

Change-Id: I9b8e66a16ccfaf840fd50bbe313cae33e44d4f11
2025-05-25 14:46:16 -04:00
Solomon Peachy
82f3d0c18f WIP hosted port to the Surfans F28
* Only bootloader builds
 * Plugins disabled
 * No keymaps to anything else
 * No simulator
 * Touchscreen not wired up yet
 * Audio still untested

Bugs:

 * rotary encoder does nothing in bootloader
   (might be bootloader bug, might be something else)

Other stuff pulled in:

 * Unify all of the (identical!) hibyos makefiles
 * Rename the "bootloader" to more generic name

Change-Id: I6d8a3b58de726db8e89cf193c90960a070a575c2
2025-05-04 18:34:22 -04:00
Solomon Peachy
a3dfdb32f6 Revert "Toolchains: Update to GCC 9.5.0"
This reverts commit d87e9b99a6.

Reason for revert: Accidentally merged

Change-Id: Ib69e88cc93faa7d1a08c137977600d0659944128
2025-04-29 15:09:46 -04:00
Solomon Peachy
d87e9b99a6 Toolchains: Update to GCC 9.5.0
All toolchain dependencies are circa the GCC 9.5.0 release:

  GCC 9.5.0, binutils 2.38, gmp 6.2.1, mpfr 4.1.1, mpc 1.2.1, isl 0.18

Native:

 * arm - mini2g, nano2g seems to work
       - ipod6g boot hang on 9.5.0 (possibly leading to disk corruption)
 * mips - xduoox3 seems stable so far
 * m68k - binaries untested

Hosted:

 * arm - binaries untested
 * mips - erosq seems stable so far
 * Android NDK - unchanged at GCC 4.9.4

Change-Id: I4ca00edd49e1936b32f68f1e7b34df38e1d1d76e
2025-04-29 14:56:12 -04:00
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
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
4cac35b603 misc: re-enable -Wshift-negative-value and -Wnonnull-compare (GCC6+)
Change-Id: I37c98da8d42fb6825b43006a549980b59d179698
2025-04-22 07:50:11 -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
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
Vencislav Atanasov
545506c923 New port: iPod Nano 4G
Currently, only the development bootloader can be built successfully.

This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.

Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: I74ea0da999ddb1d8ce5d0f5434141b3f0b5f7448
2025-04-18 20:40:49 -04:00
Vencislav Atanasov
d6cd237f80 New port: iPod Nano 3G
Currently, only a bootloader can be built successfully. The development bootloader is functional, it enables further progress on the port.

This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.

Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: Idf85e42334b0e0ae36f9ed273e2940d5d7736e34
2025-04-18 20:10:29 -04:00
Aidan MacDonald
7e8a818d95 arm: add ARM architecture profile detection
Add some logic to detect classic and M-profile cores, and make
this info available to the build system. All existing targets
are classic profile.

Change-Id: I07bfcd418bcaa6297b9bbf889fc189f167147428
2025-04-18 09:22:48 -04:00
Solomon Peachy
3539dd5a70 Revert back to the default 8px sysfont for ipod5g/ipod6g/erosq
The default status bar is sized for SYSFONT, so this made the status bar
slightly taller.

Unfortunately this broke a bunch of themes that didn't include a custom
status bar and had hardcoded assumptions about the height of the default.

While those themes should not be making those assumptions, we don't
yet have a straightforward way to deal with it.  So while we try to figure
out a better path forward, revert this.

Change-Id: I2cd6f64be5f405906a097ee0a33391e03bf1804d
2025-03-05 14:50:23 -05:00
Paul Sauro
36bcc0625a ipodvideo/ipod6g: use taller sysfont
same as eroq devices which have also a 320x240 screen

Change-Id: Ie723f7ce378beee1764dc9c0c276f08ce9381dd4
2025-03-04 13:43:15 -05:00
Solomon Peachy
e4fb35f173 Revert "Toolchains: Update to GCC 9.5.0"
This reverts commit 573ba5472e.

Reason for revert: Accidentally pushed to master, Maintainer will be put in timeout.

Change-Id: Iaa5c6eb18ae40dd64c13db75c0c3f6f519922d4a
2025-01-08 09:35:18 -05:00
Solomon Peachy
573ba5472e Toolchains: Update to GCC 9.5.0
All toolchain dependencies are circa the GCC 9.5.0 release:

  GCC 9.5.0, binutils 2.38, gmp 6.2.1, mpfr 4.1.1, mpc 1.2.1, isl 0.18

Native:

 * arm - mini2g, nano2g seems to work
       - ipod6g boot hang on 9.5.0 (possibly leading to disk corruption)
 * mips - xduoox3 seems stable so far
 * m68k - binaries untested

Hosted:

 * arm - binaries untested
 * mips - erosq seems stable so far
 * Android NDK - unchanged at GCC 4.9.4

Change-Id: I614f1b198643bfa8c45f68e4d8e15307a4998618
2025-01-08 09:31:51 -05:00
Solomon Peachy
8b01f939d8 hitiet ma8/ma9: add in keymaps for all plugins
Largely guesswork.

Change-Id: I8ab8d36de4bbdcf25dcf7d3442266bfb0a370b6f
2025-01-07 14:22:53 -05:00
Nick Feldmann
f1b53d129f android: make installToolchains.sh work again
Google changed their site and the layout of downloaded SDK zips.
Also add a warning to configure if a r2x series NDK version is used, because those aren't supported - they no longer contain GCC, only clang.

Change-Id: I48a42c38c9b657ac6662162a39763aac73ec502a
2025-01-01 09:59:34 -05:00
Christian Soffke
a032611e3e configure: remove clang warning for darwin host
not a reason to warn (anymore)

Change-Id: Ia4e42ebb03d1aa5e4a22906acb164fb795470773
2024-12-20 10:46:22 +01:00
Christian Soffke
727c800c0d Don't force gcc as host compiler + fix clang warnings
On MacOS, gcc is a symlink for clang.

Patch gets rid of the warnings produced by clang,
when it is set as HOSTCC, and fixes voicetools
compilation on MacOS when calling make voicetools
from the simulator directory.

lua rb_defines_helper:
format specifies type 'int' but the argument has
type 'long'

codecs: opus / speex (LOGF):
format '%ld' expects argument of type 'long int',
but argument 7 has type 'off_t'

gigabeat:
variable 'size' set but not used

rdf2binary:
a function declaration without a prototype is
deprecated in all versions of C

rbspeexdec:
passing 'unsigned char *' to parameter of type
'char *' converts between pointers to integer
types where one is of the unique plain 'char'
type and the other is not

hmac-sha1.c
defining a type within 'offsetof' is a Clang
extension

Change-Id: I90539906698868f9589650585d865aee9f7e8539
2024-12-20 05:29:18 +01:00
Christian Soffke
a86b1999d0 simulator: fix missing Werror option + eliminate lib duplicate
configure:
Ensure Werror option doesn't get lost when simcc resets GCCOPTS

uisimulator.make:
Remove ignored duplicate SIMLIB on Darwin

codecs.make:
Eliminate some redundancy

Change-Id: Ieee6f677fd22666cb58aa6fe53eabdc0b0f8c190
2024-12-19 15:04:46 -05:00
Solomon Peachy
29e909c25d SDL: Log the version detected
* At build time (in configure script)
 * At runtime (but only for simulator builds)

Change-Id: I01c6f0f39d4c68e3a5a037212b65baf693bb84a9
2024-12-10 09:01:32 -05:00
Solomon Peachy
93baf94dc3 configure: Disallow 'sdlapp' to be build as a simulator target.
Change-Id: I52cf549aa8a24080832413ca5afb197047b42bd7
2024-12-07 16:57:50 -05:00
Christian Soffke
c754bc5870 configure: minor ux improvements when compiling macos sim
- Show a warning when Apple's clang is detected,
  because compilation would fail with it. Then
  check for a (e.g.) Homebrew-installed version
  of GCC (14) and use it instead.

- Don't display multiple meaningless numbers when
  (incorrectly) parsing Apple's current LD version
  info. Set to 0 on Darwin, unless cross-compiling,
  since it only matters in the latter case.

Change-Id: I52236e1d1c349e30850c7786736d820c25b6d2d8
2024-12-07 17:16:31 +01:00
neofright
f895167345 Update Dockerfile for Debian 12
Change-Id: Iefbcb6f0c6869826b9ceec479eeb2c86b5d0bdcf
2024-12-06 07:55:21 -05:00
Christian Soffke
1745b74576 Make simulator compile on MacOS
Tested on MacOS Sequoia (Apple Silicon) with the
latest Xcode command line tools, gcc 14
(Homebrew GCC 14.2.0_1) and sdl2 (Homebrew 2.30.9)

Make sure 'gcc' (and 'gcc-ar') is in your PATH
ahead of the Xcode-provided "gcc"(clang). E.g.
by setting up symlinks in /usr/local/bin that
point to gcc-14 and gcc-ar-14.

Notes:
- The appropriate bmp from uisimulator/bitmaps
  has to be manually copied to your build folder
  and renamed to UI256.bmp, if you want the sim
  background to be displayed

Change-Id: I559f33d2165065f913f30c016b85906af380fb81
2024-11-30 22:19:02 -05:00
Solomon Peachy
fdc17096b5 build: add 'lto' to features.txt if built with it
This makes it easy to tell at a glance if a build was with LTO or not.

Change-Id: I7ba9b412f7b74d300a0c55e36ea4cf522d46e6f2
2024-11-30 13:49:42 -05:00
Solomon Peachy
bdf1690cb2 build: Allow LTO to work globally, not just codecs/plugins
IMPORTANT: There is no guarantee this will compile cleanly much less
_work_ on any given target.  This is purely to enable future hackery.

Change-Id: Ib58f21b717719fd4325622b446a60779406ae035
2024-11-24 08:23:38 -05:00
Solomon Peachy
200529532b configure: Allow bootloader to be specified under advanced options
This required renaming the LTO build option.

Change-Id: Ibd93e55d37b5226e7b3270d56cf07bf96a780f28
2024-11-24 08:16:07 -05:00
Dana Conrad
253eb79db3 erosqnative: hw4 support
Support hw4 units with AXP2101 PMU

Bootloader successfully compiles and loads onto device.
The LCD appears to be identical to hw3 units.
Scroll wheel and buttons work
Audio output works, including volume.
HP/LO detect works
Rockbox build is generic
GPIO gating logic seems to be working as intended now.

 - Added new GPIO definitions - some significant overlaps with pins
    from previous hardware revisions...
 - Added some GPIO definitions for older players we didn't know about
 - Add register definitions for AXP2101 from datasheet
    (these are very different from AXP192!)
 - Add AXP2101 regulator definitions, need to support multiple step
    sizes per regulator.
 - Verify AXP2101 voltage set multi-range logic
 - Verify AXP2101 voltage get multi-range logic
 - Make AXP2101 its own driver
 - AXP2101 driver should be "minimally viable", though I think
    there is some extra functionality that could be implemented.
 - Disabling the coulomb counter stuff - we could maybe make
   the E-Gauge work for the same purpose, but it only appears to
   be used on the debug screen at the moment so it doesn't seem
   like it's worth the effort.
 - Found new button GPIOs
 - Found error in my GPIO setting logic, blue light works now!
 - Set LDO/DCDC output voltages to OF's settings, as far as
   I can tell.
 - Determined we probably want TCS1421_CFG1:0 to be 0x00,
   for UFP behavior
 - Tested this rb build with both old and new bootloaders on hw1.5,
   hw2, hw4 in as many configurations as I can think of, works across
   the board.
 - Bootloader can install itself on hw4, so nand chip isn't novel
 - Uninstallation file can be made by patcher script, works on hw4
 - Installation file can be made by patcher script, works on hw4
 - Added HW4 to rbutil, manual

Change-Id: I5b75782273e81c2c6f2b9c79501c8b7cbf88391f
2024-11-22 17:01:39 -05:00
Vencislav Atanasov
38df1ff311 Fix target order and formatting in case block
Added Creative Zen V (95) to the list, since it was missing.

Change-Id: I2f0115835db82d1bedba3ccc97bcb405af3d1dd9
2024-11-16 22:12:22 -05:00
Vencislav Atanasov
1451fa2cbb Reorder targets by number
Change-Id: I9c437fbb0949c18251b2b9cfea04e9e82ebecdb4
2024-11-16 21:48:15 -05:00
Solomon Peachy
825e406965 configure: Parameterize the neame of the "sdl config" executable
We moved to SDL2 but still had the SDL1 'sdl-config' executable
used in one place.  Additionally, all comments and the help text
referenced the wrong executable name.

Change-Id: Ie2efa80d27be5f6391fc84e49e207aa2aac26e72
2024-10-31 08:35:12 -04:00
Dana Conrad
aa1a74b2a1 erosqnative: bigger system font
Change-Id: I371bc644db3694404e8013959a7e412e6814f8e7
2024-10-17 20:34:23 -04:00
Solomon Peachy
542eeae11c configure: Document the '--with-ubsan' argument
Change-Id: Ib159cec30f6396b7bf02463b8833a062a38b8841
2024-10-14 08:56:12 -04:00
Solomon Peachy
d96b222a32 Fix previous commit. don't know how it "worked" for my test build.
Change-Id: I2137e3a7036be8378b70cc7462edad33c28b5a39
2024-10-13 19:22:00 -04:00
Solomon Peachy
66ed5232cb erosq: Change default sysfont to 14-Rockfont-Mix
Former default of 08-Rockbont was borderline illegible on the screen.

Change-Id: I200d6f692b145927f0579652f4ed1ce4c6ede118
2024-10-13 18:52:20 -04:00
Solomon Peachy
e1bed147a3 build: Add advanced option to treat all warnings as errors.
Change-Id: I235f93d72bfc33243454edd04e45805b5c795f17
2024-10-12 10:34:45 -04:00
Solomon Peachy
7927423e34 SDL: Migrate to SDL2
Incorporates large portions of g#5879 g#5282 g#5285 g#5286 g#5287

Differences from the above patches:

 * Removed all MacOS-specific stuff
 * Removed support for SDL1 entirely
 * Properly implement mousewheel support
 * Bumped up minimum stack size for sigalstack threading
 * Check for overflow before enqueing scrollwheel events

Tested on:

 * sdl application (Linux)
 * Simulator (x86_64, Linux) -- xduoox3/ipod4g/sansafuze
 * Simulator (i686, Windows) -- xduoox3
 * Simulator (arm64, Linux)

Change-Id: Ia3012dd1be123feb2888798a42d5b7cc149f382b
2024-10-06 12:05:53 -04:00
Dana Conrad
a5462d6192 erosqnative: Give erosqnative_v3 its own target ID and modelname
This is needed so "make clean; make reconf" will work correctly.

Change-Id: Ife13e59ac6054f04f7095aa2263ec64595eeb3a2
2024-09-08 12:29:03 -04:00
Dana Conrad
878e29396c ErosQNative: Add v3 LCD support, conditional on bootloader
bootloader passes the player version to rockbox for LCD init changes

Credit ZappBranigan2972 on forums for original changes
Credit Bilgus for devicedata additions

Change-Id: Ia2ca493edef49b7457e84dc19b05397dc915fa5a
2024-09-02 13:29:43 -04:00