feat: add M95M02-only GAS and EEPROM profiles
Expose the existing registers through Modbus and service CAN using one GAS provider only in M95M02 builds. Include the EEPROM layout/driver, LOAD protection and calibration, firmware identity and shared CCS build workflow. Add transport/profile and SCI8 validation tests, documentation and the checked M95M02 firmware image.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
/* Test the actual 167 binding, not just a fake protocol backend. Build against
|
||||
* the generated header from the firmware build under test. No MCU registers. */
|
||||
#include "firmware_identity.h"
|
||||
#include "firmware_info_static.h"
|
||||
#include "ump_tms28335.h"
|
||||
#include <assert.h>
|
||||
static unsigned logger_reads, logger_writes;
|
||||
unsigned int ump_log_read(unsigned int address)
|
||||
{ (void)address; ++logger_reads; return 0x554dU; }
|
||||
int ump_log_write(unsigned int address, unsigned int value)
|
||||
{ (void)address; (void)value; ++logger_writes; return 1; }
|
||||
|
||||
int main(void)
|
||||
{
|
||||
uint16_t words[UMP_MAX_WORDS];
|
||||
ump_octet wire[UMP_RTU_CAPACITY];
|
||||
unsigned error, i;
|
||||
assert(ump_tms28335_prepare(3, UMP_FIRMWARE_INFO, 12, words, &error) == 12 && !error);
|
||||
assert(words[0] == 1 && words[1] == FIRMWARE_VERSION_MAJOR);
|
||||
assert(words[2] == FIRMWARE_VERSION_MINOR && words[3] == FIRMWARE_VERSION_PATCH);
|
||||
assert(words[4] == FI_YEAR && words[5] == FI_PAIR(FI_MONTH, FI_DAY));
|
||||
assert(words[8] == FI_PAIR(FI_ID_0, FI_ID_1));
|
||||
assert(logger_reads == 0);
|
||||
assert(ump_tms28335_rtu(1,3,UMP_FIRMWARE_INFO,12,wire,UMP_RTU_CAPACITY) == 29);
|
||||
for (i=0; i<12; ++i) assert(((wire[3+i*2]<<8) | wire[4+i*2]) == words[i]);
|
||||
assert(ump_crc(wire,29) == 0);
|
||||
ump_tms28335_prepare(6,UMP_FIRMWARE_INFO,123,words,&error);
|
||||
assert(error == 2 && logger_writes == 0);
|
||||
/* Firmware reads must not steal the existing logger window. */
|
||||
assert(ump_tms28335_prepare(3,UMP_BASE,16,words,&error) == 16 && !error);
|
||||
assert(logger_reads == 16 && words[0] == 0x554dU);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user