Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardware isolation of user applications #42

Closed
yiiii777 opened this issue Aug 22, 2020 · 3 comments
Closed

Hardware isolation of user applications #42

yiiii777 opened this issue Aug 22, 2020 · 3 comments

Comments

@yiiii777
Copy link
Contributor

The main idea: a separate processor for the "periphery", drivers and part of the framework, and another separate processor for "user" applications. For example, ESP32. There are bluetooth and Wi-Fi, as well as enough RAM to run software interpreters of user applications, such as lua, micropithon, espduino, j2me. Surely users will want to run some kind of emulators of other platforms, such as Z80 - this is also possible. The firmware of this microcontroller is not user changeable, but can be upgraded as whole system update.

When a user wants to launch his own custom application (one of thousands), the code for this application is taken from the SD card and sent to the RAM of the second microcontroller. Perhaps it will be some of the STM series. If an application hangs, does an incorrect operation, or something unexpected happens, the processor can be restarted without restarting the shell from the main processor.

Thus, the user has complete freedom to control the hardware. The user can choose any operating system or even use bare metal. The user is not limited by the number of device flashing and can do it on the fly.

Communication between microcontrollers can be carried out through UART, which will include interfaces for drawing UI, working with a SD card, radio modules and other peripherals.

@glitchcore
Copy link
Contributor

We won't add second processor only for solving "isolation" problem, and if all user-application will run on second processor, they will have common address space again.

This idea creates a ton of tasks to support many firmwares, update it and interact between.

@yiiii777
Copy link
Contributor Author

will have common address space again.

Not at same time

This idea creates a ton of tasks to support many firmwares, update it and interact between.

Actually, this idea leads to ONE firmware in "system" MCU, as second MCU has no firmware at all, user applications uploads to ram at every launch. But yes, you need protocol to interact with main CPU and it's peripherals

@yiiii777 yiiii777 reopened this Aug 23, 2020
@zhovner
Copy link
Member

zhovner commented Aug 23, 2020

Choosing every component is not so easy. We need to produce tens of thousands devices and changing every component is affects a bunch of negotiations with suppliers. For example for current STM32 we need to figure out the export permits and so on. We plan to lock BOM in a few days, so adding the second MCU is the real threat to fail delivery at the time.

@zhovner zhovner closed this as completed Aug 23, 2020
redlink2 referenced this issue in redlink2-archive/flipperzero-redlinked Jun 14, 2022
Utility scripts for processing some of the flipper file formats directly
daconstenla pushed a commit to daconstenla/flipperzero-firmware that referenced this issue Aug 5, 2022
xMasterX added a commit to jaroslavmraz/flipperzero-firmware that referenced this issue Aug 8, 2022
daconstenla pushed a commit to daconstenla/flipperzero-firmware that referenced this issue Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants