Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8035

SDK • RP235X Meta Blocks

$
0
0
Finding the Meta Blocks in an RP235X UF2 was easy enough but I hit some problems when it came to decoding them based on the description in the RP235X datasheet, page 409, section 5.9 -

Code:

ITEM 0 | 1      | 1 | size_flag:1 (0 means 1 byte size, 1 means 2 byte size), item_type:7:ITEM 1 | 1 + s0 | 1 | size_flag:1 = 0 means 1 byte size, 1 means 2 byte size, item_type:7_
There's a lack of consistency there and the first ends with ':' the second with '_' which I guess was merely a typo.

It also wasn't immediately obvious to me that the size_flag was the msb, and not lsb of the item type byte.

But the main issue is it doesn't explain what 'byte size' and 'word size' refer to. It seems to me it refers to the size fields which are either a single byte or two bytes - which isn't a word in ARM parlance, nor how it's used in that section of the document.

And I'm not sure the 'last item' is correct -

Code:

LAST_ITEM | 1 + s0 + s1 | 1 | 2 | s1 + s2 (other items' size)
When I decode the single Meta Block in my RP235X file which appears to match the example on page 409 it seems to be a count
of the number of items in the block rather than the sum of their payload data sizes.

Is that correct ?

This is my analysis of my RP235X Run from RAM code which contains just a single Meta Block -

Code:

  2000015C : FFFFDED3  --.  20000160 : 10210142    |  Meta Block  20000164 : 00000203    |  20000168 : 20000000    |  2000016C : 000003FF    |  20000170 : 00000000    |  20000174 : AB123579  --'

Code:

  Meta Block - 20000160 to 20000170  20000160 : 10210142  ITEM 1             ------TT  ------42  1BS_IMAGE_TYPE            42    66             ----SS--  ----01--  Data Size                 01    1             --XX----  --21----  Type Specific Data        21    33             XX------  10------  Type Specific Data        10    16  20000164 : 00000203            DATA[0]  20000168 : 20000000  ITEM 2             ------TT  ------00  Unknown Type 0            00    0             ----SS--  ----00--  Data Size                 00    0             --XX----  --00----  Type Specific Data        00    0             XX------  20------  Type Specific Data        20    32  2000016C : 000003FF  ITEM 3             ------TT  ------FF  2BS_LAST                  7F    127             --CCCC--  --0003--  Total Item Count          0003  3             ZZ------  00------  Zero padding  20000170 : 00000000  End of Meta Blocks
I couldn't tell what my 'Unknown Type 0' should be from looking in picobin.h. Anyone know ?

But is that otherwise correct to the extent I have decoded it so far ?

Statistics: Posted by hippy — Sat Aug 17, 2024 3:34 pm



Viewing all articles
Browse latest Browse all 8035

Trending Articles