AnsweredAssumed Answered

Tips for custom bootloader/application?

Question asked by Dave Jones on May 17, 2017
Latest reply on May 18, 2017 by waclawek.jan

I'm new to STM32, though I've programmed other micros for decades. I'm doing my first project with an STM32L4 and need to create a custom bootloader in lower flash and an application in upper flash. I've done this before with PIC24 parts where I created 2 projects, one for the bootloader and one for the application, each with a custom linker script that forced the linker to keep them within their specific areas of flash. The bootloader set the config fuses and was burned in by the programming cable. The application was installed via a uSD card. It had to be built using identical config fuses because it didn't actually set them when installed, since it was the bootloader that simply placed the application into a portion of flash.


I'm assuming I would do something very similar here.


1 - are linker scripts tool specific? I'm using "System Workbench" (SW4STM32). How do I find out about modifying the linker script for my needs?


2 - is there any example code of in-chip flash programming available for the STM32L4?


3 - if I understand it correctly, it's possible for the application code to move the interrupt table to RAM and use it from there? (since it can't use the interrupt table from the custom bootloader) Is this true? Anything special I need to know about doing that?