Working on SAMG55 bootloader. Need advice

Discussion around product based on ARM Cortex M4 core.

Moderators: nferre, ncollot

Posts: 3
Joined: Wed Jul 15, 2015 11:17 am

Re: Working on SAMG55 bootloader. Need advice

Thu Dec 03, 2015 11:03 pm


I stumbled upon this discussion, and I was particularly interested since I'm currently working on a bootloader as well (for the SAM4L however). It's the first time I write this kind of code so I improvised a lot of things, and I'm glad to see i wasn't completely wrong with my two-linker-scripts idea. However, I was wondering if it would be possible to use Position-Independant Code instead, and use the bootloader to just dump it/execute it anywhere in the flash, without messing with the linker and without having to reserve a fixed (and known) size for the bootloader? I think it would have some advantages, but when I tried this hypothesis, generating PIC code with arm-none-eabi-g++ seemed a bit more complex than just toggling some kind of -fpic (I don't really exactly remember why, but apparently there was some relocation steps to be done inside the bootloader).
Do you have any insight on the subject?

@bandtank : I wouldn't mind to give you my code, but it only supports serial for the moment (I plan on adding USB later), and it uses my own custom library (instead of ASF) which isn't stable yet... I'll open-source everything in a few months when it's stable enough.
Posts: 29
Joined: Fri Jul 10, 2015 6:35 pm

Re: Working on SAMG55 bootloader. Need advice

Fri Dec 04, 2015 4:33 am

I can't really answer the question of PIC. Considering that I am using Atmel Studio and the documentation and support is rather poor I try to stay within the realm of minimal obstructions to a completed final product. I don't know what kind of performance hits PIC might create. Others here might have a more educated opinion on that. For the most part, it already is PIC. But the linker locations for moving code and vectors around are pretty simple to set up. Path of least resistance!

Return to “SAM4 Cortex-M4 MCU”

Who is online

Users browsing this forum: No registered users and 1 guest