Rockbox Technical Forums
Rockbox Development => New Ports => Topic started by: krfkeith on March 25, 2012, 01:58:07 AM
-
STMicroelectronics has the ridiculously low-priced Discovery dev boards for their STM32F4 MCUs. The board itself is too limited, but it's easy enough to add anything we would need (namely, more RAM, DAC, display). I asked on IRC about potential difficulties of such a port, and one person noted that Cortex chips use Thumb-2, which could potentially introduce some pitfalls. I am vaguely aware that Thumb is some sort of subset of the main ARM ISA, but nothing more specific than that. I do have a fairly good knowledge of programming, but I am not particularly versed in ARM (though I am willing to learn what I need to). Could anyone here with more experience shed some light on what, if any, issues might arise in this endeavor?
EDIT:
Well, it appears as though the STM32 chips don't have a DDR controller, bummber :( . But! Freescale's Kinetis processors seem to have everything else I would need, and the DRAM controller.
-
It shouldn't be too difficult to get a port going on an M4, but you will need to tweak a number of bits of our assembly to make it okay for Thumb2. The majority of assembly is in codecs, though, so you shouldn't have too much trouble in the course of getting it to boot.
-
I looked through the M4 reference manual and the assembly looks fairly similar to ARMv5E in terms of coverage, although I'm assuming its not actually compatible with it. For things like codecs it would probably not be too hard to adapt the more important bits for the M4. Given how power efficient the new cortex chips are supposed to be, it might not be that important anyway.
-
Thumb2 is almost entirely compatible with the ARM instruction set; it adds back virtually everything Thumb was missing (at the cost of having a pretty complex decoder). There are some old fashioned things it doesn't do, but those tend to have been deprecated and replaced in ARMv7-A anyway.
-
How much memory does an audio player really need, anyway? The fancier Discovery board has 192k of ram and 1mb of flash, which is probably more than the players of the early Rockbox era had (Archos Jukebox etc). There is supposedly a newer version of the chip in the works with 512k ram.
-
2.5 to 4 MB depending on your screen and what features are enabled.
-
192k of ram and 1mb of flash, which is probably more than the players of the early Rockbox era had (Archos Jukebox etc).
Those had 2MB RAM
-
Archos Jukebox uses hardware decoder as well while CM4 port will use software decoding which needs substantial amount of ram. IIRC there was afford to port rockbox to 2MB arm target and it was proven difficult.
-
i think it would work
the Rockchip RKnano support all common loseless format with only a 100MHz Cortex-M3 and 128KB IRAM 96KB DRAM
-
Do you have any technical materials about RKnano? Are you sure there is no additional DSP core with its own memory? 128k+96k isn't a lot. From the computational point of view 100MHz Cortex-M3 is more then enough for most formats (actually you can look how good arm7tdmi @ 80MHz performs in all PortalPlayer devices).
-
100 MHz M3 is quite fast by our standards. With SRAM memory and a faster multiplier than arm7tdmi its probably faster than at least half out devices.
The lack of memory would be a problem though. Flac and mp3 will be fine but forget aac or vorbis. Most of our core features and DSP won't fit either. Realistically if you want a color screen and most features you'll need about 2MB.
-
stm32radio run rt-thread RTOS
STM32F103ZE +512k SRAM+2M SPI Flash+wm9878 DAC
http://stm32radio.googlecode.com/svn/trunk/stm32radio
decoding FLAC level0-level8 OK
Program Size: Code=82888 RO-data=6412 RW-data=524 ZI-data=61652
SRAM filebuffer=16*1024
-
512k of ram is too little for rockbox.
-
http://stm32radio.googlecode.com/svn/trunk/stm32radio
Copyright (C) 2007 Michael Giacomelli
:)
But yes, while you can run some of our decoders with so little memory, you won't be able to fit much of an operating system on such a simple device.
-
http://stm32radio.googlecode.com/svn/trunk/stm32radio
Copyright (C) 2007 Michael Giacomelli
:)
But yes, while you can run some of our decoders with so little memory, you won't be able to fit much of an operating system on such a simple device.
yes :) , only flac decoding, APE decoding on and off even overclocking :(
maybe STM32F4 (or STM32F7?) work properly :)
-
what is the result?did you finish it?
-
http://www.st.com/en/evaluation-tools/32f746gdiscovery.html (http://www.st.com/en/evaluation-tools/32f746gdiscovery.html)
(http://f1.hifidiy.net/forum/201512/09/131445nkhd6t6oe27uud06.jpg)
(http://f1.hifidiy.net/forum/201512/09/131353cfqreq5wkf1l85ee.jpg)
A good choice :)