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




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]

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

Offline krfkeith

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

Offline torne

  • Developer
  • Member
  • *
  • Posts: 974
  • arf arf
Re: Feasibility of Cortex-M4 Port?
« Reply #1 on: March 25, 2012, 04: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: 6212
Re: Feasibility of Cortex-M4 Port?
« Reply #2 on: March 25, 2012, 05: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: 974
  • arf arf
Re: Feasibility of Cortex-M4 Port?
« Reply #3 on: March 26, 2012, 05: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: 14
Re: Feasibility of Cortex-M4 Port?
« Reply #4 on: April 10, 2013, 01: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: 6212
Re: Feasibility of Cortex-M4 Port?
« Reply #5 on: April 10, 2013, 08:03:44 AM »
2.5 to 4 MB depending on your screen and what features are enabled.
Logged

Online gevaerts

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

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

  • SMF 2.0.4 | SMF © 2013, Simple Machines
  • XHTML
  • RSS
  • WAP2

Page created in 0.31 seconds with 26 queries.