gui_usb_screen_run() is a do{} while(0) macro, resulting in an unused
variable warning in the "caller"
Change-Id: I4b4b00ef38decfb5cc9db0da3d81ad0c9a4207d1
currently, exclusive disk mode was enabled at the same time as the
usb insertion. when multiple usb configurations exist, this is not
appropriate.
manage it in the core and enable it only when necessary.
Change-Id: Iadbec05fad1d1319471233227ae0e72c12079295
add second argument to usb_acknowledge.
it can be used for more appropriate connection tracking that does not
rely on timeout in the future.
Change-Id: I8a44366b7c7a1f944524c4ba8ecd6d9673746a65
Add a 'make start' target which starts Rockbox using a
debugger. This only works to load the main binary, but
makes it much faster to test changes that don't affect
plugins/codecs.
Because SDRAM isn't accessible at reset and the main
binary is usually too big to fit in SRAM, the bootloader
must be flashed first before Rockbox can be loaded in
this way.
The boot protocol involves GDB writing a check pattern
to SRAM while the CPU is held in reset. The bootloader
detects the pattern and takes a breakpoint, by which
time SDRAM is accessible; GDB can then upload a binary
ELF image (copied as a raw file, since the ELF will be
loaded using RB's ELF loader) and leave the breakpoint
to continue booting.
From there the bootloader can load the ELF binary from
memory, exactly like a normal SD card boot.
Change-Id: I4eb971b4162ea422e38660455cfa0958cefaa18d
To avoid problems with SDMMC DMA not being able to
access all SRAMs equally, the ELF binary is loaded
at the top of SDRAM and then copied into place.
Change-Id: Icf16d02bc15605539cbe781dd27709225abca8f9
This is a small & simple ELF loader which just copies
program segments from disk to memory. It only supports
static binaries right now.
Change-Id: I8944feb5b9dafcc5c56e12383aed25e2718ad7ea
Most of system_init() should only be performed once after
reset, and is not safe to re-run when the bootloader jumps
to the application.
Change-Id: I4d2e804ce4884da13b9167ddcda860ef3b5ba7d0
Use flash & AXI SRAM for the bootloader, ITCM/DTCM and
SDRAM for Rockbox. Hardly the most optimal use of SRAMs
but it's good enough to get started.
Fixes the Echo R1 app build, which wasn't fitting in
AXI SRAM.
Change-Id: I4f7e5f618d27b553e5ff8dec1d5c4c61ac9d8eb0
On the Echo R1, the main regulator is enabled primarily by
the power button and USB input, and secondarily by the CPU's
own output pins (cpu_power_on signal or RTC alarm output).
From a user perspective, the player should appear to power
up and down only if the power button is long pressed, which
must be implemented in software. These logical power states
are called "active" and "inactive" in the bootloader.
Going from inactive to active will attempt to boot Rockbox
unless a button (d-pad down) is held to enter bootloader
USB mode instead. Going from active to inactive will shut
down the player. The bootloader will also automatically
shut down after a short timeout, if USB is not plugged in.
In the inactive state, the player is supposed to enumerate
over USB so it can negotiate a charging current, but should
otherwise appear "off". In particular it shouldn't expose
mass storage or even power up the SD card, nor power up the
LCD/backight. This isn't implemented yet, because there's
no way to dynamically change USB configurations (eg. going
from active to inactive should trigger re-enumeration to
switch to charge only mode). To avoid surprising behavior,
the bootloader will just boot Rockbox immediately if USB is
plugged in at boot.
Change-Id: Icd1d48ef49a31eb32b54d440e9211aaf40c6b974
Normally the bootloader won't enable the LCD, but we
still want to call lcd_init() at startup to keep the
code simple.
Change-Id: I866ecd7c81b6c5e6acdd57f5d7680400df3f54f4
FS#13753 - Rocklua error splash don't display part or full filename when
it is non-ASCII
FS#13754 - Rocklua error splash don't reset gui settings (bg, fg and font)
when using signed char unicode codepoints can show up as < '0'
code was looking to remove control chars < ' ' which also removed
unicode code points in the process
Change-Id: I48074a7854f2bee195ca554e1f86505fe5567db6
The clock helpers are only used for leaf clocks of single
peripherals, which don't benefit from reference counting.
Change-Id: Ica5685e7bc0fce621ae46f758f0ad0b1dcfb2789
Make systick setup less hardcoded, and create a public API
for use by targets, in preparation for moving system_init()
into target-specific code.
Improve the implementation of udelay to make it more robust
against timer wraparound.
Change-Id: I21bb8821cfd1d7e4049fac6e6a4548d80a4276f7
* When SHOW_LOGO is not defined, print the version at the
same time as the logo would have been displayed
* Don't re-init the display after every message in USB mode
Change-Id: Ida0f5643b1d57004877ec5c42fc14028f53b1c89
For some reason it was locally defined everywhere. Move a single
definition into common.h instead.
Change-Id: Ie2fad74acccd89e40fcbb0f47258d2e14e0f8285
FS#13745 - Add transpose (like in python pillow module) and smooth resizing in rocklua
most of this is supplied 'require image'
flipping an image is built-in to the image generator function
add image flip example to rliimg
pushed the wrong script
Change-Id: I2c512a70ed26b0457e46f2f2a187d3365783af67
FS#13745 - Add transpose (like in python pillow module) and smooth resizing in rocklua
most of this is supplied 'require image'
flipping an image is built-in to the image generator function
add image flip example to rliimg
Change-Id: Ia53933c9ad09d2a5b92af45eb7a1140b64b6ae01
This is mainly useful for bootloaders that want to safely
disable the SD/MMC controller before booting. Disabling a
controller will reset and power down the bus; all attempts
to read or write to a disabled controller will fail.
Change-Id: I4a7ec4287f2b8510a35d964cc806c74be8c86406
FIFO errors shouldn't be possible with hardware flow
control enabled. DMA errors shouldn't occur unless a
bad memory address was passed.
Don't bother checking for ITCM/DTCM in the transfer
setup and instead just wait for the IDMATE error; if
the RM0433 reference manual is to be believed then
SDMMC1 _only_ has access to AXI bus memories, and
checking for all invalid destinations would be very
verbose.
Change-Id: I2b22b56009933e16c5adde4d36b7a906cee57791
Hardware flow control prevents FIFO underruns/overruns
by stopping the bus clock if one would occur. This can
slow down transfers, but that's better than having data
transfer fail due to AXI/AHB bus contention.
Change-Id: I8696d3aff78c17dbbe85907160fa37fd4ee11e85
The following inline assembly in set_irq_level() turned out
to have incorrect constraints:
int newvalue = /* input parameter */;
int oldvalue;
asm volatile ("mrs %0, primask\n"
"msr primask, %1\n"
: "=r"(oldvalue) : "r"(newvalue));
leading to incorrect code generation for common cases like
disable_irq_save(), which compiles to:
mov r5, #1
mrs r5, primask
msr primask, r5
...which doesn't disable IRQs at all, since both of the
operands got assigned to the same register; the write of
'oldvalue' clobbers the 'newvalue' input before it's used.
Apparently GCC assumes that input operands are read before
output operands are written. One way to fix this is adding
the '&' constraint: "=&r"(oldvalue), but it's better to
break things down into separate, simpler asm statements
which GCC can figure out itself.
Also add compiler memory barriers where primask is modified
to ensure loads/stores aren't incorrectly moved outside of
critical sections.
While here, optimize disable_irq_save() a bit by using the
cpsid instruction, which avoids the extra "mov" and register
allocation needed by "msr primask".
Change-Id: Iac94a76db5bac399a1cf028da4241a0473259a46
I had commented out 'talk_force_enqueue_next()' in the voice prompts
pretty sure it was because really long prompts just keep droning on
problem being as soon as the plugin returns in some cases the prompt
gets cut off by the parent calling shutup on us
so it is now a setting (on by default)
Now allows command line arguments
so you can announce whatever prompt you want whenever / wherever you want
(checkout open plugins for a way to create a plugin with command line arguments)
you can then add this .opx shortcut to your shortcuts or quick screen
and as before you can use a hotkey which also will allow command line args..
Change-Id: Id8883c0a4e85e1cb813959ab72e89817f388a397
Couldn't reproduce this on most of my devices or the sims
turns out the bug depends on uninitialized memory being FF
and the file empty
Uninitialized memory fixed what I saw at least..
Change-Id: Ie267af0a20685003ee28ff42d008dd7942a7c6fc
saves openplugin entries to the config file for later import to the database
lang_english_to_id() allows entries to be transfered between builds
Change-Id: I47e01c5f75f8b0e69c203828e21759ef24bf125d