This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Help with embedded code linking
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Grzesiek Gajoch <gajoch at gmail dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 21 Jul 2014 10:41:38 +0100
- Subject: Re: Help with embedded code linking
- Authentication-results: sourceware.org; auth=none
- References: <CAHipV2ARtuWX3YvDj4uCYwcHF_GOOHM17=5=oYhQyv_dkDKkrQ at mail dot gmail dot com>
On 21 July 2014 10:37, Grzesiek Gajoch wrote:
> Hi all,
> My "problem" is as follows:
> I have relatively big code for STM32 microcontroller (~300KB binary file).
> Every time I want to test new software version I have to recompile all
> of it and then reflash whole memory (which takes time).
>
> I have a question:
> is it possible to compile "library" part of code (it does not change
> but takes a lot of memory) and burn it in static place in memory,
> when compiling "user" code (it uses functions from library) tell the
> linker somehow to map jumps to part of memory where the lib is (i.e.
> take the adresses from memory map of staticly burned lib) - the goal
> is to place it in "user" place in memory (and only reflash this part).
Flashing your microcontroller is nothing to do with GCC.
You can certainly compile part of the code into a static library and
link to it, which would be quicker than recompiling the whole thing
every time. That wouldn't help reduce the time to flash the device,
but that's nothing to do with GCC and I don't know how to help with
that.