EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

object code of selected sources only

Started by Marcus Schwenk March 2, 2004
developing on IAR embedded workbench for MSP430F149

?? How can i configure my project to create object code from only some
single files. But consider all sources during built.

projects options: "XLINK / input / inherent, no object code"
disables the creation of object code for all files in the project, how
can this be used to disable the creation for only some?

background:
A project which creates two portions of code, one shall be programmed
and stay there, the other might get altered during lifetime of the
product and gets reprogrammed in to flash once in a while.
Sources: C + assembler

any ideas or other attempts to this task?
regards Marcus
Marcus Schwenk <marcus.schwenk@philips.com> wrote:

> ?? How can i configure my project to create object code from only some > single files. But consider all sources during built.
What exactly does "consider" mean, here? What do you expect looking at a particular source file, but not compiling it, to achieve?
> background: > A project which creates two portions of code, one shall be programmed > and stay there, the other might get altered during lifetime of the > product and gets reprogrammed in to flash once in a while.
[Caveat: I've never been anywhere near an IAR toolchain...] The usual way of doing this would be to split those two portions of the code into altogether separate projects. Then you prepare header files and/or a stub library that represent the resident part to the non-resident part of the project, including the actual addresses they were located to. You may have to text-process a map file or object file dump to extract the necessary information. Another way would be to have the non-resident project link in a single big object file (or library file) produced from the resident part, but before actual downloading cut away that part of the generated image file. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.
I would recommend breaking up your code memory map into three code regions:

1. for baseline code that never changes
2. for a function table array (ala DLL's)
3. for code that will change (and is accessed via the function table)

--Anthony


"Marcus Schwenk" <marcus.schwenk@philips.com> wrote in message
news:2f5a855c.0403020115.2c5513c9@posting.google.com...
> developing on IAR embedded workbench for MSP430F149 > > ?? How can i configure my project to create object code from only some > single files. But consider all sources during built. > > projects options: "XLINK / input / inherent, no object code" > disables the creation of object code for all files in the project, how > can this be used to disable the creation for only some? > > background: > A project which creates two portions of code, one shall be programmed > and stay there, the other might get altered during lifetime of the > product and gets reprogrammed in to flash once in a while. > Sources: C + assembler > > any ideas or other attempts to this task? > regards Marcus

The 2024 Embedded Online Conference