This page is about addressing variables

Primarily between tuningsoftware and firmware.

If firmware resets while megatune is in some page, like VE or ignadv

MegaTune could trash the config variables. This was solved with different commands for config and tables; so no unintentional crosstalk is possible any more.

Checksum protected comm-commands is a thing of the future.

There are

stored within the ECU EEPROM with all the configuration. It is likely that more configuration 2..3 pages will be necessary in the future

There are human readable strings assigned to each variable as key and the firmware will (using the mcd command) spit out all the human readable strings in the order of their offsets within the settings table. This is useful to

Using binary offsets

We decided to use binary offsets for normal

because the protocol is easier to implement via offsets (=fixed length keys).

This addressing is already implemented with 7 pages (page 0..6, see pages_ptr[]) and used for megatunix. It is efficient. The minor problem is that mtx uses a primitive checksum-less protocol, so some framing with GenBoard/BinaryProtocol is nice. But that does not effect addressing, only a transport issue.

Implementing firmware support to 'save variables based addressed via the human readable key would be simple, and would require 0 bytes of SRAM:

However this is not planned. It does not make sense for firmware to get this kind of job off of the tuningsoftware's shoulder.

Determining offsets

While the binary offsets are useful inside the read-store commands, they are very dangerous to maintain manually. We tried, and they broke earlier. Manual maintenance of key=>offset is OK temporarily, but is not a good long-term solution

but exactly the config version, that is updated when there is a change in global.h config_t keys




Marcell and Hackish agreed on the following on irc:

Tuningsoftware uses a define:

#define primep_temp_scaling 1

Tuningsoftware uses a

so the implementation is dead-simple now (macro can also be inline function of course), and can be easily upgraded later simply by changing to
#define primep_temp_scaling "primep_temp_scaling"

and implementing the