Skip to content
This repository has been archived by the owner on Feb 22, 2021. It is now read-only.

Can a "bootloaded" mbed application be compiled independent from a bootloader image? #7

Open
0Grit opened this issue May 2, 2017 · 6 comments

Comments

@0Grit
Copy link

0Grit commented May 2, 2017

A couple questions to gain my bearings

Can an mbed application be compiled without knowledge of the bootloader image that will be loading it?

What would be required for this? (Position independent compile?)

What role can uvisor secure boxes play in this realm?

@c1728p9
Copy link
Contributor

c1728p9 commented May 3, 2017

Hi @loverdeg-ep, you need to at least know the size of the bootloader. The application image must be built for an absolute address.

Currently uvisior is a pre-compiled binary for a fixed address. Because of this you can't use it in conjunction with an application built for use with a bootloader (since the application has an offset).

@0Grit
Copy link
Author

0Grit commented May 3, 2017

Any chance of making things more position independent in the future?

I'd prefer to not have to worry what boot-loader might currently be in flash when compiling an application.
It's just one more decision and potential source of error per compile.

@c1728p9
Copy link
Contributor

c1728p9 commented May 3, 2017

There are no plans to build applications as position independent, as this has implications on performance and compatibility among other things.

@0Grit
Copy link
Author

0Grit commented May 3, 2017

What are the compatibility implications?

@c1728p9
Copy link
Contributor

c1728p9 commented May 3, 2017

There would need to be a massive overhaul of linker scripts to support relocatable rom and all the pre-compiled libraries in the codebase (like for example nanostack) would no longer work. There would also need to be source code changes in the boot sequence and other places.

@0Grit
Copy link
Author

0Grit commented May 3, 2017

Does this mean remotely updating any of the pre-compiled libraries without restarting my application will never be an easy task?

Maybe this is something the uvisor will address?

I'm really trying to get a feel for the ultimate intents of the bootloader & uvisor.
It just feels like something is missing and I'm not quite sure which questions to ask.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants