0

I'm struggling with a question in which I would like to get some help...

I have a Bootloader which can upload another application into my chip. In my case the Bootloader and the main application share a lot of the same functionality, and I would like to create 3 partitions in my chip's memory - one for the BL, one for common FW and one for the actual App.

I had a little experiment in which I flashed a function into a specific location in the memory and then in an actual application "jumped" to that function by using its hard-coded address, so as a POC, I guess it would work...

The thing is that I have a lot of function/classes and it would get very difficult to handle, so my question is - is there a neat way to "bind" all those 3 "applications" together?

I'm working on a Cortex-M4FP cpu and using KEIL uVision 5 as my IDE.

Thanks for your help :)

Frant
  • 5,382
  • 1
  • 16
  • 22

1 Answers1

0

You could for example decide that the bootloader is the one providing the services is has in common with your application. It would implement an SVC handler that would be responsible for providing those common services to the application.

References - should apply to Cortex-M4 as well:

I am stating the obvious I guess, but please note that sharing code trough the application instead of your bootloader would be very dangerous in the case the new common services implementation would be buggy. Updating the shared code should always require updating the bootloader.

Frant
  • 5,382
  • 1
  • 16
  • 22