cancel
Showing results for 
Search instead for 
Did you mean: 

How to run android on stm32mp157c-dk2

PDzie.1
Associate II

Hi,

I'm lead embedded engineer at some company. Our current tech stack is android board for GUI and networking connected to stm32f2 over uart, which controls our hardware.

We're trying to give a shot to stm32mp1, which could be great way to reduce hardware cost and give us better tools to offload some not-real-time, but cpu intensive, tasks to application processor.

We've bought STM32MP157C-DK2 with intention of porting our software on it. First step would, obviously, be running Android on it. Since we've got android image from vendor of our current android boards and modified it only slightly, we have no experience with android development. Where should we start? I assume that it should be rather simple task, since ST provides bsp for stm32mp157c-ev1; which shares same MPU. I basically need, right now, usb storage, MIPI DSI display (DK2's built in one will be fine for now) with touch screen and uart peripheral. I'll leave running wifi dongle, usb camera and ethernet for later.

7 REPLIES 7
mleo
Senior II

Hello @PDzie.1​ ,

Have you already visited android related st wiki?

It contains set of useful articles:

https://wiki.st.com/stm32mpu/wiki/Category:How_to_Android

I believe it make you progress

Best regards,

Milan

Hi,

Thanks @mleo​ . I've read this wiki, but got stuck on Embedded Software page.

https://wiki.st.com/stm32mpu/wiki/How_to_create_your_own_STM32MPU_distribution_for_Android

I guess it's right place to start then. I've briefly looked at it and it seems thorough and I'm surely going to ask again when I got stuck.

Anyway, why did you prepare image for -ev1 only? -EV1 is much more expensive (4 times?) and was not available when I ordered -dk2 devkit.

Best regards,

Paweł

Hello,

EV1 benefit of 1GBytes 32-bit DDR whereas DK2 has only 512MBytes 16-bits DDR which make Android performance too low for a good user experience in most application. If you think your application might flight on DK2, you should have to built an image for the DK2.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thank you very much, it's very helpful!

I'm glad I put my hands on -dk2 instead of eval, as 3rd party SOM which we are interested in share the same memory design. So, -DK2 build would give me really accurate final performance estimate.

We currently run archaic android on 3core cpu (it's 4 core cpu with one core disabled), with base frequency of 1.2 GHz. Application still works fine when we downclock CPU by half, and CPU usage rarely exceed 10%. Most of memory is free, and we are not RAM-intensive (but I suspect, android might be).

My guess is that Android high memory bandwidth come for GPU and HMI composition. A display not bigger than 800x480 would help to reduce the overall bandwidth.

Notice that there is STM32MP1 running at 800MHz for consumer market (limited Tj) and 3rd party SOM might offer this in short term. Memory and GPU bandwidth is not increased (still 533MHz), but it might help to gain performances.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
PDzie.1
Associate II

Ok... I'm really close to getting started for real (now I just do research in short pauses between other tasks).

If I understand wiki page correctly, to build Android for -DK2 from ST's distribution I have to:

  1. Create new dir under device/stm/stm32mp1/, lets say /device/stm/stm32mp1/dk2 and copy content from eval.
  2. Modify device tree, can I just copy one from stm32mp157c-dk2 linux distro? Replace them in stm32mp1-xxxxxxx directories, or just copy new ones ( I guess makefiles and configs will point to right one, after setting everything up).
  3. Modify makefiles and overlay, as described in here: https://wiki.st.com/stm32mpu-ecosystem-v1/wiki/How_to_create_your_own_STM32MPU_distribution_for_Android#Create_your_device . Giving it a brief look, none of it seems very complicated.
  4. Flash layout should be OK, as long as I choose SDCard 8GB build variant?

That should be enough to create distribution for -DK2 board? I know that it would be just basic one, and would require a bit tuning, but that should just work (I mean, I should be able to run it on devkit and see something on it's display)? Seems a bit too easy.

Looking a bit further into the future, I could just get vendor's linux distribution, take device tree from there, do same things as with -dk2 and all should just work? Or generating my own from STM32CubeMX would be safer choice?

@edit

@PatrickF​ We will be fine if it will work with resolution up to 800x480 only :). That would be perhaps a bit problematic if we would like to upgrade to bigger displays, but even then there are plenty of 7" displays with 800x480 resolution.

VPete.1
Associate

Hello PDzie.1

did you succeed in building Android for the -DK2 in the described way?

Best

Volker.