16Fermer18
christopLe 20/04/2010 à 08:40
PpHd (./5) :
Lionel Debroux (./3) :
* the ld-tigcc-flashos-improvements branch (and its doc-related branch), which contain a number of improvements to the Flash OS support made by Patrick's modifications to improve Flash OS support. That's what he's been using for PedroM for a while.


You'll need this for Punix. It adds one option :

--flash-os-bss-start=$(FLASH_OS_BSS_START)
(usually FLASH_OS_BSS_START=0x5B00 )
which defines the start in RAM, of the BSS section allowing you to define global variable in .c files as usual.

It adds also new symbols:
__ld_archive_start: just after the end of the code, rounded to 64K
__ld_bss_even_end: just after the end of ram BSS section, rounded to 2.


Yes, this is the kind of change I'm interested in. Thanks.

Are static variables (both local to a function and local to a source file (or "compilation unit")) also stored in the BSS section? From what I understand about C, they should be.

It'll take me some time to completely convert my code to use real global variables from the pseudo-global variables (members inside a single "globals" struct named "G") that TIGCC forced upon my OS. It will allow me to interact with C more easily from assembly, and I can easily rewrite some time-critical code in asm (most notably the audio driver's interrupt handler). Actually, I can probably convert a module at a time, and declare "G" as a regular global variable. I would also have to change the start of the heap, but those are the only changes that I see as necessary.