Using S32DS, with S32K116.
How would someone share SDK Drivers, or functions in general between boot-loader code and application code?
Background for question:
Working on a LIN Bootloader using the SDK drivers (Lin stack, Uart, etc.) I dont want to load the driver code into the bootloader AND Application code because that would be a huge chunk of code space of duplicated code.
From my understanding (please correct me if i'm wrong), is I would make 3 separate projects, a bootloader project, application project and driver(SDK) project. Header files from the driver project would be included in the bootloader and application project but not the .c files. Each project would be complied separately and would contain their own linker files of which obviously would not overlap. Somehow (manual merging / auto thru eclipse) for "initial release" a single binary file would be made containing bootloader, application and driver code. Subsequent releases of application code would be released independently of the other 2 projects and the application code would be bootloaded into the application sectors dedicated to the application code.
For the drivers, how does one create a project full of just SDK Drivers, no main, no calling functions, nothing to tell the linker what functions are being used, thus where to put the code?
Would i need to make wrapper functions for the SDKs to tell the SDK function where to go in the linker script? I guess im just really confused how to get the drivers from the SDK (which i don't want to edit any of those files for obvious change management process reasons any changes needed to the SDK would need to be via wrappers) into a specific location in flash. AND then have the bootloader call those functions, as well as the application code call those functions.