FPGA - Modules.bin - inner core size
Hi, I have coded a simple procedure storing inner core boot file. FOR sec = 2 TO 63 DO Kernel.GetSector(sec*29, buf); Files.WriteBytes(r, buf, Kernel.SectorLength) END ; Ignoring some trailing NULL sectors, I can guess a file size making the original inner core => 37056 bytes. Comparing to `Modules.bin' produced by `ORL.Linker', using very early and uptodate compiler revisions, I got inner core size 37344, 37568, bytes respectively. Also binaries differ in some 3452, 20300 bytes, respectively. The newer compiler the longer binary with more differencies. Is it something expected, or do I get something wrong? What can this be accounted for? -- Tomas Kral <thomas.kral@email.cz>
Am 20.08.2018 um 14:57 schrieb Tomas Kral:
Hi,
I have coded a simple procedure storing inner core boot file.
FOR sec = 2 TO 63 DO Kernel.GetSector(sec*29, buf); Files.WriteBytes(r, buf, Kernel.SectorLength) END ;
Ignoring some trailing NULL sectors, I can guess a file size making the original inner core => 37056 bytes.
Comparing to `Modules.bin' produced by `ORL.Linker', using very early and uptodate compiler revisions, I got inner core size 37344, 37568, bytes respectively.
Also binaries differ in some 3452, 20300 bytes, respectively. The newer compiler the longer binary with more differencies.
Is it something expected, or do I get something wrong? What can this be accounted for?
OLR.Linker links to a minimal ELF binary. It includes the ELF header. Binaries linked with OLR.Linker can only run on Linux Kernel. Regards, Peter
On Mon, 20 Aug 2018 14:57:11 +0200 Tomas Kral <thomas.kral@email.cz> wrote:
FOR sec = 2 TO 63 DO Kernel.GetSector(sec*29, buf); Files.WriteBytes(r, buf, Kernel.SectorLength) END ;
Ignoring some trailing NULL sectors, I can guess a file size making the original inner core => 37056 bytes.
This is possibly of little or no use, but it shows we can access sectors in word entities. It can guess number of sectors currently used in boot area. Exact boot code size is reported by [ORL].Linker. PROCEDURE Guess*; (*SD boot sectors used*) CONST ssw = Kernel.SectorLength DIV 4; (*sector size in words*) VAR i, used, secno: INTEGER; buf: ARRAY ssw OF INTEGER; BEGIN Texts.WriteString(W, "boot sectors used"); Texts.Append(Oberon.Log, W.buf); sec := 63; (*last*) REPEAT Kernel.GetSector(sec*29, buf); DEC(sec); used := 0; FOR i := 0 TO ssw-1 DO INC(used, buf[i]) END ; UNTIL (secno < 2 (*first*)) OR (used # 0); Texts.WriteInt(W, sec-2+1, 4); Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf) END Guess; -- Tomas Kral <thomas.kral@email.cz>
participants (2)
-
Peter Matthias -
Tomas Kral