srec_emon52(5)
π¦ srec_emon52 β the Elektor Monitor (EMON52) file format
Okay bestie, so this one's a journey. This is the file format used by the EMON52 monitor, which was made by the European electronics magazine Elektor (they go by Elektuur over in Holland π³π±). And listen β Elektor wouldn't be Elektor if they didn't try to reinvent the wheel π. It's genuinely a mystery why they didn't just use a format that already existed for the project. And the plot twist? Only the Elektor Assembler will produce this file format, which lowkey reduces your choice of development tools dramatically. It's giving "we made our own club and nobody else is in it" π.
β¨ Records
So every data line is called a record, and each record contains these four fields:
ββββββ¬βββββββ¬ββββ¬ββββββββββββ¬βββββββ
β cc β aaaa β : β dd ... dd β ssss β
ββββββ΄βββββββ΄ββββ΄ββββββββββββ΄βββββββ
And here's the field-by-field breakdown, bestie:
ccβ the byte count π . A two digit hex value (1 byte) counting the actual data bytes in the record. It's separated from the next field by a space.aaaaβ the address field π. A four hex digit (2 byte) number representing the first address this record is gonna use.:β the colon, main character separator β¨. The address field and the data field are separated by it.ddβ the actual data of this record π₯. You can have 1 to 255 data bytes per record (seecc). All the bytes in the record are separated from each other (and from the checksum) by a space.ssssβ the data checksum β. It's all the bytes of the data line added together, forming a 16 bit checksum. It covers only all the data bytes of this record, nothing else.
Heads up bestie β there is no End Of File record defined. Not a one. So don't go looking for it π.
πΈ Byte Count
The byte count cc counts the actual data bytes in the current record. Usually records have 16 data bytes. And, direct quote energy, "I don't know what the maximum number of data bytes is." It depends on the size of the data buffer in the EMON52. So like... vibes-based limits, honestly π.
π Address Field
This is the address where the first data byte of the record should be stored. After storing that data byte, the address gets incremented by 1 to point to the address for the next data byte of the record. And so on and so on, until all the data bytes are stored π«Ά.
The address is represented by a 4 digit hex number (2 bytes), with the MSD first (most significant digit first, iykyk).
π Data Field
The payload of the record is formed by the Data field β this is where the actual goods live π¦. The number of data bytes expected is given by the Byte Count field. Simple as that, no cap.
π§ Checksum
The checksum is a 16 bit result from adding all data bytes of the record together. That's the whole bit π .
π₯ Size Multiplier
In general, binary data will expand in size by approximately 3.8 times when represented with this format. So yeah, she's a little chunky π β but she's iconic.
π EXAMPLE
Here's an example of an EMON52 file, fresh and slaying:
10 0000:57 6F 77 21 20 44 69 64 20 79 6F 75 20 72 65 61 0564
10 0010:6C 6C 79 20 67 6F 20 74 68 72 6F 75 67 68 20 61 05E9
10 0020:6C 6C 20 74 68 69 73 20 74 72 6F 75 62 6C 65 20 05ED
10 0030:74 6F 20 72 65 61 64 20 74 68 69 73 20 73 74 72 05F0
04 0040:69 6E 67 21 015F
(Yes, if you decode it, it says "Wow! Did you really go through all this trouble to read this string!" β she's adorable, we stan π)
β SEE ALSO
πΈ AUTHOR
This man page was taken from the above Web page π«Ά. It was written by San Bergmans <sanmail@bigfoot.com>.
And that's the tea, bestie β β this page came straight out of the Reference Manual for SRecord, dated srec_emon52(5). Now go forth and decode some Elektor records, you icon π β¨π
π¦ where this page comes from
- opensuse-leap 16.0: srecord 1.65.0-bp160.1.12 Β· GPL-3.0-or-later
- opensuse-leap 16.0: srecord 1.65.0-bp160.1.12 Β· GPL-3.0-or-later
- opensuse-leap 16.0: srecord 1.65.0-bp160.1.12 Β· GPL-3.0-or-later
- opensuse-leap 16.0: srecord 1.65.0-bp160.1.12 Β· GPL-3.0-or-later
- Copyright (C) 2001, 2006, 2007, 2009, 2011 Peter Miller
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms