From 442980335b81497b1b5660bdb6fdd90d0eeef7c8 Mon Sep 17 00:00:00 2001 From: Carsten Frank Date: Fri, 21 May 2021 08:16:24 +0200 Subject: [PATCH 1/2] Add possibillity to control storage class of variables --- libEDSsharp/CanOpenNodeExporter_V4.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libEDSsharp/CanOpenNodeExporter_V4.cs b/libEDSsharp/CanOpenNodeExporter_V4.cs index 39e524e..d073d09 100644 --- a/libEDSsharp/CanOpenNodeExporter_V4.cs +++ b/libEDSsharp/CanOpenNodeExporter_V4.cs @@ -424,10 +424,10 @@ OD data declaration of all groups { if (ODStorage_t.Count > 0) { - file.WriteLine($"extern {odname}_{group}_t {odname}_{group};"); + file.WriteLine($"extern ATTRIBUTE_{group} {odname}_{group}_t {odname}_{group};"); } } - file.WriteLine($"extern OD_t *{odname};"); + file.WriteLine($"extern ATTRIBUTE_OD OD_t *{odname};"); file.WriteLine(string.Format(@" @@ -493,7 +493,7 @@ OD data initialization of all groups { if (ODStorage.Count > 0) { - file.WriteLine($"{odname}_{group}_t {odname}_{group} = {{"); + file.WriteLine($"ATTRIMUTE_{group} {odname}_{group}_t {odname}_{group} = {{"); file.WriteLine($" {string.Join(",\n ", ODStorage[group])}"); file.WriteLine($"}};\n"); } @@ -521,7 +521,7 @@ typedef struct {{ /******************************************************************************* Object dictionary *******************************************************************************/ -static OD_entry_t {0}List[] = {{ +static ATTRIBUTE_OD OD_entry_t {0}List[] = {{ {1}, {{0x0000, 0x00, 0, NULL, NULL}} }}; From 16aa40a8c4771ce806dc4cf8d9ac6deeb804d2fe Mon Sep 17 00:00:00 2001 From: Carsten Frank Date: Fri, 21 May 2021 08:19:27 +0200 Subject: [PATCH 2/2] Spelling error --- libEDSsharp/CanOpenNodeExporter_V4.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libEDSsharp/CanOpenNodeExporter_V4.cs b/libEDSsharp/CanOpenNodeExporter_V4.cs index d073d09..ed1ad7e 100644 --- a/libEDSsharp/CanOpenNodeExporter_V4.cs +++ b/libEDSsharp/CanOpenNodeExporter_V4.cs @@ -493,7 +493,7 @@ OD data initialization of all groups { if (ODStorage.Count > 0) { - file.WriteLine($"ATTRIMUTE_{group} {odname}_{group}_t {odname}_{group} = {{"); + file.WriteLine($"ATTRIBUTE_{group} {odname}_{group}_t {odname}_{group} = {{"); file.WriteLine($" {string.Join(",\n ", ODStorage[group])}"); file.WriteLine($"}};\n"); }