Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  New Ports
| | |-+  Feasibility of Cortex-M4 Port?
« previous next »
  • Print
Pages: [1] 2

Author Topic: Feasibility of Cortex-M4 Port?  (Read 12751 times)

Offline krfkeith

  • Member
  • *
  • Posts: 1
Feasibility of Cortex-M4 Port?
« 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.
« Last Edit: March 25, 2012, 02:29:29 AM by krfkeith »
Logged

Offline torne

  • Developer
  • Member
  • *
  • Posts: 994
  • arf arf
Re: Feasibility of Cortex-M4 Port?
« Reply #1 on: March 25, 2012, 05:49:50 AM »
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.
Logged
some kind of ARM guy. ipodvideo/gigabeat-s/h120/clipv2. to save time let's assume i know everything.

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Feasibility of Cortex-M4 Port?
« Reply #2 on: March 25, 2012, 06:19:53 PM »
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.
Logged

Offline torne

  • Developer
  • Member
  • *
  • Posts: 994
  • arf arf
Re: Feasibility of Cortex-M4 Port?
« Reply #3 on: March 26, 2012, 06:22:50 AM »
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.
Logged
some kind of ARM guy. ipodvideo/gigabeat-s/h120/clipv2. to save time let's assume i know everything.

Offline phr

  • Member
  • *
  • Posts: 25
Re: Feasibility of Cortex-M4 Port?
« Reply #4 on: April 10, 2013, 02:21:27 AM »
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.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Feasibility of Cortex-M4 Port?
« Reply #5 on: April 10, 2013, 09:03:44 AM »
2.5 to 4 MB depending on your screen and what features are enabled.
Logged

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: Feasibility of Cortex-M4 Port?
« Reply #6 on: April 10, 2013, 10:19:25 AM »
Quote from: phr on April 10, 2013, 02:21:27 AM
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
Logged

Offline wodz

  • Developer
  • Member
  • *
  • Posts: 390
Re: Feasibility of Cortex-M4 Port?
« Reply #7 on: April 10, 2013, 03:32:02 PM »
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.
Logged

Offline c.azrael

  • Member
  • *
  • Posts: 6
Re: Feasibility of Cortex-M4 Port?
« Reply #8 on: October 27, 2014, 02:38:00 AM »
i think it would work
the Rockchip RKnano support all  common loseless format with only a 100MHz Cortex-M3 and 128KB IRAM 96KB DRAM
Logged

Offline wodz

  • Developer
  • Member
  • *
  • Posts: 390
Re: Feasibility of Cortex-M4 Port?
« Reply #9 on: October 27, 2014, 07:05:07 AM »
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).
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Feasibility of Cortex-M4 Port?
« Reply #10 on: October 27, 2014, 08:08:55 AM »
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.
Logged

Offline c.azrael

  • Member
  • *
  • Posts: 6
Re: Feasibility of Cortex-M4 Port?
« Reply #11 on: November 28, 2014, 12:50:45 AM »
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
Logged

Offline wodz

  • Developer
  • Member
  • *
  • Posts: 390
Re: Feasibility of Cortex-M4 Port?
« Reply #12 on: November 28, 2014, 05:01:18 AM »
512k of ram is too little for rockbox.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Feasibility of Cortex-M4 Port?
« Reply #13 on: November 28, 2014, 02:03:06 PM »
Quote from: c.azrael on November 28, 2014, 12:50:45 AM
http://stm32radio.googlecode.com/svn/trunk/stm32radio

Quote
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. 
Logged

Offline c.azrael

  • Member
  • *
  • Posts: 6
Re: Feasibility of Cortex-M4 Port?
« Reply #14 on: November 29, 2014, 11:27:07 AM »
Quote from: saratoga on November 28, 2014, 02:03:06 PM
Quote from: c.azrael on November 28, 2014, 12:50:45 AM
http://stm32radio.googlecode.com/svn/trunk/stm32radio

Quote
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 :)
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  New Ports
| | |-+  Feasibility of Cortex-M4 Port?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.117 seconds with 15 queries.