It seems to be different from that of BF533, but there is no any document like EE-240.. :-о
Sorry, it appears in the most unexpected place - in the 548 hardware reference.. :-)))
I'm looking in the BF548 HRM for the ldr format (enveloped in the Intel HEX format). I understand the EE-240 for the BF533. Is there something similar for the BF548?
I want to write code that parses the ldr file and extracts areas of code. Is there a program that does this?
I believe, in any ldr file format, you can not differentiate code blocks and data blocks it contains (especially when SDRAM is used to store both code and data). [only possibility is that if code block is residing in L1 instruction memory, then you can check target address of that block].
So, I think we do not have any code example to show how to extract only codes blocks from the given LDR file.
In one of the thread craig has explained how the data in intel hex file format looks like. Hope that will help.
Regarding documentation for booting on BF54x processors, as Alex has pointed out, System Reset and Booting chapter of HRM is best source. Besides you can refer EE-336.
Craig's thread describes the BF592.
I need the specific fields for the BF548 ldr file. I understand that i have to remove the Intel Hex format header and checksum. What I'm interested in is the build of the data within the rows, The EE240 explains it with a color-coded figure (page 11 of 28). The fields do not match the ldr of the BF548. The flags and address and count fields are different lengths and are ordered differently.
I would recommend taking a look at the Boot ROM for the BF548. We provide a copy of the Boot ROM codes at "...\Blackfin\ldr\Boot ROM\". In the appropriate "bk_kernel.asm" file you will find details of the expected header data in the _bootrom.bootkernel.header.* sections.
Sorry for the confusion, but the concept is basically same. The attached picture (of BF548 boot stream) can hopefully explain it. Please refer Basic Booting section explained in the Booting chapter.
Let me know if you have any questions.
I doctored up the picture somewhat to make it more understandable. Please correct anything that is not accurate.
Of course it's confusing that address FFA0,0000 is used in the InitCode and also in the actual program.
What do the flags mean? Is the "argument" a CRC?
I basically wrote a parser that reads a row. If its length is 32 bytes, it checks the 8-11 bytes for an address. If the address matches what i'm looking for, I copy that data (last 16 bytes of the row + enough bytes from subsequent rows).
the 'flags' are taken from the second hex pair shown in the LdrViewer, and provide instruction to the boot kernel as to any special steps required when processing this block. For example, in your screenshot you have the following blocks:
Block 0 at 00000000AD285006 (Flags)...Block 1 at 00000010AD980006 (Flags)...Block 2 at 0000008CAD748006 (Flags)...
Block 0 at 00000000
Block 1 at 00000010
Block 2 at 0000008C
These values can be cross-referenced against the "Block Flags Field" table, 17-5, in the BF54x Hardware Reference Manual. This is in Chapter 17, "System Reset and Booting".
So, Block 0 is 0x5006, which is 0101 0000 0000 0110, and we only pay attention to bits 4 through 15, as per the table. So this has bits 12 and 14, which are the BFLAG_IGNORE and BFLAG_FIRST flags, which are described in the aforementioned table.
Block 1 sets no additional flags, and block 2 is set to 1000 0000 0000 0110, which sets bit 15, "BFLAG_FINAL".
Retrieving data ...