edssharp: add another extension for the EDS file for CountLabel
The count label is required to compile against the CANopenNode v4 library since the definitions are checked by code like the following in CANopen.c
#if OD_CNT_NMT != 1
#error OD_CNT_NMT from OD.h not correct!
#endif
This problem is exhibited when there is no xpd file that has the custom properties and there is only an EDS file available. The StorageLocation is an example of setting the custom property for the CO_storageGroup and this is adding a similar extension for the CO_countLabel.
An example eds for NMT 0x1000 is shown below
[1000]
ParameterName=Device type
ObjectType=0x7
;CountLabel=NMT
;StorageLocation=ROM
DataType=0x0007
AccessType=ro
DefaultValue=0x00000000
PDOMapping=0
@nimrof - this might not be the patch if the actual expectation is that everything is supposed to be an xdd file and that is what is used to generate the CANopenNodeV4 export since the additional property support is in that it seems.
without this - then we end up with the warnings in an EDS to CANopenNodeV4 - there might be other problems coming later as well - so, should this EDS to V4 just not be supported? or should it get fixes?
WARNING :Error in 0x1000: 'Count Label' must be 'NMT'
WARNING :Error in 0x1001: 'Count Label' must be 'EM'
WARNING :Error in 0x1005: 'Count Label' must be 'SYNC'
WARNING :Error in 0x1006: 'Count Label' must be 'SYNC_PROD'
WARNING :Error in 0x1010: 'Count Label' must be 'STORAGE'
WARNING :Error in 0x1012: 'Count Label' must be 'TIME'
WARNING :Error in 0x1014: 'Count Label' must be 'EM_PROD'
WARNING :Error in 0x1016: 'Count Label' must be 'HB_CONS'
WARNING :Error in 0x1017: 'Count Label' must be 'HB_PROD'
WARNING :Error in 0x1200: 'Count Label' must be 'SDO_SRV'
WARNING :Error in 0x1400: 'Count Label' must be 'RPDO'
WARNING :Error in 0x1401: 'Count Label' must be 'RPDO'
WARNING :Error in 0x1402: 'Count Label' must be 'RPDO'
WARNING :Error in 0x1403: 'Count Label' must be 'RPDO'
WARNING :Error in 0x1800: 'Count Label' must be 'TPDO'
WARNING :Error in 0x1801: 'Count Label' must be 'TPDO'
WARNING :Error in 0x1802: 'Count Label' must be 'TPDO'
WARNING :Error in 0x1803: 'Count Label' must be 'TPDO'
And the real problem is that it does not build
modules/lib/canopennode/CANopen.c:48:3: error: #error OD_CNT_NMT from OD.h not correct!
48 | #error OD_CNT_NMT from OD.h not correct!
| ^~~~~
this might not be the patch if the actual expectation is that everything is supposed to be an xdd file and that is what is used to generate the CANopenNodeV4 export since the additional property support is in that it seems.
When I was integrating V4, i put all my efforts into xdd and tried to touch other in minimum. Xdd was meant to be a project file, eds only for export.
But eds could also contain some custom properties and could also be used as a project file. I agree with the PR. Maybe there could be an option in exporter, similar as for xdd: export full eds or export stripped eds without custom properties.